Class: Tazworks::ClientProduct
- Defined in:
- lib/tazworks/client_product.rb
Overview
Tazworks Clients Model
Instance Attribute Summary
Attributes inherited from Model
#attributes, #attributes_loaded, #ids
Class Method Summary collapse
-
.all(clientGuid, params = {}) ⇒ Object
docs.developer.tazworks.com/#bc9ed960-33e3-4eed-9f25-7b052b0d4e6f tazapi defaults to params { page: 0, size: 30 }.
-
.get(ids) ⇒ Object
TODO: WARNING - this method is untested; maintainer does not a key that is authorized to use this endpoint.
Instance Method Summary collapse
Methods inherited from Model
#attributes_loaded?, #clientGuid, find, #initialize, initialize_from_response, #load_attributes, #loaded_attributes, #reload
Constructor Details
This class inherits a constructor from Tazworks::Model
Class Method Details
.all(clientGuid, params = {}) ⇒ Object
docs.developer.tazworks.com/#bc9ed960-33e3-4eed-9f25-7b052b0d4e6f tazapi defaults to params { page: 0, size: 30 }
8 9 10 11 |
# File 'lib/tazworks/client_product.rb', line 8 def self.all(clientGuid, params = {}) raw_response = RestClient.get("/v1/clients/#{clientGuid}/products", { params: }) ClientProductPagedResponse.new(raw_response, { clientGuid: }) end |
.get(ids) ⇒ Object
TODO: WARNING - this method is untested; maintainer does not a key that is authorized to use this endpoint
14 15 16 |
# File 'lib/tazworks/client_product.rb', line 14 def self.get(ids) RestClient.get("/v1/clients/#{ids[:clientGuid]}/products/#{ids[:clientProductGuid]}") end |
Instance Method Details
#clientProductGuid ⇒ Object
18 19 20 |
# File 'lib/tazworks/client_product.rb', line 18 def clientProductGuid @ids[:clientProductGuid] end |