class Io::Flow::V0::Models::PriceSourceCatalog

Attributes

price[R]

Public Class Methods

new(incoming={}) click to toggle source
Calls superclass method Io::Flow::V0::Models::PriceSource::new
# File lib/flow_commerce/flow_api_v0_client.rb, line 60496
def initialize(incoming={})
  super(:discriminator => PriceSource::Types::PRICE_SOURCE_CATALOG)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:price], 'PriceSourceCatalog')
  @price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x))
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 60507
def copy(incoming={})
  PriceSourceCatalog.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end
subtype_to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 60511
def subtype_to_hash
  {
    :price => price.to_hash
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 60503
def to_json
  JSON.dump(to_hash)
end