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
@@ -39,74 +39,74 @@ class InputTransactionLine
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def initialize(attributes = {})
|
42
|
-
return if attributes.empty?
|
42
|
+
return if attributes.nil? or attributes.empty?
|
43
43
|
# Morph attribute keys into undescored rubyish style
|
44
|
-
|
44
|
+
if attributes.key?("product_type")
|
45
45
|
@product_type = attributes["product_type"]
|
46
46
|
|
47
47
|
end
|
48
|
-
|
48
|
+
if attributes.key?("deducted_tax_rate")
|
49
49
|
@deducted_tax_rate = attributes["deducted_tax_rate"]
|
50
50
|
|
51
51
|
end
|
52
|
-
|
52
|
+
if attributes.key?("supply_date")
|
53
53
|
@supply_date = attributes["supply_date"]
|
54
54
|
|
55
55
|
end
|
56
|
-
|
56
|
+
if attributes.key?("unit_price")
|
57
57
|
@unit_price = attributes["unit_price"]
|
58
58
|
|
59
59
|
end
|
60
|
-
|
60
|
+
if attributes.key?("unit_of_measure")
|
61
61
|
@unit_of_measure = attributes["unit_of_measure"]
|
62
62
|
|
63
63
|
end
|
64
|
-
|
64
|
+
if attributes.key?("quantity")
|
65
65
|
@quantity = attributes["quantity"]
|
66
66
|
|
67
67
|
end
|
68
|
-
|
68
|
+
if attributes.key?("custom_fields")
|
69
69
|
if (value = attributes["custom_fields"]).is_a?(Array)
|
70
70
|
@custom_fields = value.map{ |v| CustomFields.new(v) }
|
71
71
|
end
|
72
72
|
end
|
73
|
-
|
73
|
+
if attributes.key?("line_key")
|
74
74
|
@line_key = attributes["line_key"]
|
75
75
|
|
76
76
|
end
|
77
|
-
|
77
|
+
if attributes.key?("tax_name")
|
78
78
|
@tax_name = attributes["tax_name"]
|
79
79
|
|
80
80
|
end
|
81
|
-
|
81
|
+
if attributes.key?("product_code")
|
82
82
|
@product_code = attributes["product_code"]
|
83
83
|
|
84
84
|
end
|
85
|
-
|
85
|
+
if attributes.key?("amount")
|
86
86
|
@amount = attributes["amount"]
|
87
87
|
|
88
88
|
end
|
89
|
-
|
89
|
+
if attributes.key?("custom_id")
|
90
90
|
@custom_id = attributes["custom_id"]
|
91
91
|
|
92
92
|
end
|
93
|
-
|
93
|
+
if attributes.key?("informative")
|
94
94
|
@informative = attributes["informative"]
|
95
95
|
|
96
96
|
end
|
97
|
-
|
97
|
+
if attributes.key?("tax_rate")
|
98
98
|
@tax_rate = attributes["tax_rate"]
|
99
99
|
|
100
100
|
end
|
101
|
-
|
101
|
+
if attributes.key?("total_amount")
|
102
102
|
@total_amount = attributes["total_amount"]
|
103
103
|
|
104
104
|
end
|
105
|
-
|
105
|
+
if attributes.key?("product_tax_code")
|
106
106
|
@product_tax_code = attributes["product_tax_code"]
|
107
107
|
|
108
108
|
end
|
109
|
-
|
109
|
+
if attributes.key?("description")
|
110
110
|
@description = attributes["description"]
|
111
111
|
|
112
112
|
end
|
@@ -54,135 +54,135 @@ class InputTransactionUpdate
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def initialize(attributes = {})
|
57
|
-
return if attributes.empty?
|
57
|
+
return if attributes.nil? or attributes.empty?
|
58
58
|
# Morph attribute keys into undescored rubyish style
|
59
|
-
|
59
|
+
if attributes.key?("order_date_type")
|
60
60
|
@order_date_type = attributes["order_date_type"]
|
61
61
|
|
62
62
|
end
|
63
|
-
|
63
|
+
if attributes.key?("buyer_credit_card_prefix")
|
64
64
|
@buyer_credit_card_prefix = attributes["buyer_credit_card_prefix"]
|
65
65
|
|
66
66
|
end
|
67
|
-
|
67
|
+
if attributes.key?("custom_data")
|
68
68
|
@custom_data = attributes["custom_data"]
|
69
69
|
|
70
70
|
end
|
71
|
-
|
71
|
+
if attributes.key?("buyer_name")
|
72
72
|
@buyer_name = attributes["buyer_name"]
|
73
73
|
|
74
74
|
end
|
75
|
-
|
75
|
+
if attributes.key?("invoice_date")
|
76
76
|
@invoice_date = attributes["invoice_date"]
|
77
77
|
|
78
78
|
end
|
79
|
-
|
79
|
+
if attributes.key?("currency_code")
|
80
80
|
@currency_code = attributes["currency_code"]
|
81
81
|
|
82
82
|
end
|
83
|
-
|
83
|
+
if attributes.key?("sub_account_id")
|
84
84
|
@sub_account_id = attributes["sub_account_id"]
|
85
85
|
|
86
86
|
end
|
87
|
-
|
87
|
+
if attributes.key?("supply_date")
|
88
88
|
@supply_date = attributes["supply_date"]
|
89
89
|
|
90
90
|
end
|
91
|
-
|
91
|
+
if attributes.key?("invoice_address")
|
92
92
|
@invoice_address = InvoiceAddress.new(attributes["invoice_address"])
|
93
93
|
|
94
94
|
end
|
95
|
-
|
95
|
+
if attributes.key?("verification_token")
|
96
96
|
@verification_token = attributes["verification_token"]
|
97
97
|
|
98
98
|
end
|
99
|
-
|
99
|
+
if attributes.key?("note")
|
100
100
|
@note = attributes["note"]
|
101
101
|
|
102
102
|
end
|
103
|
-
|
103
|
+
if attributes.key?("tax_data")
|
104
104
|
@tax_data = TaxDataSchema.new(attributes["tax_data"])
|
105
105
|
|
106
106
|
end
|
107
|
-
|
107
|
+
if attributes.key?("transaction_lines")
|
108
108
|
if (value = attributes["transaction_lines"]).is_a?(Array)
|
109
109
|
@transaction_lines = value.map{ |v| InputTransactionLine.new(v) }
|
110
110
|
end
|
111
111
|
end
|
112
|
-
|
112
|
+
if attributes.key?("buyer_tax_number")
|
113
113
|
@buyer_tax_number = attributes["buyer_tax_number"]
|
114
114
|
|
115
115
|
end
|
116
|
-
|
116
|
+
if attributes.key?("status")
|
117
117
|
@status = attributes["status"]
|
118
118
|
|
119
119
|
end
|
120
|
-
|
120
|
+
if attributes.key?("custom_fields")
|
121
121
|
if (value = attributes["custom_fields"]).is_a?(Array)
|
122
122
|
@custom_fields = value.map{ |v| CustomFields.new(v) }
|
123
123
|
end
|
124
124
|
end
|
125
|
-
|
125
|
+
if attributes.key?("force_country_code")
|
126
126
|
@force_country_code = attributes["force_country_code"]
|
127
127
|
|
128
128
|
end
|
129
|
-
|
129
|
+
if attributes.key?("invoice_number")
|
130
130
|
@invoice_number = attributes["invoice_number"]
|
131
131
|
|
132
132
|
end
|
133
|
-
|
133
|
+
if attributes.key?("order_date")
|
134
134
|
@order_date = attributes["order_date"]
|
135
135
|
|
136
136
|
end
|
137
|
-
|
137
|
+
if attributes.key?("customer_id")
|
138
138
|
@customer_id = attributes["customer_id"]
|
139
139
|
|
140
140
|
end
|
141
|
-
|
141
|
+
if attributes.key?("comments")
|
142
142
|
@comments = attributes["comments"]
|
143
143
|
|
144
144
|
end
|
145
|
-
|
145
|
+
if attributes.key?("buyer_ip")
|
146
146
|
@buyer_ip = attributes["buyer_ip"]
|
147
147
|
|
148
148
|
end
|
149
|
-
|
149
|
+
if attributes.key?("buyer_email")
|
150
150
|
@buyer_email = attributes["buyer_email"]
|
151
151
|
|
152
152
|
end
|
153
|
-
|
153
|
+
if attributes.key?("original_transaction_key")
|
154
154
|
@original_transaction_key = attributes["original_transaction_key"]
|
155
155
|
|
156
156
|
end
|
157
|
-
|
157
|
+
if attributes.key?("billing_country_code")
|
158
158
|
@billing_country_code = attributes["billing_country_code"]
|
159
159
|
|
160
160
|
end
|
161
|
-
|
161
|
+
if attributes.key?("custom_id")
|
162
162
|
@custom_id = attributes["custom_id"]
|
163
163
|
|
164
164
|
end
|
165
|
-
|
165
|
+
if attributes.key?("additional_currencies")
|
166
166
|
@additional_currencies = AdditionalCurrencies.new(attributes["additional_currencies"])
|
167
167
|
|
168
168
|
end
|
169
|
-
|
169
|
+
if attributes.key?("invoice_place")
|
170
170
|
@invoice_place = attributes["invoice_place"]
|
171
171
|
|
172
172
|
end
|
173
|
-
|
173
|
+
if attributes.key?("evidence")
|
174
174
|
@evidence = Evidence.new(attributes["evidence"])
|
175
175
|
|
176
176
|
end
|
177
|
-
|
177
|
+
if attributes.key?("description")
|
178
178
|
@description = attributes["description"]
|
179
179
|
|
180
180
|
end
|
181
|
-
|
181
|
+
if attributes.key?("tax_deducted")
|
182
182
|
@tax_deducted = attributes["tax_deducted"]
|
183
183
|
|
184
184
|
end
|
185
|
-
|
185
|
+
if attributes.key?("tax_country_code")
|
186
186
|
@tax_country_code = attributes["tax_country_code"]
|
187
187
|
|
188
188
|
end
|
@@ -30,37 +30,37 @@ class InvoiceAddress
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def initialize(attributes = {})
|
33
|
-
return if attributes.empty?
|
33
|
+
return if attributes.nil? or attributes.empty?
|
34
34
|
# Morph attribute keys into undescored rubyish style
|
35
|
-
|
35
|
+
if attributes.key?("freeform_address")
|
36
36
|
@freeform_address = attributes["freeform_address"]
|
37
37
|
|
38
38
|
end
|
39
|
-
|
39
|
+
if attributes.key?("building_number")
|
40
40
|
@building_number = attributes["building_number"]
|
41
41
|
|
42
42
|
end
|
43
|
-
|
43
|
+
if attributes.key?("street_name")
|
44
44
|
@street_name = attributes["street_name"]
|
45
45
|
|
46
46
|
end
|
47
|
-
|
47
|
+
if attributes.key?("address_detail")
|
48
48
|
@address_detail = attributes["address_detail"]
|
49
49
|
|
50
50
|
end
|
51
|
-
|
51
|
+
if attributes.key?("city")
|
52
52
|
@city = attributes["city"]
|
53
53
|
|
54
54
|
end
|
55
|
-
|
55
|
+
if attributes.key?("postal_code")
|
56
56
|
@postal_code = attributes["postal_code"]
|
57
57
|
|
58
58
|
end
|
59
|
-
|
59
|
+
if attributes.key?("region")
|
60
60
|
@region = attributes["region"]
|
61
61
|
|
62
62
|
end
|
63
|
-
|
63
|
+
if attributes.key?("country")
|
64
64
|
@country = attributes["country"]
|
65
65
|
|
66
66
|
end
|
@@ -23,9 +23,9 @@ class ListPaymentsOut
|
|
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?("payments")
|
29
29
|
if (value = attributes["payments"]).is_a?(Array)
|
30
30
|
@payments = value.map{ |v| Payments.new(v) }
|
31
31
|
end
|
@@ -23,9 +23,9 @@ class ListRefundsOut
|
|
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?("refunds")
|
29
29
|
if (value = attributes["refunds"]).is_a?(Array)
|
30
30
|
@refunds = value.map{ |v| Refunds.new(v) }
|
31
31
|
end
|
@@ -23,9 +23,9 @@ class ListTransactionsOut
|
|
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?("transactions")
|
29
29
|
if (value = attributes["transactions"]).is_a?(Array)
|
30
30
|
@transactions = value.map{ |v| Transactions.new(v) }
|
31
31
|
end
|
@@ -25,17 +25,17 @@ class LocateGivenIPOut
|
|
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?("remote_addr")
|
31
31
|
@remote_addr = attributes["remote_addr"]
|
32
32
|
|
33
33
|
end
|
34
|
-
|
34
|
+
if attributes.key?("country_code")
|
35
35
|
@country_code = attributes["country_code"]
|
36
36
|
|
37
37
|
end
|
38
|
-
|
38
|
+
if attributes.key?("country")
|
39
39
|
@country = Country.new(attributes["country"])
|
40
40
|
|
41
41
|
end
|
@@ -25,17 +25,17 @@ class LocateMyIPOut
|
|
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?("remote_addr")
|
31
31
|
@remote_addr = attributes["remote_addr"]
|
32
32
|
|
33
33
|
end
|
34
|
-
|
34
|
+
if attributes.key?("country_code")
|
35
35
|
@country_code = attributes["country_code"]
|
36
36
|
|
37
37
|
end
|
38
|
-
|
38
|
+
if attributes.key?("country")
|
39
39
|
@country = Country.new(attributes["country"])
|
40
40
|
|
41
41
|
end
|
data/lib/taxamo/models/n.rb
CHANGED
@@ -26,21 +26,21 @@ class N
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def initialize(attributes = {})
|
29
|
-
return if attributes.empty?
|
29
|
+
return if attributes.nil? or attributes.empty?
|
30
30
|
# Morph attribute keys into undescored rubyish style
|
31
|
-
|
31
|
+
if attributes.key?("day_raw")
|
32
32
|
@day_raw = attributes["day_raw"]
|
33
33
|
|
34
34
|
end
|
35
|
-
|
35
|
+
if attributes.key?("value")
|
36
36
|
@value = attributes["value"]
|
37
37
|
|
38
38
|
end
|
39
|
-
|
39
|
+
if attributes.key?("status")
|
40
40
|
@status = attributes["status"]
|
41
41
|
|
42
42
|
end
|
43
|
-
|
43
|
+
if attributes.key?("day")
|
44
44
|
@day = attributes["day"]
|
45
45
|
|
46
46
|
end
|
@@ -25,17 +25,17 @@ class Payments
|
|
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?("amount")
|
31
31
|
@amount = attributes["amount"]
|
32
32
|
|
33
33
|
end
|
34
|
-
|
34
|
+
if attributes.key?("payment_timestamp")
|
35
35
|
@payment_timestamp = attributes["payment_timestamp"]
|
36
36
|
|
37
37
|
end
|
38
|
-
|
38
|
+
if attributes.key?("payment_information")
|
39
39
|
@payment_information = attributes["payment_information"]
|
40
40
|
|
41
41
|
end
|
@@ -23,9 +23,9 @@ class ProductTypeSchema
|
|
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?("code")
|
29
29
|
@code = attributes["code"]
|
30
30
|
|
31
31
|
end
|