Class: Io::Flow::V0::Models::FlowCurrencySettingUpserted
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#event_id ⇒ Object
readonly
Returns the value of attribute event_id.
-
#flow_currency_setting_id ⇒ Object
readonly
Returns the value of attribute flow_currency_setting_id.
-
#margin ⇒ Object
readonly
Returns the value of attribute margin.
-
#organization_id ⇒ Object
readonly
Returns the value of attribute organization_id.
-
#rate_lock_unit ⇒ Object
readonly
Returns the value of attribute rate_lock_unit.
-
#rate_lock_value ⇒ Object
readonly
Returns the value of attribute rate_lock_value.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ FlowCurrencySettingUpserted
constructor
A new instance of FlowCurrencySettingUpserted.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ FlowCurrencySettingUpserted
Returns a new instance of FlowCurrencySettingUpserted.
11071 11072 11073 11074 11075 11076 11077 11078 11079 11080 11081 11082 11083 11084 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11071 def initialize(incoming={}) super(:name => Event::Types::FLOW_CURRENCY_SETTING_UPSERTED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :flow_currency_setting_id, :organization_id, :base, :target, :margin, :rate_lock_unit, :rate_lock_value], 'FlowCurrencySettingUpserted') @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String) = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime) @flow_currency_setting_id = HttpClient::Preconditions.assert_class('flow_currency_setting_id', opts.delete(:flow_currency_setting_id), String) @organization_id = HttpClient::Preconditions.assert_class('organization_id', opts.delete(:organization_id), String) @base = HttpClient::Preconditions.assert_class('base', opts.delete(:base), String) @target = HttpClient::Preconditions.assert_class('target', opts.delete(:target), String) @margin = HttpClient::Preconditions.assert_class('margin', HttpClient::Helper.to_big_decimal(opts.delete(:margin)), BigDecimal) @rate_lock_unit = HttpClient::Preconditions.assert_class('rate_lock_unit', opts.delete(:rate_lock_unit), String) @rate_lock_value = HttpClient::Preconditions.assert_class('rate_lock_value', opts.delete(:rate_lock_value), Integer) end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
11069 11070 11071 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11069 def base @base end |
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
11069 11070 11071 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11069 def event_id @event_id end |
#flow_currency_setting_id ⇒ Object (readonly)
Returns the value of attribute flow_currency_setting_id.
11069 11070 11071 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11069 def flow_currency_setting_id @flow_currency_setting_id end |
#margin ⇒ Object (readonly)
Returns the value of attribute margin.
11069 11070 11071 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11069 def margin @margin end |
#organization_id ⇒ Object (readonly)
Returns the value of attribute organization_id.
11069 11070 11071 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11069 def organization_id @organization_id end |
#rate_lock_unit ⇒ Object (readonly)
Returns the value of attribute rate_lock_unit.
11069 11070 11071 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11069 def rate_lock_unit @rate_lock_unit end |
#rate_lock_value ⇒ Object (readonly)
Returns the value of attribute rate_lock_value.
11069 11070 11071 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11069 def rate_lock_value @rate_lock_value end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
11069 11070 11071 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11069 def target @target end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
11069 11070 11071 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11069 def end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
11090 11091 11092 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11090 def copy(incoming={}) FlowCurrencySettingUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
11094 11095 11096 11097 11098 11099 11100 11101 11102 11103 11104 11105 11106 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11094 def subtype_to_hash { :event_id => event_id, :timestamp => , :flow_currency_setting_id => flow_currency_setting_id, :organization_id => organization_id, :base => base, :target => target, :margin => margin, :rate_lock_unit => rate_lock_unit, :rate_lock_value => rate_lock_value } end |
#to_json ⇒ Object
11086 11087 11088 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11086 def to_json JSON.dump(to_hash) end |