Class: Io::Flow::V0::Models::OrganizationDefaults
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrganizationDefaults
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#base_currency ⇒ Object
readonly
Returns the value of attribute base_currency.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#locale ⇒ Object
readonly
Returns the value of attribute locale.
-
#timezone ⇒ Object
readonly
Returns the value of attribute timezone.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrganizationDefaults
constructor
A new instance of OrganizationDefaults.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrganizationDefaults
Returns a new instance of OrganizationDefaults.
48879 48880 48881 48882 48883 48884 48885 48886 48887 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48879 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:country, :base_currency, :language, :locale, :timezone], 'OrganizationDefaults') @country = HttpClient::Preconditions.assert_class('country', opts.delete(:country), String) @base_currency = HttpClient::Preconditions.assert_class('base_currency', opts.delete(:base_currency), String) @language = HttpClient::Preconditions.assert_class('language', opts.delete(:language), String) @locale = HttpClient::Preconditions.assert_class('locale', opts.delete(:locale), String) @timezone = HttpClient::Preconditions.assert_class('timezone', opts.delete(:timezone), String) end |
Instance Attribute Details
#base_currency ⇒ Object (readonly)
Returns the value of attribute base_currency.
48877 48878 48879 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48877 def base_currency @base_currency end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
48877 48878 48879 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48877 def country @country end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
48877 48878 48879 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48877 def language @language end |
#locale ⇒ Object (readonly)
Returns the value of attribute locale.
48877 48878 48879 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48877 def locale @locale end |
#timezone ⇒ Object (readonly)
Returns the value of attribute timezone.
48877 48878 48879 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48877 def timezone @timezone end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
48893 48894 48895 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48893 def copy(incoming={}) OrganizationDefaults.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
48897 48898 48899 48900 48901 48902 48903 48904 48905 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48897 def to_hash { :country => country, :base_currency => base_currency, :language => language, :locale => locale, :timezone => timezone } end |
#to_json ⇒ Object
48889 48890 48891 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48889 def to_json JSON.dump(to_hash) end |