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.
29522 29523 29524 29525 29526 29527 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29522 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.
29520 29521 29522 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29520 def amount @amount end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
29533 29534 29535 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29533 def copy(incoming={}) EmergencySituationSurchargeRatecardFee.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
29537 29538 29539 29540 29541 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29537 def subtype_to_hash { :amount => amount.to_hash } end |
#to_json ⇒ Object
29529 29530 29531 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29529 def to_json JSON.dump(to_hash) end |