taxamo-ns 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/LICENSE +11 -0
  4. data/README.md +152 -0
  5. data/Rakefile +7 -0
  6. data/lib/monkey.rb +90 -0
  7. data/lib/swagger/configuration.rb +21 -0
  8. data/lib/swagger/request.rb +199 -0
  9. data/lib/swagger/response.rb +87 -0
  10. data/lib/swagger.rb +93 -0
  11. data/lib/taxamo/models/additionalcurrencies.rb +63 -0
  12. data/lib/taxamo/models/additionalcurrency.rb +88 -0
  13. data/lib/taxamo/models/bycountry.rb +78 -0
  14. data/lib/taxamo/models/bystatus.rb +70 -0
  15. data/lib/taxamo/models/bytaxationtype.rb +83 -0
  16. data/lib/taxamo/models/c.rb +78 -0
  17. data/lib/taxamo/models/calculatesimpletaxout.rb +75 -0
  18. data/lib/taxamo/models/calculatetaxin.rb +63 -0
  19. data/lib/taxamo/models/calculatetaxlocationout.rb +98 -0
  20. data/lib/taxamo/models/calculatetaxout.rb +75 -0
  21. data/lib/taxamo/models/canceltransactionout.rb +63 -0
  22. data/lib/taxamo/models/capturepaymentout.rb +63 -0
  23. data/lib/taxamo/models/confirmtransactionin.rb +63 -0
  24. data/lib/taxamo/models/confirmtransactionout.rb +75 -0
  25. data/lib/taxamo/models/countries.rb +113 -0
  26. data/lib/taxamo/models/country.rb +120 -0
  27. data/lib/taxamo/models/countryschema.rb +120 -0
  28. data/lib/taxamo/models/createpaymentin.rb +73 -0
  29. data/lib/taxamo/models/createpaymentout.rb +63 -0
  30. data/lib/taxamo/models/createrefundin.rb +83 -0
  31. data/lib/taxamo/models/createrefundout.rb +78 -0
  32. data/lib/taxamo/models/createsmstokenin.rb +68 -0
  33. data/lib/taxamo/models/createsmstokenout.rb +63 -0
  34. data/lib/taxamo/models/createtransactionin.rb +68 -0
  35. data/lib/taxamo/models/createtransactionout.rb +75 -0
  36. data/lib/taxamo/models/currencyschema.rb +83 -0
  37. data/lib/taxamo/models/customfields.rb +68 -0
  38. data/lib/taxamo/models/emailinvoicein.rb +63 -0
  39. data/lib/taxamo/models/emailinvoiceout.rb +63 -0
  40. data/lib/taxamo/models/emailrefundin.rb +63 -0
  41. data/lib/taxamo/models/emailrefundout.rb +63 -0
  42. data/lib/taxamo/models/evidence.rb +113 -0
  43. data/lib/taxamo/models/evidenceschema.rb +78 -0
  44. data/lib/taxamo/models/getcountriesdictout.rb +64 -0
  45. data/lib/taxamo/models/getcurrenciesdictout.rb +64 -0
  46. data/lib/taxamo/models/getdailysettlementstatsout.rb +64 -0
  47. data/lib/taxamo/models/getdetailedrefundsout.rb +64 -0
  48. data/lib/taxamo/models/getdomesticsummaryreportout.rb +123 -0
  49. data/lib/taxamo/models/geteuviesreportout.rb +79 -0
  50. data/lib/taxamo/models/getproducttypesdictout.rb +64 -0
  51. data/lib/taxamo/models/getrefundsout.rb +64 -0
  52. data/lib/taxamo/models/getsettlementout.rb +84 -0
  53. data/lib/taxamo/models/getsettlementstatsbycountryout.rb +64 -0
  54. data/lib/taxamo/models/getsettlementstatsbytaxationtypeout.rb +63 -0
  55. data/lib/taxamo/models/getsettlementsummaryout.rb +63 -0
  56. data/lib/taxamo/models/gettransactionout.rb +75 -0
  57. data/lib/taxamo/models/gettransactionsstatsbycountryout.rb +64 -0
  58. data/lib/taxamo/models/gettransactionsstatsout.rb +63 -0
  59. data/lib/taxamo/models/inputtransaction.rb +220 -0
  60. data/lib/taxamo/models/inputtransactionline.rb +144 -0
  61. data/lib/taxamo/models/inputtransactionupdate.rb +220 -0
  62. data/lib/taxamo/models/invoiceaddress.rb +98 -0
  63. data/lib/taxamo/models/listpaymentsout.rb +64 -0
  64. data/lib/taxamo/models/listrefundsout.rb +64 -0
  65. data/lib/taxamo/models/listtransactionsout.rb +64 -0
  66. data/lib/taxamo/models/locategivenipout.rb +73 -0
  67. data/lib/taxamo/models/locatemyipout.rb +73 -0
  68. data/lib/taxamo/models/n.rb +78 -0
  69. data/lib/taxamo/models/payments.rb +73 -0
  70. data/lib/taxamo/models/producttypeschema.rb +63 -0
  71. data/lib/taxamo/models/refunds.rb +108 -0
  72. data/lib/taxamo/models/report.rb +103 -0
  73. data/lib/taxamo/models/settlementdailystatsschema.rb +103 -0
  74. data/lib/taxamo/models/storagerequiredfields.rb +63 -0
  75. data/lib/taxamo/models/summary.rb +98 -0
  76. data/lib/taxamo/models/taxdataschema.rb +63 -0
  77. data/lib/taxamo/models/taxrequiredfields.rb +63 -0
  78. data/lib/taxamo/models/transaction.rb +330 -0
  79. data/lib/taxamo/models/transactionlines.rb +174 -0
  80. data/lib/taxamo/models/transactions.rb +330 -0
  81. data/lib/taxamo/models/unconfirmtransactionin.rb +63 -0
  82. data/lib/taxamo/models/unconfirmtransactionout.rb +75 -0
  83. data/lib/taxamo/models/updatetransactionin.rb +63 -0
  84. data/lib/taxamo/models/updatetransactionout.rb +75 -0
  85. data/lib/taxamo/models/ustaxexemptioncertificatedetailsschema.rb +139 -0
  86. data/lib/taxamo/models/ustaxexemptioncertificateschema.rb +68 -0
  87. data/lib/taxamo/models/ustaxexemptstate.rb +73 -0
  88. data/lib/taxamo/models/ustaxid.rb +73 -0
  89. data/lib/taxamo/models/validatetaxnumberout.rb +78 -0
  90. data/lib/taxamo/models/verifysmstokenout.rb +63 -0
  91. data/lib/taxamo/version.rb +17 -0
  92. data/lib/taxamo.rb +1215 -0
  93. data/taxamo.gemspec +28 -0
  94. data/test/taxamo/connectivity_test.rb +55 -0
  95. data/test/taxamo/tax_test.rb +152 -0
  96. data/test/taxamo/transactions_api_test.rb +326 -0
  97. metadata +241 -0
@@ -0,0 +1,64 @@
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 GetDetailedRefundsOut
15
+ attr_accessor :report
16
+
17
+ # :internal => :external
18
+ def self.attribute_map
19
+ {
20
+ :report => :report
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["report"]
29
+ if (value = attributes["report"]).is_a?(Array)
30
+ @report = value.map{ |v| Report.new(v) }
31
+ end
32
+ end
33
+
34
+
35
+ end
36
+
37
+ def to_body
38
+ body = {}
39
+ self.class.attribute_map.each_pair do |key, value|
40
+ v = self.send(key)
41
+ unless v.nil?
42
+ if v.is_a?(Array)
43
+ array = Array.new
44
+ v.each do |item|
45
+ if item.respond_to?("to_body".to_sym)
46
+ array.push item.to_body
47
+ else
48
+ array.push item
49
+ end
50
+ end
51
+ body[value] = array
52
+ else
53
+ if v.respond_to?("to_body".to_sym)
54
+ body[value] = v.to_body
55
+ else
56
+ body[value] = v
57
+ end
58
+ end
59
+ end
60
+ end
61
+ body
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,123 @@
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 GetDomesticSummaryReportOut
15
+ attr_accessor :end_date, :domestic_refunds_amount, :currency_code, :global_refunds_tax_amount, :domestic_refunds_tax_amount, :eu_tax_deducted_refunds, :global_sales_amount, :global_refunds_amount, :global_sales_tax_amount, :eu_tax_deducted_sales, :start_date, :domestic_tax_amount, :domestic_sales_amount
16
+
17
+ # :internal => :external
18
+ def self.attribute_map
19
+ {
20
+ :end_date => :end_date,
21
+ :domestic_refunds_amount => :domestic_refunds_amount,
22
+ :currency_code => :currency_code,
23
+ :global_refunds_tax_amount => :global_refunds_tax_amount,
24
+ :domestic_refunds_tax_amount => :domestic_refunds_tax_amount,
25
+ :eu_tax_deducted_refunds => :eu_tax_deducted_refunds,
26
+ :global_sales_amount => :global_sales_amount,
27
+ :global_refunds_amount => :global_refunds_amount,
28
+ :global_sales_tax_amount => :global_sales_tax_amount,
29
+ :eu_tax_deducted_sales => :eu_tax_deducted_sales,
30
+ :start_date => :start_date,
31
+ :domestic_tax_amount => :domestic_tax_amount,
32
+ :domestic_sales_amount => :domestic_sales_amount
33
+
34
+ }
35
+ end
36
+
37
+ def initialize(attributes = {})
38
+ return if attributes.empty?
39
+ # Morph attribute keys into undescored rubyish style
40
+ if attributes["end_date"]
41
+ @end_date = attributes["end_date"]
42
+
43
+ end
44
+ if attributes["domestic_refunds_amount"]
45
+ @domestic_refunds_amount = attributes["domestic_refunds_amount"]
46
+
47
+ end
48
+ if attributes["currency_code"]
49
+ @currency_code = attributes["currency_code"]
50
+
51
+ end
52
+ if attributes["global_refunds_tax_amount"]
53
+ @global_refunds_tax_amount = attributes["global_refunds_tax_amount"]
54
+
55
+ end
56
+ if attributes["domestic_refunds_tax_amount"]
57
+ @domestic_refunds_tax_amount = attributes["domestic_refunds_tax_amount"]
58
+
59
+ end
60
+ if attributes["eu_tax_deducted_refunds"]
61
+ @eu_tax_deducted_refunds = attributes["eu_tax_deducted_refunds"]
62
+
63
+ end
64
+ if attributes["global_sales_amount"]
65
+ @global_sales_amount = attributes["global_sales_amount"]
66
+
67
+ end
68
+ if attributes["global_refunds_amount"]
69
+ @global_refunds_amount = attributes["global_refunds_amount"]
70
+
71
+ end
72
+ if attributes["global_sales_tax_amount"]
73
+ @global_sales_tax_amount = attributes["global_sales_tax_amount"]
74
+
75
+ end
76
+ if attributes["eu_tax_deducted_sales"]
77
+ @eu_tax_deducted_sales = attributes["eu_tax_deducted_sales"]
78
+
79
+ end
80
+ if attributes["start_date"]
81
+ @start_date = attributes["start_date"]
82
+
83
+ end
84
+ if attributes["domestic_tax_amount"]
85
+ @domestic_tax_amount = attributes["domestic_tax_amount"]
86
+
87
+ end
88
+ if attributes["domestic_sales_amount"]
89
+ @domestic_sales_amount = attributes["domestic_sales_amount"]
90
+
91
+ end
92
+
93
+
94
+ end
95
+
96
+ def to_body
97
+ body = {}
98
+ self.class.attribute_map.each_pair do |key, value|
99
+ v = self.send(key)
100
+ unless v.nil?
101
+ if v.is_a?(Array)
102
+ array = Array.new
103
+ v.each do |item|
104
+ if item.respond_to?("to_body".to_sym)
105
+ array.push item.to_body
106
+ else
107
+ array.push item
108
+ end
109
+ end
110
+ body[value] = array
111
+ else
112
+ if v.respond_to?("to_body".to_sym)
113
+ body[value] = v.to_body
114
+ else
115
+ body[value] = v
116
+ end
117
+ end
118
+ end
119
+ end
120
+ body
121
+ end
122
+ end
123
+ end
@@ -0,0 +1,79 @@
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 GetEuViesReportOut
15
+ attr_accessor :report, :currency_code, :start_date, :end_date
16
+
17
+ # :internal => :external
18
+ def self.attribute_map
19
+ {
20
+ :report => :report,
21
+ :currency_code => :currency_code,
22
+ :start_date => :start_date,
23
+ :end_date => :end_date
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["report"]
32
+ if (value = attributes["report"]).is_a?(Array)
33
+ @report = value.map{ |v| Report.new(v) }
34
+ end
35
+ end
36
+ if attributes["currency_code"]
37
+ @currency_code = attributes["currency_code"]
38
+
39
+ end
40
+ if attributes["start_date"]
41
+ @start_date = attributes["start_date"]
42
+
43
+ end
44
+ if attributes["end_date"]
45
+ @end_date = attributes["end_date"]
46
+
47
+ end
48
+
49
+
50
+ end
51
+
52
+ def to_body
53
+ body = {}
54
+ self.class.attribute_map.each_pair do |key, value|
55
+ v = self.send(key)
56
+ unless v.nil?
57
+ if v.is_a?(Array)
58
+ array = Array.new
59
+ v.each do |item|
60
+ if item.respond_to?("to_body".to_sym)
61
+ array.push item.to_body
62
+ else
63
+ array.push item
64
+ end
65
+ end
66
+ body[value] = array
67
+ else
68
+ if v.respond_to?("to_body".to_sym)
69
+ body[value] = v.to_body
70
+ else
71
+ body[value] = v
72
+ end
73
+ end
74
+ end
75
+ end
76
+ body
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,64 @@
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 GetProductTypesDictOut
15
+ attr_accessor :dictionary
16
+
17
+ # :internal => :external
18
+ def self.attribute_map
19
+ {
20
+ :dictionary => :dictionary
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["dictionary"]
29
+ if (value = attributes["dictionary"]).is_a?(Array)
30
+ @dictionary = value.map{ |v| ProductTypeSchema.new(v) }
31
+ end
32
+ end
33
+
34
+
35
+ end
36
+
37
+ def to_body
38
+ body = {}
39
+ self.class.attribute_map.each_pair do |key, value|
40
+ v = self.send(key)
41
+ unless v.nil?
42
+ if v.is_a?(Array)
43
+ array = Array.new
44
+ v.each do |item|
45
+ if item.respond_to?("to_body".to_sym)
46
+ array.push item.to_body
47
+ else
48
+ array.push item
49
+ end
50
+ end
51
+ body[value] = array
52
+ else
53
+ if v.respond_to?("to_body".to_sym)
54
+ body[value] = v.to_body
55
+ else
56
+ body[value] = v
57
+ end
58
+ end
59
+ end
60
+ end
61
+ body
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,64 @@
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 GetRefundsOut
15
+ attr_accessor :report
16
+
17
+ # :internal => :external
18
+ def self.attribute_map
19
+ {
20
+ :report => :report
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["report"]
29
+ if (value = attributes["report"]).is_a?(Array)
30
+ @report = value.map{ |v| Report.new(v) }
31
+ end
32
+ end
33
+
34
+
35
+ end
36
+
37
+ def to_body
38
+ body = {}
39
+ self.class.attribute_map.each_pair do |key, value|
40
+ v = self.send(key)
41
+ unless v.nil?
42
+ if v.is_a?(Array)
43
+ array = Array.new
44
+ v.each do |item|
45
+ if item.respond_to?("to_body".to_sym)
46
+ array.push item.to_body
47
+ else
48
+ array.push item
49
+ end
50
+ end
51
+ body[value] = array
52
+ else
53
+ if v.respond_to?("to_body".to_sym)
54
+ body[value] = v.to_body
55
+ else
56
+ body[value] = v
57
+ end
58
+ end
59
+ end
60
+ end
61
+ body
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,84 @@
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 GetSettlementOut
15
+ attr_accessor :report, :start_date, :end_date, :indicative, :fx_rate_date
16
+
17
+ # :internal => :external
18
+ def self.attribute_map
19
+ {
20
+ :report => :report,
21
+ :start_date => :start_date,
22
+ :end_date => :end_date,
23
+ :indicative => :indicative,
24
+ :fx_rate_date => :fx_rate_date
25
+
26
+ }
27
+ end
28
+
29
+ def initialize(attributes = {})
30
+ return if attributes.empty?
31
+ # Morph attribute keys into undescored rubyish style
32
+ if attributes["report"]
33
+ if (value = attributes["report"]).is_a?(Array)
34
+ @report = value.map{ |v| Report.new(v) }
35
+ end
36
+ end
37
+ if attributes["start_date"]
38
+ @start_date = attributes["start_date"]
39
+
40
+ end
41
+ if attributes["end_date"]
42
+ @end_date = attributes["end_date"]
43
+
44
+ end
45
+ if attributes["indicative"]
46
+ @indicative = attributes["indicative"]
47
+
48
+ end
49
+ if attributes["fx_rate_date"]
50
+ @fx_rate_date = attributes["fx_rate_date"]
51
+
52
+ end
53
+
54
+
55
+ end
56
+
57
+ def to_body
58
+ body = {}
59
+ self.class.attribute_map.each_pair do |key, value|
60
+ v = self.send(key)
61
+ unless v.nil?
62
+ if v.is_a?(Array)
63
+ array = Array.new
64
+ v.each do |item|
65
+ if item.respond_to?("to_body".to_sym)
66
+ array.push item.to_body
67
+ else
68
+ array.push item
69
+ end
70
+ end
71
+ body[value] = array
72
+ else
73
+ if v.respond_to?("to_body".to_sym)
74
+ body[value] = v.to_body
75
+ else
76
+ body[value] = v
77
+ end
78
+ end
79
+ end
80
+ end
81
+ body
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,64 @@
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 GetSettlementStatsByCountryOut
15
+ attr_accessor :by_country
16
+
17
+ # :internal => :external
18
+ def self.attribute_map
19
+ {
20
+ :by_country => :by_country
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["by_country"]
29
+ if (value = attributes["by_country"]).is_a?(Array)
30
+ @by_country = value.map{ |v| ByCountry.new(v) }
31
+ end
32
+ end
33
+
34
+
35
+ end
36
+
37
+ def to_body
38
+ body = {}
39
+ self.class.attribute_map.each_pair do |key, value|
40
+ v = self.send(key)
41
+ unless v.nil?
42
+ if v.is_a?(Array)
43
+ array = Array.new
44
+ v.each do |item|
45
+ if item.respond_to?("to_body".to_sym)
46
+ array.push item.to_body
47
+ else
48
+ array.push item
49
+ end
50
+ end
51
+ body[value] = array
52
+ else
53
+ if v.respond_to?("to_body".to_sym)
54
+ body[value] = v.to_body
55
+ else
56
+ body[value] = v
57
+ end
58
+ end
59
+ end
60
+ end
61
+ body
62
+ end
63
+ end
64
+ 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 GetSettlementStatsByTaxationTypeOut
15
+ attr_accessor :by_taxation_type
16
+
17
+ # :internal => :external
18
+ def self.attribute_map
19
+ {
20
+ :by_taxation_type => :by_taxation_type
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["by_taxation_type"]
29
+ @by_taxation_type = ByTaxationType.new(attributes["by_taxation_type"])
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,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 GetSettlementSummaryOut
15
+ attr_accessor :summary
16
+
17
+ # :internal => :external
18
+ def self.attribute_map
19
+ {
20
+ :summary => :summary
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["summary"]
29
+ @summary = Summary.new(attributes["summary"])
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