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.



47273
47274
47275
47276
47277
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47273

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.



47271
47272
47273
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47271

def placeholder
  @placeholder
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



47283
47284
47285
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47283

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

#subtype_to_hashObject



47287
47288
47289
47290
47291
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47287

def subtype_to_hash
  {
    :placeholder => placeholder
  }
end

#to_jsonObject



47279
47280
47281
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47279

def to_json
  JSON.dump(to_hash)
end