Class: PrintfulAPI::Country
Instance Attribute Summary
Attributes inherited from APIResource
#raw_data
Class Method Summary
collapse
Instance Method Summary
collapse
included
Methods inherited from APIResource
api_attributes, belongs_to, camelize, has_many, #load_data, singularize, #to_h
Class Method Details
.list(filters = {}, opts = {}) ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/printful_api/country.rb', line 9
def self.list( filters={}, opts={} )
taxable = filters.delete(:taxable)
puts "Country.list taxable: #{taxable}, #{filters}, #{opts}"
if taxable
super( filters, opts.merge( resource_path: '/tax/countries' ) )
else
super( filters, opts )
end
end
|
.resource_path ⇒ Object
25
26
27
|
# File 'lib/printful_api/country.rb', line 25
def self.resource_path
'/countries'
end
|
Instance Method Details
#states ⇒ Object
21
22
23
|
# File 'lib/printful_api/country.rb', line 21
def states
@states
end
|