Class: Io::Flow::V0::Models::DutiesTaxesPaidSurchargeServiceFee
- Inherits:
-
ServiceFee
- Object
- ServiceFee
- Io::Flow::V0::Models::DutiesTaxesPaidSurchargeServiceFee
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#ends_at ⇒ Object
readonly
Returns the value of attribute ends_at.
-
#starts_at ⇒ Object
readonly
Returns the value of attribute starts_at.
Attributes inherited from ServiceFee
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ DutiesTaxesPaidSurchargeServiceFee
constructor
A new instance of DutiesTaxesPaidSurchargeServiceFee.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from ServiceFee
Constructor Details
#initialize(incoming = {}) ⇒ DutiesTaxesPaidSurchargeServiceFee
Returns a new instance of DutiesTaxesPaidSurchargeServiceFee.
40355 40356 40357 40358 40359 40360 40361 40362 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40355 def initialize(incoming={}) super(:discriminator => ServiceFee::Types::DUTIES_TAXES_PAID_SURCHARGE_SERVICE_FEE) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:amount], 'DutiesTaxesPaidSurchargeServiceFee') @amount = (x = opts.delete(:amount); x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x)) @starts_at = (x = opts.delete(:starts_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('starts_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime)) @ends_at = (x = opts.delete(:ends_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('ends_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime)) end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
40353 40354 40355 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40353 def amount @amount end |
#ends_at ⇒ Object (readonly)
Returns the value of attribute ends_at.
40353 40354 40355 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40353 def ends_at @ends_at end |
#starts_at ⇒ Object (readonly)
Returns the value of attribute starts_at.
40353 40354 40355 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40353 def starts_at @starts_at end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
40368 40369 40370 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40368 def copy(incoming={}) DutiesTaxesPaidSurchargeServiceFee.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
40372 40373 40374 40375 40376 40377 40378 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40372 def subtype_to_hash { :amount => amount.to_hash, :starts_at => starts_at, :ends_at => ends_at } end |
#to_json ⇒ Object
40364 40365 40366 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40364 def to_json JSON.dump(to_hash) end |