class Io::Flow::V0::Models::AvalaraTaxCsvSetting

Attributes

reports[R]

Public Class Methods

new(incoming={}) click to toggle source
Calls superclass method Io::Flow::V0::Models::TaxSetting::new
# File lib/flow_commerce/flow_api_v0_client.rb, line 31770
def initialize(incoming={})
  super(:discriminator => TaxSetting::Types::AVALARA_TAX_CSV_SETTING)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @reports = (x = opts.delete(:reports); x.nil? ? nil : HttpClient::Preconditions.assert_class('reports', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::TaxReport) ? x : ::Io::Flow::V0::Models::TaxReport.new(x)) })
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 31780
def copy(incoming={})
  AvalaraTaxCsvSetting.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end
subtype_to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 31784
def subtype_to_hash
  {
    :reports => reports.nil? ? nil : reports.map { |o| o.to_hash }
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 31776
def to_json
  JSON.dump(to_hash)
end