class Io::Flow::V0::Models::PriceBookForm
Represents a price book for a specific currency that can override any subset of item prices within an experience.
Attributes
currency[R]
includes[R]
name[R]
status[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 59918 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:currency, :name, :includes], 'PriceBookForm') @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::IncludedLevyKey) ? x : ::Io::Flow::V0::Models::IncludedLevyKey.apply(x)) @status = (x = (x = opts.delete(:status); x.nil? ? "draft" : x); 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 59931 def copy(incoming={}) PriceBookForm.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 59935 def to_hash { :currency => currency, :name => name, :includes => includes.value, :status => status.value } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 59927 def to_json JSON.dump(to_hash) end