Class: Taxamo::InputTransactionUpdate
- Defined in:
- lib/taxamo/models/inputtransactionupdate.rb
Instance Attribute Summary collapse
-
#additional_currencies ⇒ Object
Returns the value of attribute additional_currencies.
-
#billing_country_code ⇒ Object
Returns the value of attribute billing_country_code.
-
#buyer_credit_card_prefix ⇒ Object
Returns the value of attribute buyer_credit_card_prefix.
-
#buyer_email ⇒ Object
Returns the value of attribute buyer_email.
-
#buyer_ip ⇒ Object
Returns the value of attribute buyer_ip.
-
#buyer_name ⇒ Object
Returns the value of attribute buyer_name.
-
#buyer_tax_number ⇒ Object
Returns the value of attribute buyer_tax_number.
-
#comments ⇒ Object
Returns the value of attribute comments.
-
#control_flags ⇒ Object
Returns the value of attribute control_flags.
-
#currency_code ⇒ Object
Returns the value of attribute currency_code.
-
#custom_data ⇒ Object
Returns the value of attribute custom_data.
-
#custom_fields ⇒ Object
Returns the value of attribute custom_fields.
-
#custom_id ⇒ Object
Returns the value of attribute custom_id.
-
#customer_id ⇒ Object
Returns the value of attribute customer_id.
-
#description ⇒ Object
Returns the value of attribute description.
-
#evidence ⇒ Object
Returns the value of attribute evidence.
-
#force_country_code ⇒ Object
Returns the value of attribute force_country_code.
-
#invoice_address ⇒ Object
Returns the value of attribute invoice_address.
-
#invoice_date ⇒ Object
Returns the value of attribute invoice_date.
-
#invoice_number ⇒ Object
Returns the value of attribute invoice_number.
-
#invoice_place ⇒ Object
Returns the value of attribute invoice_place.
-
#note ⇒ Object
Returns the value of attribute note.
-
#order_date ⇒ Object
Returns the value of attribute order_date.
-
#order_date_type ⇒ Object
Returns the value of attribute order_date_type.
-
#original_transaction_key ⇒ Object
Returns the value of attribute original_transaction_key.
-
#status ⇒ Object
Returns the value of attribute status.
-
#sub_account_id ⇒ Object
Returns the value of attribute sub_account_id.
-
#supply_date ⇒ Object
Returns the value of attribute supply_date.
-
#tax_country_code ⇒ Object
Returns the value of attribute tax_country_code.
-
#tax_data ⇒ Object
Returns the value of attribute tax_data.
-
#tax_deducted ⇒ Object
Returns the value of attribute tax_deducted.
-
#transaction_lines ⇒ Object
Returns the value of attribute transaction_lines.
-
#verification_token ⇒ Object
Returns the value of attribute verification_token.
Class Method Summary collapse
-
.attribute_map ⇒ Object
:internal => :external.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ InputTransactionUpdate
constructor
A new instance of InputTransactionUpdate.
- #to_body ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ InputTransactionUpdate
Returns a new instance of InputTransactionUpdate.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 57 def initialize(attributes = {}) return if attributes.nil? or attributes.empty? # Morph attribute keys into undescored rubyish style if attributes.key?("order_date_type") @order_date_type = attributes["order_date_type"] end if attributes.key?("buyer_credit_card_prefix") @buyer_credit_card_prefix = attributes["buyer_credit_card_prefix"] end if attributes.key?("custom_data") @custom_data = attributes["custom_data"] end if attributes.key?("buyer_name") @buyer_name = attributes["buyer_name"] end if attributes.key?("invoice_date") @invoice_date = attributes["invoice_date"] end if attributes.key?("currency_code") @currency_code = attributes["currency_code"] end if attributes.key?("sub_account_id") @sub_account_id = attributes["sub_account_id"] end if attributes.key?("supply_date") @supply_date = attributes["supply_date"] end if attributes.key?("control_flags") if (value = attributes["control_flags"]).is_a?(Array) @control_flags = value.map{ |v| ControlFlags.new(v) } end end if attributes.key?("invoice_address") @invoice_address = InvoiceAddress.new(attributes["invoice_address"]) end if attributes.key?("verification_token") @verification_token = attributes["verification_token"] end if attributes.key?("note") @note = attributes["note"] end if attributes.key?("tax_data") @tax_data = TaxDataSchema.new(attributes["tax_data"]) end if attributes.key?("transaction_lines") if (value = attributes["transaction_lines"]).is_a?(Array) @transaction_lines = value.map{ |v| InputTransactionLine.new(v) } end end if attributes.key?("buyer_tax_number") @buyer_tax_number = attributes["buyer_tax_number"] end if attributes.key?("status") @status = attributes["status"] end if attributes.key?("custom_fields") if (value = attributes["custom_fields"]).is_a?(Array) @custom_fields = value.map{ |v| CustomFields.new(v) } end end if attributes.key?("force_country_code") @force_country_code = attributes["force_country_code"] end if attributes.key?("invoice_number") @invoice_number = attributes["invoice_number"] end if attributes.key?("order_date") @order_date = attributes["order_date"] end if attributes.key?("customer_id") @customer_id = attributes["customer_id"] end if attributes.key?("comments") @comments = attributes["comments"] end if attributes.key?("buyer_ip") @buyer_ip = attributes["buyer_ip"] end if attributes.key?("buyer_email") @buyer_email = attributes["buyer_email"] end if attributes.key?("original_transaction_key") @original_transaction_key = attributes["original_transaction_key"] end if attributes.key?("billing_country_code") @billing_country_code = attributes["billing_country_code"] end if attributes.key?("custom_id") @custom_id = attributes["custom_id"] end if attributes.key?("additional_currencies") @additional_currencies = AdditionalCurrencies.new(attributes["additional_currencies"]) end if attributes.key?("invoice_place") @invoice_place = attributes["invoice_place"] end if attributes.key?("evidence") @evidence = Evidence.new(attributes["evidence"]) end if attributes.key?("description") @description = attributes["description"] end if attributes.key?("tax_deducted") @tax_deducted = attributes["tax_deducted"] end if attributes.key?("tax_country_code") @tax_country_code = attributes["tax_country_code"] end end |
Instance Attribute Details
#additional_currencies ⇒ Object
Returns the value of attribute additional_currencies.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def additional_currencies @additional_currencies end |
#billing_country_code ⇒ Object
Returns the value of attribute billing_country_code.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def billing_country_code @billing_country_code end |
#buyer_credit_card_prefix ⇒ Object
Returns the value of attribute buyer_credit_card_prefix.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def buyer_credit_card_prefix @buyer_credit_card_prefix end |
#buyer_email ⇒ Object
Returns the value of attribute buyer_email.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def buyer_email @buyer_email end |
#buyer_ip ⇒ Object
Returns the value of attribute buyer_ip.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def buyer_ip @buyer_ip end |
#buyer_name ⇒ Object
Returns the value of attribute buyer_name.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def buyer_name @buyer_name end |
#buyer_tax_number ⇒ Object
Returns the value of attribute buyer_tax_number.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def buyer_tax_number @buyer_tax_number end |
#comments ⇒ Object
Returns the value of attribute comments.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def comments @comments end |
#control_flags ⇒ Object
Returns the value of attribute control_flags.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def control_flags @control_flags end |
#currency_code ⇒ Object
Returns the value of attribute currency_code.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def currency_code @currency_code end |
#custom_data ⇒ Object
Returns the value of attribute custom_data.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def custom_data @custom_data end |
#custom_fields ⇒ Object
Returns the value of attribute custom_fields.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def custom_fields @custom_fields end |
#custom_id ⇒ Object
Returns the value of attribute custom_id.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def custom_id @custom_id end |
#customer_id ⇒ Object
Returns the value of attribute customer_id.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def customer_id @customer_id end |
#description ⇒ Object
Returns the value of attribute description.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def description @description end |
#evidence ⇒ Object
Returns the value of attribute evidence.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def evidence @evidence end |
#force_country_code ⇒ Object
Returns the value of attribute force_country_code.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def force_country_code @force_country_code end |
#invoice_address ⇒ Object
Returns the value of attribute invoice_address.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def invoice_address @invoice_address end |
#invoice_date ⇒ Object
Returns the value of attribute invoice_date.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def invoice_date @invoice_date end |
#invoice_number ⇒ Object
Returns the value of attribute invoice_number.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def invoice_number @invoice_number end |
#invoice_place ⇒ Object
Returns the value of attribute invoice_place.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def invoice_place @invoice_place end |
#note ⇒ Object
Returns the value of attribute note.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def note @note end |
#order_date ⇒ Object
Returns the value of attribute order_date.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def order_date @order_date end |
#order_date_type ⇒ Object
Returns the value of attribute order_date_type.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def order_date_type @order_date_type end |
#original_transaction_key ⇒ Object
Returns the value of attribute original_transaction_key.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def original_transaction_key @original_transaction_key end |
#status ⇒ Object
Returns the value of attribute status.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def status @status end |
#sub_account_id ⇒ Object
Returns the value of attribute sub_account_id.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def sub_account_id @sub_account_id end |
#supply_date ⇒ Object
Returns the value of attribute supply_date.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def supply_date @supply_date end |
#tax_country_code ⇒ Object
Returns the value of attribute tax_country_code.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def tax_country_code @tax_country_code end |
#tax_data ⇒ Object
Returns the value of attribute tax_data.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def tax_data @tax_data end |
#tax_deducted ⇒ Object
Returns the value of attribute tax_deducted.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def tax_deducted @tax_deducted end |
#transaction_lines ⇒ Object
Returns the value of attribute transaction_lines.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def transaction_lines @transaction_lines end |
#verification_token ⇒ Object
Returns the value of attribute verification_token.
15 16 17 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 15 def verification_token @verification_token end |
Class Method Details
.attribute_map ⇒ Object
:internal => :external
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 18 def self.attribute_map { :order_date_type => :order_date_type, :buyer_credit_card_prefix => :buyer_credit_card_prefix, :custom_data => :custom_data, :buyer_name => :buyer_name, :invoice_date => :invoice_date, :currency_code => :currency_code, :sub_account_id => :sub_account_id, :supply_date => :supply_date, :control_flags => :control_flags, :invoice_address => :invoice_address, :verification_token => :verification_token, :note => :note, :tax_data => :tax_data, :transaction_lines => :transaction_lines, :buyer_tax_number => :buyer_tax_number, :status => :status, :custom_fields => :custom_fields, :force_country_code => :force_country_code, :invoice_number => :invoice_number, :order_date => :order_date, :customer_id => :customer_id, :comments => :comments, :buyer_ip => :buyer_ip, :buyer_email => :buyer_email, :original_transaction_key => :original_transaction_key, :billing_country_code => :billing_country_code, :custom_id => :custom_id, :additional_currencies => :additional_currencies, :invoice_place => :invoice_place, :evidence => :evidence, :description => :description, :tax_deducted => :tax_deducted, :tax_country_code => :tax_country_code } end |
Instance Method Details
#to_body ⇒ Object
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/taxamo/models/inputtransactionupdate.rb', line 199 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 |