Class: Io::Flow::V0::Models::EmergencySituationSurchargeRatecardFee
- Inherits:
-
RatecardFee
- Object
- RatecardFee
- Io::Flow::V0::Models::EmergencySituationSurchargeRatecardFee
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
Attributes inherited from RatecardFee
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ EmergencySituationSurchargeRatecardFee
constructor
A new instance of EmergencySituationSurchargeRatecardFee.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from RatecardFee
Constructor Details
#initialize(incoming = {}) ⇒ EmergencySituationSurchargeRatecardFee
Returns a new instance of EmergencySituationSurchargeRatecardFee.
30629 30630 30631 30632 30633 30634 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30629 def initialize(incoming={}) super(:discriminator => RatecardFee::Types::EMERGENCY_SITUATION_SURCHARGE_RATECARD_FEE) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:amount], 'EmergencySituationSurchargeRatecardFee') @amount = (x = opts.delete(:amount); x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x)) end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
30627 30628 30629 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30627 def amount @amount end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
30640 30641 30642 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30640 def copy(incoming={}) EmergencySituationSurchargeRatecardFee.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
30644 30645 30646 30647 30648 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30644 def subtype_to_hash { :amount => amount.to_hash } end |
#to_json ⇒ Object
30636 30637 30638 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30636 def to_json JSON.dump(to_hash) end |