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.
30629 30630 30631 30632 30633 30634 30635 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30629 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.
30627 30628 30629 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30627 def base @base end |
#margin ⇒ Object (readonly)
Returns the value of attribute margin.
30627 30628 30629 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30627 def margin @margin end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
30627 30628 30629 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30627 def target @target end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
30641 30642 30643 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30641 def copy(incoming={}) OrganizationCurrencySettingForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
30645 30646 30647 30648 30649 30650 30651 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30645 def to_hash { :base => base, :target => target, :margin => margin } end |
#to_json ⇒ Object
30637 30638 30639 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30637 def to_json JSON.dump(to_hash) end |