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.
53324 53325 53326 53327 53328 53329 53330 53331 |
# 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 |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
53322 53323 53324 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53322 def amount @amount end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
53322 53323 53324 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53322 def currency @currency end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
53322 53323 53324 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53322 def label @label end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
53337 53338 53339 |
# 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 ⇒ Object
53341 53342 53343 53344 53345 53346 53347 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53341 def subtype_to_hash { :amount => amount, :currency => currency, :label => label } end |
#to_json ⇒ Object
53333 53334 53335 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53333 def to_json JSON.dump(to_hash) end |