Class: BigCommerce::ManagementAPI::Customers::Attributes

Inherits:
Endpoint
  • Object
show all
Defined in:
lib/big_commerce/management_api/customers.rb

Constant Summary collapse

PATH =
"customers/attributes"
RESULT_INSTANCE =
Attribute

Constants inherited from Endpoint

Endpoint::CONTENT_TYPE, Endpoint::CONTENT_TYPE_JSON, Endpoint::HOST, Endpoint::JSON_CONTENT_TYPES, Endpoint::PORT, Endpoint::RESULT_KEY, Endpoint::USER_AGENT

Instance Method Summary collapse

Methods inherited from Endpoint

#initialize

Constructor Details

This class inherits a constructor from BigCommerce::ManagementAPI::Endpoint

Instance Method Details

#create(*attributes) ⇒ Object



49
50
51
52
53
# File 'lib/big_commerce/management_api/customers.rb', line 49

def create(*attributes)
  attributes.flatten!

  POST(PATH, attributes.map(&:to_h))
end

#delete(*ids) ⇒ Object



55
56
57
58
59
60
61
62
# File 'lib/big_commerce/management_api/customers.rb', line 55

def delete(*ids)
  ids.flatten!

  DELETE(
    PATH,
    with_in_param({:id => ids}, :id)
  )
end

#get(options = {}) ⇒ Object



45
46
47
# File 'lib/big_commerce/management_api/customers.rb', line 45

def get(options = {})
  GET(PATH, options)
end