taxamo-ns 2.2.0 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -3
  3. data/lib/taxamo/models/additionalcurrencies.rb +1 -1
  4. data/lib/taxamo/models/additionalcurrency.rb +6 -6
  5. data/lib/taxamo/models/bycountry.rb +4 -4
  6. data/lib/taxamo/models/bystatus.rb +2 -2
  7. data/lib/taxamo/models/bytaxationtype.rb +5 -5
  8. data/lib/taxamo/models/c.rb +4 -4
  9. data/lib/taxamo/models/calculatesimpletaxout.rb +3 -3
  10. data/lib/taxamo/models/calculatetaxin.rb +1 -1
  11. data/lib/taxamo/models/calculatetaxlocationout.rb +8 -8
  12. data/lib/taxamo/models/calculatetaxout.rb +3 -3
  13. data/lib/taxamo/models/canceltransactionout.rb +1 -1
  14. data/lib/taxamo/models/capturepaymentout.rb +1 -1
  15. data/lib/taxamo/models/confirmtransactionin.rb +1 -1
  16. data/lib/taxamo/models/confirmtransactionout.rb +3 -3
  17. data/lib/taxamo/models/countries.rb +11 -11
  18. data/lib/taxamo/models/country.rb +12 -12
  19. data/lib/taxamo/models/countryschema.rb +12 -12
  20. data/lib/taxamo/models/createpaymentin.rb +3 -3
  21. data/lib/taxamo/models/createpaymentout.rb +1 -1
  22. data/lib/taxamo/models/createrefundin.rb +5 -5
  23. data/lib/taxamo/models/createrefundout.rb +4 -4
  24. data/lib/taxamo/models/createsmstokenin.rb +2 -2
  25. data/lib/taxamo/models/createsmstokenout.rb +1 -1
  26. data/lib/taxamo/models/createtransactionin.rb +2 -2
  27. data/lib/taxamo/models/createtransactionout.rb +3 -3
  28. data/lib/taxamo/models/currencyschema.rb +5 -5
  29. data/lib/taxamo/models/customfields.rb +2 -2
  30. data/lib/taxamo/models/emailinvoicein.rb +1 -1
  31. data/lib/taxamo/models/emailinvoiceout.rb +1 -1
  32. data/lib/taxamo/models/emailrefundin.rb +1 -1
  33. data/lib/taxamo/models/emailrefundout.rb +1 -1
  34. data/lib/taxamo/models/evidence.rb +11 -11
  35. data/lib/taxamo/models/evidenceschema.rb +4 -4
  36. data/lib/taxamo/models/getcountriesdictout.rb +1 -1
  37. data/lib/taxamo/models/getcurrenciesdictout.rb +1 -1
  38. data/lib/taxamo/models/getdailysettlementstatsout.rb +1 -1
  39. data/lib/taxamo/models/getdetailedrefundsout.rb +1 -1
  40. data/lib/taxamo/models/getdomesticsummaryreportout.rb +13 -13
  41. data/lib/taxamo/models/geteuviesreportout.rb +4 -4
  42. data/lib/taxamo/models/getproducttypesdictout.rb +1 -1
  43. data/lib/taxamo/models/getrefundsout.rb +1 -1
  44. data/lib/taxamo/models/getsettlementout.rb +5 -5
  45. data/lib/taxamo/models/getsettlementstatsbycountryout.rb +1 -1
  46. data/lib/taxamo/models/getsettlementstatsbytaxationtypeout.rb +1 -1
  47. data/lib/taxamo/models/getsettlementsummaryout.rb +1 -1
  48. data/lib/taxamo/models/gettransactionout.rb +3 -3
  49. data/lib/taxamo/models/gettransactionsstatsbycountryout.rb +1 -1
  50. data/lib/taxamo/models/gettransactionsstatsout.rb +1 -1
  51. data/lib/taxamo/models/inputtransaction.rb +32 -32
  52. data/lib/taxamo/models/inputtransactionline.rb +17 -17
  53. data/lib/taxamo/models/inputtransactionupdate.rb +32 -32
  54. data/lib/taxamo/models/invoiceaddress.rb +8 -8
  55. data/lib/taxamo/models/listpaymentsout.rb +1 -1
  56. data/lib/taxamo/models/listrefundsout.rb +1 -1
  57. data/lib/taxamo/models/listtransactionsout.rb +1 -1
  58. data/lib/taxamo/models/locategivenipout.rb +3 -3
  59. data/lib/taxamo/models/locatemyipout.rb +3 -3
  60. data/lib/taxamo/models/n.rb +4 -4
  61. data/lib/taxamo/models/payments.rb +3 -3
  62. data/lib/taxamo/models/producttypeschema.rb +1 -1
  63. data/lib/taxamo/models/refunds.rb +10 -10
  64. data/lib/taxamo/models/report.rb +9 -9
  65. data/lib/taxamo/models/settlementdailystatsschema.rb +9 -9
  66. data/lib/taxamo/models/storagerequiredfields.rb +1 -1
  67. data/lib/taxamo/models/summary.rb +8 -8
  68. data/lib/taxamo/models/taxdataschema.rb +1 -1
  69. data/lib/taxamo/models/taxrequiredfields.rb +1 -1
  70. data/lib/taxamo/models/transaction.rb +54 -54
  71. data/lib/taxamo/models/transactionlines.rb +23 -23
  72. data/lib/taxamo/models/transactions.rb +54 -54
  73. data/lib/taxamo/models/unconfirmtransactionin.rb +1 -1
  74. data/lib/taxamo/models/unconfirmtransactionout.rb +3 -3
  75. data/lib/taxamo/models/updatetransactionin.rb +1 -1
  76. data/lib/taxamo/models/updatetransactionout.rb +3 -3
  77. data/lib/taxamo/models/ustaxexemptioncertificatedetailsschema.rb +16 -16
  78. data/lib/taxamo/models/ustaxexemptioncertificateschema.rb +2 -2
  79. data/lib/taxamo/models/ustaxexemptstate.rb +3 -3
  80. data/lib/taxamo/models/ustaxid.rb +3 -3
  81. data/lib/taxamo/models/validatetaxnumberout.rb +4 -4
  82. data/lib/taxamo/models/verifysmstokenout.rb +1 -1
  83. data/lib/taxamo/version.rb +1 -1
  84. data/test/taxamo/tax_test.rb +5 -1
  85. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b21725ba22892284c0782c2349f2a598b4aa4cd4
4
- data.tar.gz: 0bbb30fd57bcbaabad55f0902fe61f1d7fec02de
3
+ metadata.gz: af0496ba8fa12bc0c3046988e3694e59b597d79b
4
+ data.tar.gz: b2fc7d05399ea300fce74629b49f4e7ec4868e50
5
5
  SHA512:
6
- metadata.gz: 40d2210b0861f2453e9c0de9214fe7b974f42c557d93b6478f70bdc1a8186c669c674d33fb4660dfc02c07201b7155e5e342bcf8286f0eeb62975ce9c66ff424
7
- data.tar.gz: 798709ed71c9c7b750c2f4efd195b1e32892c9fb53704fd10a4a0eb65baef169ecf515229fab5283de7120be3d7a43d3621b122d858ef191103213f52f81f675
6
+ metadata.gz: dd2fa5484afdb97bb6a8a7815c833a050c524ad8c722bc620f887031f04dfc3a5962d1f9a27c5e145a982c1daf38567c6b0ffa96bfb26e881b30cda49137266b
7
+ data.tar.gz: 7331926164d0a578e10594fdc89e1c2970705b104d352424e6b2f40629f0d9a693ca01c434f281e54c0b4048a6c656c758f39dd4cb58f24fdd5818d3871fc92c
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.2.0.gem
11
+ $ gem install taxamo-ns-2.3.0.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.0'
17
+ gem "taxamo-ns", github: "taxamo/taxamo-ruby", '~> 2.3'
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.0 (2017-05-18):
29
+ * set attr if `false` value is provided in the JSON response to differentiate `nil` and `false`
30
+
28
31
  2.2.0 (2017-05-03):
29
32
  * rename the gem to taxamo-ns to distinguish it from non-namespaced version
30
33
 
@@ -139,7 +142,7 @@ Please see http://www.taxamo.com/documentation/ for the most up-to-date document
139
142
 
140
143
  ## License
141
144
 
142
- Copyright 2014-2016 Taxamo, Ltd.
145
+ Copyright 2014-2017 Taxamo, Ltd.
143
146
 
144
147
  Licensed under the Apache License, Version 2.0 (the "License");
145
148
  you may not use this file except in compliance with the License.
@@ -25,7 +25,7 @@ class AdditionalCurrencies
25
25
  def initialize(attributes = {})
26
26
  return if attributes.empty?
27
27
  # Morph attribute keys into undescored rubyish style
28
- if attributes["invoice"]
28
+ unless attributes["invoice"].nil?
29
29
  @invoice = AdditionalCurrency.new(attributes["invoice"])
30
30
 
31
31
  end
@@ -30,27 +30,27 @@ class AdditionalCurrency
30
30
  def initialize(attributes = {})
31
31
  return if attributes.empty?
32
32
  # Morph attribute keys into undescored rubyish style
33
- if attributes["currency_code"]
33
+ unless attributes["currency_code"].nil?
34
34
  @currency_code = attributes["currency_code"]
35
35
 
36
36
  end
37
- if attributes["amount"]
37
+ unless attributes["amount"].nil?
38
38
  @amount = attributes["amount"]
39
39
 
40
40
  end
41
- if attributes["tax_amount"]
41
+ unless attributes["tax_amount"].nil?
42
42
  @tax_amount = attributes["tax_amount"]
43
43
 
44
44
  end
45
- if attributes["fx_rate"]
45
+ unless attributes["fx_rate"].nil?
46
46
  @fx_rate = attributes["fx_rate"]
47
47
 
48
48
  end
49
- if attributes["fx_date"]
49
+ unless attributes["fx_date"].nil?
50
50
  @fx_date = attributes["fx_date"]
51
51
 
52
52
  end
53
- if attributes["total_amount"]
53
+ unless attributes["total_amount"].nil?
54
54
  @total_amount = attributes["total_amount"]
55
55
 
56
56
  end
@@ -28,19 +28,19 @@ class ByCountry
28
28
  def initialize(attributes = {})
29
29
  return if attributes.empty?
30
30
  # Morph attribute keys into undescored rubyish style
31
- if attributes["value"]
31
+ unless attributes["value"].nil?
32
32
  @value = attributes["value"]
33
33
 
34
34
  end
35
- if attributes["tax_country_name"]
35
+ unless attributes["tax_country_name"].nil?
36
36
  @tax_country_name = attributes["tax_country_name"]
37
37
 
38
38
  end
39
- if attributes["tax_country_code"]
39
+ unless attributes["tax_country_code"].nil?
40
40
  @tax_country_code = attributes["tax_country_code"]
41
41
 
42
42
  end
43
- if attributes["currency_code"]
43
+ unless attributes["currency_code"].nil?
44
44
  @currency_code = attributes["currency_code"]
45
45
 
46
46
  end
@@ -26,12 +26,12 @@ class ByStatus
26
26
  def initialize(attributes = {})
27
27
  return if attributes.empty?
28
28
  # Morph attribute keys into undescored rubyish style
29
- if attributes["_n"]
29
+ unless attributes["_n"].nil?
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
- if attributes["_c"]
34
+ unless attributes["_c"].nil?
35
35
  if (value = attributes["C"]).is_a?(Array)
36
36
  @_c = value.map{ |v| C.new(v) }
37
37
  end
@@ -29,23 +29,23 @@ class ByTaxationType
29
29
  def initialize(attributes = {})
30
30
  return if attributes.empty?
31
31
  # Morph attribute keys into undescored rubyish style
32
- if attributes["taxed_count"]
32
+ unless attributes["taxed_count"].nil?
33
33
  @taxed_count = attributes["taxed_count"]
34
34
 
35
35
  end
36
- if attributes["deducted_count"]
36
+ unless attributes["deducted_count"].nil?
37
37
  @deducted_count = attributes["deducted_count"]
38
38
 
39
39
  end
40
- if attributes["transactions_count"]
40
+ unless attributes["transactions_count"].nil?
41
41
  @transactions_count = attributes["transactions_count"]
42
42
 
43
43
  end
44
- if attributes["eu_b2b"]
44
+ unless attributes["eu_b2b"].nil?
45
45
  @eu_b2b = attributes["eu_b2b"]
46
46
 
47
47
  end
48
- if attributes["eu_taxed"]
48
+ unless attributes["eu_taxed"].nil?
49
49
  @eu_taxed = attributes["eu_taxed"]
50
50
 
51
51
  end
@@ -28,19 +28,19 @@ class C
28
28
  def initialize(attributes = {})
29
29
  return if attributes.empty?
30
30
  # Morph attribute keys into undescored rubyish style
31
- if attributes["day_raw"]
31
+ unless attributes["day_raw"].nil?
32
32
  @day_raw = attributes["day_raw"]
33
33
 
34
34
  end
35
- if attributes["value"]
35
+ unless attributes["value"].nil?
36
36
  @value = attributes["value"]
37
37
 
38
38
  end
39
- if attributes["status"]
39
+ unless attributes["status"].nil?
40
40
  @status = attributes["status"]
41
41
 
42
42
  end
43
- if attributes["day"]
43
+ unless attributes["day"].nil?
44
44
  @day = attributes["day"]
45
45
 
46
46
  end
@@ -27,16 +27,16 @@ class CalculateSimpleTaxOut
27
27
  def initialize(attributes = {})
28
28
  return if attributes.empty?
29
29
  # Morph attribute keys into undescored rubyish style
30
- if attributes["transaction"]
30
+ unless attributes["transaction"].nil?
31
31
  @transaction = Transaction.new(attributes["transaction"])
32
32
 
33
33
  end
34
- if attributes["tax_required_fields"]
34
+ unless attributes["tax_required_fields"].nil?
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
- if attributes["storage_required_fields"]
39
+ unless attributes["storage_required_fields"].nil?
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
@@ -25,7 +25,7 @@ class CalculateTaxIn
25
25
  def initialize(attributes = {})
26
26
  return if attributes.empty?
27
27
  # Morph attribute keys into undescored rubyish style
28
- if attributes["transaction"]
28
+ unless attributes["transaction"].nil?
29
29
  @transaction = InputTransaction.new(attributes["transaction"])
30
30
 
31
31
  end
@@ -32,35 +32,35 @@ class CalculateTaxLocationOut
32
32
  def initialize(attributes = {})
33
33
  return if attributes.empty?
34
34
  # Morph attribute keys into undescored rubyish style
35
- if attributes["tax_country_code"]
35
+ unless attributes["tax_country_code"].nil?
36
36
  @tax_country_code = attributes["tax_country_code"]
37
37
 
38
38
  end
39
- if attributes["tax_deducted"]
39
+ unless attributes["tax_deducted"].nil?
40
40
  @tax_deducted = attributes["tax_deducted"]
41
41
 
42
42
  end
43
- if attributes["tax_supported"]
43
+ unless attributes["tax_supported"].nil?
44
44
  @tax_supported = attributes["tax_supported"]
45
45
 
46
46
  end
47
- if attributes["countries"]
47
+ unless attributes["countries"].nil?
48
48
  @countries = Countries.new(attributes["countries"])
49
49
 
50
50
  end
51
- if attributes["buyer_ip"]
51
+ unless attributes["buyer_ip"].nil?
52
52
  @buyer_ip = attributes["buyer_ip"]
53
53
 
54
54
  end
55
- if attributes["billing_country_code"]
55
+ unless attributes["billing_country_code"].nil?
56
56
  @billing_country_code = attributes["billing_country_code"]
57
57
 
58
58
  end
59
- if attributes["buyer_credit_card_prefix"]
59
+ unless attributes["buyer_credit_card_prefix"].nil?
60
60
  @buyer_credit_card_prefix = attributes["buyer_credit_card_prefix"]
61
61
 
62
62
  end
63
- if attributes["evidence"]
63
+ unless attributes["evidence"].nil?
64
64
  @evidence = Evidence.new(attributes["evidence"])
65
65
 
66
66
  end
@@ -27,16 +27,16 @@ class CalculateTaxOut
27
27
  def initialize(attributes = {})
28
28
  return if attributes.empty?
29
29
  # Morph attribute keys into undescored rubyish style
30
- if attributes["transaction"]
30
+ unless attributes["transaction"].nil?
31
31
  @transaction = Transaction.new(attributes["transaction"])
32
32
 
33
33
  end
34
- if attributes["tax_required_fields"]
34
+ unless attributes["tax_required_fields"].nil?
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
- if attributes["storage_required_fields"]
39
+ unless attributes["storage_required_fields"].nil?
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
@@ -25,7 +25,7 @@ class CancelTransactionOut
25
25
  def initialize(attributes = {})
26
26
  return if attributes.empty?
27
27
  # Morph attribute keys into undescored rubyish style
28
- if attributes["success"]
28
+ unless attributes["success"].nil?
29
29
  @success = attributes["success"]
30
30
 
31
31
  end
@@ -25,7 +25,7 @@ class CapturePaymentOut
25
25
  def initialize(attributes = {})
26
26
  return if attributes.empty?
27
27
  # Morph attribute keys into undescored rubyish style
28
- if attributes["success"]
28
+ unless attributes["success"].nil?
29
29
  @success = attributes["success"]
30
30
 
31
31
  end
@@ -25,7 +25,7 @@ class ConfirmTransactionIn
25
25
  def initialize(attributes = {})
26
26
  return if attributes.empty?
27
27
  # Morph attribute keys into undescored rubyish style
28
- if attributes["transaction"]
28
+ unless attributes["transaction"].nil?
29
29
  @transaction = InputTransactionUpdate.new(attributes["transaction"])
30
30
 
31
31
  end
@@ -27,16 +27,16 @@ class ConfirmTransactionOut
27
27
  def initialize(attributes = {})
28
28
  return if attributes.empty?
29
29
  # Morph attribute keys into undescored rubyish style
30
- if attributes["transaction"]
30
+ unless attributes["transaction"].nil?
31
31
  @transaction = Transaction.new(attributes["transaction"])
32
32
 
33
33
  end
34
- if attributes["tax_required_fields"]
34
+ unless attributes["tax_required_fields"].nil?
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
- if attributes["storage_required_fields"]
39
+ unless attributes["storage_required_fields"].nil?
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
@@ -35,47 +35,47 @@ class Countries
35
35
  def initialize(attributes = {})
36
36
  return if attributes.empty?
37
37
  # Morph attribute keys into undescored rubyish style
38
- if attributes["by_token"]
38
+ unless attributes["by_token"].nil?
39
39
  @by_token = CountrySchema.new(attributes["by_token"])
40
40
 
41
41
  end
42
- if attributes["by_cc"]
42
+ unless attributes["by_cc"].nil?
43
43
  @by_cc = CountrySchema.new(attributes["by_cc"])
44
44
 
45
45
  end
46
- if attributes["by_2003_rules"]
46
+ unless attributes["by_2003_rules"].nil?
47
47
  @by_2003_rules = CountrySchema.new(attributes["by_2003_rules"])
48
48
 
49
49
  end
50
- if attributes["forced"]
50
+ unless attributes["forced"].nil?
51
51
  @forced = CountrySchema.new(attributes["forced"])
52
52
 
53
53
  end
54
- if attributes["by_ip"]
54
+ unless attributes["by_ip"].nil?
55
55
  @by_ip = CountrySchema.new(attributes["by_ip"])
56
56
 
57
57
  end
58
- if attributes["guessed_from_ip"]
58
+ unless attributes["guessed_from_ip"].nil?
59
59
  @guessed_from_ip = CountrySchema.new(attributes["guessed_from_ip"])
60
60
 
61
61
  end
62
- if attributes["other_commercially_relevant_info"]
62
+ unless attributes["other_commercially_relevant_info"].nil?
63
63
  @other_commercially_relevant_info = CountrySchema.new(attributes["other_commercially_relevant_info"])
64
64
 
65
65
  end
66
- if attributes["by_billing"]
66
+ unless attributes["by_billing"].nil?
67
67
  @by_billing = CountrySchema.new(attributes["by_billing"])
68
68
 
69
69
  end
70
- if attributes["by_tax_number"]
70
+ unless attributes["by_tax_number"].nil?
71
71
  @by_tax_number = CountrySchema.new(attributes["by_tax_number"])
72
72
 
73
73
  end
74
- if attributes["detected"]
74
+ unless attributes["detected"].nil?
75
75
  @detected = CountrySchema.new(attributes["detected"])
76
76
 
77
77
  end
78
- if attributes["self_declaration"]
78
+ unless attributes["self_declaration"].nil?
79
79
  @self_declaration = CountrySchema.new(attributes["self_declaration"])
80
80
 
81
81
  end
@@ -36,53 +36,53 @@ class Country
36
36
  def initialize(attributes = {})
37
37
  return if attributes.empty?
38
38
  # Morph attribute keys into undescored rubyish style
39
- if attributes["code_long"]
39
+ unless attributes["code_long"].nil?
40
40
  @code_long = attributes["code_long"]
41
41
 
42
42
  end
43
- if attributes["codenum"]
43
+ unless attributes["codenum"].nil?
44
44
  @codenum = attributes["codenum"]
45
45
 
46
46
  end
47
- if attributes["currency"]
47
+ unless attributes["currency"].nil?
48
48
  if (value = attributes["currency"]).is_a?(Array)
49
49
  @currency = value
50
50
  end
51
51
  end
52
- if attributes["tax_supported"]
52
+ unless attributes["tax_supported"].nil?
53
53
  @tax_supported = attributes["tax_supported"]
54
54
 
55
55
  end
56
- if attributes["name"]
56
+ unless attributes["name"].nil?
57
57
  @name = attributes["name"]
58
58
 
59
59
  end
60
- if attributes["ccn3"]
60
+ unless attributes["ccn3"].nil?
61
61
  @ccn3 = attributes["ccn3"]
62
62
 
63
63
  end
64
- if attributes["tax_region"]
64
+ unless attributes["tax_region"].nil?
65
65
  @tax_region = attributes["tax_region"]
66
66
 
67
67
  end
68
- if attributes["cca3"]
68
+ unless attributes["cca3"].nil?
69
69
  @cca3 = attributes["cca3"]
70
70
 
71
71
  end
72
- if attributes["calling_code"]
72
+ unless attributes["calling_code"].nil?
73
73
  if (value = attributes["callingCode"]).is_a?(Array)
74
74
  @calling_code = value
75
75
  end
76
76
  end
77
- if attributes["tax_number_country_code"]
77
+ unless attributes["tax_number_country_code"].nil?
78
78
  @tax_number_country_code = attributes["tax_number_country_code"]
79
79
 
80
80
  end
81
- if attributes["code"]
81
+ unless attributes["code"].nil?
82
82
  @code = attributes["code"]
83
83
 
84
84
  end
85
- if attributes["cca2"]
85
+ unless attributes["cca2"].nil?
86
86
  @cca2 = attributes["cca2"]
87
87
 
88
88
  end
@@ -36,53 +36,53 @@ class CountrySchema
36
36
  def initialize(attributes = {})
37
37
  return if attributes.empty?
38
38
  # Morph attribute keys into undescored rubyish style
39
- if attributes["code_long"]
39
+ unless attributes["code_long"].nil?
40
40
  @code_long = attributes["code_long"]
41
41
 
42
42
  end
43
- if attributes["codenum"]
43
+ unless attributes["codenum"].nil?
44
44
  @codenum = attributes["codenum"]
45
45
 
46
46
  end
47
- if attributes["currency"]
47
+ unless attributes["currency"].nil?
48
48
  if (value = attributes["currency"]).is_a?(Array)
49
49
  @currency = value
50
50
  end
51
51
  end
52
- if attributes["tax_supported"]
52
+ unless attributes["tax_supported"].nil?
53
53
  @tax_supported = attributes["tax_supported"]
54
54
 
55
55
  end
56
- if attributes["name"]
56
+ unless attributes["name"].nil?
57
57
  @name = attributes["name"]
58
58
 
59
59
  end
60
- if attributes["ccn3"]
60
+ unless attributes["ccn3"].nil?
61
61
  @ccn3 = attributes["ccn3"]
62
62
 
63
63
  end
64
- if attributes["tax_region"]
64
+ unless attributes["tax_region"].nil?
65
65
  @tax_region = attributes["tax_region"]
66
66
 
67
67
  end
68
- if attributes["cca3"]
68
+ unless attributes["cca3"].nil?
69
69
  @cca3 = attributes["cca3"]
70
70
 
71
71
  end
72
- if attributes["calling_code"]
72
+ unless attributes["calling_code"].nil?
73
73
  if (value = attributes["callingCode"]).is_a?(Array)
74
74
  @calling_code = value
75
75
  end
76
76
  end
77
- if attributes["tax_number_country_code"]
77
+ unless attributes["tax_number_country_code"].nil?
78
78
  @tax_number_country_code = attributes["tax_number_country_code"]
79
79
 
80
80
  end
81
- if attributes["code"]
81
+ unless attributes["code"].nil?
82
82
  @code = attributes["code"]
83
83
 
84
84
  end
85
- if attributes["cca2"]
85
+ unless attributes["cca2"].nil?
86
86
  @cca2 = attributes["cca2"]
87
87
 
88
88
  end
@@ -27,15 +27,15 @@ class CreatePaymentIn
27
27
  def initialize(attributes = {})
28
28
  return if attributes.empty?
29
29
  # Morph attribute keys into undescored rubyish style
30
- if attributes["amount"]
30
+ unless attributes["amount"].nil?
31
31
  @amount = attributes["amount"]
32
32
 
33
33
  end
34
- if attributes["payment_timestamp"]
34
+ unless attributes["payment_timestamp"].nil?
35
35
  @payment_timestamp = attributes["payment_timestamp"]
36
36
 
37
37
  end
38
- if attributes["payment_information"]
38
+ unless attributes["payment_information"].nil?
39
39
  @payment_information = attributes["payment_information"]
40
40
 
41
41
  end
@@ -25,7 +25,7 @@ class CreatePaymentOut
25
25
  def initialize(attributes = {})
26
26
  return if attributes.empty?
27
27
  # Morph attribute keys into undescored rubyish style
28
- if attributes["success"]
28
+ unless attributes["success"].nil?
29
29
  @success = attributes["success"]
30
30
 
31
31
  end
@@ -29,23 +29,23 @@ class CreateRefundIn
29
29
  def initialize(attributes = {})
30
30
  return if attributes.empty?
31
31
  # Morph attribute keys into undescored rubyish style
32
- if attributes["line_key"]
32
+ unless attributes["line_key"].nil?
33
33
  @line_key = attributes["line_key"]
34
34
 
35
35
  end
36
- if attributes["custom_id"]
36
+ unless attributes["custom_id"].nil?
37
37
  @custom_id = attributes["custom_id"]
38
38
 
39
39
  end
40
- if attributes["amount"]
40
+ unless attributes["amount"].nil?
41
41
  @amount = attributes["amount"]
42
42
 
43
43
  end
44
- if attributes["total_amount"]
44
+ unless attributes["total_amount"].nil?
45
45
  @total_amount = attributes["total_amount"]
46
46
 
47
47
  end
48
- if attributes["refund_reason"]
48
+ unless attributes["refund_reason"].nil?
49
49
  @refund_reason = attributes["refund_reason"]
50
50
 
51
51
  end
@@ -28,19 +28,19 @@ class CreateRefundOut
28
28
  def initialize(attributes = {})
29
29
  return if attributes.empty?
30
30
  # Morph attribute keys into undescored rubyish style
31
- if attributes["total_amount"]
31
+ unless attributes["total_amount"].nil?
32
32
  @total_amount = attributes["total_amount"]
33
33
 
34
34
  end
35
- if attributes["tax_amount"]
35
+ unless attributes["tax_amount"].nil?
36
36
  @tax_amount = attributes["tax_amount"]
37
37
 
38
38
  end
39
- if attributes["refunded_total_amount"]
39
+ unless attributes["refunded_total_amount"].nil?
40
40
  @refunded_total_amount = attributes["refunded_total_amount"]
41
41
 
42
42
  end
43
- if attributes["refunded_tax_amount"]
43
+ unless attributes["refunded_tax_amount"].nil?
44
44
  @refunded_tax_amount = attributes["refunded_tax_amount"]
45
45
 
46
46
  end
@@ -26,11 +26,11 @@ class CreateSMSTokenIn
26
26
  def initialize(attributes = {})
27
27
  return if attributes.empty?
28
28
  # Morph attribute keys into undescored rubyish style
29
- if attributes["country_code"]
29
+ unless attributes["country_code"].nil?
30
30
  @country_code = attributes["country_code"]
31
31
 
32
32
  end
33
- if attributes["recipient"]
33
+ unless attributes["recipient"].nil?
34
34
  @recipient = attributes["recipient"]
35
35
 
36
36
  end
@@ -25,7 +25,7 @@ class CreateSMSTokenOut
25
25
  def initialize(attributes = {})
26
26
  return if attributes.empty?
27
27
  # Morph attribute keys into undescored rubyish style
28
- if attributes["success"]
28
+ unless attributes["success"].nil?
29
29
  @success = attributes["success"]
30
30
 
31
31
  end
@@ -26,11 +26,11 @@ class CreateTransactionIn
26
26
  def initialize(attributes = {})
27
27
  return if attributes.empty?
28
28
  # Morph attribute keys into undescored rubyish style
29
- if attributes["manual_mode"]
29
+ unless attributes["manual_mode"].nil?
30
30
  @manual_mode = attributes["manual_mode"]
31
31
 
32
32
  end
33
- if attributes["transaction"]
33
+ unless attributes["transaction"].nil?
34
34
  @transaction = InputTransaction.new(attributes["transaction"])
35
35
 
36
36
  end