class Io::Flow::V0::Models::PriceBook
Represents a list of target prices in a specific currency that can override any subset of item prices within an experience.
Attributes
currency[R]
id[R]
includes[R]
key[R]
name[R]
status[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 59847 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :key, :currency, :name, :includes, :status], 'PriceBook') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String) @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String) @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String) @includes = (x = opts.delete(:includes); x.is_a?(::Io::Flow::V0::Models::IncludedLevies) ? x : ::Io::Flow::V0::Models::IncludedLevies.new(x)) @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::PriceBookStatus) ? x : ::Io::Flow::V0::Models::PriceBookStatus.apply(x)) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 59862 def copy(incoming={}) PriceBook.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 59866 def to_hash { :id => id, :key => key, :currency => currency, :name => name, :includes => includes.to_hash, :status => status.value } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 59858 def to_json JSON.dump(to_hash) end