Class: Io::Flow::V0::Models::PriceBookItemExportOptions
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PriceBookItemExportOptions
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#available_identifiers ⇒ Object
readonly
Returns the value of attribute available_identifiers.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PriceBookItemExportOptions
constructor
A new instance of PriceBookItemExportOptions.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PriceBookItemExportOptions
Returns a new instance of PriceBookItemExportOptions.
60022 60023 60024 60025 60026 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 60022 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:available_identifiers], 'PriceBookItemExportOptions') @available_identifiers = HttpClient::Preconditions.assert_class('available_identifiers', opts.delete(:available_identifiers), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ItemIdentifier) ? x : ::Io::Flow::V0::Models::ItemIdentifier.apply(x)) } end |
Instance Attribute Details
#available_identifiers ⇒ Object (readonly)
Returns the value of attribute available_identifiers.
60020 60021 60022 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 60020 def available_identifiers @available_identifiers end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
60032 60033 60034 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 60032 def copy(incoming={}) PriceBookItemExportOptions.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
60036 60037 60038 60039 60040 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 60036 def to_hash { :available_identifiers => available_identifiers.map { |o| o.value } } end |
#to_json ⇒ Object
60028 60029 60030 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 60028 def to_json JSON.dump(to_hash) end |