class Io::Flow::V0::Models::SubcatalogStatistics

Statistics related to the items in this subcatalog, including item count, number of distinct categories, etc.

Attributes

catalog[R]
excluded[R]
included[R]
queue[R]
restricted[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 69220
def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:excluded, :included, :restricted, :queue, :catalog], 'SubcatalogStatistics')
  @excluded = (x = opts.delete(:excluded); x.is_a?(::Io::Flow::V0::Models::ItemStatistics) ? x : ::Io::Flow::V0::Models::ItemStatistics.new(x))
  @included = (x = opts.delete(:included); x.is_a?(::Io::Flow::V0::Models::ItemStatistics) ? x : ::Io::Flow::V0::Models::ItemStatistics.new(x))
  @restricted = (x = opts.delete(:restricted); x.is_a?(::Io::Flow::V0::Models::ItemStatistics) ? x : ::Io::Flow::V0::Models::ItemStatistics.new(x))
  @queue = (x = opts.delete(:queue); x.is_a?(::Io::Flow::V0::Models::ItemStatistics) ? x : ::Io::Flow::V0::Models::ItemStatistics.new(x))
  @catalog = (x = opts.delete(:catalog); x.is_a?(::Io::Flow::V0::Models::CatalogStatistics) ? x : ::Io::Flow::V0::Models::CatalogStatistics.new(x))
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 69234
def copy(incoming={})
  SubcatalogStatistics.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end
to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 69238
def to_hash
  {
    :excluded => excluded.to_hash,
    :included => included.to_hash,
    :restricted => restricted.to_hash,
    :queue => queue.to_hash,
    :catalog => catalog.to_hash
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 69230
def to_json
  JSON.dump(to_hash)
end