Class: Io::Flow::V0::Models::RemoteAreaRatecardFee
- Inherits:
-
RatecardFee
- Object
- RatecardFee
- Io::Flow::V0::Models::RemoteAreaRatecardFee
- 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 = {}) ⇒ RemoteAreaRatecardFee
constructor
A new instance of RemoteAreaRatecardFee.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from RatecardFee
Constructor Details
#initialize(incoming = {}) ⇒ RemoteAreaRatecardFee
Returns a new instance of RemoteAreaRatecardFee.
48239 48240 48241 48242 48243 48244 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48239 def initialize(incoming={}) super(:discriminator => RatecardFee::Types::REMOTE_AREA_RATECARD_FEE) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:amount], 'RemoteAreaRatecardFee') @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.
48237 48238 48239 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48237 def amount @amount end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
48250 48251 48252 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48250 def copy(incoming={}) RemoteAreaRatecardFee.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
48254 48255 48256 48257 48258 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48254 def subtype_to_hash { :amount => amount.to_hash } end |
#to_json ⇒ Object
48246 48247 48248 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48246 def to_json JSON.dump(to_hash) end |