Class: Io::Flow::V0::Clients::Catalogs
- Inherits:
-
Object
- Object
- Io::Flow::V0::Clients::Catalogs
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Method Summary collapse
-
#get_catalog(organization) ⇒ Object
Returns information about a specific catalog.
-
#get_catalog_and_statistics(organization) ⇒ Object
Get statistics for this organization’s catalog.
-
#initialize(client) ⇒ Catalogs
constructor
A new instance of Catalogs.
Constructor Details
#initialize(client) ⇒ Catalogs
Returns a new instance of Catalogs.
412 413 414 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 412 def initialize(client) @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client) end |
Instance Method Details
#get_catalog(organization) ⇒ Object
Returns information about a specific catalog.
417 418 419 420 421 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 417 def get_catalog(organization) HttpClient::Preconditions.assert_class('organization', organization, String) r = @client.request("/#{CGI.escape(organization)}/catalog").get ::Io::Flow::V0::Models::Catalog.new(r) end |
#get_catalog_and_statistics(organization) ⇒ Object
Get statistics for this organization’s catalog.
424 425 426 427 428 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 424 def get_catalog_and_statistics(organization) HttpClient::Preconditions.assert_class('organization', organization, String) r = @client.request("/#{CGI.escape(organization)}/catalog/statistics").get ::Io::Flow::V0::Models::CatalogStatistics.new(r) end |