taxamo-ns 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/LICENSE +11 -0
- data/README.md +152 -0
- data/Rakefile +7 -0
- data/lib/monkey.rb +90 -0
- data/lib/swagger/configuration.rb +21 -0
- data/lib/swagger/request.rb +199 -0
- data/lib/swagger/response.rb +87 -0
- data/lib/swagger.rb +93 -0
- data/lib/taxamo/models/additionalcurrencies.rb +63 -0
- data/lib/taxamo/models/additionalcurrency.rb +88 -0
- data/lib/taxamo/models/bycountry.rb +78 -0
- data/lib/taxamo/models/bystatus.rb +70 -0
- data/lib/taxamo/models/bytaxationtype.rb +83 -0
- data/lib/taxamo/models/c.rb +78 -0
- data/lib/taxamo/models/calculatesimpletaxout.rb +75 -0
- data/lib/taxamo/models/calculatetaxin.rb +63 -0
- data/lib/taxamo/models/calculatetaxlocationout.rb +98 -0
- data/lib/taxamo/models/calculatetaxout.rb +75 -0
- data/lib/taxamo/models/canceltransactionout.rb +63 -0
- data/lib/taxamo/models/capturepaymentout.rb +63 -0
- data/lib/taxamo/models/confirmtransactionin.rb +63 -0
- data/lib/taxamo/models/confirmtransactionout.rb +75 -0
- data/lib/taxamo/models/countries.rb +113 -0
- data/lib/taxamo/models/country.rb +120 -0
- data/lib/taxamo/models/countryschema.rb +120 -0
- data/lib/taxamo/models/createpaymentin.rb +73 -0
- data/lib/taxamo/models/createpaymentout.rb +63 -0
- data/lib/taxamo/models/createrefundin.rb +83 -0
- data/lib/taxamo/models/createrefundout.rb +78 -0
- data/lib/taxamo/models/createsmstokenin.rb +68 -0
- data/lib/taxamo/models/createsmstokenout.rb +63 -0
- data/lib/taxamo/models/createtransactionin.rb +68 -0
- data/lib/taxamo/models/createtransactionout.rb +75 -0
- data/lib/taxamo/models/currencyschema.rb +83 -0
- data/lib/taxamo/models/customfields.rb +68 -0
- data/lib/taxamo/models/emailinvoicein.rb +63 -0
- data/lib/taxamo/models/emailinvoiceout.rb +63 -0
- data/lib/taxamo/models/emailrefundin.rb +63 -0
- data/lib/taxamo/models/emailrefundout.rb +63 -0
- data/lib/taxamo/models/evidence.rb +113 -0
- data/lib/taxamo/models/evidenceschema.rb +78 -0
- data/lib/taxamo/models/getcountriesdictout.rb +64 -0
- data/lib/taxamo/models/getcurrenciesdictout.rb +64 -0
- data/lib/taxamo/models/getdailysettlementstatsout.rb +64 -0
- data/lib/taxamo/models/getdetailedrefundsout.rb +64 -0
- data/lib/taxamo/models/getdomesticsummaryreportout.rb +123 -0
- data/lib/taxamo/models/geteuviesreportout.rb +79 -0
- data/lib/taxamo/models/getproducttypesdictout.rb +64 -0
- data/lib/taxamo/models/getrefundsout.rb +64 -0
- data/lib/taxamo/models/getsettlementout.rb +84 -0
- data/lib/taxamo/models/getsettlementstatsbycountryout.rb +64 -0
- data/lib/taxamo/models/getsettlementstatsbytaxationtypeout.rb +63 -0
- data/lib/taxamo/models/getsettlementsummaryout.rb +63 -0
- data/lib/taxamo/models/gettransactionout.rb +75 -0
- data/lib/taxamo/models/gettransactionsstatsbycountryout.rb +64 -0
- data/lib/taxamo/models/gettransactionsstatsout.rb +63 -0
- data/lib/taxamo/models/inputtransaction.rb +220 -0
- data/lib/taxamo/models/inputtransactionline.rb +144 -0
- data/lib/taxamo/models/inputtransactionupdate.rb +220 -0
- data/lib/taxamo/models/invoiceaddress.rb +98 -0
- data/lib/taxamo/models/listpaymentsout.rb +64 -0
- data/lib/taxamo/models/listrefundsout.rb +64 -0
- data/lib/taxamo/models/listtransactionsout.rb +64 -0
- data/lib/taxamo/models/locategivenipout.rb +73 -0
- data/lib/taxamo/models/locatemyipout.rb +73 -0
- data/lib/taxamo/models/n.rb +78 -0
- data/lib/taxamo/models/payments.rb +73 -0
- data/lib/taxamo/models/producttypeschema.rb +63 -0
- data/lib/taxamo/models/refunds.rb +108 -0
- data/lib/taxamo/models/report.rb +103 -0
- data/lib/taxamo/models/settlementdailystatsschema.rb +103 -0
- data/lib/taxamo/models/storagerequiredfields.rb +63 -0
- data/lib/taxamo/models/summary.rb +98 -0
- data/lib/taxamo/models/taxdataschema.rb +63 -0
- data/lib/taxamo/models/taxrequiredfields.rb +63 -0
- data/lib/taxamo/models/transaction.rb +330 -0
- data/lib/taxamo/models/transactionlines.rb +174 -0
- data/lib/taxamo/models/transactions.rb +330 -0
- data/lib/taxamo/models/unconfirmtransactionin.rb +63 -0
- data/lib/taxamo/models/unconfirmtransactionout.rb +75 -0
- data/lib/taxamo/models/updatetransactionin.rb +63 -0
- data/lib/taxamo/models/updatetransactionout.rb +75 -0
- data/lib/taxamo/models/ustaxexemptioncertificatedetailsschema.rb +139 -0
- data/lib/taxamo/models/ustaxexemptioncertificateschema.rb +68 -0
- data/lib/taxamo/models/ustaxexemptstate.rb +73 -0
- data/lib/taxamo/models/ustaxid.rb +73 -0
- data/lib/taxamo/models/validatetaxnumberout.rb +78 -0
- data/lib/taxamo/models/verifysmstokenout.rb +63 -0
- data/lib/taxamo/version.rb +17 -0
- data/lib/taxamo.rb +1215 -0
- data/taxamo.gemspec +28 -0
- data/test/taxamo/connectivity_test.rb +55 -0
- data/test/taxamo/tax_test.rb +152 -0
- data/test/taxamo/transactions_api_test.rb +326 -0
- metadata +241 -0
@@ -0,0 +1,139 @@
|
|
1
|
+
# Copyright 2014-2015 Taxamo, Ltd.
|
2
|
+
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
6
|
+
#
|
7
|
+
# Unless required by applicable law or agreed to in writing, software
|
8
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
+
# See the License for the specific language governing permissions and
|
11
|
+
# limitations under the License.
|
12
|
+
|
13
|
+
module Taxamo
|
14
|
+
class UsTaxExemptionCertificateDetailsSchema
|
15
|
+
attr_accessor :single_purchase_order_identifier, :purchaser_business_type, :purchaser_exemption_reason_value, :purchaser_state, :purchaser_zip, :purchaser_city, :purchaser_last_name, :purchaser_exemption_reason, :single_purchase, :purchaser_tax_id, :purchaser_address2, :purchaser_address1, :purchaser_business_type_other_value, :purchaser_first_name, :exempt_states, :purchaser_title
|
16
|
+
|
17
|
+
# :internal => :external
|
18
|
+
def self.attribute_map
|
19
|
+
{
|
20
|
+
:single_purchase_order_identifier => :single_purchase_order_identifier,
|
21
|
+
:purchaser_business_type => :purchaser_business_type,
|
22
|
+
:purchaser_exemption_reason_value => :purchaser_exemption_reason_value,
|
23
|
+
:purchaser_state => :purchaser_state,
|
24
|
+
:purchaser_zip => :purchaser_zip,
|
25
|
+
:purchaser_city => :purchaser_city,
|
26
|
+
:purchaser_last_name => :purchaser_last_name,
|
27
|
+
:purchaser_exemption_reason => :purchaser_exemption_reason,
|
28
|
+
:single_purchase => :single_purchase,
|
29
|
+
:purchaser_tax_id => :purchaser_tax_id,
|
30
|
+
:purchaser_address2 => :purchaser_address2,
|
31
|
+
:purchaser_address1 => :purchaser_address1,
|
32
|
+
:purchaser_business_type_other_value => :purchaser_business_type_other_value,
|
33
|
+
:purchaser_first_name => :purchaser_first_name,
|
34
|
+
:exempt_states => :exempt_states,
|
35
|
+
:purchaser_title => :purchaser_title
|
36
|
+
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
def initialize(attributes = {})
|
41
|
+
return if attributes.empty?
|
42
|
+
# Morph attribute keys into undescored rubyish style
|
43
|
+
if attributes["single_purchase_order_identifier"]
|
44
|
+
@single_purchase_order_identifier = attributes["single_purchase_order_identifier"]
|
45
|
+
|
46
|
+
end
|
47
|
+
if attributes["purchaser_business_type"]
|
48
|
+
@purchaser_business_type = attributes["purchaser_business_type"]
|
49
|
+
|
50
|
+
end
|
51
|
+
if attributes["purchaser_exemption_reason_value"]
|
52
|
+
@purchaser_exemption_reason_value = attributes["purchaser_exemption_reason_value"]
|
53
|
+
|
54
|
+
end
|
55
|
+
if attributes["purchaser_state"]
|
56
|
+
@purchaser_state = attributes["purchaser_state"]
|
57
|
+
|
58
|
+
end
|
59
|
+
if attributes["purchaser_zip"]
|
60
|
+
@purchaser_zip = attributes["purchaser_zip"]
|
61
|
+
|
62
|
+
end
|
63
|
+
if attributes["purchaser_city"]
|
64
|
+
@purchaser_city = attributes["purchaser_city"]
|
65
|
+
|
66
|
+
end
|
67
|
+
if attributes["purchaser_last_name"]
|
68
|
+
@purchaser_last_name = attributes["purchaser_last_name"]
|
69
|
+
|
70
|
+
end
|
71
|
+
if attributes["purchaser_exemption_reason"]
|
72
|
+
@purchaser_exemption_reason = attributes["purchaser_exemption_reason"]
|
73
|
+
|
74
|
+
end
|
75
|
+
if attributes["single_purchase"]
|
76
|
+
@single_purchase = attributes["single_purchase"]
|
77
|
+
|
78
|
+
end
|
79
|
+
if attributes["purchaser_tax_id"]
|
80
|
+
@purchaser_tax_id = UsTaxId.new(attributes["purchaser_tax_id"])
|
81
|
+
|
82
|
+
end
|
83
|
+
if attributes["purchaser_address2"]
|
84
|
+
@purchaser_address2 = attributes["purchaser_address2"]
|
85
|
+
|
86
|
+
end
|
87
|
+
if attributes["purchaser_address1"]
|
88
|
+
@purchaser_address1 = attributes["purchaser_address1"]
|
89
|
+
|
90
|
+
end
|
91
|
+
if attributes["purchaser_business_type_other_value"]
|
92
|
+
@purchaser_business_type_other_value = attributes["purchaser_business_type_other_value"]
|
93
|
+
|
94
|
+
end
|
95
|
+
if attributes["purchaser_first_name"]
|
96
|
+
@purchaser_first_name = attributes["purchaser_first_name"]
|
97
|
+
|
98
|
+
end
|
99
|
+
if attributes["exempt_states"]
|
100
|
+
if (value = attributes["exempt_states"]).is_a?(Array)
|
101
|
+
@exempt_states = value.map{ |v| UsTaxExemptState.new(v) }
|
102
|
+
end
|
103
|
+
end
|
104
|
+
if attributes["purchaser_title"]
|
105
|
+
@purchaser_title = attributes["purchaser_title"]
|
106
|
+
|
107
|
+
end
|
108
|
+
|
109
|
+
|
110
|
+
end
|
111
|
+
|
112
|
+
def to_body
|
113
|
+
body = {}
|
114
|
+
self.class.attribute_map.each_pair do |key, value|
|
115
|
+
v = self.send(key)
|
116
|
+
unless v.nil?
|
117
|
+
if v.is_a?(Array)
|
118
|
+
array = Array.new
|
119
|
+
v.each do |item|
|
120
|
+
if item.respond_to?("to_body".to_sym)
|
121
|
+
array.push item.to_body
|
122
|
+
else
|
123
|
+
array.push item
|
124
|
+
end
|
125
|
+
end
|
126
|
+
body[value] = array
|
127
|
+
else
|
128
|
+
if v.respond_to?("to_body".to_sym)
|
129
|
+
body[value] = v.to_body
|
130
|
+
else
|
131
|
+
body[value] = v
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
136
|
+
body
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# Copyright 2014-2015 Taxamo, Ltd.
|
2
|
+
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
6
|
+
#
|
7
|
+
# Unless required by applicable law or agreed to in writing, software
|
8
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
+
# See the License for the specific language governing permissions and
|
11
|
+
# limitations under the License.
|
12
|
+
|
13
|
+
module Taxamo
|
14
|
+
class UsTaxExemptionCertificateSchema
|
15
|
+
attr_accessor :certificate_id, :detail
|
16
|
+
|
17
|
+
# :internal => :external
|
18
|
+
def self.attribute_map
|
19
|
+
{
|
20
|
+
:certificate_id => :certificate_id,
|
21
|
+
:detail => :detail
|
22
|
+
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
def initialize(attributes = {})
|
27
|
+
return if attributes.empty?
|
28
|
+
# Morph attribute keys into undescored rubyish style
|
29
|
+
if attributes["certificate_id"]
|
30
|
+
@certificate_id = attributes["certificate_id"]
|
31
|
+
|
32
|
+
end
|
33
|
+
if attributes["detail"]
|
34
|
+
@detail = UsTaxExemptionCertificateDetailsSchema.new(attributes["detail"])
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
def to_body
|
42
|
+
body = {}
|
43
|
+
self.class.attribute_map.each_pair do |key, value|
|
44
|
+
v = self.send(key)
|
45
|
+
unless v.nil?
|
46
|
+
if v.is_a?(Array)
|
47
|
+
array = Array.new
|
48
|
+
v.each do |item|
|
49
|
+
if item.respond_to?("to_body".to_sym)
|
50
|
+
array.push item.to_body
|
51
|
+
else
|
52
|
+
array.push item
|
53
|
+
end
|
54
|
+
end
|
55
|
+
body[value] = array
|
56
|
+
else
|
57
|
+
if v.respond_to?("to_body".to_sym)
|
58
|
+
body[value] = v.to_body
|
59
|
+
else
|
60
|
+
body[value] = v
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
body
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# Copyright 2014-2015 Taxamo, Ltd.
|
2
|
+
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
6
|
+
#
|
7
|
+
# Unless required by applicable law or agreed to in writing, software
|
8
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
+
# See the License for the specific language governing permissions and
|
11
|
+
# limitations under the License.
|
12
|
+
|
13
|
+
module Taxamo
|
14
|
+
class UsTaxExemptState
|
15
|
+
attr_accessor :state_abbr, :reason_for_exemption, :identifier_for_exemption_reason
|
16
|
+
|
17
|
+
# :internal => :external
|
18
|
+
def self.attribute_map
|
19
|
+
{
|
20
|
+
:state_abbr => :state_abbr,
|
21
|
+
:reason_for_exemption => :reason_for_exemption,
|
22
|
+
:identifier_for_exemption_reason => :identifier_for_exemption_reason
|
23
|
+
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
def initialize(attributes = {})
|
28
|
+
return if attributes.empty?
|
29
|
+
# Morph attribute keys into undescored rubyish style
|
30
|
+
if attributes["state_abbr"]
|
31
|
+
@state_abbr = attributes["state_abbr"]
|
32
|
+
|
33
|
+
end
|
34
|
+
if attributes["reason_for_exemption"]
|
35
|
+
@reason_for_exemption = attributes["reason_for_exemption"]
|
36
|
+
|
37
|
+
end
|
38
|
+
if attributes["identifier_for_exemption_reason"]
|
39
|
+
@identifier_for_exemption_reason = attributes["identifier_for_exemption_reason"]
|
40
|
+
|
41
|
+
end
|
42
|
+
|
43
|
+
|
44
|
+
end
|
45
|
+
|
46
|
+
def to_body
|
47
|
+
body = {}
|
48
|
+
self.class.attribute_map.each_pair do |key, value|
|
49
|
+
v = self.send(key)
|
50
|
+
unless v.nil?
|
51
|
+
if v.is_a?(Array)
|
52
|
+
array = Array.new
|
53
|
+
v.each do |item|
|
54
|
+
if item.respond_to?("to_body".to_sym)
|
55
|
+
array.push item.to_body
|
56
|
+
else
|
57
|
+
array.push item
|
58
|
+
end
|
59
|
+
end
|
60
|
+
body[value] = array
|
61
|
+
else
|
62
|
+
if v.respond_to?("to_body".to_sym)
|
63
|
+
body[value] = v.to_body
|
64
|
+
else
|
65
|
+
body[value] = v
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
body
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# Copyright 2014-2015 Taxamo, Ltd.
|
2
|
+
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
6
|
+
#
|
7
|
+
# Unless required by applicable law or agreed to in writing, software
|
8
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
+
# See the License for the specific language governing permissions and
|
11
|
+
# limitations under the License.
|
12
|
+
|
13
|
+
module Taxamo
|
14
|
+
class UsTaxId
|
15
|
+
attr_accessor :tax_id_type, :tax_id, :state_of_issue
|
16
|
+
|
17
|
+
# :internal => :external
|
18
|
+
def self.attribute_map
|
19
|
+
{
|
20
|
+
:tax_id_type => :tax_id_type,
|
21
|
+
:tax_id => :tax_id,
|
22
|
+
:state_of_issue => :state_of_issue
|
23
|
+
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
def initialize(attributes = {})
|
28
|
+
return if attributes.empty?
|
29
|
+
# Morph attribute keys into undescored rubyish style
|
30
|
+
if attributes["tax_id_type"]
|
31
|
+
@tax_id_type = attributes["tax_id_type"]
|
32
|
+
|
33
|
+
end
|
34
|
+
if attributes["tax_id"]
|
35
|
+
@tax_id = attributes["tax_id"]
|
36
|
+
|
37
|
+
end
|
38
|
+
if attributes["state_of_issue"]
|
39
|
+
@state_of_issue = attributes["state_of_issue"]
|
40
|
+
|
41
|
+
end
|
42
|
+
|
43
|
+
|
44
|
+
end
|
45
|
+
|
46
|
+
def to_body
|
47
|
+
body = {}
|
48
|
+
self.class.attribute_map.each_pair do |key, value|
|
49
|
+
v = self.send(key)
|
50
|
+
unless v.nil?
|
51
|
+
if v.is_a?(Array)
|
52
|
+
array = Array.new
|
53
|
+
v.each do |item|
|
54
|
+
if item.respond_to?("to_body".to_sym)
|
55
|
+
array.push item.to_body
|
56
|
+
else
|
57
|
+
array.push item
|
58
|
+
end
|
59
|
+
end
|
60
|
+
body[value] = array
|
61
|
+
else
|
62
|
+
if v.respond_to?("to_body".to_sym)
|
63
|
+
body[value] = v.to_body
|
64
|
+
else
|
65
|
+
body[value] = v
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
body
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# Copyright 2014-2015 Taxamo, Ltd.
|
2
|
+
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
6
|
+
#
|
7
|
+
# Unless required by applicable law or agreed to in writing, software
|
8
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
+
# See the License for the specific language governing permissions and
|
11
|
+
# limitations under the License.
|
12
|
+
|
13
|
+
module Taxamo
|
14
|
+
class ValidateTaxNumberOut
|
15
|
+
attr_accessor :tax_deducted, :buyer_tax_number, :buyer_tax_number_valid, :billing_country_code
|
16
|
+
|
17
|
+
# :internal => :external
|
18
|
+
def self.attribute_map
|
19
|
+
{
|
20
|
+
:tax_deducted => :tax_deducted,
|
21
|
+
:buyer_tax_number => :buyer_tax_number,
|
22
|
+
:buyer_tax_number_valid => :buyer_tax_number_valid,
|
23
|
+
:billing_country_code => :billing_country_code
|
24
|
+
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
def initialize(attributes = {})
|
29
|
+
return if attributes.empty?
|
30
|
+
# Morph attribute keys into undescored rubyish style
|
31
|
+
if attributes["tax_deducted"]
|
32
|
+
@tax_deducted = attributes["tax_deducted"]
|
33
|
+
|
34
|
+
end
|
35
|
+
if attributes["buyer_tax_number"]
|
36
|
+
@buyer_tax_number = attributes["buyer_tax_number"]
|
37
|
+
|
38
|
+
end
|
39
|
+
if attributes["buyer_tax_number_valid"]
|
40
|
+
@buyer_tax_number_valid = attributes["buyer_tax_number_valid"]
|
41
|
+
|
42
|
+
end
|
43
|
+
if attributes["billing_country_code"]
|
44
|
+
@billing_country_code = attributes["billing_country_code"]
|
45
|
+
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
end
|
50
|
+
|
51
|
+
def to_body
|
52
|
+
body = {}
|
53
|
+
self.class.attribute_map.each_pair do |key, value|
|
54
|
+
v = self.send(key)
|
55
|
+
unless v.nil?
|
56
|
+
if v.is_a?(Array)
|
57
|
+
array = Array.new
|
58
|
+
v.each do |item|
|
59
|
+
if item.respond_to?("to_body".to_sym)
|
60
|
+
array.push item.to_body
|
61
|
+
else
|
62
|
+
array.push item
|
63
|
+
end
|
64
|
+
end
|
65
|
+
body[value] = array
|
66
|
+
else
|
67
|
+
if v.respond_to?("to_body".to_sym)
|
68
|
+
body[value] = v.to_body
|
69
|
+
else
|
70
|
+
body[value] = v
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
body
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# Copyright 2014-2015 Taxamo, Ltd.
|
2
|
+
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
6
|
+
#
|
7
|
+
# Unless required by applicable law or agreed to in writing, software
|
8
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
+
# See the License for the specific language governing permissions and
|
11
|
+
# limitations under the License.
|
12
|
+
|
13
|
+
module Taxamo
|
14
|
+
class VerifySMSTokenOut
|
15
|
+
attr_accessor :country_code
|
16
|
+
|
17
|
+
# :internal => :external
|
18
|
+
def self.attribute_map
|
19
|
+
{
|
20
|
+
:country_code => :country_code
|
21
|
+
|
22
|
+
}
|
23
|
+
end
|
24
|
+
|
25
|
+
def initialize(attributes = {})
|
26
|
+
return if attributes.empty?
|
27
|
+
# Morph attribute keys into undescored rubyish style
|
28
|
+
if attributes["country_code"]
|
29
|
+
@country_code = attributes["country_code"]
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
def to_body
|
37
|
+
body = {}
|
38
|
+
self.class.attribute_map.each_pair do |key, value|
|
39
|
+
v = self.send(key)
|
40
|
+
unless v.nil?
|
41
|
+
if v.is_a?(Array)
|
42
|
+
array = Array.new
|
43
|
+
v.each do |item|
|
44
|
+
if item.respond_to?("to_body".to_sym)
|
45
|
+
array.push item.to_body
|
46
|
+
else
|
47
|
+
array.push item
|
48
|
+
end
|
49
|
+
end
|
50
|
+
body[value] = array
|
51
|
+
else
|
52
|
+
if v.respond_to?("to_body".to_sym)
|
53
|
+
body[value] = v.to_body
|
54
|
+
else
|
55
|
+
body[value] = v
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
body
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Copyright 2014-2015 Taxamo, Ltd.
|
2
|
+
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
6
|
+
#
|
7
|
+
# Unless required by applicable law or agreed to in writing, software
|
8
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
+
# See the License for the specific language governing permissions and
|
11
|
+
# limitations under the License.
|
12
|
+
|
13
|
+
module Taxamo
|
14
|
+
VERSION = "2.2.0"
|
15
|
+
end
|
16
|
+
|
17
|
+
|