Class: Io::Flow::V0::Models::PriceBookItemExportOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ PriceBookItemExportOptions

Returns a new instance of PriceBookItemExportOptions.



55430
55431
55432
55433
55434
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55430

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_identifiersObject (readonly)

Returns the value of attribute available_identifiers.



55428
55429
55430
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55428

def available_identifiers
  @available_identifiers
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



55440
55441
55442
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55440

def copy(incoming={})
  PriceBookItemExportOptions.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



55444
55445
55446
55447
55448
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55444

def to_hash
  {
    :available_identifiers => available_identifiers.map { |o| o.value }
  }
end

#to_jsonObject



55436
55437
55438
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55436

def to_json
  JSON.dump(to_hash)
end