taxamo 1.0.6.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/taxamo.rb +52 -10
- data/lib/taxamo/models/calculatesimpletaxout.rb +14 -2
- data/lib/taxamo/models/calculatetaxout.rb +14 -2
- data/lib/taxamo/models/confirmtransactionout.rb +14 -2
- data/lib/taxamo/models/country.rb +6 -1
- data/lib/taxamo/models/countryschema.rb +6 -1
- data/lib/taxamo/models/createtransactionout.rb +14 -2
- data/lib/taxamo/models/gettransactionout.rb +14 -2
- data/lib/taxamo/models/gettransactionsstatsbycountryout.rb +63 -0
- data/lib/taxamo/models/inputtransaction.rb +16 -1
- data/lib/taxamo/models/inputtransactionline.rb +6 -1
- data/lib/taxamo/models/inputtransactionupdate.rb +16 -1
- data/lib/taxamo/models/report.rb +28 -18
- data/lib/taxamo/models/storagerequiredfields.rb +62 -0
- data/lib/taxamo/models/summary.rb +11 -1
- data/lib/taxamo/models/taxdataschema.rb +62 -0
- data/lib/taxamo/models/taxrequiredfields.rb +62 -0
- data/lib/taxamo/models/transaction.rb +26 -1
- data/lib/taxamo/models/transactionlines.rb +6 -1
- data/lib/taxamo/models/transactions.rb +26 -1
- data/lib/taxamo/models/unconfirmtransactionout.rb +14 -2
- data/lib/taxamo/models/updatetransactionout.rb +14 -2
- data/lib/taxamo/models/ustaxexemptioncertificatedetailsschema.rb +138 -0
- data/lib/taxamo/models/ustaxexemptioncertificateschema.rb +67 -0
- data/lib/taxamo/models/ustaxexemptstate.rb +72 -0
- data/lib/taxamo/models/ustaxid.rb +72 -0
- data/lib/taxamo/version.rb +1 -1
- data/test/taxamo/tax_test.rb +14 -9
- data/test/taxamo/transactions_api_test.rb +37 -28
- metadata +10 -2
@@ -11,7 +11,7 @@
|
|
11
11
|
# limitations under the License.
|
12
12
|
|
13
13
|
class InputTransaction
|
14
|
-
attr_accessor :buyer_credit_card_prefix, :custom_data, :buyer_name, :invoice_date, :currency_code, :supply_date, :invoice_address, :verification_token, :transaction_lines, :buyer_tax_number, :custom_fields, :force_country_code, :invoice_number, :order_date, :buyer_ip, :buyer_email, :original_transaction_key, :billing_country_code, :custom_id, :additional_currencies, :invoice_place, :evidence, :description, :tax_deducted, :tax_country_code
|
14
|
+
attr_accessor :buyer_credit_card_prefix, :custom_data, :buyer_name, :invoice_date, :currency_code, :supply_date, :invoice_address, :verification_token, :tax_data, :transaction_lines, :buyer_tax_number, :status, :custom_fields, :force_country_code, :invoice_number, :order_date, :customer_id, :buyer_ip, :buyer_email, :original_transaction_key, :billing_country_code, :custom_id, :additional_currencies, :invoice_place, :evidence, :description, :tax_deducted, :tax_country_code
|
15
15
|
|
16
16
|
# :internal => :external
|
17
17
|
def self.attribute_map
|
@@ -24,12 +24,15 @@ class InputTransaction
|
|
24
24
|
:supply_date => :supply_date,
|
25
25
|
:invoice_address => :invoice_address,
|
26
26
|
:verification_token => :verification_token,
|
27
|
+
:tax_data => :tax_data,
|
27
28
|
:transaction_lines => :transaction_lines,
|
28
29
|
:buyer_tax_number => :buyer_tax_number,
|
30
|
+
:status => :status,
|
29
31
|
:custom_fields => :custom_fields,
|
30
32
|
:force_country_code => :force_country_code,
|
31
33
|
:invoice_number => :invoice_number,
|
32
34
|
:order_date => :order_date,
|
35
|
+
:customer_id => :customer_id,
|
33
36
|
:buyer_ip => :buyer_ip,
|
34
37
|
:buyer_email => :buyer_email,
|
35
38
|
:original_transaction_key => :original_transaction_key,
|
@@ -79,6 +82,10 @@ class InputTransaction
|
|
79
82
|
if attributes["verification_token"]
|
80
83
|
@verification_token = attributes["verification_token"]
|
81
84
|
|
85
|
+
end
|
86
|
+
if attributes["tax_data"]
|
87
|
+
@tax_data = TaxDataSchema.new(attributes["tax_data"])
|
88
|
+
|
82
89
|
end
|
83
90
|
if attributes["transaction_lines"]
|
84
91
|
if (value = attributes["transaction_lines"]).is_a?(Array)
|
@@ -88,6 +95,10 @@ class InputTransaction
|
|
88
95
|
if attributes["buyer_tax_number"]
|
89
96
|
@buyer_tax_number = attributes["buyer_tax_number"]
|
90
97
|
|
98
|
+
end
|
99
|
+
if attributes["status"]
|
100
|
+
@status = attributes["status"]
|
101
|
+
|
91
102
|
end
|
92
103
|
if attributes["custom_fields"]
|
93
104
|
if (value = attributes["custom_fields"]).is_a?(Array)
|
@@ -105,6 +116,10 @@ class InputTransaction
|
|
105
116
|
if attributes["order_date"]
|
106
117
|
@order_date = attributes["order_date"]
|
107
118
|
|
119
|
+
end
|
120
|
+
if attributes["customer_id"]
|
121
|
+
@customer_id = attributes["customer_id"]
|
122
|
+
|
108
123
|
end
|
109
124
|
if attributes["buyer_ip"]
|
110
125
|
@buyer_ip = attributes["buyer_ip"]
|
@@ -11,7 +11,7 @@
|
|
11
11
|
# limitations under the License.
|
12
12
|
|
13
13
|
class InputTransactionLine
|
14
|
-
attr_accessor :product_type, :supply_date, :unit_price, :unit_of_measure, :quantity, :custom_fields, :line_key, :tax_name, :product_code, :amount, :custom_id, :informative, :tax_rate, :total_amount, :description
|
14
|
+
attr_accessor :product_type, :supply_date, :unit_price, :unit_of_measure, :quantity, :custom_fields, :line_key, :tax_name, :product_code, :amount, :custom_id, :informative, :tax_rate, :total_amount, :product_tax_code, :description
|
15
15
|
|
16
16
|
# :internal => :external
|
17
17
|
def self.attribute_map
|
@@ -30,6 +30,7 @@ class InputTransactionLine
|
|
30
30
|
:informative => :informative,
|
31
31
|
:tax_rate => :tax_rate,
|
32
32
|
:total_amount => :total_amount,
|
33
|
+
:product_tax_code => :product_tax_code,
|
33
34
|
:description => :description
|
34
35
|
|
35
36
|
}
|
@@ -94,6 +95,10 @@ class InputTransactionLine
|
|
94
95
|
if attributes["total_amount"]
|
95
96
|
@total_amount = attributes["total_amount"]
|
96
97
|
|
98
|
+
end
|
99
|
+
if attributes["product_tax_code"]
|
100
|
+
@product_tax_code = attributes["product_tax_code"]
|
101
|
+
|
97
102
|
end
|
98
103
|
if attributes["description"]
|
99
104
|
@description = attributes["description"]
|
@@ -11,7 +11,7 @@
|
|
11
11
|
# limitations under the License.
|
12
12
|
|
13
13
|
class InputTransactionUpdate
|
14
|
-
attr_accessor :buyer_credit_card_prefix, :custom_data, :buyer_name, :invoice_date, :currency_code, :supply_date, :invoice_address, :verification_token, :transaction_lines, :buyer_tax_number, :custom_fields, :force_country_code, :invoice_number, :order_date, :buyer_ip, :buyer_email, :original_transaction_key, :billing_country_code, :custom_id, :additional_currencies, :invoice_place, :evidence, :description, :tax_deducted, :tax_country_code
|
14
|
+
attr_accessor :buyer_credit_card_prefix, :custom_data, :buyer_name, :invoice_date, :currency_code, :supply_date, :invoice_address, :verification_token, :tax_data, :transaction_lines, :buyer_tax_number, :status, :custom_fields, :force_country_code, :invoice_number, :order_date, :customer_id, :buyer_ip, :buyer_email, :original_transaction_key, :billing_country_code, :custom_id, :additional_currencies, :invoice_place, :evidence, :description, :tax_deducted, :tax_country_code
|
15
15
|
|
16
16
|
# :internal => :external
|
17
17
|
def self.attribute_map
|
@@ -24,12 +24,15 @@ class InputTransactionUpdate
|
|
24
24
|
:supply_date => :supply_date,
|
25
25
|
:invoice_address => :invoice_address,
|
26
26
|
:verification_token => :verification_token,
|
27
|
+
:tax_data => :tax_data,
|
27
28
|
:transaction_lines => :transaction_lines,
|
28
29
|
:buyer_tax_number => :buyer_tax_number,
|
30
|
+
:status => :status,
|
29
31
|
:custom_fields => :custom_fields,
|
30
32
|
:force_country_code => :force_country_code,
|
31
33
|
:invoice_number => :invoice_number,
|
32
34
|
:order_date => :order_date,
|
35
|
+
:customer_id => :customer_id,
|
33
36
|
:buyer_ip => :buyer_ip,
|
34
37
|
:buyer_email => :buyer_email,
|
35
38
|
:original_transaction_key => :original_transaction_key,
|
@@ -79,6 +82,10 @@ class InputTransactionUpdate
|
|
79
82
|
if attributes["verification_token"]
|
80
83
|
@verification_token = attributes["verification_token"]
|
81
84
|
|
85
|
+
end
|
86
|
+
if attributes["tax_data"]
|
87
|
+
@tax_data = TaxDataSchema.new(attributes["tax_data"])
|
88
|
+
|
82
89
|
end
|
83
90
|
if attributes["transaction_lines"]
|
84
91
|
if (value = attributes["transaction_lines"]).is_a?(Array)
|
@@ -88,6 +95,10 @@ class InputTransactionUpdate
|
|
88
95
|
if attributes["buyer_tax_number"]
|
89
96
|
@buyer_tax_number = attributes["buyer_tax_number"]
|
90
97
|
|
98
|
+
end
|
99
|
+
if attributes["status"]
|
100
|
+
@status = attributes["status"]
|
101
|
+
|
91
102
|
end
|
92
103
|
if attributes["custom_fields"]
|
93
104
|
if (value = attributes["custom_fields"]).is_a?(Array)
|
@@ -105,6 +116,10 @@ class InputTransactionUpdate
|
|
105
116
|
if attributes["order_date"]
|
106
117
|
@order_date = attributes["order_date"]
|
107
118
|
|
119
|
+
end
|
120
|
+
if attributes["customer_id"]
|
121
|
+
@customer_id = attributes["customer_id"]
|
122
|
+
|
108
123
|
end
|
109
124
|
if attributes["buyer_ip"]
|
110
125
|
@buyer_ip = attributes["buyer_ip"]
|
data/lib/taxamo/models/report.rb
CHANGED
@@ -11,18 +11,20 @@
|
|
11
11
|
# limitations under the License.
|
12
12
|
|
13
13
|
class Report
|
14
|
-
attr_accessor :
|
14
|
+
attr_accessor :currency_code, :skip_moss, :country_code, :tax_region, :country_subdivision, :amount, :tax_amount, :tax_rate, :country_name
|
15
15
|
|
16
16
|
# :internal => :external
|
17
17
|
def self.attribute_map
|
18
18
|
{
|
19
|
-
:
|
20
|
-
:
|
21
|
-
:country_name => :country_name,
|
19
|
+
:currency_code => :currency_code,
|
20
|
+
:skip_moss => :skip_moss,
|
22
21
|
:country_code => :country_code,
|
22
|
+
:tax_region => :tax_region,
|
23
|
+
:country_subdivision => :country_subdivision,
|
24
|
+
:amount => :amount,
|
23
25
|
:tax_amount => :tax_amount,
|
24
|
-
:
|
25
|
-
:
|
26
|
+
:tax_rate => :tax_rate,
|
27
|
+
:country_name => :country_name
|
26
28
|
|
27
29
|
}
|
28
30
|
end
|
@@ -30,32 +32,40 @@ class Report
|
|
30
32
|
def initialize(attributes = {})
|
31
33
|
return if attributes.empty?
|
32
34
|
# Morph attribute keys into undescored rubyish style
|
33
|
-
if attributes["
|
34
|
-
@
|
35
|
-
|
36
|
-
end
|
37
|
-
if attributes["amount"]
|
38
|
-
@amount = attributes["amount"]
|
35
|
+
if attributes["currency_code"]
|
36
|
+
@currency_code = attributes["currency_code"]
|
39
37
|
|
40
38
|
end
|
41
|
-
if attributes["
|
42
|
-
@
|
39
|
+
if attributes["skip_moss"]
|
40
|
+
@skip_moss = attributes["skip_moss"]
|
43
41
|
|
44
42
|
end
|
45
43
|
if attributes["country_code"]
|
46
44
|
@country_code = attributes["country_code"]
|
47
45
|
|
46
|
+
end
|
47
|
+
if attributes["tax_region"]
|
48
|
+
@tax_region = attributes["tax_region"]
|
49
|
+
|
50
|
+
end
|
51
|
+
if attributes["country_subdivision"]
|
52
|
+
@country_subdivision = attributes["country_subdivision"]
|
53
|
+
|
54
|
+
end
|
55
|
+
if attributes["amount"]
|
56
|
+
@amount = attributes["amount"]
|
57
|
+
|
48
58
|
end
|
49
59
|
if attributes["tax_amount"]
|
50
60
|
@tax_amount = attributes["tax_amount"]
|
51
61
|
|
52
62
|
end
|
53
|
-
if attributes["
|
54
|
-
@
|
63
|
+
if attributes["tax_rate"]
|
64
|
+
@tax_rate = attributes["tax_rate"]
|
55
65
|
|
56
66
|
end
|
57
|
-
if attributes["
|
58
|
-
@
|
67
|
+
if attributes["country_name"]
|
68
|
+
@country_name = attributes["country_name"]
|
59
69
|
|
60
70
|
end
|
61
71
|
|
@@ -0,0 +1,62 @@
|
|
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
|
+
class StorageRequiredFields
|
14
|
+
attr_accessor :field_name
|
15
|
+
|
16
|
+
# :internal => :external
|
17
|
+
def self.attribute_map
|
18
|
+
{
|
19
|
+
:field_name => :field_name
|
20
|
+
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
def initialize(attributes = {})
|
25
|
+
return if attributes.empty?
|
26
|
+
# Morph attribute keys into undescored rubyish style
|
27
|
+
if attributes["field_name"]
|
28
|
+
@field_name = attributes["field_name"]
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
def to_body
|
36
|
+
body = {}
|
37
|
+
self.class.attribute_map.each_pair do |key, value|
|
38
|
+
v = self.send(key)
|
39
|
+
unless v.nil?
|
40
|
+
if v.is_a?(Array)
|
41
|
+
array = Array.new
|
42
|
+
v.each do |item|
|
43
|
+
if item.respond_to?("to_body".to_sym)
|
44
|
+
array.push item.to_body
|
45
|
+
else
|
46
|
+
array.push item
|
47
|
+
end
|
48
|
+
end
|
49
|
+
body[value] = array
|
50
|
+
else
|
51
|
+
if v.respond_to?("to_body".to_sym)
|
52
|
+
body[value] = v.to_body
|
53
|
+
else
|
54
|
+
body[value] = v
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
body
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
@@ -11,7 +11,7 @@
|
|
11
11
|
# limitations under the License.
|
12
12
|
|
13
13
|
class Summary
|
14
|
-
attr_accessor :quarter, :tax_amount, :currency_code, :indicative, :fx_rate_date, :tax_entity_name
|
14
|
+
attr_accessor :quarter, :tax_amount, :currency_code, :indicative, :fx_rate_date, :start_date, :end_date, :tax_entity_name
|
15
15
|
|
16
16
|
# :internal => :external
|
17
17
|
def self.attribute_map
|
@@ -21,6 +21,8 @@ class Summary
|
|
21
21
|
:currency_code => :currency_code,
|
22
22
|
:indicative => :indicative,
|
23
23
|
:fx_rate_date => :fx_rate_date,
|
24
|
+
:start_date => :start_date,
|
25
|
+
:end_date => :end_date,
|
24
26
|
:tax_entity_name => :tax_entity_name
|
25
27
|
|
26
28
|
}
|
@@ -48,6 +50,14 @@ class Summary
|
|
48
50
|
if attributes["fx_rate_date"]
|
49
51
|
@fx_rate_date = attributes["fx_rate_date"]
|
50
52
|
|
53
|
+
end
|
54
|
+
if attributes["start_date"]
|
55
|
+
@start_date = attributes["start_date"]
|
56
|
+
|
57
|
+
end
|
58
|
+
if attributes["end_date"]
|
59
|
+
@end_date = attributes["end_date"]
|
60
|
+
|
51
61
|
end
|
52
62
|
if attributes["tax_entity_name"]
|
53
63
|
@tax_entity_name = attributes["tax_entity_name"]
|
@@ -0,0 +1,62 @@
|
|
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
|
+
class TaxDataSchema
|
14
|
+
attr_accessor :us_tax_exemption_certificate
|
15
|
+
|
16
|
+
# :internal => :external
|
17
|
+
def self.attribute_map
|
18
|
+
{
|
19
|
+
:us_tax_exemption_certificate => :us_tax_exemption_certificate
|
20
|
+
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
def initialize(attributes = {})
|
25
|
+
return if attributes.empty?
|
26
|
+
# Morph attribute keys into undescored rubyish style
|
27
|
+
if attributes["us_tax_exemption_certificate"]
|
28
|
+
@us_tax_exemption_certificate = UsTaxExemptionCertificateSchema.new(attributes["us_tax_exemption_certificate"])
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
def to_body
|
36
|
+
body = {}
|
37
|
+
self.class.attribute_map.each_pair do |key, value|
|
38
|
+
v = self.send(key)
|
39
|
+
unless v.nil?
|
40
|
+
if v.is_a?(Array)
|
41
|
+
array = Array.new
|
42
|
+
v.each do |item|
|
43
|
+
if item.respond_to?("to_body".to_sym)
|
44
|
+
array.push item.to_body
|
45
|
+
else
|
46
|
+
array.push item
|
47
|
+
end
|
48
|
+
end
|
49
|
+
body[value] = array
|
50
|
+
else
|
51
|
+
if v.respond_to?("to_body".to_sym)
|
52
|
+
body[value] = v.to_body
|
53
|
+
else
|
54
|
+
body[value] = v
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
body
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
@@ -0,0 +1,62 @@
|
|
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
|
+
class TaxRequiredFields
|
14
|
+
attr_accessor :field_name
|
15
|
+
|
16
|
+
# :internal => :external
|
17
|
+
def self.attribute_map
|
18
|
+
{
|
19
|
+
:field_name => :field_name
|
20
|
+
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
def initialize(attributes = {})
|
25
|
+
return if attributes.empty?
|
26
|
+
# Morph attribute keys into undescored rubyish style
|
27
|
+
if attributes["field_name"]
|
28
|
+
@field_name = attributes["field_name"]
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
def to_body
|
36
|
+
body = {}
|
37
|
+
self.class.attribute_map.each_pair do |key, value|
|
38
|
+
v = self.send(key)
|
39
|
+
unless v.nil?
|
40
|
+
if v.is_a?(Array)
|
41
|
+
array = Array.new
|
42
|
+
v.each do |item|
|
43
|
+
if item.respond_to?("to_body".to_sym)
|
44
|
+
array.push item.to_body
|
45
|
+
else
|
46
|
+
array.push item
|
47
|
+
end
|
48
|
+
end
|
49
|
+
body[value] = array
|
50
|
+
else
|
51
|
+
if v.respond_to?("to_body".to_sym)
|
52
|
+
body[value] = v.to_body
|
53
|
+
else
|
54
|
+
body[value] = v
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
body
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
@@ -11,12 +11,13 @@
|
|
11
11
|
# limitations under the License.
|
12
12
|
|
13
13
|
class Transaction
|
14
|
-
attr_accessor :confirm_timestamp, :deducted_tax_amount, :buyer_credit_card_prefix, :custom_data, :buyer_name, :invoice_date, :create_timestamp, :currency_code, :supply_date, :invoice_image_url, :key, :invoice_address, :buyer_tax_number_valid, :verification_token, :tax_supported, :transaction_lines, :buyer_tax_number, :status, :custom_fields, :force_country_code, :countries, :invoice_number, :order_date, :source, :amount, :buyer_ip, :buyer_email, :original_transaction_key, :billing_country_code, :custom_id, :tax_amount, :additional_currencies, :invoice_place, :total_amount, :tax_entity_name, :evidence, :refunded_tax_amount, :manual, :tax_timezone, :description, :test, :tax_deducted, :tax_country_code, :refunded_total_amount
|
14
|
+
attr_accessor :confirm_timestamp, :fully_informative, :deducted_tax_amount, :buyer_credit_card_prefix, :custom_data, :buyer_name, :invoice_date, :create_timestamp, :currency_code, :supply_date, :invoice_image_url, :key, :invoice_address, :buyer_tax_number_valid, :verification_token, :tax_supported, :tax_data, :transaction_lines, :buyer_tax_number, :external_key, :status, :custom_fields, :force_country_code, :countries, :invoice_number, :order_date, :customer_id, :kind, :source, :amount, :buyer_ip, :buyer_email, :original_transaction_key, :billing_country_code, :custom_id, :tax_amount, :additional_currencies, :invoice_place, :total_amount, :tax_entity_name, :evidence, :refunded_tax_amount, :manual, :tax_timezone, :description, :test, :tax_deducted, :tax_country_code, :refunded_total_amount
|
15
15
|
|
16
16
|
# :internal => :external
|
17
17
|
def self.attribute_map
|
18
18
|
{
|
19
19
|
:confirm_timestamp => :confirm_timestamp,
|
20
|
+
:fully_informative => :fully_informative,
|
20
21
|
:deducted_tax_amount => :deducted_tax_amount,
|
21
22
|
:buyer_credit_card_prefix => :buyer_credit_card_prefix,
|
22
23
|
:custom_data => :custom_data,
|
@@ -31,14 +32,18 @@ class Transaction
|
|
31
32
|
:buyer_tax_number_valid => :buyer_tax_number_valid,
|
32
33
|
:verification_token => :verification_token,
|
33
34
|
:tax_supported => :tax_supported,
|
35
|
+
:tax_data => :tax_data,
|
34
36
|
:transaction_lines => :transaction_lines,
|
35
37
|
:buyer_tax_number => :buyer_tax_number,
|
38
|
+
:external_key => :external_key,
|
36
39
|
:status => :status,
|
37
40
|
:custom_fields => :custom_fields,
|
38
41
|
:force_country_code => :force_country_code,
|
39
42
|
:countries => :countries,
|
40
43
|
:invoice_number => :invoice_number,
|
41
44
|
:order_date => :order_date,
|
45
|
+
:customer_id => :customer_id,
|
46
|
+
:kind => :kind,
|
42
47
|
:source => :source,
|
43
48
|
:amount => :amount,
|
44
49
|
:buyer_ip => :buyer_ip,
|
@@ -70,6 +75,10 @@ class Transaction
|
|
70
75
|
if attributes["confirm_timestamp"]
|
71
76
|
@confirm_timestamp = attributes["confirm_timestamp"]
|
72
77
|
|
78
|
+
end
|
79
|
+
if attributes["fully_informative"]
|
80
|
+
@fully_informative = attributes["fully_informative"]
|
81
|
+
|
73
82
|
end
|
74
83
|
if attributes["deducted_tax_amount"]
|
75
84
|
@deducted_tax_amount = attributes["deducted_tax_amount"]
|
@@ -126,6 +135,10 @@ class Transaction
|
|
126
135
|
if attributes["tax_supported"]
|
127
136
|
@tax_supported = attributes["tax_supported"]
|
128
137
|
|
138
|
+
end
|
139
|
+
if attributes["tax_data"]
|
140
|
+
@tax_data = TaxDataSchema.new(attributes["tax_data"])
|
141
|
+
|
129
142
|
end
|
130
143
|
if attributes["transaction_lines"]
|
131
144
|
if (value = attributes["transaction_lines"]).is_a?(Array)
|
@@ -135,6 +148,10 @@ class Transaction
|
|
135
148
|
if attributes["buyer_tax_number"]
|
136
149
|
@buyer_tax_number = attributes["buyer_tax_number"]
|
137
150
|
|
151
|
+
end
|
152
|
+
if attributes["external_key"]
|
153
|
+
@external_key = attributes["external_key"]
|
154
|
+
|
138
155
|
end
|
139
156
|
if attributes["status"]
|
140
157
|
@status = attributes["status"]
|
@@ -160,6 +177,14 @@ class Transaction
|
|
160
177
|
if attributes["order_date"]
|
161
178
|
@order_date = attributes["order_date"]
|
162
179
|
|
180
|
+
end
|
181
|
+
if attributes["customer_id"]
|
182
|
+
@customer_id = attributes["customer_id"]
|
183
|
+
|
184
|
+
end
|
185
|
+
if attributes["kind"]
|
186
|
+
@kind = attributes["kind"]
|
187
|
+
|
163
188
|
end
|
164
189
|
if attributes["source"]
|
165
190
|
@source = attributes["source"]
|