Class: Io::Flow::V0::Models::OrderQuotePriceStandard
- Inherits:
-
OrderQuotePrice
- Object
- OrderQuotePrice
- Io::Flow::V0::Models::OrderQuotePriceStandard
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
Attributes inherited from OrderQuotePrice
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderQuotePriceStandard
constructor
A new instance of OrderQuotePriceStandard.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from OrderQuotePrice
Constructor Details
#initialize(incoming = {}) ⇒ OrderQuotePriceStandard
Returns a new instance of OrderQuotePriceStandard.
47351 47352 47353 47354 47355 47356 47357 47358 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47351 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 |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
47349 47350 47351 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47349 def amount @amount end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
47349 47350 47351 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47349 def currency @currency end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
47349 47350 47351 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47349 def label @label end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
47364 47365 47366 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47364 def copy(incoming={}) OrderQuotePriceStandard.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
47368 47369 47370 47371 47372 47373 47374 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47368 def subtype_to_hash { :amount => amount, :currency => currency, :label => label } end |
#to_json ⇒ Object
47360 47361 47362 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47360 def to_json JSON.dump(to_hash) end |