Class: Io::Flow::V0::Models::AvalaraTaxCsvSetting
- Inherits:
-
TaxSetting
- Object
- TaxSetting
- Io::Flow::V0::Models::AvalaraTaxCsvSetting
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#email_recipients ⇒ Object
readonly
Returns the value of attribute email_recipients.
-
#schedule ⇒ Object
readonly
Returns the value of attribute schedule.
-
#timezone ⇒ Object
readonly
Returns the value of attribute timezone.
Attributes inherited from TaxSetting
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ AvalaraTaxCsvSetting
constructor
A new instance of AvalaraTaxCsvSetting.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from TaxSetting
Constructor Details
#initialize(incoming = {}) ⇒ AvalaraTaxCsvSetting
Returns a new instance of AvalaraTaxCsvSetting.
23513 23514 23515 23516 23517 23518 23519 23520 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23513 def initialize(incoming={}) super(:discriminator => TaxSetting::Types::AVALARA_TAX_CSV_SETTING) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:schedule, :timezone], 'AvalaraTaxCsvSetting') @schedule = (x = opts.delete(:schedule); x.is_a?(::Io::Flow::V0::Models::RepeatSchedule) ? x : ::Io::Flow::V0::Models::RepeatSchedule.from_json(x)) @timezone = HttpClient::Preconditions.assert_class('timezone', opts.delete(:timezone), String) @email_recipients = (x = opts.delete(:email_recipients); x.nil? ? nil : HttpClient::Preconditions.assert_class('email_recipients', x, Array).map { |v| HttpClient::Preconditions.assert_class('email_recipients', v, String) }) end |
Instance Attribute Details
#email_recipients ⇒ Object (readonly)
Returns the value of attribute email_recipients.
23511 23512 23513 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23511 def email_recipients @email_recipients end |
#schedule ⇒ Object (readonly)
Returns the value of attribute schedule.
23511 23512 23513 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23511 def schedule @schedule end |
#timezone ⇒ Object (readonly)
Returns the value of attribute timezone.
23511 23512 23513 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23511 def timezone @timezone end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
23526 23527 23528 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23526 def copy(incoming={}) AvalaraTaxCsvSetting.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
23530 23531 23532 23533 23534 23535 23536 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23530 def subtype_to_hash { :schedule => schedule.to_hash, :timezone => timezone, :email_recipients => email_recipients.nil? ? nil : email_recipients } end |
#to_json ⇒ Object
23522 23523 23524 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23522 def to_json JSON.dump(to_hash) end |