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.



53246
53247
53248
53249
53250
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53246

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.



53244
53245
53246
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53244

def placeholder
  @placeholder
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



53256
53257
53258
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53256

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

#subtype_to_hashObject



53260
53261
53262
53263
53264
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53260

def subtype_to_hash
  {
    :placeholder => placeholder
  }
end

#to_jsonObject



53252
53253
53254
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53252

def to_json
  JSON.dump(to_hash)
end