Class: Io::Flow::V0::Clients::PriceRules
- Inherits:
-
Object
- Object
- Io::Flow::V0::Clients::PriceRules
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Method Summary collapse
- #get(organization, code) ⇒ Object
-
#initialize(client) ⇒ PriceRules
constructor
A new instance of PriceRules.
Constructor Details
#initialize(client) ⇒ PriceRules
Returns a new instance of PriceRules.
7301 7302 7303 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7301 def initialize(client) @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client) end |
Instance Method Details
#get(organization, code) ⇒ Object
7305 7306 7307 7308 7309 7310 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7305 def get(organization, code) HttpClient::Preconditions.assert_class('organization', organization, String) HttpClient::Preconditions.assert_class('code', code, String) r = @client.request("/#{CGI.escape(organization)}/shopify/price/rules/discount/#{CGI.escape(code)}").get ::Io::Flow::Shopify::External::V0::Models::PriceRule.new(r) end |