Class: LemonSqueezy::Store
- Inherits:
-
Object
- Object
- OpenStruct
- Object
- LemonSqueezy::Store
show all
- Defined in:
- lib/lemon_squeezy/models/store.rb
Class Method Summary
collapse
Methods inherited from Object
#initialize, #to_ostruct
Class Method Details
.list(**params) ⇒ Object
6
7
8
9
|
# File 'lib/lemon_squeezy/models/store.rb', line 6
def list(**params)
response = Client.get_request("stores", params: Client.build_list_request_params(params))
Collection.from_response(response, type: Store)
end
|
.retrieve(id:) ⇒ Object
11
12
13
14
|
# File 'lib/lemon_squeezy/models/store.rb', line 11
def retrieve(id:)
response = Client.get_request("stores/#{id}")
Store.new(response.body["data"]) if response.success?
end
|