class Taxamo::ValidateTaxNumberOut
Attributes
billing_country_code[RW]
buyer_tax_number[RW]
buyer_tax_number_format_valid[RW]
buyer_tax_number_normalized[RW]
buyer_tax_number_valid[RW]
tax_deducted[RW]
Public Class Methods
attribute_map()
click to toggle source
:internal => :external
# File lib/taxamo/models/validatetaxnumberout.rb, line 18 def self.attribute_map { :tax_deducted => :tax_deducted, :buyer_tax_number => :buyer_tax_number, :buyer_tax_number_normalized => :buyer_tax_number_normalized, :buyer_tax_number_valid => :buyer_tax_number_valid, :buyer_tax_number_format_valid => :buyer_tax_number_format_valid, :billing_country_code => :billing_country_code } end
new(attributes = {})
click to toggle source
# File lib/taxamo/models/validatetaxnumberout.rb, line 30 def initialize(attributes = {}) return if attributes.nil? or attributes.empty? # Morph attribute keys into undescored rubyish style if attributes.key?("tax_deducted") @tax_deducted = attributes["tax_deducted"] end if attributes.key?("buyer_tax_number") @buyer_tax_number = attributes["buyer_tax_number"] end if attributes.key?("buyer_tax_number_normalized") @buyer_tax_number_normalized = attributes["buyer_tax_number_normalized"] end if attributes.key?("buyer_tax_number_valid") @buyer_tax_number_valid = attributes["buyer_tax_number_valid"] end if attributes.key?("buyer_tax_number_format_valid") @buyer_tax_number_format_valid = attributes["buyer_tax_number_format_valid"] end if attributes.key?("billing_country_code") @billing_country_code = attributes["billing_country_code"] end end
Public Instance Methods
to_body()
click to toggle source
# File lib/taxamo/models/validatetaxnumberout.rb, line 61 def to_body body = {} self.class.attribute_map.each_pair do |key, value| v = self.send(key) unless v.nil? if v.is_a?(Array) array = Array.new v.each do |item| if item.respond_to?("to_body".to_sym) array.push item.to_body else array.push item end end body[value] = array else if v.respond_to?("to_body".to_sym) body[value] = v.to_body else body[value] = v end end end end body end