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.
49451 49452 49453 49454 49455 49456 49457 49458 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49451 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.
49449 49450 49451 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49449 def amount @amount end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
49449 49450 49451 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49449 def currency @currency end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
49449 49450 49451 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49449 def label @label end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
49464 49465 49466 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49464 def copy(incoming={}) OrderQuotePriceStandard.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
49468 49469 49470 49471 49472 49473 49474 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49468 def subtype_to_hash { :amount => amount, :currency => currency, :label => label } end |
#to_json ⇒ Object
49460 49461 49462 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49460 def to_json JSON.dump(to_hash) end |