data-and-reporting-sdk 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
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,1412 @@
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
+ # PayerDetails Model.
8
+ class PayerDetails < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Collecting company id of the customer.
13
+ # @return [Integer]
14
+ attr_accessor :col_co_id
15
+
16
+ # Collecting company code of the customer.
17
+ # @return [Integer]
18
+ attr_accessor :col_co_code
19
+
20
+ # ISO code of the customer country.
21
+ # @return [String]
22
+ attr_accessor :country_code
23
+
24
+ # Country of the customer
25
+ # @return [String]
26
+ attr_accessor :country
27
+
28
+ # Payer id of the customer
29
+ # @return [Integer]
30
+ attr_accessor :payer_id
31
+
32
+ # Payer Number of the customer
33
+ # @return [String]
34
+ attr_accessor :payer_number
35
+
36
+ # Full Name of the Payer
37
+ # @return [String]
38
+ attr_accessor :payer_full_name
39
+
40
+ # Short name of the payer
41
+ # @return [String]
42
+ attr_accessor :payer_short_name
43
+
44
+ # Payer Group Id
45
+ # @return [Integer]
46
+ attr_accessor :payer_group_id
47
+
48
+ # Invoiced amount and due for payment from the last SOA.
49
+ # @return [Float]
50
+ attr_accessor :amount_due
51
+
52
+ # Invoiced amount and overdue for payment from the last SOA.
53
+ # @return [Float]
54
+ attr_accessor :amount_overdue
55
+
56
+ # Invoiced amount and not overdue for payment from the last SOA.
57
+ # @return [Float]
58
+ attr_accessor :amount_not_overdue
59
+
60
+ # Current outstanding balance amount from the last SOA.
61
+ # @return [Float]
62
+ attr_accessor :outstanding_balance
63
+
64
+ # Unallocated payment.
65
+ # When negative, indicates overdue amount from the last SOA.
66
+ # @return [Float]
67
+ attr_accessor :unallocated_payment
68
+
69
+ # Currency ISO code
70
+ # @return [String]
71
+ attr_accessor :soa_currency_code
72
+
73
+ # Currency symbol
74
+ # @return [String]
75
+ attr_accessor :soa_currency_symbol
76
+
77
+ # Currency ISO code
78
+ # @return [String]
79
+ attr_accessor :soa_credit_limit_currency_code
80
+
81
+ # Currency symbol
82
+ # @return [String]
83
+ attr_accessor :soa_credit_limit_currency_symbol
84
+
85
+ # Currency ISO code
86
+ # @return [String]
87
+ attr_accessor :last_payment_currency_code
88
+
89
+ # currency symbol
90
+ # @return [String]
91
+ attr_accessor :last_payment_currency_symbol
92
+
93
+ # Latest payment amount for the requested payer.
94
+ # @return [Float]
95
+ attr_accessor :last_payment_amount
96
+
97
+ # Latest payment date for the requested payer.
98
+ # @return [String]
99
+ attr_accessor :last_payment_date
100
+
101
+ # Last payment amount in statement of account for the requested payer.
102
+ # @return [Float]
103
+ attr_accessor :soa_last_payment_amount
104
+
105
+ # Last payment date in statement of account for the requested payer.
106
+ # @return [String]
107
+ attr_accessor :soa_last_payment_date
108
+
109
+ # Currency ISO code
110
+ # @return [String]
111
+ attr_accessor :currency_code
112
+
113
+ # Currency Symbol
114
+ # @return [String]
115
+ attr_accessor :currency_symbol
116
+
117
+ # The 2-character ISO Code for the customer and card owning country.
118
+ # @return [String]
119
+ attr_accessor :col_co_country_code
120
+
121
+ # Currency ISO code of the local country.
122
+ # @return [String]
123
+ attr_accessor :local_currency_code
124
+
125
+ # Currency Symbol of the local country
126
+ # @return [String]
127
+ attr_accessor :local_currency_symbol
128
+
129
+ # Exchange rate from OU base currency to local currency.
130
+ # @return [Float]
131
+ attr_accessor :local_currency_exchange_rate
132
+
133
+ # Exchange rate from SoA credit limit currency to local currency
134
+ # @return [Float]
135
+ attr_accessor :local_currency_exchange_rate_so_a
136
+
137
+ # Billing/Invoice frequency Identifier. Indicates the frequency in which the
138
+ # transactions will be considered for invoicing in a bulling run
139
+ # E.g.: 1, 2, 3, etc.
140
+ # @return [Integer]
141
+ attr_accessor :billing_frequency_type_id
142
+
143
+ # Billing/Invoice frequency. The frequency in which the transactions will be
144
+ # considered for invoicing in a bulling run
145
+ # E.g.:
146
+ # 1 Daily (all days)
147
+ # 2 Daily (only working days)
148
+ # 3 Weekly - Monday
149
+ # 4 Weekly – Tuesday
150
+ # Etc.
151
+ # @return [String]
152
+ attr_accessor :billing_frequency_type
153
+
154
+ # Frequency at which the billing process is triggered.
155
+ # E.g.: 1, 2, 3, etc.
156
+ # @return [Integer]
157
+ attr_accessor :billing_run_frequency_type_id
158
+
159
+ # Frequency at which the billing process is triggered.E.g.:
160
+ # 1 Daily (all days)
161
+ # 2 Daily (only working days)
162
+ # 3 Weekly - Monday
163
+ # 4 Weekly – Tuesday
164
+ # Etc.
165
+ # @return [String]
166
+ attr_accessor :billing_run_frequnecy
167
+
168
+ # The first day in a month when the billing should run in case of multiple
169
+ # billing runs configured with in a single month.
170
+ # @return [Integer]
171
+ attr_accessor :day1_run
172
+
173
+ # The second day in a month when the billing should run in case of multiple
174
+ # billing runs configured with in a single month.
175
+ # @return [Integer]
176
+ attr_accessor :day2_run
177
+
178
+ # The third day in a month when the billing should run in case of multiple
179
+ # billing runs configured with in a single month.
180
+ # @return [Integer]
181
+ attr_accessor :day3_run
182
+
183
+ # The fourth day in a month when the billing should run in case of multiple
184
+ # billing runs configured with in a single month.
185
+ # @return [Integer]
186
+ attr_accessor :day4_run
187
+
188
+ # The fourth day in a month when the billing should run in case of multiple
189
+ # billing runs configured with in a single month.
190
+ # @return [Array[InvoiceDistributionMethod]]
191
+ attr_accessor :invoice_distribution_methods
192
+
193
+ # Invoice output type (Id-Description)
194
+ # E.g.:
195
+ # 1-PDF
196
+ # 6-Print
197
+ # @return [String]
198
+ attr_accessor :output_type
199
+
200
+ # The Account ID of the account on which the invoice is generated.
201
+ # @return [Integer]
202
+ attr_accessor :invoice_account_id
203
+
204
+ # The Account Number of the account on which the invoice is generated.
205
+ # @return [String]
206
+ attr_accessor :invoice_account_number
207
+
208
+ # The Account Short Name of the account on which the invoice is generated.
209
+ # @return [String]
210
+ attr_accessor :invoice_account_short_name
211
+
212
+ # Best of Indicator of the Pricing customer/account configured.
213
+ # @return [TrueClass | FalseClass]
214
+ attr_accessor :best_of_indicator
215
+
216
+ # Whether the account is international.
217
+ # @return [TrueClass | FalseClass]
218
+ attr_accessor :is_international
219
+
220
+ # Total number of accounts under the payer.
221
+ # @return [Integer]
222
+ attr_accessor :total_accounts
223
+
224
+ # Total number of active accounts under the payer.
225
+ # @return [Integer]
226
+ attr_accessor :total_active_accounts
227
+
228
+ # Total number of cards under the payer.
229
+ # @return [Integer]
230
+ attr_accessor :total_cards
231
+
232
+ # Total number of active cards under the payer.
233
+ # @return [Integer]
234
+ attr_accessor :total_active_cards
235
+
236
+ # Total number of cards under the payer that are permanently blocked
237
+ # @return [Integer]
238
+ attr_accessor :total_blocked_cards
239
+
240
+ # Total number of cards under the payer that are cancelled
241
+ # @return [Integer]
242
+ attr_accessor :total_cancelled_cards
243
+
244
+ # Total number of expired cards under the payer.
245
+ # @return [Integer]
246
+ attr_accessor :total_expired_cards
247
+
248
+ # Total number of Renewal Pending cards under the payer.
249
+ # @return [Integer]
250
+ attr_accessor :total_renewal_pending_cards
251
+
252
+ # Total number of cards under the payer with status as “Replaced
253
+ # @return [Integer]
254
+ attr_accessor :total_replaced_cards
255
+
256
+ # Total number of cards under the payer that are temporarily blocked by
257
+ # customer.
258
+ # @return [Integer]
259
+ attr_accessor :total_temporary_block_cards_by_customer
260
+
261
+ # Total number of cards under the payer that are temporarily blocked by
262
+ # Shell.
263
+ # @return [Integer]
264
+ attr_accessor :total_temporary_block_cards_by_shell
265
+
266
+ # Total number of cards in “New” status
267
+ # @return [Integer]
268
+ attr_accessor :total_new_cards
269
+
270
+ # Total number of cards in Fraud status
271
+ # @return [Integer]
272
+ attr_accessor :total_fraud_cards
273
+
274
+ # Total number of accounts in Blocked status
275
+ # @return [Integer]
276
+ attr_accessor :total_blocked_accounts
277
+
278
+ # Total number of accounts in Cancel status
279
+ # @return [Integer]
280
+ attr_accessor :total_cancelled_accounts
281
+
282
+ # Trading name for the Payer
283
+ # @return [String]
284
+ attr_accessor :payer_trading_name
285
+
286
+ # Payer current status id and description
287
+ # e.g. (Id – Description):
288
+ # 1-Active
289
+ # 2-Requested from UTA
290
+ # 3-Awaiting embossing
291
+ # 4-Manufactured
292
+ # 5-Awaiting despatch
293
+ # @return [String]
294
+ attr_accessor :status
295
+
296
+ # Payer Billing Language id and description
297
+ # @return [String]
298
+ attr_accessor :billing_language
299
+
300
+ # Legal entity id and description of the Payer
301
+ # @return [String]
302
+ attr_accessor :legal_entity
303
+
304
+ # Payer/Company Established Date.
305
+ # @return [String]
306
+ attr_accessor :date_established
307
+
308
+ # Payer/Company Classification id and description
309
+ # @return [String]
310
+ attr_accessor :customer_classification
311
+
312
+ # Payer/Company Industry class id and description
313
+ # @return [String]
314
+ attr_accessor :industry_class
315
+
316
+ # Marketing Segmentation id and description
317
+ # @return [String]
318
+ attr_accessor :marketing_segmentation
319
+
320
+ # Payer/Company Line of Business Id and Description
321
+ # @return [String]
322
+ attr_accessor :line_of_business
323
+
324
+ # Is Credit Limit printed on the statement of account: True/False
325
+ # If True Credit Limit is printed on invoice/SOA
326
+ # @return [TrueClass | FalseClass]
327
+ attr_accessor :print_credit_limit
328
+
329
+ # Card Group Type configured for Payer
330
+ # e.g. (Id – Description):
331
+ # 1-Horizontal only
332
+ # 2-Vertical only
333
+ # 3-Both
334
+ # @return [String]
335
+ attr_accessor :card_group_type
336
+
337
+ # If set to True cards will be automatically renewed on expiry
338
+ # @return [TrueClass | FalseClass]
339
+ attr_accessor :renew_cards
340
+
341
+ # If set to True then Self Select PIN is allowed for Payer
342
+ # @return [TrueClass | FalseClass]
343
+ attr_accessor :allow_select_pin
344
+
345
+ # If set to True then Fleet PIN is applied for the cards directly under
346
+ # payer
347
+ # @return [TrueClass | FalseClass]
348
+ attr_accessor :use_fleet_pin
349
+
350
+ # Payer/Company VAT registration number.
351
+ # @return [String]
352
+ attr_accessor :vat_reg_number
353
+
354
+ # Payer/Company VAT registration number 2.
355
+ # @return [String]
356
+ attr_accessor :vat_reg_number2
357
+
358
+ # Payer/Company Registration number
359
+ # @return [String]
360
+ attr_accessor :registration_number
361
+
362
+ # Payer/Company Registration number2
363
+ # @return [String]
364
+ attr_accessor :registration_number2
365
+
366
+ # Sales Ledger Balance (Billed)
367
+ # @return [Float]
368
+ attr_accessor :sales_ledger_balance
369
+
370
+ # Exposure after guarantee
371
+ # @return [Float]
372
+ attr_accessor :exposure
373
+
374
+ # Total outstanding debt (including billed and unbilled sales and fee items)
375
+ # @return [Float]
376
+ attr_accessor :outstanding_debt
377
+
378
+ # The available credit for the payer.
379
+ # This is the credit limit minus the outstanding debt.
380
+ # @return [Float]
381
+ attr_accessor :available_credit
382
+
383
+ # Band Id and Description of the Payer in Card Platform.
384
+ # e.g. (Id – Description):
385
+ # 1-Platinum
386
+ # 2-Gold
387
+ # 3-Silver
388
+ # 4-Bronze
389
+ # @return [String]
390
+ attr_accessor :band
391
+
392
+ # Global Customer reference id configured in card platform for Payer (Same
393
+ # as Payer Group)
394
+ # @return [String]
395
+ attr_accessor :global_customer_reference_id
396
+
397
+ # Payment Credit limit of Payer.
398
+ # @return [Float]
399
+ attr_accessor :credit_limit
400
+
401
+ # Credit limit in Customer currency.
402
+ # Note: For currency details refer the parameters CurrencyCode &
403
+ # CurrencySymbol in the PayerDetail response.
404
+ # @return [Float]
405
+ attr_accessor :credit_limit_in_customer_currency
406
+
407
+ # Customer Billing currency ISO code.
408
+ # @return [String]
409
+ attr_accessor :billing_currency_code
410
+
411
+ # Customer Billing currency Symbol.
412
+ # @return [String]
413
+ attr_accessor :billing_currency_symbol
414
+
415
+ # Payment method Id and Description as configured for Payer in Card Platform
416
+ # @return [String]
417
+ attr_accessor :payment_method
418
+
419
+ # Payment terms Id and Description as configured for Payer in Card Platform
420
+ # @return [String]
421
+ attr_accessor :payment_terms
422
+
423
+ # Temporary Credit limit increase value
424
+ # @return [Float]
425
+ attr_accessor :temporary_credit_limit_increase
426
+
427
+ # Temporary Credit limit increase value
428
+ # @return [Float]
429
+ attr_accessor :temporary_credit_limit_increase_in_customer_currency
430
+
431
+ # Temporary Credit limit expiry date
432
+ # @return [String]
433
+ attr_accessor :temporary_credit_limit_expiry_date
434
+
435
+ # Temporary Credit limit expiry date
436
+ # @return [Array[BankAccount]]
437
+ attr_accessor :payer_bank_account
438
+
439
+ # Temporary Credit limit expiry date
440
+ # @return [Address]
441
+ attr_accessor :card_delivery_address
442
+
443
+ # Temporary Credit limit expiry date
444
+ # @return [Address]
445
+ attr_accessor :correspondance_address
446
+
447
+ # Temporary Credit limit expiry date
448
+ # @return [Address]
449
+ attr_accessor :billing_address
450
+
451
+ # True, if the payer is setup for volume-based pricing and is active on the
452
+ # current date, else false.
453
+ # This field is returned only when IncludeBonusParameters is set to True in
454
+ # the request. Else set to null.
455
+ # @return [TrueClass | FalseClass]
456
+ attr_accessor :has_active_vol_based_pricing
457
+
458
+ # True, if the payer is setup for volume-based bonus and is active on the
459
+ # current date, else false.
460
+ # This field is returned only when IncludeBonusParameters is set to True in
461
+ # the request. Else set to null.
462
+ # @return [TrueClass | FalseClass]
463
+ attr_accessor :has_active_vol_based_bonus
464
+
465
+ # True, if the payer is setup for volume-based association bonus and is
466
+ # active on the current date, else false.
467
+ # This field is returned only when IncludeBonusParameters is set to True in
468
+ # the request. Else set to null.
469
+ # @return [TrueClass | FalseClass]
470
+ attr_accessor :has_active_vol_based_association_bonus
471
+
472
+ # This entity will not be present in the response if the
473
+ # ‘IncludeFinanceCurrency’ flag in the request is ‘false’
474
+ # @return [FinanceCurrency]
475
+ attr_accessor :finance_currency
476
+
477
+ # Customer id in e-TM system
478
+ # This field will have value only when ReturnTollsCustomerId is set to true
479
+ # in the request else set to null or empty.
480
+ # @return [String]
481
+ attr_accessor :tolls_customer_id
482
+
483
+ # String Colco country type id in e-TM system
484
+ # This field will have value only when ReturnTollsCustomerId is set to true
485
+ # in the request else set to null or empty.
486
+ # @return [String]
487
+ attr_accessor :tolls_colco_country_type_id
488
+
489
+ # String Colco country type id in e-TM system
490
+ # This field will have value only when ReturnTollsCustomerId is set to true
491
+ # in the request else set to null or empty.
492
+ # @return [Array[CustomerContract]]
493
+ attr_accessor :contracts
494
+
495
+ # A mapping from model property names to API property names.
496
+ def self.names
497
+ @_hash = {} if @_hash.nil?
498
+ @_hash['col_co_id'] = 'ColCoId'
499
+ @_hash['col_co_code'] = 'ColCoCode'
500
+ @_hash['country_code'] = 'CountryCode'
501
+ @_hash['country'] = 'Country'
502
+ @_hash['payer_id'] = 'PayerId'
503
+ @_hash['payer_number'] = 'PayerNumber'
504
+ @_hash['payer_full_name'] = 'PayerFullName'
505
+ @_hash['payer_short_name'] = 'PayerShortName'
506
+ @_hash['payer_group_id'] = 'PayerGroupId'
507
+ @_hash['amount_due'] = 'AmountDue'
508
+ @_hash['amount_overdue'] = 'AmountOverdue'
509
+ @_hash['amount_not_overdue'] = 'AmountNotOverdue'
510
+ @_hash['outstanding_balance'] = 'OutstandingBalance'
511
+ @_hash['unallocated_payment'] = 'UnallocatedPayment'
512
+ @_hash['soa_currency_code'] = 'SOACurrencyCode'
513
+ @_hash['soa_currency_symbol'] = 'SOACurrencySymbol'
514
+ @_hash['soa_credit_limit_currency_code'] = 'SOACreditLimitCurrencyCode'
515
+ @_hash['soa_credit_limit_currency_symbol'] =
516
+ 'SOACreditLimitCurrencySymbol'
517
+ @_hash['last_payment_currency_code'] = 'LastPaymentCurrencyCode'
518
+ @_hash['last_payment_currency_symbol'] = 'LastPaymentCurrencySymbol'
519
+ @_hash['last_payment_amount'] = 'LastPaymentAmount'
520
+ @_hash['last_payment_date'] = 'LastPaymentDate'
521
+ @_hash['soa_last_payment_amount'] = 'SOALastPaymentAmount'
522
+ @_hash['soa_last_payment_date'] = 'SOALastPaymentDate'
523
+ @_hash['currency_code'] = 'CurrencyCode'
524
+ @_hash['currency_symbol'] = 'CurrencySymbol'
525
+ @_hash['col_co_country_code'] = 'ColCoCountryCode'
526
+ @_hash['local_currency_code'] = 'LocalCurrencyCode'
527
+ @_hash['local_currency_symbol'] = 'LocalCurrencySymbol'
528
+ @_hash['local_currency_exchange_rate'] = 'LocalCurrencyExchangeRate'
529
+ @_hash['local_currency_exchange_rate_so_a'] =
530
+ 'LocalCurrencyExchangeRate_SoA'
531
+ @_hash['billing_frequency_type_id'] = 'BillingFrequencyTypeId'
532
+ @_hash['billing_frequency_type'] = 'BillingFrequencyType'
533
+ @_hash['billing_run_frequency_type_id'] = 'BillingRunFrequencyTypeId'
534
+ @_hash['billing_run_frequnecy'] = 'BillingRunFrequnecy'
535
+ @_hash['day1_run'] = 'Day1Run'
536
+ @_hash['day2_run'] = 'Day2Run'
537
+ @_hash['day3_run'] = 'Day3Run'
538
+ @_hash['day4_run'] = 'Day4Run'
539
+ @_hash['invoice_distribution_methods'] = 'InvoiceDistributionMethods'
540
+ @_hash['output_type'] = 'OutputType'
541
+ @_hash['invoice_account_id'] = 'InvoiceAccountID'
542
+ @_hash['invoice_account_number'] = 'InvoiceAccountNumber'
543
+ @_hash['invoice_account_short_name'] = 'InvoiceAccountShortName'
544
+ @_hash['best_of_indicator'] = 'BestOfIndicator'
545
+ @_hash['is_international'] = 'IsInternational'
546
+ @_hash['total_accounts'] = 'TotalAccounts'
547
+ @_hash['total_active_accounts'] = 'TotalActiveAccounts'
548
+ @_hash['total_cards'] = 'TotalCards'
549
+ @_hash['total_active_cards'] = 'TotalActiveCards'
550
+ @_hash['total_blocked_cards'] = 'TotalBlockedCards'
551
+ @_hash['total_cancelled_cards'] = 'TotalCancelledCards'
552
+ @_hash['total_expired_cards'] = 'TotalExpiredCards'
553
+ @_hash['total_renewal_pending_cards'] = 'TotalRenewalPendingCards'
554
+ @_hash['total_replaced_cards'] = 'TotalReplacedCards'
555
+ @_hash['total_temporary_block_cards_by_customer'] =
556
+ 'TotalTemporaryBlockCardsByCustomer'
557
+ @_hash['total_temporary_block_cards_by_shell'] =
558
+ 'TotalTemporaryBlockCardsByShell'
559
+ @_hash['total_new_cards'] = 'TotalNewCards'
560
+ @_hash['total_fraud_cards'] = 'TotalFraudCards'
561
+ @_hash['total_blocked_accounts'] = 'TotalBlockedAccounts'
562
+ @_hash['total_cancelled_accounts'] = 'TotalCancelledAccounts'
563
+ @_hash['payer_trading_name'] = 'PayerTradingName'
564
+ @_hash['status'] = 'Status'
565
+ @_hash['billing_language'] = 'BillingLanguage'
566
+ @_hash['legal_entity'] = 'LegalEntity'
567
+ @_hash['date_established'] = 'DateEstablished'
568
+ @_hash['customer_classification'] = 'CustomerClassification'
569
+ @_hash['industry_class'] = 'IndustryClass'
570
+ @_hash['marketing_segmentation'] = 'MarketingSegmentation'
571
+ @_hash['line_of_business'] = 'LineOfBusiness'
572
+ @_hash['print_credit_limit'] = 'PrintCreditLimit'
573
+ @_hash['card_group_type'] = 'CardGroupType'
574
+ @_hash['renew_cards'] = 'RenewCards'
575
+ @_hash['allow_select_pin'] = 'AllowSelectPIN'
576
+ @_hash['use_fleet_pin'] = 'UseFleetPIN'
577
+ @_hash['vat_reg_number'] = 'VATRegNumber'
578
+ @_hash['vat_reg_number2'] = 'VATRegNumber2'
579
+ @_hash['registration_number'] = 'RegistrationNumber'
580
+ @_hash['registration_number2'] = 'RegistrationNumber2'
581
+ @_hash['sales_ledger_balance'] = 'SalesLedgerBalance'
582
+ @_hash['exposure'] = 'Exposure'
583
+ @_hash['outstanding_debt'] = 'OutstandingDebt'
584
+ @_hash['available_credit'] = 'AvailableCredit'
585
+ @_hash['band'] = 'Band'
586
+ @_hash['global_customer_reference_id'] = 'GlobalCustomerReferenceId'
587
+ @_hash['credit_limit'] = 'CreditLimit'
588
+ @_hash['credit_limit_in_customer_currency'] =
589
+ 'CreditLimitInCustomerCurrency'
590
+ @_hash['billing_currency_code'] = 'BillingCurrencyCode'
591
+ @_hash['billing_currency_symbol'] = 'BillingCurrencySymbol'
592
+ @_hash['payment_method'] = 'PaymentMethod'
593
+ @_hash['payment_terms'] = 'PaymentTerms'
594
+ @_hash['temporary_credit_limit_increase'] =
595
+ 'TemporaryCreditLimitIncrease'
596
+ @_hash['temporary_credit_limit_increase_in_customer_currency'] =
597
+ 'TemporaryCreditLimitIncreaseInCustomerCurrency'
598
+ @_hash['temporary_credit_limit_expiry_date'] =
599
+ 'TemporaryCreditLimitExpiryDate'
600
+ @_hash['payer_bank_account'] = 'PayerBankAccount'
601
+ @_hash['card_delivery_address'] = 'CardDeliveryAddress'
602
+ @_hash['correspondance_address'] = 'CorrespondanceAddress'
603
+ @_hash['billing_address'] = 'BillingAddress'
604
+ @_hash['has_active_vol_based_pricing'] = 'HasActiveVolBasedPricing'
605
+ @_hash['has_active_vol_based_bonus'] = 'HasActiveVolBasedBonus'
606
+ @_hash['has_active_vol_based_association_bonus'] =
607
+ 'HasActiveVolBasedAssociationBonus'
608
+ @_hash['finance_currency'] = 'FinanceCurrency'
609
+ @_hash['tolls_customer_id'] = 'TollsCustomerId'
610
+ @_hash['tolls_colco_country_type_id'] = 'TollsColcoCountryTypeId'
611
+ @_hash['contracts'] = 'Contracts'
612
+ @_hash
613
+ end
614
+
615
+ # An array for optional fields
616
+ def self.optionals
617
+ %w[
618
+ col_co_id
619
+ col_co_code
620
+ country_code
621
+ country
622
+ payer_id
623
+ payer_number
624
+ payer_full_name
625
+ payer_short_name
626
+ payer_group_id
627
+ amount_due
628
+ amount_overdue
629
+ amount_not_overdue
630
+ outstanding_balance
631
+ unallocated_payment
632
+ soa_currency_code
633
+ soa_currency_symbol
634
+ soa_credit_limit_currency_code
635
+ soa_credit_limit_currency_symbol
636
+ last_payment_currency_code
637
+ last_payment_currency_symbol
638
+ last_payment_amount
639
+ last_payment_date
640
+ soa_last_payment_amount
641
+ soa_last_payment_date
642
+ currency_code
643
+ currency_symbol
644
+ col_co_country_code
645
+ local_currency_code
646
+ local_currency_symbol
647
+ local_currency_exchange_rate
648
+ local_currency_exchange_rate_so_a
649
+ billing_frequency_type_id
650
+ billing_frequency_type
651
+ billing_run_frequency_type_id
652
+ billing_run_frequnecy
653
+ day1_run
654
+ day2_run
655
+ day3_run
656
+ day4_run
657
+ invoice_distribution_methods
658
+ output_type
659
+ invoice_account_id
660
+ invoice_account_number
661
+ invoice_account_short_name
662
+ best_of_indicator
663
+ is_international
664
+ total_accounts
665
+ total_active_accounts
666
+ total_cards
667
+ total_active_cards
668
+ total_blocked_cards
669
+ total_cancelled_cards
670
+ total_expired_cards
671
+ total_renewal_pending_cards
672
+ total_replaced_cards
673
+ total_temporary_block_cards_by_customer
674
+ total_temporary_block_cards_by_shell
675
+ total_new_cards
676
+ total_fraud_cards
677
+ total_blocked_accounts
678
+ total_cancelled_accounts
679
+ payer_trading_name
680
+ status
681
+ billing_language
682
+ legal_entity
683
+ date_established
684
+ customer_classification
685
+ industry_class
686
+ marketing_segmentation
687
+ line_of_business
688
+ print_credit_limit
689
+ card_group_type
690
+ renew_cards
691
+ allow_select_pin
692
+ use_fleet_pin
693
+ vat_reg_number
694
+ vat_reg_number2
695
+ registration_number
696
+ registration_number2
697
+ sales_ledger_balance
698
+ exposure
699
+ outstanding_debt
700
+ available_credit
701
+ band
702
+ global_customer_reference_id
703
+ credit_limit
704
+ credit_limit_in_customer_currency
705
+ billing_currency_code
706
+ billing_currency_symbol
707
+ payment_method
708
+ payment_terms
709
+ temporary_credit_limit_increase
710
+ temporary_credit_limit_increase_in_customer_currency
711
+ temporary_credit_limit_expiry_date
712
+ payer_bank_account
713
+ card_delivery_address
714
+ correspondance_address
715
+ billing_address
716
+ has_active_vol_based_pricing
717
+ has_active_vol_based_bonus
718
+ has_active_vol_based_association_bonus
719
+ finance_currency
720
+ tolls_customer_id
721
+ tolls_colco_country_type_id
722
+ contracts
723
+ ]
724
+ end
725
+
726
+ # An array for nullable fields
727
+ def self.nullables
728
+ %w[
729
+ col_co_id
730
+ col_co_code
731
+ country_code
732
+ country
733
+ payer_id
734
+ payer_number
735
+ payer_full_name
736
+ payer_short_name
737
+ payer_group_id
738
+ amount_due
739
+ amount_overdue
740
+ amount_not_overdue
741
+ outstanding_balance
742
+ unallocated_payment
743
+ soa_currency_code
744
+ soa_currency_symbol
745
+ soa_credit_limit_currency_code
746
+ soa_credit_limit_currency_symbol
747
+ last_payment_currency_code
748
+ last_payment_currency_symbol
749
+ last_payment_amount
750
+ last_payment_date
751
+ soa_last_payment_amount
752
+ soa_last_payment_date
753
+ currency_code
754
+ currency_symbol
755
+ col_co_country_code
756
+ local_currency_code
757
+ local_currency_symbol
758
+ local_currency_exchange_rate
759
+ local_currency_exchange_rate_so_a
760
+ billing_frequency_type_id
761
+ billing_frequency_type
762
+ billing_run_frequency_type_id
763
+ billing_run_frequnecy
764
+ day1_run
765
+ day2_run
766
+ day3_run
767
+ day4_run
768
+ output_type
769
+ invoice_account_id
770
+ invoice_account_number
771
+ invoice_account_short_name
772
+ total_accounts
773
+ total_active_accounts
774
+ total_cards
775
+ total_active_cards
776
+ total_blocked_cards
777
+ total_cancelled_cards
778
+ total_expired_cards
779
+ total_renewal_pending_cards
780
+ total_replaced_cards
781
+ total_temporary_block_cards_by_customer
782
+ total_temporary_block_cards_by_shell
783
+ total_new_cards
784
+ total_fraud_cards
785
+ total_blocked_accounts
786
+ total_cancelled_accounts
787
+ payer_trading_name
788
+ billing_language
789
+ legal_entity
790
+ date_established
791
+ customer_classification
792
+ industry_class
793
+ marketing_segmentation
794
+ line_of_business
795
+ card_group_type
796
+ vat_reg_number
797
+ registration_number
798
+ registration_number2
799
+ sales_ledger_balance
800
+ exposure
801
+ outstanding_debt
802
+ available_credit
803
+ band
804
+ global_customer_reference_id
805
+ credit_limit
806
+ credit_limit_in_customer_currency
807
+ billing_currency_code
808
+ billing_currency_symbol
809
+ payment_method
810
+ payment_terms
811
+ temporary_credit_limit_increase
812
+ temporary_credit_limit_increase_in_customer_currency
813
+ temporary_credit_limit_expiry_date
814
+ tolls_customer_id
815
+ tolls_colco_country_type_id
816
+ ]
817
+ end
818
+
819
+ def initialize(col_co_id = SKIP,
820
+ col_co_code = SKIP,
821
+ country_code = SKIP,
822
+ country = SKIP,
823
+ payer_id = SKIP,
824
+ payer_number = SKIP,
825
+ payer_full_name = SKIP,
826
+ payer_short_name = SKIP,
827
+ payer_group_id = SKIP,
828
+ amount_due = SKIP,
829
+ amount_overdue = SKIP,
830
+ amount_not_overdue = SKIP,
831
+ outstanding_balance = SKIP,
832
+ unallocated_payment = SKIP,
833
+ soa_currency_code = SKIP,
834
+ soa_currency_symbol = SKIP,
835
+ soa_credit_limit_currency_code = SKIP,
836
+ soa_credit_limit_currency_symbol = SKIP,
837
+ last_payment_currency_code = SKIP,
838
+ last_payment_currency_symbol = SKIP,
839
+ last_payment_amount = SKIP,
840
+ last_payment_date = SKIP,
841
+ soa_last_payment_amount = SKIP,
842
+ soa_last_payment_date = SKIP,
843
+ currency_code = SKIP,
844
+ currency_symbol = SKIP,
845
+ col_co_country_code = SKIP,
846
+ local_currency_code = SKIP,
847
+ local_currency_symbol = SKIP,
848
+ local_currency_exchange_rate = SKIP,
849
+ local_currency_exchange_rate_so_a = SKIP,
850
+ billing_frequency_type_id = SKIP,
851
+ billing_frequency_type = SKIP,
852
+ billing_run_frequency_type_id = SKIP,
853
+ billing_run_frequnecy = SKIP,
854
+ day1_run = SKIP,
855
+ day2_run = SKIP,
856
+ day3_run = SKIP,
857
+ day4_run = SKIP,
858
+ invoice_distribution_methods = SKIP,
859
+ output_type = SKIP,
860
+ invoice_account_id = SKIP,
861
+ invoice_account_number = SKIP,
862
+ invoice_account_short_name = SKIP,
863
+ best_of_indicator = false,
864
+ is_international = false,
865
+ total_accounts = SKIP,
866
+ total_active_accounts = SKIP,
867
+ total_cards = SKIP,
868
+ total_active_cards = SKIP,
869
+ total_blocked_cards = SKIP,
870
+ total_cancelled_cards = SKIP,
871
+ total_expired_cards = SKIP,
872
+ total_renewal_pending_cards = SKIP,
873
+ total_replaced_cards = SKIP,
874
+ total_temporary_block_cards_by_customer = SKIP,
875
+ total_temporary_block_cards_by_shell = SKIP,
876
+ total_new_cards = SKIP,
877
+ total_fraud_cards = SKIP,
878
+ total_blocked_accounts = SKIP,
879
+ total_cancelled_accounts = SKIP,
880
+ payer_trading_name = SKIP,
881
+ status = SKIP,
882
+ billing_language = SKIP,
883
+ legal_entity = SKIP,
884
+ date_established = SKIP,
885
+ customer_classification = SKIP,
886
+ industry_class = SKIP,
887
+ marketing_segmentation = SKIP,
888
+ line_of_business = SKIP,
889
+ print_credit_limit = false,
890
+ card_group_type = SKIP,
891
+ renew_cards = false,
892
+ allow_select_pin = false,
893
+ use_fleet_pin = SKIP,
894
+ vat_reg_number = SKIP,
895
+ vat_reg_number2 = SKIP,
896
+ registration_number = SKIP,
897
+ registration_number2 = SKIP,
898
+ sales_ledger_balance = SKIP,
899
+ exposure = SKIP,
900
+ outstanding_debt = SKIP,
901
+ available_credit = SKIP,
902
+ band = SKIP,
903
+ global_customer_reference_id = SKIP,
904
+ credit_limit = SKIP,
905
+ credit_limit_in_customer_currency = SKIP,
906
+ billing_currency_code = SKIP,
907
+ billing_currency_symbol = SKIP,
908
+ payment_method = SKIP,
909
+ payment_terms = SKIP,
910
+ temporary_credit_limit_increase = SKIP,
911
+ temporary_credit_limit_increase_in_customer_currency = SKIP,
912
+ temporary_credit_limit_expiry_date = SKIP,
913
+ payer_bank_account = SKIP,
914
+ card_delivery_address = SKIP,
915
+ correspondance_address = SKIP,
916
+ billing_address = SKIP,
917
+ has_active_vol_based_pricing = SKIP,
918
+ has_active_vol_based_bonus = SKIP,
919
+ has_active_vol_based_association_bonus = SKIP,
920
+ finance_currency = SKIP,
921
+ tolls_customer_id = SKIP,
922
+ tolls_colco_country_type_id = SKIP,
923
+ contracts = SKIP)
924
+ @col_co_id = col_co_id unless col_co_id == SKIP
925
+ @col_co_code = col_co_code unless col_co_code == SKIP
926
+ @country_code = country_code unless country_code == SKIP
927
+ @country = country unless country == SKIP
928
+ @payer_id = payer_id unless payer_id == SKIP
929
+ @payer_number = payer_number unless payer_number == SKIP
930
+ @payer_full_name = payer_full_name unless payer_full_name == SKIP
931
+ @payer_short_name = payer_short_name unless payer_short_name == SKIP
932
+ @payer_group_id = payer_group_id unless payer_group_id == SKIP
933
+ @amount_due = amount_due unless amount_due == SKIP
934
+ @amount_overdue = amount_overdue unless amount_overdue == SKIP
935
+ @amount_not_overdue = amount_not_overdue unless amount_not_overdue == SKIP
936
+ @outstanding_balance = outstanding_balance unless outstanding_balance == SKIP
937
+ @unallocated_payment = unallocated_payment unless unallocated_payment == SKIP
938
+ @soa_currency_code = soa_currency_code unless soa_currency_code == SKIP
939
+ @soa_currency_symbol = soa_currency_symbol unless soa_currency_symbol == SKIP
940
+ unless soa_credit_limit_currency_code == SKIP
941
+ @soa_credit_limit_currency_code =
942
+ soa_credit_limit_currency_code
943
+ end
944
+ unless soa_credit_limit_currency_symbol == SKIP
945
+ @soa_credit_limit_currency_symbol =
946
+ soa_credit_limit_currency_symbol
947
+ end
948
+ unless last_payment_currency_code == SKIP
949
+ @last_payment_currency_code =
950
+ last_payment_currency_code
951
+ end
952
+ unless last_payment_currency_symbol == SKIP
953
+ @last_payment_currency_symbol =
954
+ last_payment_currency_symbol
955
+ end
956
+ @last_payment_amount = last_payment_amount unless last_payment_amount == SKIP
957
+ @last_payment_date = last_payment_date unless last_payment_date == SKIP
958
+ @soa_last_payment_amount = soa_last_payment_amount unless soa_last_payment_amount == SKIP
959
+ @soa_last_payment_date = soa_last_payment_date unless soa_last_payment_date == SKIP
960
+ @currency_code = currency_code unless currency_code == SKIP
961
+ @currency_symbol = currency_symbol unless currency_symbol == SKIP
962
+ @col_co_country_code = col_co_country_code unless col_co_country_code == SKIP
963
+ @local_currency_code = local_currency_code unless local_currency_code == SKIP
964
+ @local_currency_symbol = local_currency_symbol unless local_currency_symbol == SKIP
965
+ unless local_currency_exchange_rate == SKIP
966
+ @local_currency_exchange_rate =
967
+ local_currency_exchange_rate
968
+ end
969
+ unless local_currency_exchange_rate_so_a == SKIP
970
+ @local_currency_exchange_rate_so_a =
971
+ local_currency_exchange_rate_so_a
972
+ end
973
+ unless billing_frequency_type_id == SKIP
974
+ @billing_frequency_type_id =
975
+ billing_frequency_type_id
976
+ end
977
+ @billing_frequency_type = billing_frequency_type unless billing_frequency_type == SKIP
978
+ unless billing_run_frequency_type_id == SKIP
979
+ @billing_run_frequency_type_id =
980
+ billing_run_frequency_type_id
981
+ end
982
+ @billing_run_frequnecy = billing_run_frequnecy unless billing_run_frequnecy == SKIP
983
+ @day1_run = day1_run unless day1_run == SKIP
984
+ @day2_run = day2_run unless day2_run == SKIP
985
+ @day3_run = day3_run unless day3_run == SKIP
986
+ @day4_run = day4_run unless day4_run == SKIP
987
+ unless invoice_distribution_methods == SKIP
988
+ @invoice_distribution_methods =
989
+ invoice_distribution_methods
990
+ end
991
+ @output_type = output_type unless output_type == SKIP
992
+ @invoice_account_id = invoice_account_id unless invoice_account_id == SKIP
993
+ @invoice_account_number = invoice_account_number unless invoice_account_number == SKIP
994
+ unless invoice_account_short_name == SKIP
995
+ @invoice_account_short_name =
996
+ invoice_account_short_name
997
+ end
998
+ @best_of_indicator = best_of_indicator unless best_of_indicator == SKIP
999
+ @is_international = is_international unless is_international == SKIP
1000
+ @total_accounts = total_accounts unless total_accounts == SKIP
1001
+ @total_active_accounts = total_active_accounts unless total_active_accounts == SKIP
1002
+ @total_cards = total_cards unless total_cards == SKIP
1003
+ @total_active_cards = total_active_cards unless total_active_cards == SKIP
1004
+ @total_blocked_cards = total_blocked_cards unless total_blocked_cards == SKIP
1005
+ @total_cancelled_cards = total_cancelled_cards unless total_cancelled_cards == SKIP
1006
+ @total_expired_cards = total_expired_cards unless total_expired_cards == SKIP
1007
+ unless total_renewal_pending_cards == SKIP
1008
+ @total_renewal_pending_cards =
1009
+ total_renewal_pending_cards
1010
+ end
1011
+ @total_replaced_cards = total_replaced_cards unless total_replaced_cards == SKIP
1012
+ unless total_temporary_block_cards_by_customer == SKIP
1013
+ @total_temporary_block_cards_by_customer =
1014
+ total_temporary_block_cards_by_customer
1015
+ end
1016
+ unless total_temporary_block_cards_by_shell == SKIP
1017
+ @total_temporary_block_cards_by_shell =
1018
+ total_temporary_block_cards_by_shell
1019
+ end
1020
+ @total_new_cards = total_new_cards unless total_new_cards == SKIP
1021
+ @total_fraud_cards = total_fraud_cards unless total_fraud_cards == SKIP
1022
+ @total_blocked_accounts = total_blocked_accounts unless total_blocked_accounts == SKIP
1023
+ @total_cancelled_accounts = total_cancelled_accounts unless total_cancelled_accounts == SKIP
1024
+ @payer_trading_name = payer_trading_name unless payer_trading_name == SKIP
1025
+ @status = status unless status == SKIP
1026
+ @billing_language = billing_language unless billing_language == SKIP
1027
+ @legal_entity = legal_entity unless legal_entity == SKIP
1028
+ @date_established = date_established unless date_established == SKIP
1029
+ @customer_classification = customer_classification unless customer_classification == SKIP
1030
+ @industry_class = industry_class unless industry_class == SKIP
1031
+ @marketing_segmentation = marketing_segmentation unless marketing_segmentation == SKIP
1032
+ @line_of_business = line_of_business unless line_of_business == SKIP
1033
+ @print_credit_limit = print_credit_limit unless print_credit_limit == SKIP
1034
+ @card_group_type = card_group_type unless card_group_type == SKIP
1035
+ @renew_cards = renew_cards unless renew_cards == SKIP
1036
+ @allow_select_pin = allow_select_pin unless allow_select_pin == SKIP
1037
+ @use_fleet_pin = use_fleet_pin unless use_fleet_pin == SKIP
1038
+ @vat_reg_number = vat_reg_number unless vat_reg_number == SKIP
1039
+ @vat_reg_number2 = vat_reg_number2 unless vat_reg_number2 == SKIP
1040
+ @registration_number = registration_number unless registration_number == SKIP
1041
+ @registration_number2 = registration_number2 unless registration_number2 == SKIP
1042
+ @sales_ledger_balance = sales_ledger_balance unless sales_ledger_balance == SKIP
1043
+ @exposure = exposure unless exposure == SKIP
1044
+ @outstanding_debt = outstanding_debt unless outstanding_debt == SKIP
1045
+ @available_credit = available_credit unless available_credit == SKIP
1046
+ @band = band unless band == SKIP
1047
+ unless global_customer_reference_id == SKIP
1048
+ @global_customer_reference_id =
1049
+ global_customer_reference_id
1050
+ end
1051
+ @credit_limit = credit_limit unless credit_limit == SKIP
1052
+ unless credit_limit_in_customer_currency == SKIP
1053
+ @credit_limit_in_customer_currency =
1054
+ credit_limit_in_customer_currency
1055
+ end
1056
+ @billing_currency_code = billing_currency_code unless billing_currency_code == SKIP
1057
+ @billing_currency_symbol = billing_currency_symbol unless billing_currency_symbol == SKIP
1058
+ @payment_method = payment_method unless payment_method == SKIP
1059
+ @payment_terms = payment_terms unless payment_terms == SKIP
1060
+ unless temporary_credit_limit_increase == SKIP
1061
+ @temporary_credit_limit_increase =
1062
+ temporary_credit_limit_increase
1063
+ end
1064
+ unless temporary_credit_limit_increase_in_customer_currency == SKIP
1065
+ @temporary_credit_limit_increase_in_customer_currency =
1066
+ temporary_credit_limit_increase_in_customer_currency
1067
+ end
1068
+ unless temporary_credit_limit_expiry_date == SKIP
1069
+ @temporary_credit_limit_expiry_date =
1070
+ temporary_credit_limit_expiry_date
1071
+ end
1072
+ @payer_bank_account = payer_bank_account unless payer_bank_account == SKIP
1073
+ @card_delivery_address = card_delivery_address unless card_delivery_address == SKIP
1074
+ @correspondance_address = correspondance_address unless correspondance_address == SKIP
1075
+ @billing_address = billing_address unless billing_address == SKIP
1076
+ unless has_active_vol_based_pricing == SKIP
1077
+ @has_active_vol_based_pricing =
1078
+ has_active_vol_based_pricing
1079
+ end
1080
+ unless has_active_vol_based_bonus == SKIP
1081
+ @has_active_vol_based_bonus =
1082
+ has_active_vol_based_bonus
1083
+ end
1084
+ unless has_active_vol_based_association_bonus == SKIP
1085
+ @has_active_vol_based_association_bonus =
1086
+ has_active_vol_based_association_bonus
1087
+ end
1088
+ @finance_currency = finance_currency unless finance_currency == SKIP
1089
+ @tolls_customer_id = tolls_customer_id unless tolls_customer_id == SKIP
1090
+ unless tolls_colco_country_type_id == SKIP
1091
+ @tolls_colco_country_type_id =
1092
+ tolls_colco_country_type_id
1093
+ end
1094
+ @contracts = contracts unless contracts == SKIP
1095
+ end
1096
+
1097
+ # Creates an instance of the object from a hash.
1098
+ def self.from_hash(hash)
1099
+ return nil unless hash
1100
+
1101
+ # Extract variables from the hash.
1102
+ col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
1103
+ col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
1104
+ country_code = hash.key?('CountryCode') ? hash['CountryCode'] : SKIP
1105
+ country = hash.key?('Country') ? hash['Country'] : SKIP
1106
+ payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
1107
+ payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
1108
+ payer_full_name =
1109
+ hash.key?('PayerFullName') ? hash['PayerFullName'] : SKIP
1110
+ payer_short_name =
1111
+ hash.key?('PayerShortName') ? hash['PayerShortName'] : SKIP
1112
+ payer_group_id = hash.key?('PayerGroupId') ? hash['PayerGroupId'] : SKIP
1113
+ amount_due = hash.key?('AmountDue') ? hash['AmountDue'] : SKIP
1114
+ amount_overdue = hash.key?('AmountOverdue') ? hash['AmountOverdue'] : SKIP
1115
+ amount_not_overdue =
1116
+ hash.key?('AmountNotOverdue') ? hash['AmountNotOverdue'] : SKIP
1117
+ outstanding_balance =
1118
+ hash.key?('OutstandingBalance') ? hash['OutstandingBalance'] : SKIP
1119
+ unallocated_payment =
1120
+ hash.key?('UnallocatedPayment') ? hash['UnallocatedPayment'] : SKIP
1121
+ soa_currency_code =
1122
+ hash.key?('SOACurrencyCode') ? hash['SOACurrencyCode'] : SKIP
1123
+ soa_currency_symbol =
1124
+ hash.key?('SOACurrencySymbol') ? hash['SOACurrencySymbol'] : SKIP
1125
+ soa_credit_limit_currency_code =
1126
+ hash.key?('SOACreditLimitCurrencyCode') ? hash['SOACreditLimitCurrencyCode'] : SKIP
1127
+ soa_credit_limit_currency_symbol =
1128
+ hash.key?('SOACreditLimitCurrencySymbol') ? hash['SOACreditLimitCurrencySymbol'] : SKIP
1129
+ last_payment_currency_code =
1130
+ hash.key?('LastPaymentCurrencyCode') ? hash['LastPaymentCurrencyCode'] : SKIP
1131
+ last_payment_currency_symbol =
1132
+ hash.key?('LastPaymentCurrencySymbol') ? hash['LastPaymentCurrencySymbol'] : SKIP
1133
+ last_payment_amount =
1134
+ hash.key?('LastPaymentAmount') ? hash['LastPaymentAmount'] : SKIP
1135
+ last_payment_date =
1136
+ hash.key?('LastPaymentDate') ? hash['LastPaymentDate'] : SKIP
1137
+ soa_last_payment_amount =
1138
+ hash.key?('SOALastPaymentAmount') ? hash['SOALastPaymentAmount'] : SKIP
1139
+ soa_last_payment_date =
1140
+ hash.key?('SOALastPaymentDate') ? hash['SOALastPaymentDate'] : SKIP
1141
+ currency_code = hash.key?('CurrencyCode') ? hash['CurrencyCode'] : SKIP
1142
+ currency_symbol =
1143
+ hash.key?('CurrencySymbol') ? hash['CurrencySymbol'] : SKIP
1144
+ col_co_country_code =
1145
+ hash.key?('ColCoCountryCode') ? hash['ColCoCountryCode'] : SKIP
1146
+ local_currency_code =
1147
+ hash.key?('LocalCurrencyCode') ? hash['LocalCurrencyCode'] : SKIP
1148
+ local_currency_symbol =
1149
+ hash.key?('LocalCurrencySymbol') ? hash['LocalCurrencySymbol'] : SKIP
1150
+ local_currency_exchange_rate =
1151
+ hash.key?('LocalCurrencyExchangeRate') ? hash['LocalCurrencyExchangeRate'] : SKIP
1152
+ local_currency_exchange_rate_so_a =
1153
+ hash.key?('LocalCurrencyExchangeRate_SoA') ? hash['LocalCurrencyExchangeRate_SoA'] : SKIP
1154
+ billing_frequency_type_id =
1155
+ hash.key?('BillingFrequencyTypeId') ? hash['BillingFrequencyTypeId'] : SKIP
1156
+ billing_frequency_type =
1157
+ hash.key?('BillingFrequencyType') ? hash['BillingFrequencyType'] : SKIP
1158
+ billing_run_frequency_type_id =
1159
+ hash.key?('BillingRunFrequencyTypeId') ? hash['BillingRunFrequencyTypeId'] : SKIP
1160
+ billing_run_frequnecy =
1161
+ hash.key?('BillingRunFrequnecy') ? hash['BillingRunFrequnecy'] : SKIP
1162
+ day1_run = hash.key?('Day1Run') ? hash['Day1Run'] : SKIP
1163
+ day2_run = hash.key?('Day2Run') ? hash['Day2Run'] : SKIP
1164
+ day3_run = hash.key?('Day3Run') ? hash['Day3Run'] : SKIP
1165
+ day4_run = hash.key?('Day4Run') ? hash['Day4Run'] : SKIP
1166
+ # Parameter is an array, so we need to iterate through it
1167
+ invoice_distribution_methods = nil
1168
+ unless hash['InvoiceDistributionMethods'].nil?
1169
+ invoice_distribution_methods = []
1170
+ hash['InvoiceDistributionMethods'].each do |structure|
1171
+ invoice_distribution_methods << (InvoiceDistributionMethod.from_hash(structure) if structure)
1172
+ end
1173
+ end
1174
+
1175
+ invoice_distribution_methods = SKIP unless hash.key?('InvoiceDistributionMethods')
1176
+ output_type = hash.key?('OutputType') ? hash['OutputType'] : SKIP
1177
+ invoice_account_id =
1178
+ hash.key?('InvoiceAccountID') ? hash['InvoiceAccountID'] : SKIP
1179
+ invoice_account_number =
1180
+ hash.key?('InvoiceAccountNumber') ? hash['InvoiceAccountNumber'] : SKIP
1181
+ invoice_account_short_name =
1182
+ hash.key?('InvoiceAccountShortName') ? hash['InvoiceAccountShortName'] : SKIP
1183
+ best_of_indicator = hash['BestOfIndicator'] ||= false
1184
+ is_international = hash['IsInternational'] ||= false
1185
+ total_accounts = hash.key?('TotalAccounts') ? hash['TotalAccounts'] : SKIP
1186
+ total_active_accounts =
1187
+ hash.key?('TotalActiveAccounts') ? hash['TotalActiveAccounts'] : SKIP
1188
+ total_cards = hash.key?('TotalCards') ? hash['TotalCards'] : SKIP
1189
+ total_active_cards =
1190
+ hash.key?('TotalActiveCards') ? hash['TotalActiveCards'] : SKIP
1191
+ total_blocked_cards =
1192
+ hash.key?('TotalBlockedCards') ? hash['TotalBlockedCards'] : SKIP
1193
+ total_cancelled_cards =
1194
+ hash.key?('TotalCancelledCards') ? hash['TotalCancelledCards'] : SKIP
1195
+ total_expired_cards =
1196
+ hash.key?('TotalExpiredCards') ? hash['TotalExpiredCards'] : SKIP
1197
+ total_renewal_pending_cards =
1198
+ hash.key?('TotalRenewalPendingCards') ? hash['TotalRenewalPendingCards'] : SKIP
1199
+ total_replaced_cards =
1200
+ hash.key?('TotalReplacedCards') ? hash['TotalReplacedCards'] : SKIP
1201
+ total_temporary_block_cards_by_customer =
1202
+ hash.key?('TotalTemporaryBlockCardsByCustomer') ? hash['TotalTemporaryBlockCardsByCustomer'] : SKIP
1203
+ total_temporary_block_cards_by_shell =
1204
+ hash.key?('TotalTemporaryBlockCardsByShell') ? hash['TotalTemporaryBlockCardsByShell'] : SKIP
1205
+ total_new_cards =
1206
+ hash.key?('TotalNewCards') ? hash['TotalNewCards'] : SKIP
1207
+ total_fraud_cards =
1208
+ hash.key?('TotalFraudCards') ? hash['TotalFraudCards'] : SKIP
1209
+ total_blocked_accounts =
1210
+ hash.key?('TotalBlockedAccounts') ? hash['TotalBlockedAccounts'] : SKIP
1211
+ total_cancelled_accounts =
1212
+ hash.key?('TotalCancelledAccounts') ? hash['TotalCancelledAccounts'] : SKIP
1213
+ payer_trading_name =
1214
+ hash.key?('PayerTradingName') ? hash['PayerTradingName'] : SKIP
1215
+ status = hash.key?('Status') ? hash['Status'] : SKIP
1216
+ billing_language =
1217
+ hash.key?('BillingLanguage') ? hash['BillingLanguage'] : SKIP
1218
+ legal_entity = hash.key?('LegalEntity') ? hash['LegalEntity'] : SKIP
1219
+ date_established =
1220
+ hash.key?('DateEstablished') ? hash['DateEstablished'] : SKIP
1221
+ customer_classification =
1222
+ hash.key?('CustomerClassification') ? hash['CustomerClassification'] : SKIP
1223
+ industry_class = hash.key?('IndustryClass') ? hash['IndustryClass'] : SKIP
1224
+ marketing_segmentation =
1225
+ hash.key?('MarketingSegmentation') ? hash['MarketingSegmentation'] : SKIP
1226
+ line_of_business =
1227
+ hash.key?('LineOfBusiness') ? hash['LineOfBusiness'] : SKIP
1228
+ print_credit_limit = hash['PrintCreditLimit'] ||= false
1229
+ card_group_type =
1230
+ hash.key?('CardGroupType') ? hash['CardGroupType'] : SKIP
1231
+ renew_cards = hash['RenewCards'] ||= false
1232
+ allow_select_pin = hash['AllowSelectPIN'] ||= false
1233
+ use_fleet_pin = hash.key?('UseFleetPIN') ? hash['UseFleetPIN'] : SKIP
1234
+ vat_reg_number = hash.key?('VATRegNumber') ? hash['VATRegNumber'] : SKIP
1235
+ vat_reg_number2 =
1236
+ hash.key?('VATRegNumber2') ? hash['VATRegNumber2'] : SKIP
1237
+ registration_number =
1238
+ hash.key?('RegistrationNumber') ? hash['RegistrationNumber'] : SKIP
1239
+ registration_number2 =
1240
+ hash.key?('RegistrationNumber2') ? hash['RegistrationNumber2'] : SKIP
1241
+ sales_ledger_balance =
1242
+ hash.key?('SalesLedgerBalance') ? hash['SalesLedgerBalance'] : SKIP
1243
+ exposure = hash.key?('Exposure') ? hash['Exposure'] : SKIP
1244
+ outstanding_debt =
1245
+ hash.key?('OutstandingDebt') ? hash['OutstandingDebt'] : SKIP
1246
+ available_credit =
1247
+ hash.key?('AvailableCredit') ? hash['AvailableCredit'] : SKIP
1248
+ band = hash.key?('Band') ? hash['Band'] : SKIP
1249
+ global_customer_reference_id =
1250
+ hash.key?('GlobalCustomerReferenceId') ? hash['GlobalCustomerReferenceId'] : SKIP
1251
+ credit_limit = hash.key?('CreditLimit') ? hash['CreditLimit'] : SKIP
1252
+ credit_limit_in_customer_currency =
1253
+ hash.key?('CreditLimitInCustomerCurrency') ? hash['CreditLimitInCustomerCurrency'] : SKIP
1254
+ billing_currency_code =
1255
+ hash.key?('BillingCurrencyCode') ? hash['BillingCurrencyCode'] : SKIP
1256
+ billing_currency_symbol =
1257
+ hash.key?('BillingCurrencySymbol') ? hash['BillingCurrencySymbol'] : SKIP
1258
+ payment_method = hash.key?('PaymentMethod') ? hash['PaymentMethod'] : SKIP
1259
+ payment_terms = hash.key?('PaymentTerms') ? hash['PaymentTerms'] : SKIP
1260
+ temporary_credit_limit_increase =
1261
+ hash.key?('TemporaryCreditLimitIncrease') ? hash['TemporaryCreditLimitIncrease'] : SKIP
1262
+ temporary_credit_limit_increase_in_customer_currency =
1263
+ hash.key?('TemporaryCreditLimitIncreaseInCustomerCurrency') ? hash['TemporaryCreditLimitIncreaseInCustomerCurrency'] : SKIP
1264
+ temporary_credit_limit_expiry_date =
1265
+ hash.key?('TemporaryCreditLimitExpiryDate') ? hash['TemporaryCreditLimitExpiryDate'] : SKIP
1266
+ # Parameter is an array, so we need to iterate through it
1267
+ payer_bank_account = nil
1268
+ unless hash['PayerBankAccount'].nil?
1269
+ payer_bank_account = []
1270
+ hash['PayerBankAccount'].each do |structure|
1271
+ payer_bank_account << (BankAccount.from_hash(structure) if structure)
1272
+ end
1273
+ end
1274
+
1275
+ payer_bank_account = SKIP unless hash.key?('PayerBankAccount')
1276
+ card_delivery_address = Address.from_hash(hash['CardDeliveryAddress']) if
1277
+ hash['CardDeliveryAddress']
1278
+ correspondance_address = Address.from_hash(hash['CorrespondanceAddress']) if
1279
+ hash['CorrespondanceAddress']
1280
+ billing_address = Address.from_hash(hash['BillingAddress']) if hash['BillingAddress']
1281
+ has_active_vol_based_pricing =
1282
+ hash.key?('HasActiveVolBasedPricing') ? hash['HasActiveVolBasedPricing'] : SKIP
1283
+ has_active_vol_based_bonus =
1284
+ hash.key?('HasActiveVolBasedBonus') ? hash['HasActiveVolBasedBonus'] : SKIP
1285
+ has_active_vol_based_association_bonus =
1286
+ hash.key?('HasActiveVolBasedAssociationBonus') ? hash['HasActiveVolBasedAssociationBonus'] : SKIP
1287
+ finance_currency = FinanceCurrency.from_hash(hash['FinanceCurrency']) if
1288
+ hash['FinanceCurrency']
1289
+ tolls_customer_id =
1290
+ hash.key?('TollsCustomerId') ? hash['TollsCustomerId'] : SKIP
1291
+ tolls_colco_country_type_id =
1292
+ hash.key?('TollsColcoCountryTypeId') ? hash['TollsColcoCountryTypeId'] : SKIP
1293
+ # Parameter is an array, so we need to iterate through it
1294
+ contracts = nil
1295
+ unless hash['Contracts'].nil?
1296
+ contracts = []
1297
+ hash['Contracts'].each do |structure|
1298
+ contracts << (CustomerContract.from_hash(structure) if structure)
1299
+ end
1300
+ end
1301
+
1302
+ contracts = SKIP unless hash.key?('Contracts')
1303
+
1304
+ # Create object from extracted values.
1305
+ PayerDetails.new(col_co_id,
1306
+ col_co_code,
1307
+ country_code,
1308
+ country,
1309
+ payer_id,
1310
+ payer_number,
1311
+ payer_full_name,
1312
+ payer_short_name,
1313
+ payer_group_id,
1314
+ amount_due,
1315
+ amount_overdue,
1316
+ amount_not_overdue,
1317
+ outstanding_balance,
1318
+ unallocated_payment,
1319
+ soa_currency_code,
1320
+ soa_currency_symbol,
1321
+ soa_credit_limit_currency_code,
1322
+ soa_credit_limit_currency_symbol,
1323
+ last_payment_currency_code,
1324
+ last_payment_currency_symbol,
1325
+ last_payment_amount,
1326
+ last_payment_date,
1327
+ soa_last_payment_amount,
1328
+ soa_last_payment_date,
1329
+ currency_code,
1330
+ currency_symbol,
1331
+ col_co_country_code,
1332
+ local_currency_code,
1333
+ local_currency_symbol,
1334
+ local_currency_exchange_rate,
1335
+ local_currency_exchange_rate_so_a,
1336
+ billing_frequency_type_id,
1337
+ billing_frequency_type,
1338
+ billing_run_frequency_type_id,
1339
+ billing_run_frequnecy,
1340
+ day1_run,
1341
+ day2_run,
1342
+ day3_run,
1343
+ day4_run,
1344
+ invoice_distribution_methods,
1345
+ output_type,
1346
+ invoice_account_id,
1347
+ invoice_account_number,
1348
+ invoice_account_short_name,
1349
+ best_of_indicator,
1350
+ is_international,
1351
+ total_accounts,
1352
+ total_active_accounts,
1353
+ total_cards,
1354
+ total_active_cards,
1355
+ total_blocked_cards,
1356
+ total_cancelled_cards,
1357
+ total_expired_cards,
1358
+ total_renewal_pending_cards,
1359
+ total_replaced_cards,
1360
+ total_temporary_block_cards_by_customer,
1361
+ total_temporary_block_cards_by_shell,
1362
+ total_new_cards,
1363
+ total_fraud_cards,
1364
+ total_blocked_accounts,
1365
+ total_cancelled_accounts,
1366
+ payer_trading_name,
1367
+ status,
1368
+ billing_language,
1369
+ legal_entity,
1370
+ date_established,
1371
+ customer_classification,
1372
+ industry_class,
1373
+ marketing_segmentation,
1374
+ line_of_business,
1375
+ print_credit_limit,
1376
+ card_group_type,
1377
+ renew_cards,
1378
+ allow_select_pin,
1379
+ use_fleet_pin,
1380
+ vat_reg_number,
1381
+ vat_reg_number2,
1382
+ registration_number,
1383
+ registration_number2,
1384
+ sales_ledger_balance,
1385
+ exposure,
1386
+ outstanding_debt,
1387
+ available_credit,
1388
+ band,
1389
+ global_customer_reference_id,
1390
+ credit_limit,
1391
+ credit_limit_in_customer_currency,
1392
+ billing_currency_code,
1393
+ billing_currency_symbol,
1394
+ payment_method,
1395
+ payment_terms,
1396
+ temporary_credit_limit_increase,
1397
+ temporary_credit_limit_increase_in_customer_currency,
1398
+ temporary_credit_limit_expiry_date,
1399
+ payer_bank_account,
1400
+ card_delivery_address,
1401
+ correspondance_address,
1402
+ billing_address,
1403
+ has_active_vol_based_pricing,
1404
+ has_active_vol_based_bonus,
1405
+ has_active_vol_based_association_bonus,
1406
+ finance_currency,
1407
+ tolls_customer_id,
1408
+ tolls_colco_country_type_id,
1409
+ contracts)
1410
+ end
1411
+ end
1412
+ end