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.
1290 1291 1292 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 1290 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
1295 1296 1297 1298 1299 1300 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 1295 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 |