taxamo-ns 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -2
- data/lib/taxamo/models/additionalcurrencies.rb +2 -2
- data/lib/taxamo/models/additionalcurrency.rb +7 -7
- data/lib/taxamo/models/bycountry.rb +5 -5
- data/lib/taxamo/models/bystatus.rb +3 -3
- data/lib/taxamo/models/bytaxationtype.rb +6 -6
- data/lib/taxamo/models/c.rb +5 -5
- data/lib/taxamo/models/calculatesimpletaxout.rb +4 -4
- data/lib/taxamo/models/calculatetaxin.rb +2 -2
- data/lib/taxamo/models/calculatetaxlocationout.rb +9 -9
- data/lib/taxamo/models/calculatetaxout.rb +4 -4
- data/lib/taxamo/models/canceltransactionout.rb +2 -2
- data/lib/taxamo/models/capturepaymentout.rb +2 -2
- data/lib/taxamo/models/confirmtransactionin.rb +2 -2
- data/lib/taxamo/models/confirmtransactionout.rb +4 -4
- data/lib/taxamo/models/countries.rb +12 -12
- data/lib/taxamo/models/country.rb +13 -13
- data/lib/taxamo/models/countryschema.rb +13 -13
- data/lib/taxamo/models/createpaymentin.rb +4 -4
- data/lib/taxamo/models/createpaymentout.rb +2 -2
- data/lib/taxamo/models/createrefundin.rb +6 -6
- data/lib/taxamo/models/createrefundout.rb +5 -5
- data/lib/taxamo/models/createsmstokenin.rb +3 -3
- data/lib/taxamo/models/createsmstokenout.rb +2 -2
- data/lib/taxamo/models/createtransactionin.rb +3 -3
- data/lib/taxamo/models/createtransactionout.rb +4 -4
- data/lib/taxamo/models/currencyschema.rb +6 -6
- data/lib/taxamo/models/customfields.rb +3 -3
- data/lib/taxamo/models/emailinvoicein.rb +2 -2
- data/lib/taxamo/models/emailinvoiceout.rb +2 -2
- data/lib/taxamo/models/emailrefundin.rb +2 -2
- data/lib/taxamo/models/emailrefundout.rb +2 -2
- data/lib/taxamo/models/evidence.rb +12 -12
- data/lib/taxamo/models/evidenceschema.rb +5 -5
- data/lib/taxamo/models/getcountriesdictout.rb +2 -2
- data/lib/taxamo/models/getcurrenciesdictout.rb +2 -2
- data/lib/taxamo/models/getdailysettlementstatsout.rb +2 -2
- data/lib/taxamo/models/getdetailedrefundsout.rb +2 -2
- data/lib/taxamo/models/getdomesticsummaryreportout.rb +14 -14
- data/lib/taxamo/models/geteuviesreportout.rb +5 -5
- data/lib/taxamo/models/getproducttypesdictout.rb +2 -2
- data/lib/taxamo/models/getrefundsout.rb +2 -2
- data/lib/taxamo/models/getsettlementout.rb +6 -6
- data/lib/taxamo/models/getsettlementstatsbycountryout.rb +2 -2
- data/lib/taxamo/models/getsettlementstatsbytaxationtypeout.rb +2 -2
- data/lib/taxamo/models/getsettlementsummaryout.rb +2 -2
- data/lib/taxamo/models/gettransactionout.rb +4 -4
- data/lib/taxamo/models/gettransactionsstatsbycountryout.rb +2 -2
- data/lib/taxamo/models/gettransactionsstatsout.rb +2 -2
- data/lib/taxamo/models/inputtransaction.rb +33 -33
- data/lib/taxamo/models/inputtransactionline.rb +18 -18
- data/lib/taxamo/models/inputtransactionupdate.rb +33 -33
- data/lib/taxamo/models/invoiceaddress.rb +9 -9
- data/lib/taxamo/models/listpaymentsout.rb +2 -2
- data/lib/taxamo/models/listrefundsout.rb +2 -2
- data/lib/taxamo/models/listtransactionsout.rb +2 -2
- data/lib/taxamo/models/locategivenipout.rb +4 -4
- data/lib/taxamo/models/locatemyipout.rb +4 -4
- data/lib/taxamo/models/n.rb +5 -5
- data/lib/taxamo/models/payments.rb +4 -4
- data/lib/taxamo/models/producttypeschema.rb +2 -2
- data/lib/taxamo/models/refunds.rb +11 -11
- data/lib/taxamo/models/report.rb +10 -10
- data/lib/taxamo/models/settlementdailystatsschema.rb +10 -10
- data/lib/taxamo/models/storagerequiredfields.rb +2 -2
- data/lib/taxamo/models/summary.rb +9 -9
- data/lib/taxamo/models/taxdataschema.rb +2 -2
- data/lib/taxamo/models/taxrequiredfields.rb +2 -2
- data/lib/taxamo/models/transaction.rb +55 -55
- data/lib/taxamo/models/transactionlines.rb +24 -24
- data/lib/taxamo/models/transactions.rb +55 -55
- data/lib/taxamo/models/unconfirmtransactionin.rb +2 -2
- data/lib/taxamo/models/unconfirmtransactionout.rb +4 -4
- data/lib/taxamo/models/updatetransactionin.rb +2 -2
- data/lib/taxamo/models/updatetransactionout.rb +4 -4
- data/lib/taxamo/models/ustaxexemptioncertificatedetailsschema.rb +17 -17
- data/lib/taxamo/models/ustaxexemptioncertificateschema.rb +3 -3
- data/lib/taxamo/models/ustaxexemptstate.rb +4 -4
- data/lib/taxamo/models/ustaxid.rb +4 -4
- data/lib/taxamo/models/validatetaxnumberout.rb +5 -5
- data/lib/taxamo/models/verifysmstokenout.rb +2 -2
- data/lib/taxamo/version.rb +1 -1
- data/test/taxamo/dict_test.rb +36 -0
- data/test/taxamo/tax_test.rb +3 -1
- metadata +4 -2
@@ -45,98 +45,98 @@ class TransactionLines
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def initialize(attributes = {})
|
48
|
-
return if attributes.empty?
|
48
|
+
return if attributes.nil? or attributes.empty?
|
49
49
|
# Morph attribute keys into undescored rubyish style
|
50
|
-
|
50
|
+
if attributes.key?("product_type")
|
51
51
|
@product_type = attributes["product_type"]
|
52
52
|
|
53
53
|
end
|
54
|
-
|
54
|
+
if attributes.key?("deducted_tax_amount")
|
55
55
|
@deducted_tax_amount = attributes["deducted_tax_amount"]
|
56
56
|
|
57
57
|
end
|
58
|
-
|
58
|
+
if attributes.key?("deducted_tax_rate")
|
59
59
|
@deducted_tax_rate = attributes["deducted_tax_rate"]
|
60
60
|
|
61
61
|
end
|
62
|
-
|
62
|
+
if attributes.key?("supply_date")
|
63
63
|
@supply_date = attributes["supply_date"]
|
64
64
|
|
65
65
|
end
|
66
|
-
|
66
|
+
if attributes.key?("id")
|
67
67
|
@id = attributes["id"]
|
68
68
|
|
69
69
|
end
|
70
|
-
|
70
|
+
if attributes.key?("unit_price")
|
71
71
|
@unit_price = attributes["unit_price"]
|
72
72
|
|
73
73
|
end
|
74
|
-
|
74
|
+
if attributes.key?("unit_of_measure")
|
75
75
|
@unit_of_measure = attributes["unit_of_measure"]
|
76
76
|
|
77
77
|
end
|
78
|
-
|
78
|
+
if attributes.key?("quantity")
|
79
79
|
@quantity = attributes["quantity"]
|
80
80
|
|
81
81
|
end
|
82
|
-
|
82
|
+
if attributes.key?("custom_fields")
|
83
83
|
if (value = attributes["custom_fields"]).is_a?(Array)
|
84
84
|
@custom_fields = value.map{ |v| CustomFields.new(v) }
|
85
85
|
end
|
86
86
|
end
|
87
|
-
|
87
|
+
if attributes.key?("line_key")
|
88
88
|
@line_key = attributes["line_key"]
|
89
89
|
|
90
90
|
end
|
91
|
-
|
91
|
+
if attributes.key?("tax_name")
|
92
92
|
@tax_name = attributes["tax_name"]
|
93
93
|
|
94
94
|
end
|
95
|
-
|
95
|
+
if attributes.key?("product_code")
|
96
96
|
@product_code = attributes["product_code"]
|
97
97
|
|
98
98
|
end
|
99
|
-
|
99
|
+
if attributes.key?("amount")
|
100
100
|
@amount = attributes["amount"]
|
101
101
|
|
102
102
|
end
|
103
|
-
|
103
|
+
if attributes.key?("custom_id")
|
104
104
|
@custom_id = attributes["custom_id"]
|
105
105
|
|
106
106
|
end
|
107
|
-
|
107
|
+
if attributes.key?("informative")
|
108
108
|
@informative = attributes["informative"]
|
109
109
|
|
110
110
|
end
|
111
|
-
|
111
|
+
if attributes.key?("tax_amount")
|
112
112
|
@tax_amount = attributes["tax_amount"]
|
113
113
|
|
114
114
|
end
|
115
|
-
|
115
|
+
if attributes.key?("tax_rate")
|
116
116
|
@tax_rate = attributes["tax_rate"]
|
117
117
|
|
118
118
|
end
|
119
|
-
|
119
|
+
if attributes.key?("additional_currencies")
|
120
120
|
@additional_currencies = AdditionalCurrencies.new(attributes["additional_currencies"])
|
121
121
|
|
122
122
|
end
|
123
|
-
|
123
|
+
if attributes.key?("total_amount")
|
124
124
|
@total_amount = attributes["total_amount"]
|
125
125
|
|
126
126
|
end
|
127
|
-
|
127
|
+
if attributes.key?("product_tax_code")
|
128
128
|
@product_tax_code = attributes["product_tax_code"]
|
129
129
|
|
130
130
|
end
|
131
|
-
|
131
|
+
if attributes.key?("refunded_tax_amount")
|
132
132
|
@refunded_tax_amount = attributes["refunded_tax_amount"]
|
133
133
|
|
134
134
|
end
|
135
|
-
|
135
|
+
if attributes.key?("description")
|
136
136
|
@description = attributes["description"]
|
137
137
|
|
138
138
|
end
|
139
|
-
|
139
|
+
if attributes.key?("refunded_total_amount")
|
140
140
|
@refunded_total_amount = attributes["refunded_total_amount"]
|
141
141
|
|
142
142
|
end
|
@@ -76,223 +76,223 @@ class Transactions
|
|
76
76
|
end
|
77
77
|
|
78
78
|
def initialize(attributes = {})
|
79
|
-
return if attributes.empty?
|
79
|
+
return if attributes.nil? or attributes.empty?
|
80
80
|
# Morph attribute keys into undescored rubyish style
|
81
|
-
|
81
|
+
if attributes.key?("confirm_timestamp")
|
82
82
|
@confirm_timestamp = attributes["confirm_timestamp"]
|
83
83
|
|
84
84
|
end
|
85
|
-
|
85
|
+
if attributes.key?("fully_informative")
|
86
86
|
@fully_informative = attributes["fully_informative"]
|
87
87
|
|
88
88
|
end
|
89
|
-
|
89
|
+
if attributes.key?("deducted_tax_amount")
|
90
90
|
@deducted_tax_amount = attributes["deducted_tax_amount"]
|
91
91
|
|
92
92
|
end
|
93
|
-
|
93
|
+
if attributes.key?("order_date_type")
|
94
94
|
@order_date_type = attributes["order_date_type"]
|
95
95
|
|
96
96
|
end
|
97
|
-
|
97
|
+
if attributes.key?("buyer_credit_card_prefix")
|
98
98
|
@buyer_credit_card_prefix = attributes["buyer_credit_card_prefix"]
|
99
99
|
|
100
100
|
end
|
101
|
-
|
101
|
+
if attributes.key?("custom_data")
|
102
102
|
@custom_data = attributes["custom_data"]
|
103
103
|
|
104
104
|
end
|
105
|
-
|
105
|
+
if attributes.key?("buyer_name")
|
106
106
|
@buyer_name = attributes["buyer_name"]
|
107
107
|
|
108
108
|
end
|
109
|
-
|
109
|
+
if attributes.key?("invoice_date")
|
110
110
|
@invoice_date = attributes["invoice_date"]
|
111
111
|
|
112
112
|
end
|
113
|
-
|
113
|
+
if attributes.key?("create_timestamp")
|
114
114
|
@create_timestamp = attributes["create_timestamp"]
|
115
115
|
|
116
116
|
end
|
117
|
-
|
117
|
+
if attributes.key?("currency_code")
|
118
118
|
@currency_code = attributes["currency_code"]
|
119
119
|
|
120
120
|
end
|
121
|
-
|
121
|
+
if attributes.key?("sub_account_id")
|
122
122
|
@sub_account_id = attributes["sub_account_id"]
|
123
123
|
|
124
124
|
end
|
125
|
-
|
125
|
+
if attributes.key?("supply_date")
|
126
126
|
@supply_date = attributes["supply_date"]
|
127
127
|
|
128
128
|
end
|
129
|
-
|
129
|
+
if attributes.key?("invoice_image_url")
|
130
130
|
@invoice_image_url = attributes["invoice_image_url"]
|
131
131
|
|
132
132
|
end
|
133
|
-
|
133
|
+
if attributes.key?("key")
|
134
134
|
@key = attributes["key"]
|
135
135
|
|
136
136
|
end
|
137
|
-
|
137
|
+
if attributes.key?("tax_number_service")
|
138
138
|
@tax_number_service = attributes["tax_number_service"]
|
139
139
|
|
140
140
|
end
|
141
|
-
|
141
|
+
if attributes.key?("invoice_address")
|
142
142
|
@invoice_address = InvoiceAddress.new(attributes["invoice_address"])
|
143
143
|
|
144
144
|
end
|
145
|
-
|
145
|
+
if attributes.key?("buyer_tax_number_valid")
|
146
146
|
@buyer_tax_number_valid = attributes["buyer_tax_number_valid"]
|
147
147
|
|
148
148
|
end
|
149
|
-
|
149
|
+
if attributes.key?("verification_token")
|
150
150
|
@verification_token = attributes["verification_token"]
|
151
151
|
|
152
152
|
end
|
153
|
-
|
153
|
+
if attributes.key?("note")
|
154
154
|
@note = attributes["note"]
|
155
155
|
|
156
156
|
end
|
157
|
-
|
157
|
+
if attributes.key?("tax_supported")
|
158
158
|
@tax_supported = attributes["tax_supported"]
|
159
159
|
|
160
160
|
end
|
161
|
-
|
161
|
+
if attributes.key?("tax_data")
|
162
162
|
@tax_data = TaxDataSchema.new(attributes["tax_data"])
|
163
163
|
|
164
164
|
end
|
165
|
-
|
165
|
+
if attributes.key?("transaction_lines")
|
166
166
|
if (value = attributes["transaction_lines"]).is_a?(Array)
|
167
167
|
@transaction_lines = value.map{ |v| TransactionLines.new(v) }
|
168
168
|
end
|
169
169
|
end
|
170
|
-
|
170
|
+
if attributes.key?("buyer_tax_number")
|
171
171
|
@buyer_tax_number = attributes["buyer_tax_number"]
|
172
172
|
|
173
173
|
end
|
174
|
-
|
174
|
+
if attributes.key?("external_key")
|
175
175
|
@external_key = attributes["external_key"]
|
176
176
|
|
177
177
|
end
|
178
|
-
|
178
|
+
if attributes.key?("status")
|
179
179
|
@status = attributes["status"]
|
180
180
|
|
181
181
|
end
|
182
|
-
|
182
|
+
if attributes.key?("custom_fields")
|
183
183
|
if (value = attributes["custom_fields"]).is_a?(Array)
|
184
184
|
@custom_fields = value.map{ |v| CustomFields.new(v) }
|
185
185
|
end
|
186
186
|
end
|
187
|
-
|
187
|
+
if attributes.key?("force_country_code")
|
188
188
|
@force_country_code = attributes["force_country_code"]
|
189
189
|
|
190
190
|
end
|
191
|
-
|
191
|
+
if attributes.key?("countries")
|
192
192
|
@countries = Countries.new(attributes["countries"])
|
193
193
|
|
194
194
|
end
|
195
|
-
|
195
|
+
if attributes.key?("invoice_number")
|
196
196
|
@invoice_number = attributes["invoice_number"]
|
197
197
|
|
198
198
|
end
|
199
|
-
|
199
|
+
if attributes.key?("order_date")
|
200
200
|
@order_date = attributes["order_date"]
|
201
201
|
|
202
202
|
end
|
203
|
-
|
203
|
+
if attributes.key?("customer_id")
|
204
204
|
@customer_id = attributes["customer_id"]
|
205
205
|
|
206
206
|
end
|
207
|
-
|
207
|
+
if attributes.key?("kind")
|
208
208
|
@kind = attributes["kind"]
|
209
209
|
|
210
210
|
end
|
211
|
-
|
211
|
+
if attributes.key?("source")
|
212
212
|
@source = attributes["source"]
|
213
213
|
|
214
214
|
end
|
215
|
-
|
215
|
+
if attributes.key?("amount")
|
216
216
|
@amount = attributes["amount"]
|
217
217
|
|
218
218
|
end
|
219
|
-
|
219
|
+
if attributes.key?("comments")
|
220
220
|
@comments = attributes["comments"]
|
221
221
|
|
222
222
|
end
|
223
|
-
|
223
|
+
if attributes.key?("buyer_ip")
|
224
224
|
@buyer_ip = attributes["buyer_ip"]
|
225
225
|
|
226
226
|
end
|
227
|
-
|
227
|
+
if attributes.key?("buyer_email")
|
228
228
|
@buyer_email = attributes["buyer_email"]
|
229
229
|
|
230
230
|
end
|
231
|
-
|
231
|
+
if attributes.key?("original_transaction_key")
|
232
232
|
@original_transaction_key = attributes["original_transaction_key"]
|
233
233
|
|
234
234
|
end
|
235
|
-
|
235
|
+
if attributes.key?("billing_country_code")
|
236
236
|
@billing_country_code = attributes["billing_country_code"]
|
237
237
|
|
238
238
|
end
|
239
|
-
|
239
|
+
if attributes.key?("custom_id")
|
240
240
|
@custom_id = attributes["custom_id"]
|
241
241
|
|
242
242
|
end
|
243
|
-
|
243
|
+
if attributes.key?("tax_amount")
|
244
244
|
@tax_amount = attributes["tax_amount"]
|
245
245
|
|
246
246
|
end
|
247
|
-
|
247
|
+
if attributes.key?("additional_currencies")
|
248
248
|
@additional_currencies = AdditionalCurrencies.new(attributes["additional_currencies"])
|
249
249
|
|
250
250
|
end
|
251
|
-
|
251
|
+
if attributes.key?("invoice_place")
|
252
252
|
@invoice_place = attributes["invoice_place"]
|
253
253
|
|
254
254
|
end
|
255
|
-
|
255
|
+
if attributes.key?("total_amount")
|
256
256
|
@total_amount = attributes["total_amount"]
|
257
257
|
|
258
258
|
end
|
259
|
-
|
259
|
+
if attributes.key?("tax_entity_name")
|
260
260
|
@tax_entity_name = attributes["tax_entity_name"]
|
261
261
|
|
262
262
|
end
|
263
|
-
|
263
|
+
if attributes.key?("evidence")
|
264
264
|
@evidence = Evidence.new(attributes["evidence"])
|
265
265
|
|
266
266
|
end
|
267
|
-
|
267
|
+
if attributes.key?("refunded_tax_amount")
|
268
268
|
@refunded_tax_amount = attributes["refunded_tax_amount"]
|
269
269
|
|
270
270
|
end
|
271
|
-
|
271
|
+
if attributes.key?("manual")
|
272
272
|
@manual = attributes["manual"]
|
273
273
|
|
274
274
|
end
|
275
|
-
|
275
|
+
if attributes.key?("tax_timezone")
|
276
276
|
@tax_timezone = attributes["tax_timezone"]
|
277
277
|
|
278
278
|
end
|
279
|
-
|
279
|
+
if attributes.key?("description")
|
280
280
|
@description = attributes["description"]
|
281
281
|
|
282
282
|
end
|
283
|
-
|
283
|
+
if attributes.key?("test")
|
284
284
|
@test = attributes["test"]
|
285
285
|
|
286
286
|
end
|
287
|
-
|
287
|
+
if attributes.key?("tax_deducted")
|
288
288
|
@tax_deducted = attributes["tax_deducted"]
|
289
289
|
|
290
290
|
end
|
291
|
-
|
291
|
+
if attributes.key?("tax_country_code")
|
292
292
|
@tax_country_code = attributes["tax_country_code"]
|
293
293
|
|
294
294
|
end
|
295
|
-
|
295
|
+
if attributes.key?("refunded_total_amount")
|
296
296
|
@refunded_total_amount = attributes["refunded_total_amount"]
|
297
297
|
|
298
298
|
end
|
@@ -23,9 +23,9 @@ class UnconfirmTransactionIn
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def initialize(attributes = {})
|
26
|
-
return if attributes.empty?
|
26
|
+
return if attributes.nil? or attributes.empty?
|
27
27
|
# Morph attribute keys into undescored rubyish style
|
28
|
-
|
28
|
+
if attributes.key?("transaction")
|
29
29
|
@transaction = InputTransactionUpdate.new(attributes["transaction"])
|
30
30
|
|
31
31
|
end
|
@@ -25,18 +25,18 @@ class UnconfirmTransactionOut
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def initialize(attributes = {})
|
28
|
-
return if attributes.empty?
|
28
|
+
return if attributes.nil? or attributes.empty?
|
29
29
|
# Morph attribute keys into undescored rubyish style
|
30
|
-
|
30
|
+
if attributes.key?("transaction")
|
31
31
|
@transaction = Transaction.new(attributes["transaction"])
|
32
32
|
|
33
33
|
end
|
34
|
-
|
34
|
+
if attributes.key?("tax_required_fields")
|
35
35
|
if (value = attributes["tax_required_fields"]).is_a?(Array)
|
36
36
|
@tax_required_fields = value.map{ |v| TaxRequiredFields.new(v) }
|
37
37
|
end
|
38
38
|
end
|
39
|
-
|
39
|
+
if attributes.key?("storage_required_fields")
|
40
40
|
if (value = attributes["storage_required_fields"]).is_a?(Array)
|
41
41
|
@storage_required_fields = value.map{ |v| StorageRequiredFields.new(v) }
|
42
42
|
end
|
@@ -23,9 +23,9 @@ class UpdateTransactionIn
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def initialize(attributes = {})
|
26
|
-
return if attributes.empty?
|
26
|
+
return if attributes.nil? or attributes.empty?
|
27
27
|
# Morph attribute keys into undescored rubyish style
|
28
|
-
|
28
|
+
if attributes.key?("transaction")
|
29
29
|
@transaction = Transaction.new(attributes["transaction"])
|
30
30
|
|
31
31
|
end
|