Class: PlentyClient::SalesPrice::Account
- Inherits:
-
Object
- Object
- PlentyClient::SalesPrice::Account
show all
- Extended by:
- Endpoint, Request
- Defined in:
- lib/plenty_client/sales_price/account.rb
Constant Summary
collapse
- LIST_REFERRER_ACCOUNTS =
'/items/sales_prices/{salesPriceId}/accounts'.freeze
- ACTIVATE_REFERRER_ACCOUNT =
'/items/sales_prices/{salesPriceId}/accounts'.freeze
- DEACTIVATE_REFERRER_ACCOUNT =
'/items/sales_prices/{salesPriceId}/accounts/{accountType}/{accountId}'.freeze
Class Method Summary
collapse
Methods included from Endpoint
build_endpoint, routes
Methods included from Request
delete, get, patch, post, put, request
Class Method Details
.activate(sales_price_id, headers = {}) ⇒ Object
17
18
19
|
# File 'lib/plenty_client/sales_price/account.rb', line 17
def activate(sales_price_id, = {})
post(build_endpoint(ACTIVATE_REFERRER_ACCOUNT, sales_price: sales_price_id), )
end
|
.deactivate(sales_price_id, account_type_id, account_id) ⇒ Object
21
22
23
24
25
26
|
# File 'lib/plenty_client/sales_price/account.rb', line 21
def deactivate(sales_price_id, account_type_id, account_id)
delete(build_endpoint(DEACTIVATE_REFERRER_ACCOUNT,
sales_price: sales_price_id,
account_type: account_type_id,
account: account_id))
end
|
.list(sales_price_id, headers = {}, &block) ⇒ Object
13
14
15
|
# File 'lib/plenty_client/sales_price/account.rb', line 13
def list(sales_price_id, = {}, &block)
get(build_endpoint(LIST_REFERRER_ACCOUNTS, sales_price: sales_price_id), , &block)
end
|