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.
41054 41055 41056 41057 41058 41059 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41054 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.
41052 41053 41054 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41052 def amount @amount end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
41065 41066 41067 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41065 def copy(incoming={}) EmergencySituationSurchargeRatecardFee.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
41069 41070 41071 41072 41073 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41069 def subtype_to_hash { :amount => amount.to_hash } end |
#to_json ⇒ Object
41061 41062 41063 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41061 def to_json JSON.dump(to_hash) end |