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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30e57e2079d49e411b06a1d7cd46e613ad680b32
|
4
|
+
data.tar.gz: f1e8eb74fa7a3016d0f508e2117c0d25bf31df2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
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
|
-
|
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
|
-
|
33
|
+
if attributes.key?("currency_code")
|
34
34
|
@currency_code = attributes["currency_code"]
|
35
35
|
|
36
36
|
end
|
37
|
-
|
37
|
+
if attributes.key?("amount")
|
38
38
|
@amount = attributes["amount"]
|
39
39
|
|
40
40
|
end
|
41
|
-
|
41
|
+
if attributes.key?("tax_amount")
|
42
42
|
@tax_amount = attributes["tax_amount"]
|
43
43
|
|
44
44
|
end
|
45
|
-
|
45
|
+
if attributes.key?("fx_rate")
|
46
46
|
@fx_rate = attributes["fx_rate"]
|
47
47
|
|
48
48
|
end
|
49
|
-
|
49
|
+
if attributes.key?("fx_date")
|
50
50
|
@fx_date = attributes["fx_date"]
|
51
51
|
|
52
52
|
end
|
53
|
-
|
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
|
-
|
31
|
+
if attributes.key?("value")
|
32
32
|
@value = attributes["value"]
|
33
33
|
|
34
34
|
end
|
35
|
-
|
35
|
+
if attributes.key?("tax_country_name")
|
36
36
|
@tax_country_name = attributes["tax_country_name"]
|
37
37
|
|
38
38
|
end
|
39
|
-
|
39
|
+
if attributes.key?("tax_country_code")
|
40
40
|
@tax_country_code = attributes["tax_country_code"]
|
41
41
|
|
42
42
|
end
|
43
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
32
|
+
if attributes.key?("taxed_count")
|
33
33
|
@taxed_count = attributes["taxed_count"]
|
34
34
|
|
35
35
|
end
|
36
|
-
|
36
|
+
if attributes.key?("deducted_count")
|
37
37
|
@deducted_count = attributes["deducted_count"]
|
38
38
|
|
39
39
|
end
|
40
|
-
|
40
|
+
if attributes.key?("transactions_count")
|
41
41
|
@transactions_count = attributes["transactions_count"]
|
42
42
|
|
43
43
|
end
|
44
|
-
|
44
|
+
if attributes.key?("eu_b2b")
|
45
45
|
@eu_b2b = attributes["eu_b2b"]
|
46
46
|
|
47
47
|
end
|
48
|
-
|
48
|
+
if attributes.key?("eu_taxed")
|
49
49
|
@eu_taxed = attributes["eu_taxed"]
|
50
50
|
|
51
51
|
end
|
data/lib/taxamo/models/c.rb
CHANGED
@@ -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
|
-
|
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,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
|
-
|
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
|
@@ -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
|
-
|
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
|
-
|
35
|
+
if attributes.key?("tax_country_code")
|
36
36
|
@tax_country_code = attributes["tax_country_code"]
|
37
37
|
|
38
38
|
end
|
39
|
-
|
39
|
+
if attributes.key?("tax_deducted")
|
40
40
|
@tax_deducted = attributes["tax_deducted"]
|
41
41
|
|
42
42
|
end
|
43
|
-
|
43
|
+
if attributes.key?("tax_supported")
|
44
44
|
@tax_supported = attributes["tax_supported"]
|
45
45
|
|
46
46
|
end
|
47
|
-
|
47
|
+
if attributes.key?("countries")
|
48
48
|
@countries = Countries.new(attributes["countries"])
|
49
49
|
|
50
50
|
end
|
51
|
-
|
51
|
+
if attributes.key?("buyer_ip")
|
52
52
|
@buyer_ip = attributes["buyer_ip"]
|
53
53
|
|
54
54
|
end
|
55
|
-
|
55
|
+
if attributes.key?("billing_country_code")
|
56
56
|
@billing_country_code = attributes["billing_country_code"]
|
57
57
|
|
58
58
|
end
|
59
|
-
|
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
|
-
|
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
|
-
|
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
|
@@ -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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
@@ -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
|
-
|
38
|
+
if attributes.key?("by_token")
|
39
39
|
@by_token = CountrySchema.new(attributes["by_token"])
|
40
40
|
|
41
41
|
end
|
42
|
-
|
42
|
+
if attributes.key?("by_cc")
|
43
43
|
@by_cc = CountrySchema.new(attributes["by_cc"])
|
44
44
|
|
45
45
|
end
|
46
|
-
|
46
|
+
if attributes.key?("by_2003_rules")
|
47
47
|
@by_2003_rules = CountrySchema.new(attributes["by_2003_rules"])
|
48
48
|
|
49
49
|
end
|
50
|
-
|
50
|
+
if attributes.key?("forced")
|
51
51
|
@forced = CountrySchema.new(attributes["forced"])
|
52
52
|
|
53
53
|
end
|
54
|
-
|
54
|
+
if attributes.key?("by_ip")
|
55
55
|
@by_ip = CountrySchema.new(attributes["by_ip"])
|
56
56
|
|
57
57
|
end
|
58
|
-
|
58
|
+
if attributes.key?("guessed_from_ip")
|
59
59
|
@guessed_from_ip = CountrySchema.new(attributes["guessed_from_ip"])
|
60
60
|
|
61
61
|
end
|
62
|
-
|
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
|
-
|
66
|
+
if attributes.key?("by_billing")
|
67
67
|
@by_billing = CountrySchema.new(attributes["by_billing"])
|
68
68
|
|
69
69
|
end
|
70
|
-
|
70
|
+
if attributes.key?("by_tax_number")
|
71
71
|
@by_tax_number = CountrySchema.new(attributes["by_tax_number"])
|
72
72
|
|
73
73
|
end
|
74
|
-
|
74
|
+
if attributes.key?("detected")
|
75
75
|
@detected = CountrySchema.new(attributes["detected"])
|
76
76
|
|
77
77
|
end
|
78
|
-
|
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
|
-
|
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
|