Class: PlentyClient::Order::Currency
- Inherits:
-
Object
- Object
- PlentyClient::Order::Currency
show all
- Extended by:
- Endpoint, Request
- Defined in:
- lib/plenty_client/order/currency.rb
Constant Summary
collapse
- LIST_CURRENCIES =
'/orders/currencies'.freeze
- FIND_CURRENCY_ISO =
'/orders/currencies/{currencyIso}'.freeze
- FIND_COUNTRIES_FOR_CURRENCY =
'/orders/currencies/{currencyIso}/countries'.freeze
- FIND_CURRENCY_FOR_COUNTRY =
'/orders/currencies/countries/{countryId}'.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
.find(currency_iso, headers = {}, &block) ⇒ Object
17
18
19
|
# File 'lib/plenty_client/order/currency.rb', line 17
def find(currency_iso, = {}, &block)
get(build_endpoint(FIND_CURRENCY_ISO, currency: currency_iso), , &block)
end
|
.find_countries(currency_iso, headers = {}, &block) ⇒ Object
21
22
23
|
# File 'lib/plenty_client/order/currency.rb', line 21
def find_countries(currency_iso, = {}, &block)
get(build_endpoint(FIND_COUNTRIES_FOR_CURRENCY, currency: currency_iso), , &block)
end
|
.find_currency(country_id, headers = {}, &block) ⇒ Object
25
26
27
|
# File 'lib/plenty_client/order/currency.rb', line 25
def find_currency(country_id, = {}, &block)
get(build_endpoint(FIND_CURRENCY_FOR_COUNTRY, country: country_id), , &block)
end
|
.list(headers = {}, &block) ⇒ Object
13
14
15
|
# File 'lib/plenty_client/order/currency.rb', line 13
def list( = {}, &block)
get(build_endpoint(LIST_CURRENCIES), , &block)
end
|