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
@@ -34,55 +34,55 @@ class CountrySchema
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def initialize(attributes = {})
|
37
|
-
return if attributes.empty?
|
37
|
+
return if attributes.nil? or attributes.empty?
|
38
38
|
# Morph attribute keys into undescored rubyish style
|
39
|
-
|
39
|
+
if attributes.key?("code_long")
|
40
40
|
@code_long = attributes["code_long"]
|
41
41
|
|
42
42
|
end
|
43
|
-
|
43
|
+
if attributes.key?("codenum")
|
44
44
|
@codenum = attributes["codenum"]
|
45
45
|
|
46
46
|
end
|
47
|
-
|
47
|
+
if attributes.key?("currency")
|
48
48
|
if (value = attributes["currency"]).is_a?(Array)
|
49
49
|
@currency = value
|
50
50
|
end
|
51
51
|
end
|
52
|
-
|
52
|
+
if attributes.key?("tax_supported")
|
53
53
|
@tax_supported = attributes["tax_supported"]
|
54
54
|
|
55
55
|
end
|
56
|
-
|
56
|
+
if attributes.key?("name")
|
57
57
|
@name = attributes["name"]
|
58
58
|
|
59
59
|
end
|
60
|
-
|
60
|
+
if attributes.key?("ccn3")
|
61
61
|
@ccn3 = attributes["ccn3"]
|
62
62
|
|
63
63
|
end
|
64
|
-
|
64
|
+
if attributes.key?("tax_region")
|
65
65
|
@tax_region = attributes["tax_region"]
|
66
66
|
|
67
67
|
end
|
68
|
-
|
68
|
+
if attributes.key?("cca3")
|
69
69
|
@cca3 = attributes["cca3"]
|
70
70
|
|
71
71
|
end
|
72
|
-
|
72
|
+
if attributes.key?("calling_code")
|
73
73
|
if (value = attributes["callingCode"]).is_a?(Array)
|
74
74
|
@calling_code = value
|
75
75
|
end
|
76
76
|
end
|
77
|
-
|
77
|
+
if attributes.key?("tax_number_country_code")
|
78
78
|
@tax_number_country_code = attributes["tax_number_country_code"]
|
79
79
|
|
80
80
|
end
|
81
|
-
|
81
|
+
if attributes.key?("code")
|
82
82
|
@code = attributes["code"]
|
83
83
|
|
84
84
|
end
|
85
|
-
|
85
|
+
if attributes.key?("cca2")
|
86
86
|
@cca2 = attributes["cca2"]
|
87
87
|
|
88
88
|
end
|
@@ -25,17 +25,17 @@ class CreatePaymentIn
|
|
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 CreatePaymentOut
|
|
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?("success")
|
29
29
|
@success = attributes["success"]
|
30
30
|
|
31
31
|
end
|
@@ -27,25 +27,25 @@ class CreateRefundIn
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def initialize(attributes = {})
|
30
|
-
return if attributes.empty?
|
30
|
+
return if attributes.nil? or attributes.empty?
|
31
31
|
# Morph attribute keys into undescored rubyish style
|
32
|
-
|
32
|
+
if attributes.key?("line_key")
|
33
33
|
@line_key = attributes["line_key"]
|
34
34
|
|
35
35
|
end
|
36
|
-
|
36
|
+
if attributes.key?("custom_id")
|
37
37
|
@custom_id = attributes["custom_id"]
|
38
38
|
|
39
39
|
end
|
40
|
-
|
40
|
+
if attributes.key?("amount")
|
41
41
|
@amount = attributes["amount"]
|
42
42
|
|
43
43
|
end
|
44
|
-
|
44
|
+
if attributes.key?("total_amount")
|
45
45
|
@total_amount = attributes["total_amount"]
|
46
46
|
|
47
47
|
end
|
48
|
-
|
48
|
+
if attributes.key?("refund_reason")
|
49
49
|
@refund_reason = attributes["refund_reason"]
|
50
50
|
|
51
51
|
end
|
@@ -26,21 +26,21 @@ class CreateRefundOut
|
|
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?("total_amount")
|
32
32
|
@total_amount = attributes["total_amount"]
|
33
33
|
|
34
34
|
end
|
35
|
-
|
35
|
+
if attributes.key?("tax_amount")
|
36
36
|
@tax_amount = attributes["tax_amount"]
|
37
37
|
|
38
38
|
end
|
39
|
-
|
39
|
+
if attributes.key?("refunded_total_amount")
|
40
40
|
@refunded_total_amount = attributes["refunded_total_amount"]
|
41
41
|
|
42
42
|
end
|
43
|
-
|
43
|
+
if attributes.key?("refunded_tax_amount")
|
44
44
|
@refunded_tax_amount = attributes["refunded_tax_amount"]
|
45
45
|
|
46
46
|
end
|
@@ -24,13 +24,13 @@ class CreateSMSTokenIn
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def initialize(attributes = {})
|
27
|
-
return if attributes.empty?
|
27
|
+
return if attributes.nil? or attributes.empty?
|
28
28
|
# Morph attribute keys into undescored rubyish style
|
29
|
-
|
29
|
+
if attributes.key?("country_code")
|
30
30
|
@country_code = attributes["country_code"]
|
31
31
|
|
32
32
|
end
|
33
|
-
|
33
|
+
if attributes.key?("recipient")
|
34
34
|
@recipient = attributes["recipient"]
|
35
35
|
|
36
36
|
end
|
@@ -23,9 +23,9 @@ class CreateSMSTokenOut
|
|
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?("success")
|
29
29
|
@success = attributes["success"]
|
30
30
|
|
31
31
|
end
|
@@ -24,13 +24,13 @@ class CreateTransactionIn
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def initialize(attributes = {})
|
27
|
-
return if attributes.empty?
|
27
|
+
return if attributes.nil? or attributes.empty?
|
28
28
|
# Morph attribute keys into undescored rubyish style
|
29
|
-
|
29
|
+
if attributes.key?("manual_mode")
|
30
30
|
@manual_mode = attributes["manual_mode"]
|
31
31
|
|
32
32
|
end
|
33
|
-
|
33
|
+
if attributes.key?("transaction")
|
34
34
|
@transaction = InputTransaction.new(attributes["transaction"])
|
35
35
|
|
36
36
|
end
|
@@ -25,18 +25,18 @@ class CreateTransactionOut
|
|
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
|
@@ -27,25 +27,25 @@ class CurrencySchema
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def initialize(attributes = {})
|
30
|
-
return if attributes.empty?
|
30
|
+
return if attributes.nil? or attributes.empty?
|
31
31
|
# Morph attribute keys into undescored rubyish style
|
32
|
-
|
32
|
+
if attributes.key?("code")
|
33
33
|
@code = attributes["code"]
|
34
34
|
|
35
35
|
end
|
36
|
-
|
36
|
+
if attributes.key?("minorunits")
|
37
37
|
@minorunits = attributes["minorunits"]
|
38
38
|
|
39
39
|
end
|
40
|
-
|
40
|
+
if attributes.key?("description")
|
41
41
|
@description = attributes["description"]
|
42
42
|
|
43
43
|
end
|
44
|
-
|
44
|
+
if attributes.key?("isocode")
|
45
45
|
@isocode = attributes["isocode"]
|
46
46
|
|
47
47
|
end
|
48
|
-
|
48
|
+
if attributes.key?("isonum")
|
49
49
|
@isonum = attributes["isonum"]
|
50
50
|
|
51
51
|
end
|
@@ -24,13 +24,13 @@ class CustomFields
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def initialize(attributes = {})
|
27
|
-
return if attributes.empty?
|
27
|
+
return if attributes.nil? or attributes.empty?
|
28
28
|
# Morph attribute keys into undescored rubyish style
|
29
|
-
|
29
|
+
if attributes.key?("key")
|
30
30
|
@key = attributes["key"]
|
31
31
|
|
32
32
|
end
|
33
|
-
|
33
|
+
if attributes.key?("value")
|
34
34
|
@value = attributes["value"]
|
35
35
|
|
36
36
|
end
|
@@ -23,9 +23,9 @@ class EmailInvoiceIn
|
|
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?("buyer_email")
|
29
29
|
@buyer_email = attributes["buyer_email"]
|
30
30
|
|
31
31
|
end
|
@@ -23,9 +23,9 @@ class EmailInvoiceOut
|
|
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?("success")
|
29
29
|
@success = attributes["success"]
|
30
30
|
|
31
31
|
end
|
@@ -23,9 +23,9 @@ class EmailRefundIn
|
|
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?("buyer_email")
|
29
29
|
@buyer_email = attributes["buyer_email"]
|
30
30
|
|
31
31
|
end
|
@@ -23,9 +23,9 @@ class EmailRefundOut
|
|
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?("success")
|
29
29
|
@success = attributes["success"]
|
30
30
|
|
31
31
|
end
|
@@ -33,49 +33,49 @@ class Evidence
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def initialize(attributes = {})
|
36
|
-
return if attributes.empty?
|
36
|
+
return if attributes.nil? or attributes.empty?
|
37
37
|
# Morph attribute keys into undescored rubyish style
|
38
|
-
|
38
|
+
if attributes.key?("by_token")
|
39
39
|
@by_token = EvidenceSchema.new(attributes["by_token"])
|
40
40
|
|
41
41
|
end
|
42
|
-
|
42
|
+
if attributes.key?("by_cc")
|
43
43
|
@by_cc = EvidenceSchema.new(attributes["by_cc"])
|
44
44
|
|
45
45
|
end
|
46
|
-
|
46
|
+
if attributes.key?("by_2003_rules")
|
47
47
|
@by_2003_rules = EvidenceSchema.new(attributes["by_2003_rules"])
|
48
48
|
|
49
49
|
end
|
50
|
-
|
50
|
+
if attributes.key?("forced")
|
51
51
|
@forced = EvidenceSchema.new(attributes["forced"])
|
52
52
|
|
53
53
|
end
|
54
|
-
|
54
|
+
if attributes.key?("by_payment_method")
|
55
55
|
@by_payment_method = EvidenceSchema.new(attributes["by_payment_method"])
|
56
56
|
|
57
57
|
end
|
58
|
-
|
58
|
+
if attributes.key?("by_ip")
|
59
59
|
@by_ip = EvidenceSchema.new(attributes["by_ip"])
|
60
60
|
|
61
61
|
end
|
62
|
-
|
62
|
+
if attributes.key?("guessed_from_ip")
|
63
63
|
@guessed_from_ip = EvidenceSchema.new(attributes["guessed_from_ip"])
|
64
64
|
|
65
65
|
end
|
66
|
-
|
66
|
+
if attributes.key?("other_commercially_relevant_info")
|
67
67
|
@other_commercially_relevant_info = EvidenceSchema.new(attributes["other_commercially_relevant_info"])
|
68
68
|
|
69
69
|
end
|
70
|
-
|
70
|
+
if attributes.key?("by_billing")
|
71
71
|
@by_billing = EvidenceSchema.new(attributes["by_billing"])
|
72
72
|
|
73
73
|
end
|
74
|
-
|
74
|
+
if attributes.key?("by_tax_number")
|
75
75
|
@by_tax_number = EvidenceSchema.new(attributes["by_tax_number"])
|
76
76
|
|
77
77
|
end
|
78
|
-
|
78
|
+
if attributes.key?("self_declaration")
|
79
79
|
@self_declaration = EvidenceSchema.new(attributes["self_declaration"])
|
80
80
|
|
81
81
|
end
|
@@ -26,21 +26,21 @@ class EvidenceSchema
|
|
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?("used")
|
32
32
|
@used = attributes["used"]
|
33
33
|
|
34
34
|
end
|
35
|
-
|
35
|
+
if attributes.key?("resolved_country_code")
|
36
36
|
@resolved_country_code = attributes["resolved_country_code"]
|
37
37
|
|
38
38
|
end
|
39
|
-
|
39
|
+
if attributes.key?("evidence_type")
|
40
40
|
@evidence_type = attributes["evidence_type"]
|
41
41
|
|
42
42
|
end
|
43
|
-
|
43
|
+
if attributes.key?("evidence_value")
|
44
44
|
@evidence_value = attributes["evidence_value"]
|
45
45
|
|
46
46
|
end
|
@@ -23,9 +23,9 @@ class GetCountriesDictOut
|
|
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?("dictionary")
|
29
29
|
if (value = attributes["dictionary"]).is_a?(Array)
|
30
30
|
@dictionary = value.map{ |v| CountrySchema.new(v) }
|
31
31
|
end
|