Class: Io::Flow::V0::Models::OrganizationCurrencySettingForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrganizationCurrencySettingForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Represents the parts of an organization setting that can be updated.
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#margin ⇒ Object
readonly
Returns the value of attribute margin.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrganizationCurrencySettingForm
constructor
A new instance of OrganizationCurrencySettingForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrganizationCurrencySettingForm
Returns a new instance of OrganizationCurrencySettingForm.
31007 31008 31009 31010 31011 31012 31013 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31007 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:base, :target, :margin], 'OrganizationCurrencySettingForm') @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.
31005 31006 31007 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31005 def base @base end |
#margin ⇒ Object (readonly)
Returns the value of attribute margin.
31005 31006 31007 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31005 def margin @margin end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
31005 31006 31007 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31005 def target @target end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
31019 31020 31021 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31019 def copy(incoming={}) OrganizationCurrencySettingForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
31023 31024 31025 31026 31027 31028 31029 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31023 def to_hash { :base => base, :target => target, :margin => margin } end |
#to_json ⇒ Object
31015 31016 31017 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31015 def to_json JSON.dump(to_hash) end |