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.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -2
  3. data/lib/taxamo/models/additionalcurrencies.rb +2 -2
  4. data/lib/taxamo/models/additionalcurrency.rb +7 -7
  5. data/lib/taxamo/models/bycountry.rb +5 -5
  6. data/lib/taxamo/models/bystatus.rb +3 -3
  7. data/lib/taxamo/models/bytaxationtype.rb +6 -6
  8. data/lib/taxamo/models/c.rb +5 -5
  9. data/lib/taxamo/models/calculatesimpletaxout.rb +4 -4
  10. data/lib/taxamo/models/calculatetaxin.rb +2 -2
  11. data/lib/taxamo/models/calculatetaxlocationout.rb +9 -9
  12. data/lib/taxamo/models/calculatetaxout.rb +4 -4
  13. data/lib/taxamo/models/canceltransactionout.rb +2 -2
  14. data/lib/taxamo/models/capturepaymentout.rb +2 -2
  15. data/lib/taxamo/models/confirmtransactionin.rb +2 -2
  16. data/lib/taxamo/models/confirmtransactionout.rb +4 -4
  17. data/lib/taxamo/models/countries.rb +12 -12
  18. data/lib/taxamo/models/country.rb +13 -13
  19. data/lib/taxamo/models/countryschema.rb +13 -13
  20. data/lib/taxamo/models/createpaymentin.rb +4 -4
  21. data/lib/taxamo/models/createpaymentout.rb +2 -2
  22. data/lib/taxamo/models/createrefundin.rb +6 -6
  23. data/lib/taxamo/models/createrefundout.rb +5 -5
  24. data/lib/taxamo/models/createsmstokenin.rb +3 -3
  25. data/lib/taxamo/models/createsmstokenout.rb +2 -2
  26. data/lib/taxamo/models/createtransactionin.rb +3 -3
  27. data/lib/taxamo/models/createtransactionout.rb +4 -4
  28. data/lib/taxamo/models/currencyschema.rb +6 -6
  29. data/lib/taxamo/models/customfields.rb +3 -3
  30. data/lib/taxamo/models/emailinvoicein.rb +2 -2
  31. data/lib/taxamo/models/emailinvoiceout.rb +2 -2
  32. data/lib/taxamo/models/emailrefundin.rb +2 -2
  33. data/lib/taxamo/models/emailrefundout.rb +2 -2
  34. data/lib/taxamo/models/evidence.rb +12 -12
  35. data/lib/taxamo/models/evidenceschema.rb +5 -5
  36. data/lib/taxamo/models/getcountriesdictout.rb +2 -2
  37. data/lib/taxamo/models/getcurrenciesdictout.rb +2 -2
  38. data/lib/taxamo/models/getdailysettlementstatsout.rb +2 -2
  39. data/lib/taxamo/models/getdetailedrefundsout.rb +2 -2
  40. data/lib/taxamo/models/getdomesticsummaryreportout.rb +14 -14
  41. data/lib/taxamo/models/geteuviesreportout.rb +5 -5
  42. data/lib/taxamo/models/getproducttypesdictout.rb +2 -2
  43. data/lib/taxamo/models/getrefundsout.rb +2 -2
  44. data/lib/taxamo/models/getsettlementout.rb +6 -6
  45. data/lib/taxamo/models/getsettlementstatsbycountryout.rb +2 -2
  46. data/lib/taxamo/models/getsettlementstatsbytaxationtypeout.rb +2 -2
  47. data/lib/taxamo/models/getsettlementsummaryout.rb +2 -2
  48. data/lib/taxamo/models/gettransactionout.rb +4 -4
  49. data/lib/taxamo/models/gettransactionsstatsbycountryout.rb +2 -2
  50. data/lib/taxamo/models/gettransactionsstatsout.rb +2 -2
  51. data/lib/taxamo/models/inputtransaction.rb +33 -33
  52. data/lib/taxamo/models/inputtransactionline.rb +18 -18
  53. data/lib/taxamo/models/inputtransactionupdate.rb +33 -33
  54. data/lib/taxamo/models/invoiceaddress.rb +9 -9
  55. data/lib/taxamo/models/listpaymentsout.rb +2 -2
  56. data/lib/taxamo/models/listrefundsout.rb +2 -2
  57. data/lib/taxamo/models/listtransactionsout.rb +2 -2
  58. data/lib/taxamo/models/locategivenipout.rb +4 -4
  59. data/lib/taxamo/models/locatemyipout.rb +4 -4
  60. data/lib/taxamo/models/n.rb +5 -5
  61. data/lib/taxamo/models/payments.rb +4 -4
  62. data/lib/taxamo/models/producttypeschema.rb +2 -2
  63. data/lib/taxamo/models/refunds.rb +11 -11
  64. data/lib/taxamo/models/report.rb +10 -10
  65. data/lib/taxamo/models/settlementdailystatsschema.rb +10 -10
  66. data/lib/taxamo/models/storagerequiredfields.rb +2 -2
  67. data/lib/taxamo/models/summary.rb +9 -9
  68. data/lib/taxamo/models/taxdataschema.rb +2 -2
  69. data/lib/taxamo/models/taxrequiredfields.rb +2 -2
  70. data/lib/taxamo/models/transaction.rb +55 -55
  71. data/lib/taxamo/models/transactionlines.rb +24 -24
  72. data/lib/taxamo/models/transactions.rb +55 -55
  73. data/lib/taxamo/models/unconfirmtransactionin.rb +2 -2
  74. data/lib/taxamo/models/unconfirmtransactionout.rb +4 -4
  75. data/lib/taxamo/models/updatetransactionin.rb +2 -2
  76. data/lib/taxamo/models/updatetransactionout.rb +4 -4
  77. data/lib/taxamo/models/ustaxexemptioncertificatedetailsschema.rb +17 -17
  78. data/lib/taxamo/models/ustaxexemptioncertificateschema.rb +3 -3
  79. data/lib/taxamo/models/ustaxexemptstate.rb +4 -4
  80. data/lib/taxamo/models/ustaxid.rb +4 -4
  81. data/lib/taxamo/models/validatetaxnumberout.rb +5 -5
  82. data/lib/taxamo/models/verifysmstokenout.rb +2 -2
  83. data/lib/taxamo/version.rb +1 -1
  84. data/test/taxamo/dict_test.rb +36 -0
  85. data/test/taxamo/tax_test.rb +3 -1
  86. 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
- unless attributes["code_long"].nil?
39
+ if attributes.key?("code_long")
40
40
  @code_long = attributes["code_long"]
41
41
 
42
42
  end
43
- unless attributes["codenum"].nil?
43
+ if attributes.key?("codenum")
44
44
  @codenum = attributes["codenum"]
45
45
 
46
46
  end
47
- unless attributes["currency"].nil?
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
- unless attributes["tax_supported"].nil?
52
+ if attributes.key?("tax_supported")
53
53
  @tax_supported = attributes["tax_supported"]
54
54
 
55
55
  end
56
- unless attributes["name"].nil?
56
+ if attributes.key?("name")
57
57
  @name = attributes["name"]
58
58
 
59
59
  end
60
- unless attributes["ccn3"].nil?
60
+ if attributes.key?("ccn3")
61
61
  @ccn3 = attributes["ccn3"]
62
62
 
63
63
  end
64
- unless attributes["tax_region"].nil?
64
+ if attributes.key?("tax_region")
65
65
  @tax_region = attributes["tax_region"]
66
66
 
67
67
  end
68
- unless attributes["cca3"].nil?
68
+ if attributes.key?("cca3")
69
69
  @cca3 = attributes["cca3"]
70
70
 
71
71
  end
72
- unless attributes["calling_code"].nil?
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
- unless attributes["tax_number_country_code"].nil?
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
- unless attributes["code"].nil?
81
+ if attributes.key?("code")
82
82
  @code = attributes["code"]
83
83
 
84
84
  end
85
- unless attributes["cca2"].nil?
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
- unless attributes["amount"].nil?
30
+ if attributes.key?("amount")
31
31
  @amount = attributes["amount"]
32
32
 
33
33
  end
34
- unless attributes["payment_timestamp"].nil?
34
+ if attributes.key?("payment_timestamp")
35
35
  @payment_timestamp = attributes["payment_timestamp"]
36
36
 
37
37
  end
38
- unless attributes["payment_information"].nil?
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
- unless attributes["success"].nil?
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
- unless attributes["line_key"].nil?
32
+ if attributes.key?("line_key")
33
33
  @line_key = attributes["line_key"]
34
34
 
35
35
  end
36
- unless attributes["custom_id"].nil?
36
+ if attributes.key?("custom_id")
37
37
  @custom_id = attributes["custom_id"]
38
38
 
39
39
  end
40
- unless attributes["amount"].nil?
40
+ if attributes.key?("amount")
41
41
  @amount = attributes["amount"]
42
42
 
43
43
  end
44
- unless attributes["total_amount"].nil?
44
+ if attributes.key?("total_amount")
45
45
  @total_amount = attributes["total_amount"]
46
46
 
47
47
  end
48
- unless attributes["refund_reason"].nil?
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
- unless attributes["total_amount"].nil?
31
+ if attributes.key?("total_amount")
32
32
  @total_amount = attributes["total_amount"]
33
33
 
34
34
  end
35
- unless attributes["tax_amount"].nil?
35
+ if attributes.key?("tax_amount")
36
36
  @tax_amount = attributes["tax_amount"]
37
37
 
38
38
  end
39
- unless attributes["refunded_total_amount"].nil?
39
+ if attributes.key?("refunded_total_amount")
40
40
  @refunded_total_amount = attributes["refunded_total_amount"]
41
41
 
42
42
  end
43
- unless attributes["refunded_tax_amount"].nil?
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
- unless attributes["country_code"].nil?
29
+ if attributes.key?("country_code")
30
30
  @country_code = attributes["country_code"]
31
31
 
32
32
  end
33
- unless attributes["recipient"].nil?
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
- unless attributes["success"].nil?
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
- unless attributes["manual_mode"].nil?
29
+ if attributes.key?("manual_mode")
30
30
  @manual_mode = attributes["manual_mode"]
31
31
 
32
32
  end
33
- unless attributes["transaction"].nil?
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
- unless attributes["transaction"].nil?
30
+ if attributes.key?("transaction")
31
31
  @transaction = Transaction.new(attributes["transaction"])
32
32
 
33
33
  end
34
- unless attributes["tax_required_fields"].nil?
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
- unless attributes["storage_required_fields"].nil?
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
- unless attributes["code"].nil?
32
+ if attributes.key?("code")
33
33
  @code = attributes["code"]
34
34
 
35
35
  end
36
- unless attributes["minorunits"].nil?
36
+ if attributes.key?("minorunits")
37
37
  @minorunits = attributes["minorunits"]
38
38
 
39
39
  end
40
- unless attributes["description"].nil?
40
+ if attributes.key?("description")
41
41
  @description = attributes["description"]
42
42
 
43
43
  end
44
- unless attributes["isocode"].nil?
44
+ if attributes.key?("isocode")
45
45
  @isocode = attributes["isocode"]
46
46
 
47
47
  end
48
- unless attributes["isonum"].nil?
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
- unless attributes["key"].nil?
29
+ if attributes.key?("key")
30
30
  @key = attributes["key"]
31
31
 
32
32
  end
33
- unless attributes["value"].nil?
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
- unless attributes["buyer_email"].nil?
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
- unless attributes["success"].nil?
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
- unless attributes["buyer_email"].nil?
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
- unless attributes["success"].nil?
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
- unless attributes["by_token"].nil?
38
+ if attributes.key?("by_token")
39
39
  @by_token = EvidenceSchema.new(attributes["by_token"])
40
40
 
41
41
  end
42
- unless attributes["by_cc"].nil?
42
+ if attributes.key?("by_cc")
43
43
  @by_cc = EvidenceSchema.new(attributes["by_cc"])
44
44
 
45
45
  end
46
- unless attributes["by_2003_rules"].nil?
46
+ if attributes.key?("by_2003_rules")
47
47
  @by_2003_rules = EvidenceSchema.new(attributes["by_2003_rules"])
48
48
 
49
49
  end
50
- unless attributes["forced"].nil?
50
+ if attributes.key?("forced")
51
51
  @forced = EvidenceSchema.new(attributes["forced"])
52
52
 
53
53
  end
54
- unless attributes["by_payment_method"].nil?
54
+ if attributes.key?("by_payment_method")
55
55
  @by_payment_method = EvidenceSchema.new(attributes["by_payment_method"])
56
56
 
57
57
  end
58
- unless attributes["by_ip"].nil?
58
+ if attributes.key?("by_ip")
59
59
  @by_ip = EvidenceSchema.new(attributes["by_ip"])
60
60
 
61
61
  end
62
- unless attributes["guessed_from_ip"].nil?
62
+ if attributes.key?("guessed_from_ip")
63
63
  @guessed_from_ip = EvidenceSchema.new(attributes["guessed_from_ip"])
64
64
 
65
65
  end
66
- unless attributes["other_commercially_relevant_info"].nil?
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
- unless attributes["by_billing"].nil?
70
+ if attributes.key?("by_billing")
71
71
  @by_billing = EvidenceSchema.new(attributes["by_billing"])
72
72
 
73
73
  end
74
- unless attributes["by_tax_number"].nil?
74
+ if attributes.key?("by_tax_number")
75
75
  @by_tax_number = EvidenceSchema.new(attributes["by_tax_number"])
76
76
 
77
77
  end
78
- unless attributes["self_declaration"].nil?
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
- unless attributes["used"].nil?
31
+ if attributes.key?("used")
32
32
  @used = attributes["used"]
33
33
 
34
34
  end
35
- unless attributes["resolved_country_code"].nil?
35
+ if attributes.key?("resolved_country_code")
36
36
  @resolved_country_code = attributes["resolved_country_code"]
37
37
 
38
38
  end
39
- unless attributes["evidence_type"].nil?
39
+ if attributes.key?("evidence_type")
40
40
  @evidence_type = attributes["evidence_type"]
41
41
 
42
42
  end
43
- unless attributes["evidence_value"].nil?
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
- unless attributes["dictionary"].nil?
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