Class: Io::Flow::V0::Models::OrganizationCurrencySettingUpserted
- 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.
-
#margin ⇒ Object
readonly
Returns the value of attribute margin.
-
#organization_currency_setting_id ⇒ Object
readonly
Returns the value of attribute organization_currency_setting_id.
-
#organization_id ⇒ Object
readonly
Returns the value of attribute organization_id.
-
#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 = {}) ⇒ OrganizationCurrencySettingUpserted
constructor
A new instance of OrganizationCurrencySettingUpserted.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ OrganizationCurrencySettingUpserted
Returns a new instance of OrganizationCurrencySettingUpserted.
13994 13995 13996 13997 13998 13999 14000 14001 14002 14003 14004 14005 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13994 def initialize(incoming={}) super(:name => Event::Types::ORGANIZATION_CURRENCY_SETTING_UPSERTED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization_currency_setting_id, :organization_id, :base, :target, :margin], 'OrganizationCurrencySettingUpserted') @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) @organization_currency_setting_id = HttpClient::Preconditions.assert_class('organization_currency_setting_id', opts.delete(:organization_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) end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
13992 13993 13994 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13992 def base @base end |
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
13992 13993 13994 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13992 def event_id @event_id end |
#margin ⇒ Object (readonly)
Returns the value of attribute margin.
13992 13993 13994 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13992 def margin @margin end |
#organization_currency_setting_id ⇒ Object (readonly)
Returns the value of attribute organization_currency_setting_id.
13992 13993 13994 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13992 def organization_currency_setting_id @organization_currency_setting_id end |
#organization_id ⇒ Object (readonly)
Returns the value of attribute organization_id.
13992 13993 13994 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13992 def organization_id @organization_id end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
13992 13993 13994 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13992 def target @target end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
13992 13993 13994 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13992 def end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
14011 14012 14013 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14011 def copy(incoming={}) OrganizationCurrencySettingUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
14015 14016 14017 14018 14019 14020 14021 14022 14023 14024 14025 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14015 def subtype_to_hash { :event_id => event_id, :timestamp => , :organization_currency_setting_id => organization_currency_setting_id, :organization_id => organization_id, :base => base, :target => target, :margin => margin } end |
#to_json ⇒ Object
14007 14008 14009 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14007 def to_json JSON.dump(to_hash) end |