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.
2646 2647 2648 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 2646 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
2651 2652 2653 2654 2655 2656 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 2651 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 |