Class: Io::Flow::V0::Models::OrderQuotePriceFree

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

Instance Attribute Summary collapse

Attributes inherited from OrderQuotePrice

#discriminator

Instance Method Summary collapse

Methods inherited from OrderQuotePrice

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ OrderQuotePriceFree

Returns a new instance of OrderQuotePriceFree.



49373
49374
49375
49376
49377
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49373

def initialize(incoming={})
  super(:discriminator => OrderQuotePrice::Types::ORDER_QUOTE_PRICE_FREE)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @placeholder = (x = opts.delete(:placeholder); x.nil? ? nil : HttpClient::Preconditions.assert_class('placeholder', x, String))
end

Instance Attribute Details

#placeholderObject (readonly)

Returns the value of attribute placeholder.



49371
49372
49373
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49371

def placeholder
  @placeholder
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



49383
49384
49385
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49383

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

#subtype_to_hashObject



49387
49388
49389
49390
49391
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49387

def subtype_to_hash
  {
    :placeholder => placeholder
  }
end

#to_jsonObject



49379
49380
49381
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49379

def to_json
  JSON.dump(to_hash)
end