data-and-reporting-sdk 1.0.0

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 (178) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +104 -0
  4. data/lib/shell_data_reporting_ap_is/api_helper.rb +10 -0
  5. data/lib/shell_data_reporting_ap_is/client.rb +84 -0
  6. data/lib/shell_data_reporting_ap_is/configuration.rb +110 -0
  7. data/lib/shell_data_reporting_ap_is/controllers/base_controller.rb +66 -0
  8. data/lib/shell_data_reporting_ap_is/controllers/customer_controller.rb +478 -0
  9. data/lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb +470 -0
  10. data/lib/shell_data_reporting_ap_is/controllers/o_auth_authorization_controller.rb +42 -0
  11. data/lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb +878 -0
  12. data/lib/shell_data_reporting_ap_is/exceptions/api_exception.rb +10 -0
  13. data/lib/shell_data_reporting_ap_is/exceptions/default_error_exception.rb +32 -0
  14. data/lib/shell_data_reporting_ap_is/exceptions/error_object_exception.rb +54 -0
  15. data/lib/shell_data_reporting_ap_is/exceptions/error_user_access_error1_exception.rb +32 -0
  16. data/lib/shell_data_reporting_ap_is/exceptions/o_auth_provider_exception.rb +48 -0
  17. data/lib/shell_data_reporting_ap_is/http/auth/basic_auth.rb +50 -0
  18. data/lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb +89 -0
  19. data/lib/shell_data_reporting_ap_is/http/http_call_back.rb +10 -0
  20. data/lib/shell_data_reporting_ap_is/http/http_method_enum.rb +10 -0
  21. data/lib/shell_data_reporting_ap_is/http/http_request.rb +10 -0
  22. data/lib/shell_data_reporting_ap_is/http/http_response.rb +10 -0
  23. data/lib/shell_data_reporting_ap_is/models/account_access.rb +128 -0
  24. data/lib/shell_data_reporting_ap_is/models/account_request.rb +252 -0
  25. data/lib/shell_data_reporting_ap_is/models/account_response.rb +111 -0
  26. data/lib/shell_data_reporting_ap_is/models/account_response_accounts_items.rb +750 -0
  27. data/lib/shell_data_reporting_ap_is/models/accounts.rb +65 -0
  28. data/lib/shell_data_reporting_ap_is/models/address.rb +174 -0
  29. data/lib/shell_data_reporting_ap_is/models/associated_account.rb +98 -0
  30. data/lib/shell_data_reporting_ap_is/models/audit_request.rb +256 -0
  31. data/lib/shell_data_reporting_ap_is/models/audit_response.rb +111 -0
  32. data/lib/shell_data_reporting_ap_is/models/audit_response_audits_items.rb +450 -0
  33. data/lib/shell_data_reporting_ap_is/models/bank_account.rb +192 -0
  34. data/lib/shell_data_reporting_ap_is/models/base_model.rb +62 -0
  35. data/lib/shell_data_reporting_ap_is/models/bonus_configuration.rb +419 -0
  36. data/lib/shell_data_reporting_ap_is/models/bonus_history.rb +444 -0
  37. data/lib/shell_data_reporting_ap_is/models/card_day_time_restrictions.rb +159 -0
  38. data/lib/shell_data_reporting_ap_is/models/card_exceptions.rb +268 -0
  39. data/lib/shell_data_reporting_ap_is/models/card_group_request.rb +178 -0
  40. data/lib/shell_data_reporting_ap_is/models/card_group_response.rb +109 -0
  41. data/lib/shell_data_reporting_ap_is/models/card_group_response_card_groups_items.rb +301 -0
  42. data/lib/shell_data_reporting_ap_is/models/card_type_request.rb +145 -0
  43. data/lib/shell_data_reporting_ap_is/models/card_type_response.rb +79 -0
  44. data/lib/shell_data_reporting_ap_is/models/card_type_response_customer_card_types_items.rb +470 -0
  45. data/lib/shell_data_reporting_ap_is/models/card_type_response_error.rb +60 -0
  46. data/lib/shell_data_reporting_ap_is/models/card_usage_restrictions.rb +281 -0
  47. data/lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb +159 -0
  48. data/lib/shell_data_reporting_ap_is/models/card_usage_summary_response.rb +79 -0
  49. data/lib/shell_data_reporting_ap_is/models/col_co_access.rb +88 -0
  50. data/lib/shell_data_reporting_ap_is/models/current_volume.rb +99 -0
  51. data/lib/shell_data_reporting_ap_is/models/customer_contract.rb +63 -0
  52. data/lib/shell_data_reporting_ap_is/models/customer_detail_request.rb +123 -0
  53. data/lib/shell_data_reporting_ap_is/models/customer_detail_response.rb +437 -0
  54. data/lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb +200 -0
  55. data/lib/shell_data_reporting_ap_is/models/customer_price_list_response.rb +82 -0
  56. data/lib/shell_data_reporting_ap_is/models/default_error_fault.rb +60 -0
  57. data/lib/shell_data_reporting_ap_is/models/default_error_fault_detail.rb +50 -0
  58. data/lib/shell_data_reporting_ap_is/models/delivery_addresses.rb +258 -0
  59. data/lib/shell_data_reporting_ap_is/models/eid_access.rb +75 -0
  60. data/lib/shell_data_reporting_ap_is/models/eid_document.rb +166 -0
  61. data/lib/shell_data_reporting_ap_is/models/eid_document_response.rb +140 -0
  62. data/lib/shell_data_reporting_ap_is/models/eid_download_req.rb +86 -0
  63. data/lib/shell_data_reporting_ap_is/models/eid_download_request.rb +50 -0
  64. data/lib/shell_data_reporting_ap_is/models/eid_search_req.rb +160 -0
  65. data/lib/shell_data_reporting_ap_is/models/eid_search_request.rb +70 -0
  66. data/lib/shell_data_reporting_ap_is/models/error_details.rb +81 -0
  67. data/lib/shell_data_reporting_ap_is/models/error_status.rb +60 -0
  68. data/lib/shell_data_reporting_ap_is/models/error_user_access.rb +50 -0
  69. data/lib/shell_data_reporting_ap_is/models/error_user_access_error.rb +60 -0
  70. data/lib/shell_data_reporting_ap_is/models/exception_product.rb +65 -0
  71. data/lib/shell_data_reporting_ap_is/models/exception_site_location.rb +63 -0
  72. data/lib/shell_data_reporting_ap_is/models/fee_item.rb +977 -0
  73. data/lib/shell_data_reporting_ap_is/models/fee_item_summary_all_of0.rb +194 -0
  74. data/lib/shell_data_reporting_ap_is/models/fee_rule_location.rb +153 -0
  75. data/lib/shell_data_reporting_ap_is/models/fee_rule_product.rb +98 -0
  76. data/lib/shell_data_reporting_ap_is/models/fee_rule_tier.rb +74 -0
  77. data/lib/shell_data_reporting_ap_is/models/fee_summary_response.rb +85 -0
  78. data/lib/shell_data_reporting_ap_is/models/fees_fee_rule_tiers.rb +124 -0
  79. data/lib/shell_data_reporting_ap_is/models/finance_currency.rb +98 -0
  80. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_card.rb +73 -0
  81. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_data.rb +267 -0
  82. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_request.rb +197 -0
  83. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_response.rb +79 -0
  84. data/lib/shell_data_reporting_ap_is/models/invoice_dates_data.rb +62 -0
  85. data/lib/shell_data_reporting_ap_is/models/invoice_dates_request.rb +50 -0
  86. data/lib/shell_data_reporting_ap_is/models/invoice_dates_request_filters.rb +146 -0
  87. data/lib/shell_data_reporting_ap_is/models/invoice_dates_response_data.rb +80 -0
  88. data/lib/shell_data_reporting_ap_is/models/invoice_distribution_method.rb +99 -0
  89. data/lib/shell_data_reporting_ap_is/models/invoice_download_req.rb +99 -0
  90. data/lib/shell_data_reporting_ap_is/models/invoice_download_request.rb +50 -0
  91. data/lib/shell_data_reporting_ap_is/models/invoice_search_additional_document.rb +80 -0
  92. data/lib/shell_data_reporting_ap_is/models/invoice_search_details.rb +913 -0
  93. data/lib/shell_data_reporting_ap_is/models/invoice_search_request.rb +91 -0
  94. data/lib/shell_data_reporting_ap_is/models/invoice_search_request_filters.rb +344 -0
  95. data/lib/shell_data_reporting_ap_is/models/invoice_search_response.rb +127 -0
  96. data/lib/shell_data_reporting_ap_is/models/invoice_summary_details.rb +129 -0
  97. data/lib/shell_data_reporting_ap_is/models/invoice_summary_request.rb +50 -0
  98. data/lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb +345 -0
  99. data/lib/shell_data_reporting_ap_is/models/invoice_summary_response.rb +79 -0
  100. data/lib/shell_data_reporting_ap_is/models/invoices_summaries.rb +221 -0
  101. data/lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb +421 -0
  102. data/lib/shell_data_reporting_ap_is/models/logged_in_user_request.rb +107 -0
  103. data/lib/shell_data_reporting_ap_is/models/logged_in_user_response.rb +394 -0
  104. data/lib/shell_data_reporting_ap_is/models/monthly_invoice_trend.rb +112 -0
  105. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb +360 -0
  106. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request_accounts_items.rb +84 -0
  107. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response.rb +110 -0
  108. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response_transactions_items.rb +1724 -0
  109. data/lib/shell_data_reporting_ap_is/models/o_auth_provider_error_enum.rb +45 -0
  110. data/lib/shell_data_reporting_ap_is/models/o_auth_token.rb +100 -0
  111. data/lib/shell_data_reporting_ap_is/models/past_statement_of_accounts.rb +502 -0
  112. data/lib/shell_data_reporting_ap_is/models/payer_access.rb +147 -0
  113. data/lib/shell_data_reporting_ap_is/models/payer_details.rb +1412 -0
  114. data/lib/shell_data_reporting_ap_is/models/payer_request.rb +126 -0
  115. data/lib/shell_data_reporting_ap_is/models/payer_response.rb +115 -0
  116. data/lib/shell_data_reporting_ap_is/models/payers.rb +109 -0
  117. data/lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb +322 -0
  118. data/lib/shell_data_reporting_ap_is/models/pin_advice_types.rb +80 -0
  119. data/lib/shell_data_reporting_ap_is/models/price_list.rb +485 -0
  120. data/lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb +477 -0
  121. data/lib/shell_data_reporting_ap_is/models/price_transaction_request.rb +572 -0
  122. data/lib/shell_data_reporting_ap_is/models/priced_request_data.rb +485 -0
  123. data/lib/shell_data_reporting_ap_is/models/priced_response_data.rb +2132 -0
  124. data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response.rb +79 -0
  125. data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response_transactions_summary_items.rb +242 -0
  126. data/lib/shell_data_reporting_ap_is/models/priced_transaction_items_location_items.rb +67 -0
  127. data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_invoice_status_enum.rb +27 -0
  128. data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_period_enum.rb +27 -0
  129. data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_sort_order_enum.rb +37 -0
  130. data/lib/shell_data_reporting_ap_is/models/priced_transaction_request_v2.rb +72 -0
  131. data/lib/shell_data_reporting_ap_is/models/priced_transaction_resp_v2_refund_flag_enum.rb +23 -0
  132. data/lib/shell_data_reporting_ap_is/models/priced_transaction_response.rb +59 -0
  133. data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_transactions_items.rb +1719 -0
  134. data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_v2.rb +110 -0
  135. data/lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb +115 -0
  136. data/lib/shell_data_reporting_ap_is/models/pricing_history.rb +105 -0
  137. data/lib/shell_data_reporting_ap_is/models/purchase_categories.rb +114 -0
  138. data/lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb +217 -0
  139. data/lib/shell_data_reporting_ap_is/models/recent_transaction_request.rb +66 -0
  140. data/lib/shell_data_reporting_ap_is/models/recent_transactions.rb +918 -0
  141. data/lib/shell_data_reporting_ap_is/models/recent_transactions_response.rb +110 -0
  142. data/lib/shell_data_reporting_ap_is/models/role.rb +102 -0
  143. data/lib/shell_data_reporting_ap_is/models/search_doc_req.rb +269 -0
  144. data/lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb +204 -0
  145. data/lib/shell_data_reporting_ap_is/models/search_documents_request.rb +70 -0
  146. data/lib/shell_data_reporting_ap_is/models/search_documents_response.rb +122 -0
  147. data/lib/shell_data_reporting_ap_is/models/search_soa_req.rb +197 -0
  148. data/lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb +220 -0
  149. data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_request.rb +70 -0
  150. data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_response.rb +120 -0
  151. data/lib/shell_data_reporting_ap_is/models/site_location.rb +67 -0
  152. data/lib/shell_data_reporting_ap_is/models/statement_of_account_request.rb +50 -0
  153. data/lib/shell_data_reporting_ap_is/models/statement_of_account_request_filters.rb +197 -0
  154. data/lib/shell_data_reporting_ap_is/models/statement_of_account_resp.rb +138 -0
  155. data/lib/shell_data_reporting_ap_is/models/statement_of_account_response.rb +80 -0
  156. data/lib/shell_data_reporting_ap_is/models/tier.rb +167 -0
  157. data/lib/shell_data_reporting_ap_is/models/transaction_exceptions.rb +1267 -0
  158. data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb +267 -0
  159. data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_response.rb +100 -0
  160. data/lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb +348 -0
  161. data/lib/shell_data_reporting_ap_is/models/transaction_fees_response.rb +111 -0
  162. data/lib/shell_data_reporting_ap_is/models/update_odometer.rb +62 -0
  163. data/lib/shell_data_reporting_ap_is/models/update_odometer_reference.rb +67 -0
  164. data/lib/shell_data_reporting_ap_is/models/update_odometer_request.rb +146 -0
  165. data/lib/shell_data_reporting_ap_is/models/update_odometer_response.rb +93 -0
  166. data/lib/shell_data_reporting_ap_is/models/usage_summary.rb +202 -0
  167. data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb +118 -0
  168. data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_response.rb +120 -0
  169. data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_request.rb +103 -0
  170. data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_response.rb +120 -0
  171. data/lib/shell_data_reporting_ap_is/utilities/date_time_helper.rb +11 -0
  172. data/lib/shell_data_reporting_ap_is/utilities/file_wrapper.rb +16 -0
  173. data/lib/shell_data_reporting_ap_is.rb +229 -0
  174. data/test/controllers/controller_test_base.rb +34 -0
  175. data/test/controllers/test_invoice_controller.rb +398 -0
  176. data/test/controllers/test_transaction_controller.rb +235 -0
  177. data/test/http_response_catcher.rb +19 -0
  178. metadata +302 -0
@@ -0,0 +1,913 @@
1
+ # shell_data_reporting_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellDataReportingApIs
7
+ # InvoiceSearchDetails Model.
8
+ class InvoiceSearchDetails < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Account Full Name
13
+ # Example: AT_reversal customer_FN
14
+ # @return [String]
15
+ attr_accessor :account_full_name
16
+
17
+ # Account ID
18
+ # Example: 29484
19
+ # @return [Integer]
20
+ attr_accessor :account_id
21
+
22
+ # Account Number
23
+ # Example: GB99215176
24
+ # @return [String]
25
+ attr_accessor :account_number
26
+
27
+ # Account Short Name
28
+ # Example: AT Earth Movers-SN
29
+ # @return [String]
30
+ attr_accessor :account_short_name
31
+
32
+ # ColCo Id.
33
+ # Example: 18
34
+ # @return [Integer]
35
+ attr_accessor :col_co_id
36
+
37
+ # ColCo’s OpCo Id.
38
+ # Example: 018
39
+ # @return [String]
40
+ attr_accessor :col_co_op_co_id
41
+
42
+ # Current billing frequency of the account.
43
+ # A few of the possible IDs and Description are below:
44
+ # 1 Daily (all days)
45
+ # 2 Daily (only working days)
46
+ # 3 Weekly - Monday
47
+ # 4 Weekly - Tuesday
48
+ # 5 Weekly - Wednesday
49
+ # 6 Weekly - Thursday
50
+ # 7 Weekly - Friday
51
+ # 8 Weekly - Saturday
52
+ # 9 Weekly - Sunday
53
+ # 10 Monthly - 1st
54
+ # Example: Weekly – Wednesday
55
+ # @return [String]
56
+ attr_accessor :current_billing_frequency
57
+
58
+ # Current billing frequency id of the account.
59
+ # A few of the possible IDs and Description are below:
60
+ # 1 Daily (all days)
61
+ # 2 Daily (only working days)
62
+ # 3 Weekly - Monday
63
+ # 4 Weekly - Tuesday
64
+ # 5 Weekly - Wednesday
65
+ # 6 Weekly - Thursday
66
+ # 7 Weekly - Friday
67
+ # 8 Weekly - Saturday
68
+ # 9 Weekly - Sunday
69
+ # 10 Monthly - 1st
70
+ # Example: 5
71
+ # @return [Integer]
72
+ attr_accessor :current_billing_frequency_id
73
+
74
+ # Current distribution method name of the account.
75
+ # Example : Id & Description
76
+ # 1 e-mail
77
+ # 2 Fax
78
+ # 3 Courier to Customer
79
+ # 4 Courier to Client
80
+ # 5 Print
81
+ # 6 FTP
82
+ # 7 SMS
83
+ # @return [String]
84
+ attr_accessor :current_distribution_method
85
+
86
+ # Current distribution method id of the account.
87
+ # Example : Id & Description
88
+ # 1 e-mail
89
+ # 2 Fax
90
+ # 3 Courier to Customer
91
+ # 4 Courier to Client
92
+ # 5 Print
93
+ # 6 FTP
94
+ # 7 SMS
95
+ # @return [Integer]
96
+ attr_accessor :current_distribution_method_id
97
+
98
+ # Customer currency ISO code.
99
+ # Example: EUR
100
+ # @return [String]
101
+ attr_accessor :customer_currency_code
102
+
103
+ # Customer currency code.
104
+ # Example: €
105
+ # @return [String]
106
+ attr_accessor :customer_currency_symbol
107
+
108
+ # DelCo’s client company number.
109
+ # Example: 132
110
+ # @return [String]
111
+ attr_accessor :del_co_client_number
112
+
113
+ # DelCo Id.
114
+ # Example: 132
115
+ # @return [Integer]
116
+ attr_accessor :del_co_id
117
+
118
+ # DelCo’s OpCo Id.
119
+ # Example: 032
120
+ # @return [String]
121
+ attr_accessor :del_co_op_co_id
122
+
123
+ # Document type Id description.
124
+ # @return [String]
125
+ attr_accessor :document_type
126
+
127
+ # Document type Id.
128
+ # @return [Integer]
129
+ attr_accessor :document_type_id
130
+
131
+ # Due date. Format: yyyyMMdd.
132
+ # Example: 20170115
133
+ # @return [String]
134
+ attr_accessor :due_date
135
+
136
+ # Gross amount in customer currency in the document.
137
+ # @return [Float]
138
+ attr_accessor :gross_amount_customer_currency
139
+
140
+ # Gross amount in transaction currency in the document
141
+ # @return [Float]
142
+ attr_accessor :gross_amount_transaction_currency
143
+
144
+ # Invoicing date. Format: yyyyMMdd
145
+ # Example: 20170101
146
+ # @return [String]
147
+ attr_accessor :invoice_date
148
+
149
+ # Company name.
150
+ # @return [String]
151
+ attr_accessor :invoiced_by
152
+
153
+ # Country Name.
154
+ # Example: Czech Republic
155
+ # @return [String]
156
+ attr_accessor :invoiced_on_behalf_of
157
+
158
+ # Invoice id.
159
+ # Example: 1
160
+ # @return [Integer]
161
+ attr_accessor :invoice_id
162
+
163
+ # Invoice number.
164
+ # Example: 0123456789
165
+ # @return [String]
166
+ attr_accessor :invoice_number
167
+
168
+ # True/False.
169
+ # True if this is an International invoice, else false.
170
+ # @return [TrueClass | FalseClass]
171
+ attr_accessor :is_international
172
+
173
+ # True/False.
174
+ # True if this is a National invoice, else false.
175
+ # @return [TrueClass | FalseClass]
176
+ attr_accessor :is_national
177
+
178
+ # Net amount in customer currency in the document.
179
+ # @return [Float]
180
+ attr_accessor :net_amount_customer_currency
181
+
182
+ # Net amount in transaction currency in the document.
183
+ # @return [Float]
184
+ attr_accessor :net_amount_transaction_currency
185
+
186
+ # Payment customer id of the customer.
187
+ # Example: 123456
188
+ # @return [Integer]
189
+ attr_accessor :payer_id
190
+
191
+ # Payment customer number.
192
+ # Example: GB000000123
193
+ # @return [String]
194
+ attr_accessor :payer_number
195
+
196
+ # A few of the possible IDs and Descriptions are below:
197
+ # 1 14 days after Invoice
198
+ # 2 15 days after Invoice
199
+ # 3 21 days after Invoice
200
+ # 4 30 days after Invoice
201
+ # 5 45 days after Invoice
202
+ # @return [String]
203
+ attr_accessor :payment_terms
204
+
205
+ # Payment terms id of the payment customer.
206
+ # A few of the possible IDs and Descriptions are below:
207
+ # 1 14 days after Invoice
208
+ # 2 15 days after Invoice
209
+ # 3 21 days after Invoice
210
+ # 4 30 days after Invoice
211
+ # 5 45 days after Invoice
212
+ # @return [Integer]
213
+ attr_accessor :payment_terms_id
214
+
215
+ # Replaced document id.
216
+ # Example: 2
217
+ # @return [Integer]
218
+ attr_accessor :replacement_invoice_id
219
+
220
+ # Reversed document id.
221
+ # Example: 3
222
+ # @return [Integer]
223
+ attr_accessor :reversal_invoice_id
224
+
225
+ # Status of the document. Valid values –
226
+ # • [Empty] – For all document types except for Invoice and Statement.
227
+ # • Due – Invoices/Statements due for payment and is within the due date.
228
+ # • Paid – Fully paid Invoices/Statements.
229
+ # Overdue – Invoices/Statements due of payment and has crossed the due date.
230
+ # @return [String]
231
+ attr_accessor :status
232
+
233
+ # Billing type description.
234
+ # Example: Id & Description
235
+ # -3 Guarantee History
236
+ # -1 Initial Balance
237
+ # 0 Standard Invoice
238
+ # 1 Immediate Invoice
239
+ # 2 Guarantee
240
+ # 4 Advanced DD Invoice
241
+ # @return [String]
242
+ attr_accessor :summary_document_billing_type
243
+
244
+ # Billing type id.
245
+ # Example: Id & Description
246
+ # -3 Guarantee History
247
+ # -1 Initial Balance
248
+ # 0 Standard Invoice
249
+ # 1 Immediate Invoice
250
+ # 2 Guarantee
251
+ # 4 Advanced DD Invoice
252
+ # @return [Integer]
253
+ attr_accessor :summary_document_billing_type_id
254
+
255
+ # Document generated date. Format: yyyyMMdd
256
+ # Example: 20170101
257
+ # @return [String]
258
+ attr_accessor :summary_document_date
259
+
260
+ # DD amount.
261
+ # @return [Float]
262
+ attr_accessor :summary_document_dd_amount
263
+
264
+ # Due date for document. Format: yyyyMMdd
265
+ # Example: 20170115
266
+ # @return [String]
267
+ attr_accessor :summary_document_due_date
268
+
269
+ # Summary document identifier
270
+ # Example: 1
271
+ # @return [Integer]
272
+ attr_accessor :summary_document_id
273
+
274
+ # True/False
275
+ # True if invoice amount is fully paid, else false
276
+ # @return [TrueClass | FalseClass]
277
+ attr_accessor :summary_document_is_fully_paid
278
+
279
+ # Summary document number
280
+ # Example: ‘0/CZ0000000123456/2017’
281
+ # @return [String]
282
+ attr_accessor :summary_document_number
283
+
284
+ # Total amount paid.
285
+ # @return [Float]
286
+ attr_accessor :summary_document_paid_amount
287
+
288
+ # Statement of Account reference number of the payment customer.
289
+ # @return [String]
290
+ attr_accessor :summary_document_so_a_reference_number
291
+
292
+ # Statement of Account Id of the payment customer.
293
+ # @return [Integer]
294
+ attr_accessor :summary_document_statement_of_account_id
295
+
296
+ # Transaction currency ISO code.
297
+ # Example: EUR
298
+ # @return [String]
299
+ attr_accessor :transaction_currency_code
300
+
301
+ # Transaction currency symbol.
302
+ # Example: €
303
+ # @return [String]
304
+ attr_accessor :transaction_currency_symbol
305
+
306
+ # Invoice type description.
307
+ # A few of the possible IDs and Description are below:
308
+ # 1 Original
309
+ # 2 Reversal
310
+ # 3 Replacement
311
+ # Example: Original
312
+ # @return [String]
313
+ attr_accessor :type
314
+
315
+ # Invoice type id.
316
+ # A few of the possible IDs and Descriptions are below:
317
+ # 1 Original
318
+ # 2 Reversal
319
+ # 3 Replacement
320
+ # Example: 1
321
+ # @return [Integer]
322
+ attr_accessor :type_id
323
+
324
+ # VAT amount in customer currency in the document
325
+ # @return [Float]
326
+ attr_accessor :vat_amount_customer_currency
327
+
328
+ # VAT amount in transaction currency in the document
329
+ # @return [Float]
330
+ attr_accessor :vat_amount_transaction_currency
331
+
332
+ # Country name of the VAT country.
333
+ # Example: France, Germany
334
+ # @return [String]
335
+ attr_accessor :vat_country
336
+
337
+ # Country Id of the VAT country.
338
+ # Example: 1,2
339
+ # @return [Integer]
340
+ attr_accessor :vat_country_id
341
+
342
+ # Country ISO code of the VAT country.
343
+ # Example : CZ, SK, UK, etc.,
344
+ # @return [String]
345
+ attr_accessor :vat_country_iso_code
346
+
347
+ # VAT country’s OpCo Id.
348
+ # Example: 032
349
+ # @return [String]
350
+ attr_accessor :vat_country_op_co_id
351
+
352
+ # document reference number of the Invoice file
353
+ # @return [String]
354
+ attr_accessor :document_reference
355
+
356
+ # document reference number of the Invoice file
357
+ # @return [Array[InvoiceSearchAdditionalDocument]]
358
+ attr_accessor :additional_documents
359
+
360
+ # A mapping from model property names to API property names.
361
+ def self.names
362
+ @_hash = {} if @_hash.nil?
363
+ @_hash['account_full_name'] = 'AccountFullName'
364
+ @_hash['account_id'] = 'AccountId'
365
+ @_hash['account_number'] = 'AccountNumber'
366
+ @_hash['account_short_name'] = 'AccountShortName'
367
+ @_hash['col_co_id'] = 'ColCoId'
368
+ @_hash['col_co_op_co_id'] = 'ColCoOpCoId'
369
+ @_hash['current_billing_frequency'] = 'CurrentBillingFrequency'
370
+ @_hash['current_billing_frequency_id'] = 'CurrentBillingFrequencyId'
371
+ @_hash['current_distribution_method'] = 'CurrentDistributionMethod'
372
+ @_hash['current_distribution_method_id'] = 'CurrentDistributionMethodId'
373
+ @_hash['customer_currency_code'] = 'CustomerCurrencyCode'
374
+ @_hash['customer_currency_symbol'] = 'CustomerCurrencySymbol'
375
+ @_hash['del_co_client_number'] = 'DelCoClientNumber'
376
+ @_hash['del_co_id'] = 'DelCoId'
377
+ @_hash['del_co_op_co_id'] = 'DelCoOpCoId'
378
+ @_hash['document_type'] = 'DocumentType'
379
+ @_hash['document_type_id'] = 'DocumentTypeId'
380
+ @_hash['due_date'] = 'DueDate'
381
+ @_hash['gross_amount_customer_currency'] = 'GrossAmountCustomerCurrency'
382
+ @_hash['gross_amount_transaction_currency'] =
383
+ 'GrossAmountTransactionCurrency'
384
+ @_hash['invoice_date'] = 'InvoiceDate'
385
+ @_hash['invoiced_by'] = 'InvoicedBy'
386
+ @_hash['invoiced_on_behalf_of'] = 'InvoicedOnBehalfOf'
387
+ @_hash['invoice_id'] = 'InvoiceId'
388
+ @_hash['invoice_number'] = 'InvoiceNumber'
389
+ @_hash['is_international'] = 'IsInternational'
390
+ @_hash['is_national'] = 'IsNational'
391
+ @_hash['net_amount_customer_currency'] = 'NetAmountCustomerCurrency'
392
+ @_hash['net_amount_transaction_currency'] =
393
+ 'NetAmountTransactionCurrency'
394
+ @_hash['payer_id'] = 'PayerId'
395
+ @_hash['payer_number'] = 'PayerNumber'
396
+ @_hash['payment_terms'] = 'PaymentTerms'
397
+ @_hash['payment_terms_id'] = 'PaymentTermsId'
398
+ @_hash['replacement_invoice_id'] = 'ReplacementInvoiceId'
399
+ @_hash['reversal_invoice_id'] = 'ReversalInvoiceId'
400
+ @_hash['status'] = 'Status'
401
+ @_hash['summary_document_billing_type'] = 'SummaryDocumentBillingType'
402
+ @_hash['summary_document_billing_type_id'] =
403
+ 'SummaryDocumentBillingTypeId'
404
+ @_hash['summary_document_date'] = 'SummaryDocumentDate'
405
+ @_hash['summary_document_dd_amount'] = 'SummaryDocumentDDAmount'
406
+ @_hash['summary_document_due_date'] = 'SummaryDocumentDueDate'
407
+ @_hash['summary_document_id'] = 'SummaryDocumentId'
408
+ @_hash['summary_document_is_fully_paid'] = 'SummaryDocumentIsFullyPaid'
409
+ @_hash['summary_document_number'] = 'SummaryDocumentNumber'
410
+ @_hash['summary_document_paid_amount'] = 'SummaryDocumentPaidAmount'
411
+ @_hash['summary_document_so_a_reference_number'] =
412
+ 'SummaryDocumentSoAReferenceNumber'
413
+ @_hash['summary_document_statement_of_account_id'] =
414
+ 'SummaryDocumentStatementOfAccountId'
415
+ @_hash['transaction_currency_code'] = 'TransactionCurrencyCode'
416
+ @_hash['transaction_currency_symbol'] = 'TransactionCurrencySymbol'
417
+ @_hash['type'] = 'Type'
418
+ @_hash['type_id'] = 'TypeId'
419
+ @_hash['vat_amount_customer_currency'] = 'VATAmountCustomerCurrency'
420
+ @_hash['vat_amount_transaction_currency'] =
421
+ 'VATAmountTransactionCurrency'
422
+ @_hash['vat_country'] = 'VATCountry'
423
+ @_hash['vat_country_id'] = 'VATCountryId'
424
+ @_hash['vat_country_iso_code'] = 'VATCountryISOCode'
425
+ @_hash['vat_country_op_co_id'] = 'VATCountryOpCoId'
426
+ @_hash['document_reference'] = 'DocumentReference'
427
+ @_hash['additional_documents'] = 'AdditionalDocuments'
428
+ @_hash
429
+ end
430
+
431
+ # An array for optional fields
432
+ def self.optionals
433
+ %w[
434
+ account_full_name
435
+ account_id
436
+ account_number
437
+ account_short_name
438
+ col_co_id
439
+ col_co_op_co_id
440
+ current_billing_frequency
441
+ current_billing_frequency_id
442
+ current_distribution_method
443
+ current_distribution_method_id
444
+ customer_currency_code
445
+ customer_currency_symbol
446
+ del_co_client_number
447
+ del_co_id
448
+ del_co_op_co_id
449
+ document_type
450
+ document_type_id
451
+ due_date
452
+ gross_amount_customer_currency
453
+ gross_amount_transaction_currency
454
+ invoice_date
455
+ invoiced_by
456
+ invoiced_on_behalf_of
457
+ invoice_id
458
+ invoice_number
459
+ is_international
460
+ is_national
461
+ net_amount_customer_currency
462
+ net_amount_transaction_currency
463
+ payer_id
464
+ payer_number
465
+ payment_terms
466
+ payment_terms_id
467
+ replacement_invoice_id
468
+ reversal_invoice_id
469
+ status
470
+ summary_document_billing_type
471
+ summary_document_billing_type_id
472
+ summary_document_date
473
+ summary_document_dd_amount
474
+ summary_document_due_date
475
+ summary_document_id
476
+ summary_document_is_fully_paid
477
+ summary_document_number
478
+ summary_document_paid_amount
479
+ summary_document_so_a_reference_number
480
+ summary_document_statement_of_account_id
481
+ transaction_currency_code
482
+ transaction_currency_symbol
483
+ type
484
+ type_id
485
+ vat_amount_customer_currency
486
+ vat_amount_transaction_currency
487
+ vat_country
488
+ vat_country_id
489
+ vat_country_iso_code
490
+ vat_country_op_co_id
491
+ document_reference
492
+ additional_documents
493
+ ]
494
+ end
495
+
496
+ # An array for nullable fields
497
+ def self.nullables
498
+ %w[
499
+ account_full_name
500
+ account_id
501
+ account_number
502
+ account_short_name
503
+ col_co_id
504
+ col_co_op_co_id
505
+ current_billing_frequency
506
+ current_billing_frequency_id
507
+ current_distribution_method
508
+ current_distribution_method_id
509
+ customer_currency_code
510
+ customer_currency_symbol
511
+ del_co_client_number
512
+ del_co_id
513
+ del_co_op_co_id
514
+ document_type
515
+ document_type_id
516
+ due_date
517
+ gross_amount_customer_currency
518
+ gross_amount_transaction_currency
519
+ invoice_date
520
+ invoiced_by
521
+ invoiced_on_behalf_of
522
+ invoice_id
523
+ invoice_number
524
+ is_international
525
+ is_national
526
+ net_amount_customer_currency
527
+ net_amount_transaction_currency
528
+ payer_id
529
+ payer_number
530
+ payment_terms
531
+ payment_terms_id
532
+ replacement_invoice_id
533
+ reversal_invoice_id
534
+ status
535
+ summary_document_billing_type
536
+ summary_document_billing_type_id
537
+ summary_document_date
538
+ summary_document_dd_amount
539
+ summary_document_due_date
540
+ summary_document_id
541
+ summary_document_is_fully_paid
542
+ summary_document_number
543
+ summary_document_paid_amount
544
+ summary_document_so_a_reference_number
545
+ summary_document_statement_of_account_id
546
+ transaction_currency_code
547
+ transaction_currency_symbol
548
+ type
549
+ type_id
550
+ vat_amount_customer_currency
551
+ vat_amount_transaction_currency
552
+ vat_country
553
+ vat_country_id
554
+ vat_country_iso_code
555
+ vat_country_op_co_id
556
+ document_reference
557
+ ]
558
+ end
559
+
560
+ def initialize(account_full_name = SKIP,
561
+ account_id = SKIP,
562
+ account_number = SKIP,
563
+ account_short_name = SKIP,
564
+ col_co_id = SKIP,
565
+ col_co_op_co_id = SKIP,
566
+ current_billing_frequency = SKIP,
567
+ current_billing_frequency_id = SKIP,
568
+ current_distribution_method = SKIP,
569
+ current_distribution_method_id = SKIP,
570
+ customer_currency_code = SKIP,
571
+ customer_currency_symbol = SKIP,
572
+ del_co_client_number = SKIP,
573
+ del_co_id = SKIP,
574
+ del_co_op_co_id = SKIP,
575
+ document_type = SKIP,
576
+ document_type_id = SKIP,
577
+ due_date = SKIP,
578
+ gross_amount_customer_currency = SKIP,
579
+ gross_amount_transaction_currency = SKIP,
580
+ invoice_date = SKIP,
581
+ invoiced_by = SKIP,
582
+ invoiced_on_behalf_of = SKIP,
583
+ invoice_id = SKIP,
584
+ invoice_number = SKIP,
585
+ is_international = SKIP,
586
+ is_national = SKIP,
587
+ net_amount_customer_currency = SKIP,
588
+ net_amount_transaction_currency = SKIP,
589
+ payer_id = SKIP,
590
+ payer_number = SKIP,
591
+ payment_terms = SKIP,
592
+ payment_terms_id = SKIP,
593
+ replacement_invoice_id = SKIP,
594
+ reversal_invoice_id = SKIP,
595
+ status = SKIP,
596
+ summary_document_billing_type = SKIP,
597
+ summary_document_billing_type_id = SKIP,
598
+ summary_document_date = SKIP,
599
+ summary_document_dd_amount = SKIP,
600
+ summary_document_due_date = SKIP,
601
+ summary_document_id = SKIP,
602
+ summary_document_is_fully_paid = SKIP,
603
+ summary_document_number = SKIP,
604
+ summary_document_paid_amount = SKIP,
605
+ summary_document_so_a_reference_number = SKIP,
606
+ summary_document_statement_of_account_id = SKIP,
607
+ transaction_currency_code = SKIP,
608
+ transaction_currency_symbol = SKIP,
609
+ type = SKIP,
610
+ type_id = SKIP,
611
+ vat_amount_customer_currency = SKIP,
612
+ vat_amount_transaction_currency = SKIP,
613
+ vat_country = SKIP,
614
+ vat_country_id = SKIP,
615
+ vat_country_iso_code = SKIP,
616
+ vat_country_op_co_id = SKIP,
617
+ document_reference = SKIP,
618
+ additional_documents = SKIP)
619
+ @account_full_name = account_full_name unless account_full_name == SKIP
620
+ @account_id = account_id unless account_id == SKIP
621
+ @account_number = account_number unless account_number == SKIP
622
+ @account_short_name = account_short_name unless account_short_name == SKIP
623
+ @col_co_id = col_co_id unless col_co_id == SKIP
624
+ @col_co_op_co_id = col_co_op_co_id unless col_co_op_co_id == SKIP
625
+ unless current_billing_frequency == SKIP
626
+ @current_billing_frequency =
627
+ current_billing_frequency
628
+ end
629
+ unless current_billing_frequency_id == SKIP
630
+ @current_billing_frequency_id =
631
+ current_billing_frequency_id
632
+ end
633
+ unless current_distribution_method == SKIP
634
+ @current_distribution_method =
635
+ current_distribution_method
636
+ end
637
+ unless current_distribution_method_id == SKIP
638
+ @current_distribution_method_id =
639
+ current_distribution_method_id
640
+ end
641
+ @customer_currency_code = customer_currency_code unless customer_currency_code == SKIP
642
+ @customer_currency_symbol = customer_currency_symbol unless customer_currency_symbol == SKIP
643
+ @del_co_client_number = del_co_client_number unless del_co_client_number == SKIP
644
+ @del_co_id = del_co_id unless del_co_id == SKIP
645
+ @del_co_op_co_id = del_co_op_co_id unless del_co_op_co_id == SKIP
646
+ @document_type = document_type unless document_type == SKIP
647
+ @document_type_id = document_type_id unless document_type_id == SKIP
648
+ @due_date = due_date unless due_date == SKIP
649
+ unless gross_amount_customer_currency == SKIP
650
+ @gross_amount_customer_currency =
651
+ gross_amount_customer_currency
652
+ end
653
+ unless gross_amount_transaction_currency == SKIP
654
+ @gross_amount_transaction_currency =
655
+ gross_amount_transaction_currency
656
+ end
657
+ @invoice_date = invoice_date unless invoice_date == SKIP
658
+ @invoiced_by = invoiced_by unless invoiced_by == SKIP
659
+ @invoiced_on_behalf_of = invoiced_on_behalf_of unless invoiced_on_behalf_of == SKIP
660
+ @invoice_id = invoice_id unless invoice_id == SKIP
661
+ @invoice_number = invoice_number unless invoice_number == SKIP
662
+ @is_international = is_international unless is_international == SKIP
663
+ @is_national = is_national unless is_national == SKIP
664
+ unless net_amount_customer_currency == SKIP
665
+ @net_amount_customer_currency =
666
+ net_amount_customer_currency
667
+ end
668
+ unless net_amount_transaction_currency == SKIP
669
+ @net_amount_transaction_currency =
670
+ net_amount_transaction_currency
671
+ end
672
+ @payer_id = payer_id unless payer_id == SKIP
673
+ @payer_number = payer_number unless payer_number == SKIP
674
+ @payment_terms = payment_terms unless payment_terms == SKIP
675
+ @payment_terms_id = payment_terms_id unless payment_terms_id == SKIP
676
+ @replacement_invoice_id = replacement_invoice_id unless replacement_invoice_id == SKIP
677
+ @reversal_invoice_id = reversal_invoice_id unless reversal_invoice_id == SKIP
678
+ @status = status unless status == SKIP
679
+ unless summary_document_billing_type == SKIP
680
+ @summary_document_billing_type =
681
+ summary_document_billing_type
682
+ end
683
+ unless summary_document_billing_type_id == SKIP
684
+ @summary_document_billing_type_id =
685
+ summary_document_billing_type_id
686
+ end
687
+ @summary_document_date = summary_document_date unless summary_document_date == SKIP
688
+ unless summary_document_dd_amount == SKIP
689
+ @summary_document_dd_amount =
690
+ summary_document_dd_amount
691
+ end
692
+ unless summary_document_due_date == SKIP
693
+ @summary_document_due_date =
694
+ summary_document_due_date
695
+ end
696
+ @summary_document_id = summary_document_id unless summary_document_id == SKIP
697
+ unless summary_document_is_fully_paid == SKIP
698
+ @summary_document_is_fully_paid =
699
+ summary_document_is_fully_paid
700
+ end
701
+ @summary_document_number = summary_document_number unless summary_document_number == SKIP
702
+ unless summary_document_paid_amount == SKIP
703
+ @summary_document_paid_amount =
704
+ summary_document_paid_amount
705
+ end
706
+ unless summary_document_so_a_reference_number == SKIP
707
+ @summary_document_so_a_reference_number =
708
+ summary_document_so_a_reference_number
709
+ end
710
+ unless summary_document_statement_of_account_id == SKIP
711
+ @summary_document_statement_of_account_id =
712
+ summary_document_statement_of_account_id
713
+ end
714
+ unless transaction_currency_code == SKIP
715
+ @transaction_currency_code =
716
+ transaction_currency_code
717
+ end
718
+ unless transaction_currency_symbol == SKIP
719
+ @transaction_currency_symbol =
720
+ transaction_currency_symbol
721
+ end
722
+ @type = type unless type == SKIP
723
+ @type_id = type_id unless type_id == SKIP
724
+ unless vat_amount_customer_currency == SKIP
725
+ @vat_amount_customer_currency =
726
+ vat_amount_customer_currency
727
+ end
728
+ unless vat_amount_transaction_currency == SKIP
729
+ @vat_amount_transaction_currency =
730
+ vat_amount_transaction_currency
731
+ end
732
+ @vat_country = vat_country unless vat_country == SKIP
733
+ @vat_country_id = vat_country_id unless vat_country_id == SKIP
734
+ @vat_country_iso_code = vat_country_iso_code unless vat_country_iso_code == SKIP
735
+ @vat_country_op_co_id = vat_country_op_co_id unless vat_country_op_co_id == SKIP
736
+ @document_reference = document_reference unless document_reference == SKIP
737
+ @additional_documents = additional_documents unless additional_documents == SKIP
738
+ end
739
+
740
+ # Creates an instance of the object from a hash.
741
+ def self.from_hash(hash)
742
+ return nil unless hash
743
+
744
+ # Extract variables from the hash.
745
+ account_full_name =
746
+ hash.key?('AccountFullName') ? hash['AccountFullName'] : SKIP
747
+ account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP
748
+ account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
749
+ account_short_name =
750
+ hash.key?('AccountShortName') ? hash['AccountShortName'] : SKIP
751
+ col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
752
+ col_co_op_co_id = hash.key?('ColCoOpCoId') ? hash['ColCoOpCoId'] : SKIP
753
+ current_billing_frequency =
754
+ hash.key?('CurrentBillingFrequency') ? hash['CurrentBillingFrequency'] : SKIP
755
+ current_billing_frequency_id =
756
+ hash.key?('CurrentBillingFrequencyId') ? hash['CurrentBillingFrequencyId'] : SKIP
757
+ current_distribution_method =
758
+ hash.key?('CurrentDistributionMethod') ? hash['CurrentDistributionMethod'] : SKIP
759
+ current_distribution_method_id =
760
+ hash.key?('CurrentDistributionMethodId') ? hash['CurrentDistributionMethodId'] : SKIP
761
+ customer_currency_code =
762
+ hash.key?('CustomerCurrencyCode') ? hash['CustomerCurrencyCode'] : SKIP
763
+ customer_currency_symbol =
764
+ hash.key?('CustomerCurrencySymbol') ? hash['CustomerCurrencySymbol'] : SKIP
765
+ del_co_client_number =
766
+ hash.key?('DelCoClientNumber') ? hash['DelCoClientNumber'] : SKIP
767
+ del_co_id = hash.key?('DelCoId') ? hash['DelCoId'] : SKIP
768
+ del_co_op_co_id = hash.key?('DelCoOpCoId') ? hash['DelCoOpCoId'] : SKIP
769
+ document_type = hash.key?('DocumentType') ? hash['DocumentType'] : SKIP
770
+ document_type_id =
771
+ hash.key?('DocumentTypeId') ? hash['DocumentTypeId'] : SKIP
772
+ due_date = hash.key?('DueDate') ? hash['DueDate'] : SKIP
773
+ gross_amount_customer_currency =
774
+ hash.key?('GrossAmountCustomerCurrency') ? hash['GrossAmountCustomerCurrency'] : SKIP
775
+ gross_amount_transaction_currency =
776
+ hash.key?('GrossAmountTransactionCurrency') ? hash['GrossAmountTransactionCurrency'] : SKIP
777
+ invoice_date = hash.key?('InvoiceDate') ? hash['InvoiceDate'] : SKIP
778
+ invoiced_by = hash.key?('InvoicedBy') ? hash['InvoicedBy'] : SKIP
779
+ invoiced_on_behalf_of =
780
+ hash.key?('InvoicedOnBehalfOf') ? hash['InvoicedOnBehalfOf'] : SKIP
781
+ invoice_id = hash.key?('InvoiceId') ? hash['InvoiceId'] : SKIP
782
+ invoice_number = hash.key?('InvoiceNumber') ? hash['InvoiceNumber'] : SKIP
783
+ is_international =
784
+ hash.key?('IsInternational') ? hash['IsInternational'] : SKIP
785
+ is_national = hash.key?('IsNational') ? hash['IsNational'] : SKIP
786
+ net_amount_customer_currency =
787
+ hash.key?('NetAmountCustomerCurrency') ? hash['NetAmountCustomerCurrency'] : SKIP
788
+ net_amount_transaction_currency =
789
+ hash.key?('NetAmountTransactionCurrency') ? hash['NetAmountTransactionCurrency'] : SKIP
790
+ payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
791
+ payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
792
+ payment_terms = hash.key?('PaymentTerms') ? hash['PaymentTerms'] : SKIP
793
+ payment_terms_id =
794
+ hash.key?('PaymentTermsId') ? hash['PaymentTermsId'] : SKIP
795
+ replacement_invoice_id =
796
+ hash.key?('ReplacementInvoiceId') ? hash['ReplacementInvoiceId'] : SKIP
797
+ reversal_invoice_id =
798
+ hash.key?('ReversalInvoiceId') ? hash['ReversalInvoiceId'] : SKIP
799
+ status = hash.key?('Status') ? hash['Status'] : SKIP
800
+ summary_document_billing_type =
801
+ hash.key?('SummaryDocumentBillingType') ? hash['SummaryDocumentBillingType'] : SKIP
802
+ summary_document_billing_type_id =
803
+ hash.key?('SummaryDocumentBillingTypeId') ? hash['SummaryDocumentBillingTypeId'] : SKIP
804
+ summary_document_date =
805
+ hash.key?('SummaryDocumentDate') ? hash['SummaryDocumentDate'] : SKIP
806
+ summary_document_dd_amount =
807
+ hash.key?('SummaryDocumentDDAmount') ? hash['SummaryDocumentDDAmount'] : SKIP
808
+ summary_document_due_date =
809
+ hash.key?('SummaryDocumentDueDate') ? hash['SummaryDocumentDueDate'] : SKIP
810
+ summary_document_id =
811
+ hash.key?('SummaryDocumentId') ? hash['SummaryDocumentId'] : SKIP
812
+ summary_document_is_fully_paid =
813
+ hash.key?('SummaryDocumentIsFullyPaid') ? hash['SummaryDocumentIsFullyPaid'] : SKIP
814
+ summary_document_number =
815
+ hash.key?('SummaryDocumentNumber') ? hash['SummaryDocumentNumber'] : SKIP
816
+ summary_document_paid_amount =
817
+ hash.key?('SummaryDocumentPaidAmount') ? hash['SummaryDocumentPaidAmount'] : SKIP
818
+ summary_document_so_a_reference_number =
819
+ hash.key?('SummaryDocumentSoAReferenceNumber') ? hash['SummaryDocumentSoAReferenceNumber'] : SKIP
820
+ summary_document_statement_of_account_id =
821
+ hash.key?('SummaryDocumentStatementOfAccountId') ? hash['SummaryDocumentStatementOfAccountId'] : SKIP
822
+ transaction_currency_code =
823
+ hash.key?('TransactionCurrencyCode') ? hash['TransactionCurrencyCode'] : SKIP
824
+ transaction_currency_symbol =
825
+ hash.key?('TransactionCurrencySymbol') ? hash['TransactionCurrencySymbol'] : SKIP
826
+ type = hash.key?('Type') ? hash['Type'] : SKIP
827
+ type_id = hash.key?('TypeId') ? hash['TypeId'] : SKIP
828
+ vat_amount_customer_currency =
829
+ hash.key?('VATAmountCustomerCurrency') ? hash['VATAmountCustomerCurrency'] : SKIP
830
+ vat_amount_transaction_currency =
831
+ hash.key?('VATAmountTransactionCurrency') ? hash['VATAmountTransactionCurrency'] : SKIP
832
+ vat_country = hash.key?('VATCountry') ? hash['VATCountry'] : SKIP
833
+ vat_country_id = hash.key?('VATCountryId') ? hash['VATCountryId'] : SKIP
834
+ vat_country_iso_code =
835
+ hash.key?('VATCountryISOCode') ? hash['VATCountryISOCode'] : SKIP
836
+ vat_country_op_co_id =
837
+ hash.key?('VATCountryOpCoId') ? hash['VATCountryOpCoId'] : SKIP
838
+ document_reference =
839
+ hash.key?('DocumentReference') ? hash['DocumentReference'] : SKIP
840
+ # Parameter is an array, so we need to iterate through it
841
+ additional_documents = nil
842
+ unless hash['AdditionalDocuments'].nil?
843
+ additional_documents = []
844
+ hash['AdditionalDocuments'].each do |structure|
845
+ additional_documents << (InvoiceSearchAdditionalDocument.from_hash(structure) if structure)
846
+ end
847
+ end
848
+
849
+ additional_documents = SKIP unless hash.key?('AdditionalDocuments')
850
+
851
+ # Create object from extracted values.
852
+ InvoiceSearchDetails.new(account_full_name,
853
+ account_id,
854
+ account_number,
855
+ account_short_name,
856
+ col_co_id,
857
+ col_co_op_co_id,
858
+ current_billing_frequency,
859
+ current_billing_frequency_id,
860
+ current_distribution_method,
861
+ current_distribution_method_id,
862
+ customer_currency_code,
863
+ customer_currency_symbol,
864
+ del_co_client_number,
865
+ del_co_id,
866
+ del_co_op_co_id,
867
+ document_type,
868
+ document_type_id,
869
+ due_date,
870
+ gross_amount_customer_currency,
871
+ gross_amount_transaction_currency,
872
+ invoice_date,
873
+ invoiced_by,
874
+ invoiced_on_behalf_of,
875
+ invoice_id,
876
+ invoice_number,
877
+ is_international,
878
+ is_national,
879
+ net_amount_customer_currency,
880
+ net_amount_transaction_currency,
881
+ payer_id,
882
+ payer_number,
883
+ payment_terms,
884
+ payment_terms_id,
885
+ replacement_invoice_id,
886
+ reversal_invoice_id,
887
+ status,
888
+ summary_document_billing_type,
889
+ summary_document_billing_type_id,
890
+ summary_document_date,
891
+ summary_document_dd_amount,
892
+ summary_document_due_date,
893
+ summary_document_id,
894
+ summary_document_is_fully_paid,
895
+ summary_document_number,
896
+ summary_document_paid_amount,
897
+ summary_document_so_a_reference_number,
898
+ summary_document_statement_of_account_id,
899
+ transaction_currency_code,
900
+ transaction_currency_symbol,
901
+ type,
902
+ type_id,
903
+ vat_amount_customer_currency,
904
+ vat_amount_transaction_currency,
905
+ vat_country,
906
+ vat_country_id,
907
+ vat_country_iso_code,
908
+ vat_country_op_co_id,
909
+ document_reference,
910
+ additional_documents)
911
+ end
912
+ end
913
+ end