Class: Io::Flow::V0::Clients::OrderPromotions
- Inherits:
-
Object
- Object
- Io::Flow::V0::Clients::OrderPromotions
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Method Summary collapse
-
#delete_by_key(organization, key) ⇒ Object
Deletes the order promotion with the specified key.
-
#initialize(client) ⇒ OrderPromotions
constructor
A new instance of OrderPromotions.
Constructor Details
#initialize(client) ⇒ OrderPromotions
Returns a new instance of OrderPromotions.
2451 2452 2453 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 2451 def initialize(client) @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client) end |
Instance Method Details
#delete_by_key(organization, key) ⇒ Object
Deletes the order promotion with the specified key
2456 2457 2458 2459 2460 2461 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 2456 def delete_by_key(organization, key) HttpClient::Preconditions.assert_class('organization', organization, String) HttpClient::Preconditions.assert_class('key', key, String) r = @client.request("/#{CGI.escape(organization)}/order/promotions/#{CGI.escape(key)}").delete nil end |