Class: Io::Flow::V0::Models::AvalaraTaxSetting
- Inherits:
-
TaxSetting
- Object
- TaxSetting
- Io::Flow::V0::Models::AvalaraTaxSetting
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#base_currency ⇒ Object
readonly
Returns the value of attribute base_currency.
-
#company_code ⇒ Object
readonly
Returns the value of attribute company_code.
Attributes inherited from TaxSetting
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ AvalaraTaxSetting
constructor
A new instance of AvalaraTaxSetting.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from TaxSetting
Constructor Details
#initialize(incoming = {}) ⇒ AvalaraTaxSetting
Returns a new instance of AvalaraTaxSetting.
23000 23001 23002 23003 23004 23005 23006 23007 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23000 def initialize(incoming={}) super(:discriminator => TaxSetting::Types::AVALARA_TAX_SETTING) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:company_code, :base_currency], 'AvalaraTaxSetting') @company_code = HttpClient::Preconditions.assert_class('company_code', opts.delete(:company_code), String) @base_currency = HttpClient::Preconditions.assert_class('base_currency', opts.delete(:base_currency), String) @api_key = (x = opts.delete(:api_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('api_key', x, String)) end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
22998 22999 23000 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22998 def api_key @api_key end |
#base_currency ⇒ Object (readonly)
Returns the value of attribute base_currency.
22998 22999 23000 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22998 def base_currency @base_currency end |
#company_code ⇒ Object (readonly)
Returns the value of attribute company_code.
22998 22999 23000 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22998 def company_code @company_code end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
23013 23014 23015 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23013 def copy(incoming={}) AvalaraTaxSetting.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
23017 23018 23019 23020 23021 23022 23023 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23017 def subtype_to_hash { :company_code => company_code, :base_currency => base_currency, :api_key => api_key } end |
#to_json ⇒ Object
23009 23010 23011 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23009 def to_json JSON.dump(to_hash) end |