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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: af0496ba8fa12bc0c3046988e3694e59b597d79b
4
- data.tar.gz: b2fc7d05399ea300fce74629b49f4e7ec4868e50
3
+ metadata.gz: 30e57e2079d49e411b06a1d7cd46e613ad680b32
4
+ data.tar.gz: f1e8eb74fa7a3016d0f508e2117c0d25bf31df2c
5
5
  SHA512:
6
- metadata.gz: dd2fa5484afdb97bb6a8a7815c833a050c524ad8c722bc620f887031f04dfc3a5962d1f9a27c5e145a982c1daf38567c6b0ffa96bfb26e881b30cda49137266b
7
- data.tar.gz: 7331926164d0a578e10594fdc89e1c2970705b104d352424e6b2f40629f0d9a693ca01c434f281e54c0b4048a6c656c758f39dd4cb58f24fdd5818d3871fc92c
6
+ metadata.gz: 1c0be861aa1e56740edc23cf9de545fa6818c4eeb2491d0667e73285a48e6e1fe41f209ebafcac8de50427b2e883023b5920d0ccde127bb9bcd4a87d6bfa665c
7
+ data.tar.gz: c6b875b019b977ba9896f8ed616ad24626f89145682558bcc11a4c2986971f9b4ee4996be978c4d668b16f3e2b468f6b85fe00fd6565d62039001fba53164261
data/README.md CHANGED
@@ -8,13 +8,13 @@ To install it, just fetch this repository and issue the following command:
8
8
 
9
9
  ```shell
10
10
  $ gem build taxamo.gemspec
11
- $ gem install taxamo-ns-2.3.0.gem
11
+ $ gem install taxamo-ns-2.3.1.gem
12
12
  ```
13
13
 
14
14
  Alternatively, add the following line to your project's `Gemfile` file:
15
15
 
16
16
  ```ruby
17
- gem "taxamo-ns", github: "taxamo/taxamo-ruby", '~> 2.3'
17
+ gem "taxamo-ns", github: "taxamo/taxamo-ruby", '~> 2'
18
18
  ```
19
19
 
20
20
  If your code relies on 1.x version and uses the classes for constructing input, without the namespaces, you can keep on using it:
@@ -25,6 +25,9 @@ gem "taxamo", github: "taxamo/taxamo-ruby", '~> 1.1'
25
25
 
26
26
  ## Changes
27
27
 
28
+ 2.3.1 (2017-05-19):
29
+ * use `key?` when parsing the JSON response to differentiate `nil` and `false` and attribute not being present.
30
+
28
31
  2.3.0 (2017-05-18):
29
32
  * set attr if `false` value is provided in the JSON response to differentiate `nil` and `false`
30
33
 
@@ -23,9 +23,9 @@ class AdditionalCurrencies
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["invoice"].nil?
28
+ if attributes.key?("invoice")
29
29
  @invoice = AdditionalCurrency.new(attributes["invoice"])
30
30
 
31
31
  end
@@ -28,29 +28,29 @@ class AdditionalCurrency
28
28
  end
29
29
 
30
30
  def initialize(attributes = {})
31
- return if attributes.empty?
31
+ return if attributes.nil? or attributes.empty?
32
32
  # Morph attribute keys into undescored rubyish style
33
- unless attributes["currency_code"].nil?
33
+ if attributes.key?("currency_code")
34
34
  @currency_code = attributes["currency_code"]
35
35
 
36
36
  end
37
- unless attributes["amount"].nil?
37
+ if attributes.key?("amount")
38
38
  @amount = attributes["amount"]
39
39
 
40
40
  end
41
- unless attributes["tax_amount"].nil?
41
+ if attributes.key?("tax_amount")
42
42
  @tax_amount = attributes["tax_amount"]
43
43
 
44
44
  end
45
- unless attributes["fx_rate"].nil?
45
+ if attributes.key?("fx_rate")
46
46
  @fx_rate = attributes["fx_rate"]
47
47
 
48
48
  end
49
- unless attributes["fx_date"].nil?
49
+ if attributes.key?("fx_date")
50
50
  @fx_date = attributes["fx_date"]
51
51
 
52
52
  end
53
- unless attributes["total_amount"].nil?
53
+ if attributes.key?("total_amount")
54
54
  @total_amount = attributes["total_amount"]
55
55
 
56
56
  end
@@ -26,21 +26,21 @@ class ByCountry
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["value"].nil?
31
+ if attributes.key?("value")
32
32
  @value = attributes["value"]
33
33
 
34
34
  end
35
- unless attributes["tax_country_name"].nil?
35
+ if attributes.key?("tax_country_name")
36
36
  @tax_country_name = attributes["tax_country_name"]
37
37
 
38
38
  end
39
- unless attributes["tax_country_code"].nil?
39
+ if attributes.key?("tax_country_code")
40
40
  @tax_country_code = attributes["tax_country_code"]
41
41
 
42
42
  end
43
- unless attributes["currency_code"].nil?
43
+ if attributes.key?("currency_code")
44
44
  @currency_code = attributes["currency_code"]
45
45
 
46
46
  end
@@ -24,14 +24,14 @@ class ByStatus
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["_n"].nil?
29
+ if attributes.key?("_n")
30
30
  if (value = attributes["N"]).is_a?(Array)
31
31
  @_n = value.map{ |v| N.new(v) }
32
32
  end
33
33
  end
34
- unless attributes["_c"].nil?
34
+ if attributes.key?("_c")
35
35
  if (value = attributes["C"]).is_a?(Array)
36
36
  @_c = value.map{ |v| C.new(v) }
37
37
  end
@@ -27,25 +27,25 @@ class ByTaxationType
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["taxed_count"].nil?
32
+ if attributes.key?("taxed_count")
33
33
  @taxed_count = attributes["taxed_count"]
34
34
 
35
35
  end
36
- unless attributes["deducted_count"].nil?
36
+ if attributes.key?("deducted_count")
37
37
  @deducted_count = attributes["deducted_count"]
38
38
 
39
39
  end
40
- unless attributes["transactions_count"].nil?
40
+ if attributes.key?("transactions_count")
41
41
  @transactions_count = attributes["transactions_count"]
42
42
 
43
43
  end
44
- unless attributes["eu_b2b"].nil?
44
+ if attributes.key?("eu_b2b")
45
45
  @eu_b2b = attributes["eu_b2b"]
46
46
 
47
47
  end
48
- unless attributes["eu_taxed"].nil?
48
+ if attributes.key?("eu_taxed")
49
49
  @eu_taxed = attributes["eu_taxed"]
50
50
 
51
51
  end
@@ -26,21 +26,21 @@ class C
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["day_raw"].nil?
31
+ if attributes.key?("day_raw")
32
32
  @day_raw = attributes["day_raw"]
33
33
 
34
34
  end
35
- unless attributes["value"].nil?
35
+ if attributes.key?("value")
36
36
  @value = attributes["value"]
37
37
 
38
38
  end
39
- unless attributes["status"].nil?
39
+ if attributes.key?("status")
40
40
  @status = attributes["status"]
41
41
 
42
42
  end
43
- unless attributes["day"].nil?
43
+ if attributes.key?("day")
44
44
  @day = attributes["day"]
45
45
 
46
46
  end
@@ -25,18 +25,18 @@ class CalculateSimpleTaxOut
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
@@ -23,9 +23,9 @@ class CalculateTaxIn
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["transaction"].nil?
28
+ if attributes.key?("transaction")
29
29
  @transaction = InputTransaction.new(attributes["transaction"])
30
30
 
31
31
  end
@@ -30,37 +30,37 @@ class CalculateTaxLocationOut
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
- unless attributes["tax_country_code"].nil?
35
+ if attributes.key?("tax_country_code")
36
36
  @tax_country_code = attributes["tax_country_code"]
37
37
 
38
38
  end
39
- unless attributes["tax_deducted"].nil?
39
+ if attributes.key?("tax_deducted")
40
40
  @tax_deducted = attributes["tax_deducted"]
41
41
 
42
42
  end
43
- unless attributes["tax_supported"].nil?
43
+ if attributes.key?("tax_supported")
44
44
  @tax_supported = attributes["tax_supported"]
45
45
 
46
46
  end
47
- unless attributes["countries"].nil?
47
+ if attributes.key?("countries")
48
48
  @countries = Countries.new(attributes["countries"])
49
49
 
50
50
  end
51
- unless attributes["buyer_ip"].nil?
51
+ if attributes.key?("buyer_ip")
52
52
  @buyer_ip = attributes["buyer_ip"]
53
53
 
54
54
  end
55
- unless attributes["billing_country_code"].nil?
55
+ if attributes.key?("billing_country_code")
56
56
  @billing_country_code = attributes["billing_country_code"]
57
57
 
58
58
  end
59
- unless attributes["buyer_credit_card_prefix"].nil?
59
+ if attributes.key?("buyer_credit_card_prefix")
60
60
  @buyer_credit_card_prefix = attributes["buyer_credit_card_prefix"]
61
61
 
62
62
  end
63
- unless attributes["evidence"].nil?
63
+ if attributes.key?("evidence")
64
64
  @evidence = Evidence.new(attributes["evidence"])
65
65
 
66
66
  end
@@ -25,18 +25,18 @@ class CalculateTaxOut
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
@@ -23,9 +23,9 @@ class CancelTransactionOut
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 CapturePaymentOut
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 ConfirmTransactionIn
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["transaction"].nil?
28
+ if attributes.key?("transaction")
29
29
  @transaction = InputTransactionUpdate.new(attributes["transaction"])
30
30
 
31
31
  end
@@ -25,18 +25,18 @@ class ConfirmTransactionOut
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
@@ -33,49 +33,49 @@ class Countries
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 = CountrySchema.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 = CountrySchema.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 = CountrySchema.new(attributes["by_2003_rules"])
48
48
 
49
49
  end
50
- unless attributes["forced"].nil?
50
+ if attributes.key?("forced")
51
51
  @forced = CountrySchema.new(attributes["forced"])
52
52
 
53
53
  end
54
- unless attributes["by_ip"].nil?
54
+ if attributes.key?("by_ip")
55
55
  @by_ip = CountrySchema.new(attributes["by_ip"])
56
56
 
57
57
  end
58
- unless attributes["guessed_from_ip"].nil?
58
+ if attributes.key?("guessed_from_ip")
59
59
  @guessed_from_ip = CountrySchema.new(attributes["guessed_from_ip"])
60
60
 
61
61
  end
62
- unless attributes["other_commercially_relevant_info"].nil?
62
+ if attributes.key?("other_commercially_relevant_info")
63
63
  @other_commercially_relevant_info = CountrySchema.new(attributes["other_commercially_relevant_info"])
64
64
 
65
65
  end
66
- unless attributes["by_billing"].nil?
66
+ if attributes.key?("by_billing")
67
67
  @by_billing = CountrySchema.new(attributes["by_billing"])
68
68
 
69
69
  end
70
- unless attributes["by_tax_number"].nil?
70
+ if attributes.key?("by_tax_number")
71
71
  @by_tax_number = CountrySchema.new(attributes["by_tax_number"])
72
72
 
73
73
  end
74
- unless attributes["detected"].nil?
74
+ if attributes.key?("detected")
75
75
  @detected = CountrySchema.new(attributes["detected"])
76
76
 
77
77
  end
78
- unless attributes["self_declaration"].nil?
78
+ if attributes.key?("self_declaration")
79
79
  @self_declaration = CountrySchema.new(attributes["self_declaration"])
80
80
 
81
81
  end
@@ -34,55 +34,55 @@ class Country
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