Class: PrintfulAPI::TaxRate
- Inherits:
-
APIResource
- Object
- APIResource
- PrintfulAPI::TaxRate
- Defined in:
- lib/printful_api/tax_rate.rb
Instance Attribute Summary
Attributes inherited from APIResource
Class Method Summary collapse
-
.get(recipient = {}, opts = {}) ⇒ Object
PrintfulAPI::TaxRate.get( country_code: ‘US’, state_code: ‘CA’, city: ‘San Diego’, zip: 92130 ).
Methods inherited from APIResource
api_attributes, belongs_to, camelize, has_many, #load_data, singularize, #to_h
Class Method Details
.get(recipient = {}, opts = {}) ⇒ Object
PrintfulAPI::TaxRate.get( country_code: ‘US’, state_code: ‘CA’, city: ‘San Diego’, zip: 92130 )
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/printful_api/tax_rate.rb', line 8 def self.get( recipient = {}, opts = {} ) data = PrintfulAPI.request( :POST, "/tax/rates", data: { recipient: recipient }, params: opts ) model = self.new model.load_data( data ) model end |