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.
30723 30724 30725 30726 30727 30728 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30723 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.
30721 30722 30723 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30721 def amount @amount end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
30734 30735 30736 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30734 def copy(incoming={}) EmergencySituationSurchargeRatecardFee.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
30738 30739 30740 30741 30742 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30738 def subtype_to_hash { :amount => amount.to_hash } end |
#to_json ⇒ Object
30730 30731 30732 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30730 def to_json JSON.dump(to_hash) end |