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,75 @@
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 GetTransactionOut
15
+ attr_accessor :transaction, :tax_required_fields, :storage_required_fields
16
+
17
+ # :internal => :external
18
+ def self.attribute_map
19
+ {
20
+ :transaction => :transaction,
21
+ :tax_required_fields => :tax_required_fields,
22
+ :storage_required_fields => :storage_required_fields
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["transaction"]
31
+ @transaction = Transaction.new(attributes["transaction"])
32
+
33
+ end
34
+ if attributes["tax_required_fields"]
35
+ if (value = attributes["tax_required_fields"]).is_a?(Array)
36
+ @tax_required_fields = value.map{ |v| TaxRequiredFields.new(v) }
37
+ end
38
+ end
39
+ if attributes["storage_required_fields"]
40
+ if (value = attributes["storage_required_fields"]).is_a?(Array)
41
+ @storage_required_fields = value.map{ |v| StorageRequiredFields.new(v) }
42
+ end
43
+ end
44
+
45
+
46
+ end
47
+
48
+ def to_body
49
+ body = {}
50
+ self.class.attribute_map.each_pair do |key, value|
51
+ v = self.send(key)
52
+ unless v.nil?
53
+ if v.is_a?(Array)
54
+ array = Array.new
55
+ v.each do |item|
56
+ if item.respond_to?("to_body".to_sym)
57
+ array.push item.to_body
58
+ else
59
+ array.push item
60
+ end
61
+ end
62
+ body[value] = array
63
+ else
64
+ if v.respond_to?("to_body".to_sym)
65
+ body[value] = v.to_body
66
+ else
67
+ body[value] = v
68
+ end
69
+ end
70
+ end
71
+ end
72
+ body
73
+ end
74
+ end
75
+ 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 GetTransactionsStatsByCountryOut
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 GetTransactionsStatsOut
15
+ attr_accessor :by_status
16
+
17
+ # :internal => :external
18
+ def self.attribute_map
19
+ {
20
+ :by_status => :by_status
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_status"]
29
+ @by_status = ByStatus.new(attributes["by_status"])
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,220 @@
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 InputTransaction
15
+ attr_accessor :order_date_type, :buyer_credit_card_prefix, :custom_data, :buyer_name, :invoice_date, :currency_code, :sub_account_id, :supply_date, :invoice_address, :verification_token, :note, :tax_data, :transaction_lines, :buyer_tax_number, :status, :custom_fields, :force_country_code, :invoice_number, :order_date, :customer_id, :comments, :buyer_ip, :buyer_email, :original_transaction_key, :billing_country_code, :custom_id, :additional_currencies, :invoice_place, :evidence, :description, :tax_deducted, :tax_country_code
16
+
17
+ # :internal => :external
18
+ def self.attribute_map
19
+ {
20
+ :order_date_type => :order_date_type,
21
+ :buyer_credit_card_prefix => :buyer_credit_card_prefix,
22
+ :custom_data => :custom_data,
23
+ :buyer_name => :buyer_name,
24
+ :invoice_date => :invoice_date,
25
+ :currency_code => :currency_code,
26
+ :sub_account_id => :sub_account_id,
27
+ :supply_date => :supply_date,
28
+ :invoice_address => :invoice_address,
29
+ :verification_token => :verification_token,
30
+ :note => :note,
31
+ :tax_data => :tax_data,
32
+ :transaction_lines => :transaction_lines,
33
+ :buyer_tax_number => :buyer_tax_number,
34
+ :status => :status,
35
+ :custom_fields => :custom_fields,
36
+ :force_country_code => :force_country_code,
37
+ :invoice_number => :invoice_number,
38
+ :order_date => :order_date,
39
+ :customer_id => :customer_id,
40
+ :comments => :comments,
41
+ :buyer_ip => :buyer_ip,
42
+ :buyer_email => :buyer_email,
43
+ :original_transaction_key => :original_transaction_key,
44
+ :billing_country_code => :billing_country_code,
45
+ :custom_id => :custom_id,
46
+ :additional_currencies => :additional_currencies,
47
+ :invoice_place => :invoice_place,
48
+ :evidence => :evidence,
49
+ :description => :description,
50
+ :tax_deducted => :tax_deducted,
51
+ :tax_country_code => :tax_country_code
52
+
53
+ }
54
+ end
55
+
56
+ def initialize(attributes = {})
57
+ return if attributes.empty?
58
+ # Morph attribute keys into undescored rubyish style
59
+ if attributes["order_date_type"]
60
+ @order_date_type = attributes["order_date_type"]
61
+
62
+ end
63
+ if attributes["buyer_credit_card_prefix"]
64
+ @buyer_credit_card_prefix = attributes["buyer_credit_card_prefix"]
65
+
66
+ end
67
+ if attributes["custom_data"]
68
+ @custom_data = attributes["custom_data"]
69
+
70
+ end
71
+ if attributes["buyer_name"]
72
+ @buyer_name = attributes["buyer_name"]
73
+
74
+ end
75
+ if attributes["invoice_date"]
76
+ @invoice_date = attributes["invoice_date"]
77
+
78
+ end
79
+ if attributes["currency_code"]
80
+ @currency_code = attributes["currency_code"]
81
+
82
+ end
83
+ if attributes["sub_account_id"]
84
+ @sub_account_id = attributes["sub_account_id"]
85
+
86
+ end
87
+ if attributes["supply_date"]
88
+ @supply_date = attributes["supply_date"]
89
+
90
+ end
91
+ if attributes["invoice_address"]
92
+ @invoice_address = InvoiceAddress.new(attributes["invoice_address"])
93
+
94
+ end
95
+ if attributes["verification_token"]
96
+ @verification_token = attributes["verification_token"]
97
+
98
+ end
99
+ if attributes["note"]
100
+ @note = attributes["note"]
101
+
102
+ end
103
+ if attributes["tax_data"]
104
+ @tax_data = TaxDataSchema.new(attributes["tax_data"])
105
+
106
+ end
107
+ if attributes["transaction_lines"]
108
+ if (value = attributes["transaction_lines"]).is_a?(Array)
109
+ @transaction_lines = value.map{ |v| InputTransactionLine.new(v) }
110
+ end
111
+ end
112
+ if attributes["buyer_tax_number"]
113
+ @buyer_tax_number = attributes["buyer_tax_number"]
114
+
115
+ end
116
+ if attributes["status"]
117
+ @status = attributes["status"]
118
+
119
+ end
120
+ if attributes["custom_fields"]
121
+ if (value = attributes["custom_fields"]).is_a?(Array)
122
+ @custom_fields = value.map{ |v| CustomFields.new(v) }
123
+ end
124
+ end
125
+ if attributes["force_country_code"]
126
+ @force_country_code = attributes["force_country_code"]
127
+
128
+ end
129
+ if attributes["invoice_number"]
130
+ @invoice_number = attributes["invoice_number"]
131
+
132
+ end
133
+ if attributes["order_date"]
134
+ @order_date = attributes["order_date"]
135
+
136
+ end
137
+ if attributes["customer_id"]
138
+ @customer_id = attributes["customer_id"]
139
+
140
+ end
141
+ if attributes["comments"]
142
+ @comments = attributes["comments"]
143
+
144
+ end
145
+ if attributes["buyer_ip"]
146
+ @buyer_ip = attributes["buyer_ip"]
147
+
148
+ end
149
+ if attributes["buyer_email"]
150
+ @buyer_email = attributes["buyer_email"]
151
+
152
+ end
153
+ if attributes["original_transaction_key"]
154
+ @original_transaction_key = attributes["original_transaction_key"]
155
+
156
+ end
157
+ if attributes["billing_country_code"]
158
+ @billing_country_code = attributes["billing_country_code"]
159
+
160
+ end
161
+ if attributes["custom_id"]
162
+ @custom_id = attributes["custom_id"]
163
+
164
+ end
165
+ if attributes["additional_currencies"]
166
+ @additional_currencies = AdditionalCurrencies.new(attributes["additional_currencies"])
167
+
168
+ end
169
+ if attributes["invoice_place"]
170
+ @invoice_place = attributes["invoice_place"]
171
+
172
+ end
173
+ if attributes["evidence"]
174
+ @evidence = Evidence.new(attributes["evidence"])
175
+
176
+ end
177
+ if attributes["description"]
178
+ @description = attributes["description"]
179
+
180
+ end
181
+ if attributes["tax_deducted"]
182
+ @tax_deducted = attributes["tax_deducted"]
183
+
184
+ end
185
+ if attributes["tax_country_code"]
186
+ @tax_country_code = attributes["tax_country_code"]
187
+
188
+ end
189
+
190
+
191
+ end
192
+
193
+ def to_body
194
+ body = {}
195
+ self.class.attribute_map.each_pair do |key, value|
196
+ v = self.send(key)
197
+ unless v.nil?
198
+ if v.is_a?(Array)
199
+ array = Array.new
200
+ v.each do |item|
201
+ if item.respond_to?("to_body".to_sym)
202
+ array.push item.to_body
203
+ else
204
+ array.push item
205
+ end
206
+ end
207
+ body[value] = array
208
+ else
209
+ if v.respond_to?("to_body".to_sym)
210
+ body[value] = v.to_body
211
+ else
212
+ body[value] = v
213
+ end
214
+ end
215
+ end
216
+ end
217
+ body
218
+ end
219
+ end
220
+ end
@@ -0,0 +1,144 @@
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 InputTransactionLine
15
+ attr_accessor :product_type, :deducted_tax_rate, :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
16
+
17
+ # :internal => :external
18
+ def self.attribute_map
19
+ {
20
+ :product_type => :product_type,
21
+ :deducted_tax_rate => :deducted_tax_rate,
22
+ :supply_date => :supply_date,
23
+ :unit_price => :unit_price,
24
+ :unit_of_measure => :unit_of_measure,
25
+ :quantity => :quantity,
26
+ :custom_fields => :custom_fields,
27
+ :line_key => :line_key,
28
+ :tax_name => :tax_name,
29
+ :product_code => :product_code,
30
+ :amount => :amount,
31
+ :custom_id => :custom_id,
32
+ :informative => :informative,
33
+ :tax_rate => :tax_rate,
34
+ :total_amount => :total_amount,
35
+ :product_tax_code => :product_tax_code,
36
+ :description => :description
37
+
38
+ }
39
+ end
40
+
41
+ def initialize(attributes = {})
42
+ return if attributes.empty?
43
+ # Morph attribute keys into undescored rubyish style
44
+ if attributes["product_type"]
45
+ @product_type = attributes["product_type"]
46
+
47
+ end
48
+ if attributes["deducted_tax_rate"]
49
+ @deducted_tax_rate = attributes["deducted_tax_rate"]
50
+
51
+ end
52
+ if attributes["supply_date"]
53
+ @supply_date = attributes["supply_date"]
54
+
55
+ end
56
+ if attributes["unit_price"]
57
+ @unit_price = attributes["unit_price"]
58
+
59
+ end
60
+ if attributes["unit_of_measure"]
61
+ @unit_of_measure = attributes["unit_of_measure"]
62
+
63
+ end
64
+ if attributes["quantity"]
65
+ @quantity = attributes["quantity"]
66
+
67
+ end
68
+ if attributes["custom_fields"]
69
+ if (value = attributes["custom_fields"]).is_a?(Array)
70
+ @custom_fields = value.map{ |v| CustomFields.new(v) }
71
+ end
72
+ end
73
+ if attributes["line_key"]
74
+ @line_key = attributes["line_key"]
75
+
76
+ end
77
+ if attributes["tax_name"]
78
+ @tax_name = attributes["tax_name"]
79
+
80
+ end
81
+ if attributes["product_code"]
82
+ @product_code = attributes["product_code"]
83
+
84
+ end
85
+ if attributes["amount"]
86
+ @amount = attributes["amount"]
87
+
88
+ end
89
+ if attributes["custom_id"]
90
+ @custom_id = attributes["custom_id"]
91
+
92
+ end
93
+ if attributes["informative"]
94
+ @informative = attributes["informative"]
95
+
96
+ end
97
+ if attributes["tax_rate"]
98
+ @tax_rate = attributes["tax_rate"]
99
+
100
+ end
101
+ if attributes["total_amount"]
102
+ @total_amount = attributes["total_amount"]
103
+
104
+ end
105
+ if attributes["product_tax_code"]
106
+ @product_tax_code = attributes["product_tax_code"]
107
+
108
+ end
109
+ if attributes["description"]
110
+ @description = attributes["description"]
111
+
112
+ end
113
+
114
+
115
+ end
116
+
117
+ def to_body
118
+ body = {}
119
+ self.class.attribute_map.each_pair do |key, value|
120
+ v = self.send(key)
121
+ unless v.nil?
122
+ if v.is_a?(Array)
123
+ array = Array.new
124
+ v.each do |item|
125
+ if item.respond_to?("to_body".to_sym)
126
+ array.push item.to_body
127
+ else
128
+ array.push item
129
+ end
130
+ end
131
+ body[value] = array
132
+ else
133
+ if v.respond_to?("to_body".to_sym)
134
+ body[value] = v.to_body
135
+ else
136
+ body[value] = v
137
+ end
138
+ end
139
+ end
140
+ end
141
+ body
142
+ end
143
+ end
144
+ end