taxamo 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/LICENSE +11 -0
  4. data/README.md +120 -0
  5. data/Rakefile +7 -0
  6. data/lib/monkey.rb +90 -0
  7. data/lib/swagger.rb +93 -0
  8. data/lib/swagger/configuration.rb +21 -0
  9. data/lib/swagger/request.rb +198 -0
  10. data/lib/swagger/response.rb +87 -0
  11. data/lib/taxamo.rb +999 -0
  12. data/lib/taxamo/models/additionalcurrencies.rb +62 -0
  13. data/lib/taxamo/models/additionalcurrency.rb +82 -0
  14. data/lib/taxamo/models/bycountry.rb +77 -0
  15. data/lib/taxamo/models/bystatus.rb +69 -0
  16. data/lib/taxamo/models/bytaxationtype.rb +82 -0
  17. data/lib/taxamo/models/c.rb +77 -0
  18. data/lib/taxamo/models/calculatesimpletaxout.rb +62 -0
  19. data/lib/taxamo/models/calculatetaxin.rb +62 -0
  20. data/lib/taxamo/models/calculatetaxlocationout.rb +97 -0
  21. data/lib/taxamo/models/calculatetaxout.rb +62 -0
  22. data/lib/taxamo/models/canceltransactionout.rb +62 -0
  23. data/lib/taxamo/models/capturepaymentout.rb +62 -0
  24. data/lib/taxamo/models/confirmtransactionin.rb +62 -0
  25. data/lib/taxamo/models/confirmtransactionout.rb +62 -0
  26. data/lib/taxamo/models/countries.rb +112 -0
  27. data/lib/taxamo/models/country.rb +114 -0
  28. data/lib/taxamo/models/countryschema.rb +114 -0
  29. data/lib/taxamo/models/createpaymentin.rb +72 -0
  30. data/lib/taxamo/models/createpaymentout.rb +62 -0
  31. data/lib/taxamo/models/createrefundin.rb +77 -0
  32. data/lib/taxamo/models/createrefundout.rb +77 -0
  33. data/lib/taxamo/models/createsmstokenin.rb +67 -0
  34. data/lib/taxamo/models/createsmstokenout.rb +62 -0
  35. data/lib/taxamo/models/createtransactionin.rb +67 -0
  36. data/lib/taxamo/models/createtransactionout.rb +62 -0
  37. data/lib/taxamo/models/currencyschema.rb +82 -0
  38. data/lib/taxamo/models/customfields.rb +67 -0
  39. data/lib/taxamo/models/emailinvoicein.rb +62 -0
  40. data/lib/taxamo/models/emailinvoiceout.rb +62 -0
  41. data/lib/taxamo/models/evidence.rb +112 -0
  42. data/lib/taxamo/models/evidenceschema.rb +77 -0
  43. data/lib/taxamo/models/getcountriesdictout.rb +63 -0
  44. data/lib/taxamo/models/getcurrenciesdictout.rb +63 -0
  45. data/lib/taxamo/models/getdailysettlementstatsout.rb +63 -0
  46. data/lib/taxamo/models/getproducttypesdictout.rb +63 -0
  47. data/lib/taxamo/models/getrefundsout.rb +63 -0
  48. data/lib/taxamo/models/getsettlementout.rb +83 -0
  49. data/lib/taxamo/models/getsettlementstatsbycountryout.rb +63 -0
  50. data/lib/taxamo/models/getsettlementstatsbytaxationtypeout.rb +62 -0
  51. data/lib/taxamo/models/getsettlementsummaryout.rb +62 -0
  52. data/lib/taxamo/models/gettransactionout.rb +62 -0
  53. data/lib/taxamo/models/gettransactionsstatsout.rb +62 -0
  54. data/lib/taxamo/models/inputtransaction.rb +184 -0
  55. data/lib/taxamo/models/inputtransactionline.rb +133 -0
  56. data/lib/taxamo/models/inputtransactionupdate.rb +184 -0
  57. data/lib/taxamo/models/invoiceaddress.rb +97 -0
  58. data/lib/taxamo/models/listpaymentsout.rb +63 -0
  59. data/lib/taxamo/models/listtransactionsout.rb +63 -0
  60. data/lib/taxamo/models/locategivenipout.rb +72 -0
  61. data/lib/taxamo/models/locatemyipout.rb +72 -0
  62. data/lib/taxamo/models/n.rb +77 -0
  63. data/lib/taxamo/models/payments.rb +72 -0
  64. data/lib/taxamo/models/producttypeschema.rb +62 -0
  65. data/lib/taxamo/models/report.rb +92 -0
  66. data/lib/taxamo/models/settlementdailystatsschema.rb +102 -0
  67. data/lib/taxamo/models/summary.rb +87 -0
  68. data/lib/taxamo/models/transaction.rb +279 -0
  69. data/lib/taxamo/models/transactionlines.rb +163 -0
  70. data/lib/taxamo/models/transactions.rb +279 -0
  71. data/lib/taxamo/models/unconfirmtransactionin.rb +62 -0
  72. data/lib/taxamo/models/unconfirmtransactionout.rb +62 -0
  73. data/lib/taxamo/models/updatetransactionin.rb +62 -0
  74. data/lib/taxamo/models/updatetransactionout.rb +62 -0
  75. data/lib/taxamo/models/validatetaxnumberout.rb +77 -0
  76. data/lib/taxamo/models/verifysmstokenout.rb +62 -0
  77. data/lib/taxamo/version.rb +17 -0
  78. data/taxamo.gemspec +31 -0
  79. data/test/taxamo/connectivity_test.rb +55 -0
  80. data/test/taxamo/tax_test.rb +147 -0
  81. data/test/taxamo/transactions_api_test.rb +308 -0
  82. metadata +226 -0
@@ -0,0 +1,72 @@
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 LocateMyIPOut
14
+ attr_accessor :remote_addr, :country_code, :country
15
+
16
+ # :internal => :external
17
+ def self.attribute_map
18
+ {
19
+ :remote_addr => :remote_addr,
20
+ :country_code => :country_code,
21
+ :country => :country
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["remote_addr"]
30
+ @remote_addr = attributes["remote_addr"]
31
+
32
+ end
33
+ if attributes["country_code"]
34
+ @country_code = attributes["country_code"]
35
+
36
+ end
37
+ if attributes["country"]
38
+ @country = Country.new(attributes["country"])
39
+
40
+ end
41
+
42
+
43
+ end
44
+
45
+ def to_body
46
+ body = {}
47
+ self.class.attribute_map.each_pair do |key, value|
48
+ v = self.send(key)
49
+ unless v.nil?
50
+ if v.is_a?(Array)
51
+ array = Array.new
52
+ v.each do |item|
53
+ if item.respond_to?("to_body".to_sym)
54
+ array.push item.to_body
55
+ else
56
+ array.push item
57
+ end
58
+ end
59
+ body[value] = array
60
+ else
61
+ if v.respond_to?("to_body".to_sym)
62
+ body[value] = v.to_body
63
+ else
64
+ body[value] = v
65
+ end
66
+ end
67
+ end
68
+ end
69
+ body
70
+ end
71
+ end
72
+
@@ -0,0 +1,77 @@
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 N
14
+ attr_accessor :day_raw, :value, :status, :day
15
+
16
+ # :internal => :external
17
+ def self.attribute_map
18
+ {
19
+ :day_raw => :day_raw,
20
+ :value => :value,
21
+ :status => :status,
22
+ :day => :day
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["day_raw"]
31
+ @day_raw = attributes["day_raw"]
32
+
33
+ end
34
+ if attributes["value"]
35
+ @value = attributes["value"]
36
+
37
+ end
38
+ if attributes["status"]
39
+ @status = attributes["status"]
40
+
41
+ end
42
+ if attributes["day"]
43
+ @day = attributes["day"]
44
+
45
+ end
46
+
47
+
48
+ end
49
+
50
+ def to_body
51
+ body = {}
52
+ self.class.attribute_map.each_pair do |key, value|
53
+ v = self.send(key)
54
+ unless v.nil?
55
+ if v.is_a?(Array)
56
+ array = Array.new
57
+ v.each do |item|
58
+ if item.respond_to?("to_body".to_sym)
59
+ array.push item.to_body
60
+ else
61
+ array.push item
62
+ end
63
+ end
64
+ body[value] = array
65
+ else
66
+ if v.respond_to?("to_body".to_sym)
67
+ body[value] = v.to_body
68
+ else
69
+ body[value] = v
70
+ end
71
+ end
72
+ end
73
+ end
74
+ body
75
+ end
76
+ end
77
+
@@ -0,0 +1,72 @@
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 Payments
14
+ attr_accessor :amount, :payment_timestamp, :payment_information
15
+
16
+ # :internal => :external
17
+ def self.attribute_map
18
+ {
19
+ :amount => :amount,
20
+ :payment_timestamp => :payment_timestamp,
21
+ :payment_information => :payment_information
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["amount"]
30
+ @amount = attributes["amount"]
31
+
32
+ end
33
+ if attributes["payment_timestamp"]
34
+ @payment_timestamp = attributes["payment_timestamp"]
35
+
36
+ end
37
+ if attributes["payment_information"]
38
+ @payment_information = attributes["payment_information"]
39
+
40
+ end
41
+
42
+
43
+ end
44
+
45
+ def to_body
46
+ body = {}
47
+ self.class.attribute_map.each_pair do |key, value|
48
+ v = self.send(key)
49
+ unless v.nil?
50
+ if v.is_a?(Array)
51
+ array = Array.new
52
+ v.each do |item|
53
+ if item.respond_to?("to_body".to_sym)
54
+ array.push item.to_body
55
+ else
56
+ array.push item
57
+ end
58
+ end
59
+ body[value] = array
60
+ else
61
+ if v.respond_to?("to_body".to_sym)
62
+ body[value] = v.to_body
63
+ else
64
+ body[value] = v
65
+ end
66
+ end
67
+ end
68
+ end
69
+ body
70
+ end
71
+ end
72
+
@@ -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 ProductTypeSchema
14
+ attr_accessor :code
15
+
16
+ # :internal => :external
17
+ def self.attribute_map
18
+ {
19
+ :code => :code
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["code"]
28
+ @code = attributes["code"]
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,92 @@
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 Report
14
+ attr_accessor :tax_rate, :amount, :country_name, :country_code, :tax_amount, :skip_moss, :currency_code
15
+
16
+ # :internal => :external
17
+ def self.attribute_map
18
+ {
19
+ :tax_rate => :tax_rate,
20
+ :amount => :amount,
21
+ :country_name => :country_name,
22
+ :country_code => :country_code,
23
+ :tax_amount => :tax_amount,
24
+ :skip_moss => :skip_moss,
25
+ :currency_code => :currency_code
26
+
27
+ }
28
+ end
29
+
30
+ def initialize(attributes = {})
31
+ return if attributes.empty?
32
+ # Morph attribute keys into undescored rubyish style
33
+ if attributes["tax_rate"]
34
+ @tax_rate = attributes["tax_rate"]
35
+
36
+ end
37
+ if attributes["amount"]
38
+ @amount = attributes["amount"]
39
+
40
+ end
41
+ if attributes["country_name"]
42
+ @country_name = attributes["country_name"]
43
+
44
+ end
45
+ if attributes["country_code"]
46
+ @country_code = attributes["country_code"]
47
+
48
+ end
49
+ if attributes["tax_amount"]
50
+ @tax_amount = attributes["tax_amount"]
51
+
52
+ end
53
+ if attributes["skip_moss"]
54
+ @skip_moss = attributes["skip_moss"]
55
+
56
+ end
57
+ if attributes["currency_code"]
58
+ @currency_code = attributes["currency_code"]
59
+
60
+ end
61
+
62
+
63
+ end
64
+
65
+ def to_body
66
+ body = {}
67
+ self.class.attribute_map.each_pair do |key, value|
68
+ v = self.send(key)
69
+ unless v.nil?
70
+ if v.is_a?(Array)
71
+ array = Array.new
72
+ v.each do |item|
73
+ if item.respond_to?("to_body".to_sym)
74
+ array.push item.to_body
75
+ else
76
+ array.push item
77
+ end
78
+ end
79
+ body[value] = array
80
+ else
81
+ if v.respond_to?("to_body".to_sym)
82
+ body[value] = v.to_body
83
+ else
84
+ body[value] = v
85
+ end
86
+ end
87
+ end
88
+ end
89
+ body
90
+ end
91
+ end
92
+
@@ -0,0 +1,102 @@
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 SettlementDailyStatsSchema
14
+ attr_accessor :b2c, :untaxed, :eu_taxed, :eu_b2b, :count, :eu_total, :day_raw, :b2b, :day
15
+
16
+ # :internal => :external
17
+ def self.attribute_map
18
+ {
19
+ :b2c => :b2c,
20
+ :untaxed => :untaxed,
21
+ :eu_taxed => :eu_taxed,
22
+ :eu_b2b => :eu_b2b,
23
+ :count => :count,
24
+ :eu_total => :eu_total,
25
+ :day_raw => :day_raw,
26
+ :b2b => :b2b,
27
+ :day => :day
28
+
29
+ }
30
+ end
31
+
32
+ def initialize(attributes = {})
33
+ return if attributes.empty?
34
+ # Morph attribute keys into undescored rubyish style
35
+ if attributes["b2c"]
36
+ @b2c = attributes["b2c"]
37
+
38
+ end
39
+ if attributes["untaxed"]
40
+ @untaxed = attributes["untaxed"]
41
+
42
+ end
43
+ if attributes["eu_taxed"]
44
+ @eu_taxed = attributes["eu_taxed"]
45
+
46
+ end
47
+ if attributes["eu_b2b"]
48
+ @eu_b2b = attributes["eu_b2b"]
49
+
50
+ end
51
+ if attributes["count"]
52
+ @count = attributes["count"]
53
+
54
+ end
55
+ if attributes["eu_total"]
56
+ @eu_total = attributes["eu_total"]
57
+
58
+ end
59
+ if attributes["day_raw"]
60
+ @day_raw = attributes["day_raw"]
61
+
62
+ end
63
+ if attributes["b2b"]
64
+ @b2b = attributes["b2b"]
65
+
66
+ end
67
+ if attributes["day"]
68
+ @day = attributes["day"]
69
+
70
+ end
71
+
72
+
73
+ end
74
+
75
+ def to_body
76
+ body = {}
77
+ self.class.attribute_map.each_pair do |key, value|
78
+ v = self.send(key)
79
+ unless v.nil?
80
+ if v.is_a?(Array)
81
+ array = Array.new
82
+ v.each do |item|
83
+ if item.respond_to?("to_body".to_sym)
84
+ array.push item.to_body
85
+ else
86
+ array.push item
87
+ end
88
+ end
89
+ body[value] = array
90
+ else
91
+ if v.respond_to?("to_body".to_sym)
92
+ body[value] = v.to_body
93
+ else
94
+ body[value] = v
95
+ end
96
+ end
97
+ end
98
+ end
99
+ body
100
+ end
101
+ end
102
+