Class: Printful::StoresResource
Instance Attribute Summary
Attributes inherited from Resource
#client
Instance Method Summary
collapse
Methods inherited from Resource
#initialize
Instance Method Details
4
5
6
7
8
|
# File 'lib/printful/resources/stores.rb', line 4
def list
response = get_request("stores")
body = response.body["result"]
Collection.from_response(body: body, type: Store)
end
|
#retrieve(id:) ⇒ Object
10
11
12
13
|
# File 'lib/printful/resources/stores.rb', line 10
def retrieve(id:)
response = get_request("stores/#{id}")
Store.new(response.body["result"])
end
|