class Io::Flow::V0::Models::OrderQuotePriceStandard

Attributes

amount[R]
currency[R]
label[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 53324
def initialize(incoming={})
  super(:discriminator => OrderQuotePrice::Types::ORDER_QUOTE_PRICE_STANDARD)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:amount, :currency, :label], 'OrderQuotePriceStandard')
  @amount = HttpClient::Preconditions.assert_class('amount', opts.delete(:amount), Numeric)
  @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
  @label = HttpClient::Preconditions.assert_class('label', opts.delete(:label), String)
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 53337
def copy(incoming={})
  OrderQuotePriceStandard.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end
subtype_to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 53341
def subtype_to_hash
  {
    :amount => amount,
    :currency => currency,
    :label => label
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 53333
def to_json
  JSON.dump(to_hash)
end