Class: Io::Flow::V0::Models::OrderQuotePriceEstimated
- Inherits:
-
OrderQuotePrice
- Object
- OrderQuotePrice
- Io::Flow::V0::Models::OrderQuotePriceEstimated
- 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 = {}) ⇒ OrderQuotePriceEstimated
constructor
A new instance of OrderQuotePriceEstimated.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from OrderQuotePrice
Constructor Details
#initialize(incoming = {}) ⇒ OrderQuotePriceEstimated
Returns a new instance of OrderQuotePriceEstimated.
53215 53216 53217 53218 53219 53220 53221 53222 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53215 def initialize(incoming={}) super(:discriminator => OrderQuotePrice::Types::ORDER_QUOTE_PRICE_ESTIMATED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:amount, :currency, :label], 'OrderQuotePriceEstimated') @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.
53213 53214 53215 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53213 def amount @amount end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
53213 53214 53215 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53213 def currency @currency end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
53213 53214 53215 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53213 def label @label end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
53228 53229 53230 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53228 def copy(incoming={}) OrderQuotePriceEstimated.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
53232 53233 53234 53235 53236 53237 53238 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53232 def subtype_to_hash { :amount => amount, :currency => currency, :label => label } end |
#to_json ⇒ Object
53224 53225 53226 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53224 def to_json JSON.dump(to_hash) end |