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,1267 @@
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
+ # TransactionExceptions Model.
8
+ class TransactionExceptions < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Unique Sales Item Identifier
13
+ # @return [Float]
14
+ attr_accessor :sales_item_id
15
+
16
+ # Unique Card Identifier
17
+ # @return [Integer]
18
+ attr_accessor :card_id
19
+
20
+ # Product Id
21
+ # @return [Integer]
22
+ attr_accessor :product_id
23
+
24
+ # Transaction Unique Identifier
25
+ # @return [String]
26
+ attr_accessor :transaction_guid
27
+
28
+ # Local Transaction Date of where the transaction took place
29
+ # Format: yyyyMMdd
30
+ # @return [String]
31
+ attr_accessor :transaction_date
32
+
33
+ # Total Gross Amount for the Invoice Customer
34
+ # @return [Float]
35
+ attr_accessor :customer_invoice_value_total_gross
36
+
37
+ # Card PAN number
38
+ # Returns masked PAN number when masking is enabled at the Microservices
39
+ # configuration (Mask all digits except the last 6 digits of the PAN)
40
+ # @return [String]
41
+ attr_accessor :card_pan
42
+
43
+ # Card Expiry Date
44
+ # Format: yyyyMMdd
45
+ # @return [String]
46
+ attr_accessor :card_expiry
47
+
48
+ # Local Transaction Time of where the transaction took place
49
+ # Format: HH:mm:ss (24 hours format)
50
+ # @return [String]
51
+ attr_accessor :transaction_time
52
+
53
+ # UTC Offset extracted from GFN Sales Date time. Note: This may not be
54
+ # accurate for all TPN transactions
55
+ # Format: +/-HH:mm:ss (24 hours format)
56
+ # @return [String]
57
+ attr_accessor :utc_offset
58
+
59
+ # Fleet Id Input as entered by the drivers at the time of transaction
60
+ # @return [String]
61
+ attr_accessor :fleet_id_input
62
+
63
+ # Odometer Input as entered by the drivers at the time of transaction
64
+ # @return [Integer]
65
+ attr_accessor :odometer_input
66
+
67
+ # Driver Name embossed on the card
68
+ # @return [String]
69
+ attr_accessor :driver_name
70
+
71
+ # Vehicle Registration Number embossed on the card
72
+ # @return [String]
73
+ attr_accessor :vehicle_registration
74
+
75
+ # ISO currency code (Example: GBP)
76
+ # @return [String]
77
+ attr_accessor :invoice_currency_code
78
+
79
+ # Currency symbol of the Invoice Currency Code (i.e. £, $, etc.,)
80
+ # @return [String]
81
+ attr_accessor :invoice_currency_symbol
82
+
83
+ # ISO currency code
84
+ # @return [String]
85
+ attr_accessor :transaction_currency_code
86
+
87
+ # Currency symbol of the Transaction Currency Code (i.e. £, $, etc.,)
88
+ # @return [String]
89
+ attr_accessor :transaction_currency_symbol
90
+
91
+ # Net Amount
92
+ # @return [Float]
93
+ attr_accessor :transaction_net_amount
94
+
95
+ # Tax Amount
96
+ # @return [Float]
97
+ attr_accessor :transaction_tax
98
+
99
+ # Gross Amount
100
+ # @return [Float]
101
+ attr_accessor :transaction_gross_amount
102
+
103
+ # Invoiced Net Amount
104
+ # @return [Float]
105
+ attr_accessor :invoice_net_amount
106
+
107
+ # Invoiced Tax Amount
108
+ # @return [Float]
109
+ attr_accessor :invoice_tax
110
+
111
+ # Invoice Gross Amount
112
+ # @return [Float]
113
+ attr_accessor :invoice_gross_amount
114
+
115
+ # Country of Purchase (Ex: France, Germany, etc.,)
116
+ # @return [String]
117
+ attr_accessor :purchased_in_country
118
+
119
+ # Account Id
120
+ # @return [Integer]
121
+ attr_accessor :account_id
122
+
123
+ # Account Number
124
+ # @return [String]
125
+ attr_accessor :account_number
126
+
127
+ # Account Name
128
+ # @return [String]
129
+ attr_accessor :account_name
130
+
131
+ # Account Short Name
132
+ # @return [String]
133
+ attr_accessor :account_short_name
134
+
135
+ # Quantity/Volume
136
+ # @return [Float]
137
+ attr_accessor :quantity
138
+
139
+ # True if the product on transaction is listed as a fuel product else return
140
+ # false
141
+ # @return [TrueClass | FalseClass]
142
+ attr_accessor :fuel_product
143
+
144
+ # Product Unit Price in transaction currency
145
+ # @return [Float]
146
+ attr_accessor :unit_price_in_transaction_currency
147
+
148
+ # Product Unit Price in invoice currency
149
+ # @return [Float]
150
+ attr_accessor :unit_price_in_invoice_currency
151
+
152
+ # Unit Discount in transaction currency
153
+ # @return [Float]
154
+ attr_accessor :unit_discount_transaction_currency
155
+
156
+ # Unit Discount in invoice currency
157
+ # @return [Float]
158
+ attr_accessor :unit_discount_invoice_currency
159
+
160
+ # True when the transaction is already invoice, else return False
161
+ # @return [TrueClass | FalseClass]
162
+ attr_accessor :is_invoiced
163
+
164
+ # Invoice Number if invoiced
165
+ # @return [String]
166
+ attr_accessor :invoice_number
167
+
168
+ # Invoice Date
169
+ # Format: yyyyMMdd HH:mm:ss
170
+ # @return [String]
171
+ attr_accessor :invoice_date
172
+
173
+ # Site Code
174
+ # @return [String]
175
+ attr_accessor :site_code
176
+
177
+ # Site Name
178
+ # @return [String]
179
+ attr_accessor :site_name
180
+
181
+ # Site Country
182
+ # @return [String]
183
+ attr_accessor :site_country
184
+
185
+ # Geography Location entity for Site Location
186
+ # @return [ExceptionSiteLocation]
187
+ attr_accessor :location
188
+
189
+ # Card Group Name
190
+ # @return [String]
191
+ attr_accessor :card_group_name
192
+
193
+ # Receipt Number
194
+ # @return [String]
195
+ attr_accessor :receipt_number
196
+
197
+ # Product Code
198
+ # @return [String]
199
+ attr_accessor :product_code
200
+
201
+ # Product Name
202
+ # @return [String]
203
+ attr_accessor :product_name
204
+
205
+ # Product Group Id
206
+ # @return [Integer]
207
+ attr_accessor :product_group_id
208
+
209
+ # Product Group Name
210
+ # @return [String]
211
+ attr_accessor :product_group_name
212
+
213
+ # DelCo Exchange Rate (Site exchange rate)
214
+ # @return [Float]
215
+ attr_accessor :del_co_exchange_rate
216
+
217
+ # ColCo Exchange Rate (Customer exchange rate)
218
+ # @return [Float]
219
+ attr_accessor :col_co_exchange_rate
220
+
221
+ # True when transaction occurred at a Shell site else return False
222
+ # @return [TrueClass | FalseClass]
223
+ attr_accessor :is_shell_site
224
+
225
+ # Network as configured
226
+ # @return [String]
227
+ attr_accessor :network
228
+
229
+ # Site Group Id
230
+ # @return [Integer]
231
+ attr_accessor :site_group_id
232
+
233
+ # Site GroupName
234
+ # @return [String]
235
+ attr_accessor :site_group_name
236
+
237
+ # Site GroupName
238
+ # @return [String]
239
+ attr_accessor :posting_date
240
+
241
+ # First digits of the Card PAN
242
+ # 7002 = Fleet
243
+ # 7077 = CRT
244
+ # @return [String]
245
+ attr_accessor :issuer_code
246
+
247
+ # ISO code of the country where the transaction took place
248
+ # @return [String]
249
+ attr_accessor :purchased_in_country_code
250
+
251
+ # ISO code of the Customer Country
252
+ # @return [String]
253
+ attr_accessor :customer_country_code
254
+
255
+ # Name of the Customer Country
256
+ # @return [String]
257
+ attr_accessor :customer_country
258
+
259
+ # Release code, 7th Digit of the Card PAN
260
+ # @return [String]
261
+ attr_accessor :release_code
262
+
263
+ # Card group ID
264
+ # @return [String]
265
+ attr_accessor :card_group_id
266
+
267
+ # 3 digits, Card sequence number and Check digit (Digit 16,17 and 18 on the
268
+ # card pan)
269
+ # @return [String]
270
+ attr_accessor :card_sequence_number
271
+
272
+ # Check digit, Last number of the card pan
273
+ # @return [String]
274
+ attr_accessor :check_digit
275
+
276
+ # FleetId/CRN description in Card Platform configured at the account level
277
+ # @return [String]
278
+ attr_accessor :fleet_id_description
279
+
280
+ # VAT Percentage
281
+ # @return [Float]
282
+ attr_accessor :vat_rate
283
+
284
+ # VAT Category Id-Description
285
+ # 1-Zero Rated
286
+ # 2-A1 PH-O 12% Sales Domestic
287
+ # 3-VAT exempt
288
+ # @return [String]
289
+ attr_accessor :vat_category
290
+
291
+ # Effective Discount (excluding VAT, in transaction currency) 4 digits
292
+ # @return [String]
293
+ attr_accessor :effective_discount_in_trx_currency
294
+
295
+ # Transaction Type
296
+ # @return [String]
297
+ attr_accessor :transaction_type
298
+
299
+ # Pin Indicator (Indicates whether PIN used or not used at the time of
300
+ # transaction)
301
+ # @return [String]
302
+ attr_accessor :pin_indicator
303
+
304
+ # Is VAT Applicable for this transaction
305
+ # “Y” or “N”
306
+ # @return [String]
307
+ attr_accessor :vat_applicable
308
+
309
+ # Net Invoice Indicator, Will the customer receive an invoice without VAT?
310
+ # Example: “Y” or “N”
311
+ # @return [String]
312
+ attr_accessor :net_invoice_indicator
313
+
314
+ # Customer currency code
315
+ # @return [String]
316
+ attr_accessor :customer_currency_code
317
+
318
+ # Customer currency Symbol
319
+ # @return [String]
320
+ attr_accessor :customer_currency_symbol
321
+
322
+ # Effective Unit Discount
323
+ # @return [Float]
324
+ attr_accessor :effective_unit_discount_in_customer_currency
325
+
326
+ # Effective Discount
327
+ # @return [Float]
328
+ attr_accessor :effective_discount_in_customer_currency
329
+
330
+ # VAT on Net Amount
331
+ # @return [Float]
332
+ attr_accessor :va_ton_net_amount_in_customer_currency
333
+
334
+ # Discount Type
335
+ # Example: 1-None
336
+ # 2-Pence per unit
337
+ # 3-Percentage
338
+ # @return [String]
339
+ attr_accessor :discount_type
340
+
341
+ # Transaction status "U" or "I"
342
+ # “U” stands for Uninvoiced
343
+ # “I” stands for Invoiced
344
+ # @return [String]
345
+ attr_accessor :transaction_status
346
+
347
+ # Payer Group applicable for the Large Customer NL+8 digit code
348
+ # @return [String]
349
+ attr_accessor :payer_group
350
+
351
+ # Refund Flag “N” for Not Refunded and “Y” for Refunded.
352
+ # @return [String]
353
+ attr_accessor :refund_flag
354
+
355
+ # Shows Sales Item Id of the original item that was refunded
356
+ # @return [Float]
357
+ attr_accessor :original_sales_item_id
358
+
359
+ # Delco Name
360
+ # @return [String]
361
+ attr_accessor :delco_name
362
+
363
+ # Delco Code
364
+ # @return [String]
365
+ attr_accessor :delco_code
366
+
367
+ # Payer number
368
+ # @return [String]
369
+ attr_accessor :payer_number
370
+
371
+ # Payer name
372
+ # @return [String]
373
+ attr_accessor :payer_name
374
+
375
+ # Year/Month of the Card Expiry captured on the transaction
376
+ # @return [String]
377
+ attr_accessor :card_expiry_period
378
+
379
+ # Authorisation code of the transaction
380
+ # @return [String]
381
+ attr_accessor :authorisation_code
382
+
383
+ # Unique id of the transaction that may include one or more salesitems
384
+ # @return [String]
385
+ attr_accessor :transaction_id
386
+
387
+ # Transaction line item number
388
+ # @return [String]
389
+ attr_accessor :transaction_line
390
+
391
+ # Is the Sales Item allowed for clearing? i.e. not written off
392
+ # Example: “Y” or “N”
393
+ # @return [String]
394
+ attr_accessor :allow_clearing
395
+
396
+ # CRM Case number if the sales item is in dispute
397
+ # @return [String]
398
+ attr_accessor :crm_number
399
+
400
+ # Sales Item Dispute Status if disputed
401
+ # 0 No Dispute
402
+ # 1 In Dispute
403
+ # 2 Re-Instated
404
+ # 3 Adjusted
405
+ # 4 Written Off by Colco
406
+ # 5 Written Off by Delco
407
+ # 6 Charged Back to Site
408
+ # @return [String]
409
+ attr_accessor :dispute_status
410
+
411
+ # Unit discount in customer currency
412
+ # @return [Float]
413
+ attr_accessor :rebate_rate
414
+
415
+ # Exchange rate from transaction currency to customer currency.
416
+ # @return [Float]
417
+ attr_accessor :del_co_to_col_co_exchange_rate
418
+
419
+ # Net euro amount.
420
+ # @return [Float]
421
+ attr_accessor :net_euro_amount
422
+
423
+ # Euro rebate amount.
424
+ # @return [Float]
425
+ attr_accessor :euro_rebate_amount
426
+
427
+ # Euro VAT amount.
428
+ # @return [Float]
429
+ attr_accessor :euro_vat_amount
430
+
431
+ # Parent customer number
432
+ # @return [String]
433
+ attr_accessor :parent_customer_number
434
+
435
+ # VAT on Net Amount (in transaction currency) 2 decimals
436
+ # @return [Float]
437
+ attr_accessor :va_ton_net_amount
438
+
439
+ # VAT Country
440
+ # @return [String]
441
+ attr_accessor :vat_country
442
+
443
+ # A mapping from model property names to API property names.
444
+ def self.names
445
+ @_hash = {} if @_hash.nil?
446
+ @_hash['sales_item_id'] = 'SalesItemId'
447
+ @_hash['card_id'] = 'CardId'
448
+ @_hash['product_id'] = 'ProductId'
449
+ @_hash['transaction_guid'] = 'TransactionGUID'
450
+ @_hash['transaction_date'] = 'TransactionDate'
451
+ @_hash['customer_invoice_value_total_gross'] =
452
+ 'CustomerInvoiceValueTotalGross'
453
+ @_hash['card_pan'] = 'CardPAN'
454
+ @_hash['card_expiry'] = 'CardExpiry'
455
+ @_hash['transaction_time'] = 'TransactionTime'
456
+ @_hash['utc_offset'] = 'UTCOffset'
457
+ @_hash['fleet_id_input'] = 'FleetIdInput'
458
+ @_hash['odometer_input'] = 'OdometerInput'
459
+ @_hash['driver_name'] = 'DriverName'
460
+ @_hash['vehicle_registration'] = 'VehicleRegistration'
461
+ @_hash['invoice_currency_code'] = 'InvoiceCurrencyCode'
462
+ @_hash['invoice_currency_symbol'] = 'InvoiceCurrencySymbol'
463
+ @_hash['transaction_currency_code'] = 'TransactionCurrencyCode'
464
+ @_hash['transaction_currency_symbol'] = 'TransactionCurrencySymbol'
465
+ @_hash['transaction_net_amount'] = 'TransactionNetAmount'
466
+ @_hash['transaction_tax'] = 'TransactionTax'
467
+ @_hash['transaction_gross_amount'] = 'TransactionGrossAmount'
468
+ @_hash['invoice_net_amount'] = 'InvoiceNetAmount'
469
+ @_hash['invoice_tax'] = 'InvoiceTax'
470
+ @_hash['invoice_gross_amount'] = 'InvoiceGrossAmount'
471
+ @_hash['purchased_in_country'] = 'PurchasedInCountry'
472
+ @_hash['account_id'] = 'AccountId'
473
+ @_hash['account_number'] = 'AccountNumber'
474
+ @_hash['account_name'] = 'AccountName'
475
+ @_hash['account_short_name'] = 'AccountShortName'
476
+ @_hash['quantity'] = 'Quantity'
477
+ @_hash['fuel_product'] = 'FuelProduct'
478
+ @_hash['unit_price_in_transaction_currency'] =
479
+ 'UnitPriceInTransactionCurrency'
480
+ @_hash['unit_price_in_invoice_currency'] = 'UnitPriceInInvoiceCurrency'
481
+ @_hash['unit_discount_transaction_currency'] =
482
+ 'UnitDiscountTransactionCurrency'
483
+ @_hash['unit_discount_invoice_currency'] = 'UnitDiscountInvoiceCurrency'
484
+ @_hash['is_invoiced'] = 'IsInvoiced'
485
+ @_hash['invoice_number'] = 'InvoiceNumber'
486
+ @_hash['invoice_date'] = 'InvoiceDate'
487
+ @_hash['site_code'] = 'SiteCode'
488
+ @_hash['site_name'] = 'SiteName'
489
+ @_hash['site_country'] = 'SiteCountry'
490
+ @_hash['location'] = 'Location'
491
+ @_hash['card_group_name'] = 'CardGroupName'
492
+ @_hash['receipt_number'] = 'ReceiptNumber'
493
+ @_hash['product_code'] = 'ProductCode'
494
+ @_hash['product_name'] = 'ProductName'
495
+ @_hash['product_group_id'] = 'ProductGroupId'
496
+ @_hash['product_group_name'] = 'ProductGroupName'
497
+ @_hash['del_co_exchange_rate'] = 'DelCoExchangeRate'
498
+ @_hash['col_co_exchange_rate'] = 'ColCoExchangeRate'
499
+ @_hash['is_shell_site'] = 'IsShellSite'
500
+ @_hash['network'] = 'Network'
501
+ @_hash['site_group_id'] = 'SiteGroupId'
502
+ @_hash['site_group_name'] = 'SiteGroupName'
503
+ @_hash['posting_date'] = 'PostingDate'
504
+ @_hash['issuer_code'] = 'IssuerCode'
505
+ @_hash['purchased_in_country_code'] = 'PurchasedInCountryCode'
506
+ @_hash['customer_country_code'] = 'CustomerCountryCode'
507
+ @_hash['customer_country'] = 'CustomerCountry'
508
+ @_hash['release_code'] = 'ReleaseCode'
509
+ @_hash['card_group_id'] = 'CardGroupId'
510
+ @_hash['card_sequence_number'] = 'CardSequenceNumber'
511
+ @_hash['check_digit'] = 'CheckDigit'
512
+ @_hash['fleet_id_description'] = 'FleetIDDescription'
513
+ @_hash['vat_rate'] = 'VATRate'
514
+ @_hash['vat_category'] = 'VATCategory'
515
+ @_hash['effective_discount_in_trx_currency'] =
516
+ 'EffectiveDiscountInTrxCurrency'
517
+ @_hash['transaction_type'] = 'TransactionType'
518
+ @_hash['pin_indicator'] = 'PINIndicator'
519
+ @_hash['vat_applicable'] = 'VATApplicable'
520
+ @_hash['net_invoice_indicator'] = 'NetInvoiceIndicator'
521
+ @_hash['customer_currency_code'] = 'CustomerCurrencyCode'
522
+ @_hash['customer_currency_symbol'] = 'CustomerCurrencySymbol'
523
+ @_hash['effective_unit_discount_in_customer_currency'] =
524
+ 'EffectiveUnitDiscountInCustomerCurrency'
525
+ @_hash['effective_discount_in_customer_currency'] =
526
+ 'EffectiveDiscountInCustomerCurrency'
527
+ @_hash['va_ton_net_amount_in_customer_currency'] =
528
+ 'VATonNetAmountInCustomerCurrency'
529
+ @_hash['discount_type'] = 'DiscountType'
530
+ @_hash['transaction_status'] = 'TransactionStatus'
531
+ @_hash['payer_group'] = 'PayerGroup'
532
+ @_hash['refund_flag'] = 'RefundFlag'
533
+ @_hash['original_sales_item_id'] = 'OriginalSalesItemId'
534
+ @_hash['delco_name'] = 'DelcoName'
535
+ @_hash['delco_code'] = 'DelcoCode'
536
+ @_hash['payer_number'] = 'PayerNumber'
537
+ @_hash['payer_name'] = 'PayerName'
538
+ @_hash['card_expiry_period'] = 'CardExpiryPeriod'
539
+ @_hash['authorisation_code'] = 'AuthorisationCode'
540
+ @_hash['transaction_id'] = 'TransactionId'
541
+ @_hash['transaction_line'] = 'TransactionLine'
542
+ @_hash['allow_clearing'] = 'AllowClearing'
543
+ @_hash['crm_number'] = 'CRMNumber'
544
+ @_hash['dispute_status'] = 'DisputeStatus'
545
+ @_hash['rebate_rate'] = 'RebateRate'
546
+ @_hash['del_co_to_col_co_exchange_rate'] = 'DelCoToColCoExchangeRate'
547
+ @_hash['net_euro_amount'] = 'NetEuroAmount'
548
+ @_hash['euro_rebate_amount'] = 'EuroRebateAmount'
549
+ @_hash['euro_vat_amount'] = 'EuroVATAmount'
550
+ @_hash['parent_customer_number'] = 'ParentCustomerNumber'
551
+ @_hash['va_ton_net_amount'] = 'VATonNetAmount'
552
+ @_hash['vat_country'] = 'VATCountry'
553
+ @_hash
554
+ end
555
+
556
+ # An array for optional fields
557
+ def self.optionals
558
+ %w[
559
+ sales_item_id
560
+ card_id
561
+ product_id
562
+ transaction_guid
563
+ transaction_date
564
+ customer_invoice_value_total_gross
565
+ card_pan
566
+ card_expiry
567
+ transaction_time
568
+ utc_offset
569
+ fleet_id_input
570
+ odometer_input
571
+ driver_name
572
+ vehicle_registration
573
+ invoice_currency_code
574
+ invoice_currency_symbol
575
+ transaction_currency_code
576
+ transaction_currency_symbol
577
+ transaction_net_amount
578
+ transaction_tax
579
+ transaction_gross_amount
580
+ invoice_net_amount
581
+ invoice_tax
582
+ invoice_gross_amount
583
+ purchased_in_country
584
+ account_id
585
+ account_number
586
+ account_name
587
+ account_short_name
588
+ quantity
589
+ fuel_product
590
+ unit_price_in_transaction_currency
591
+ unit_price_in_invoice_currency
592
+ unit_discount_transaction_currency
593
+ unit_discount_invoice_currency
594
+ is_invoiced
595
+ invoice_number
596
+ invoice_date
597
+ site_code
598
+ site_name
599
+ site_country
600
+ location
601
+ card_group_name
602
+ receipt_number
603
+ product_code
604
+ product_name
605
+ product_group_id
606
+ product_group_name
607
+ del_co_exchange_rate
608
+ col_co_exchange_rate
609
+ is_shell_site
610
+ network
611
+ site_group_id
612
+ site_group_name
613
+ posting_date
614
+ issuer_code
615
+ purchased_in_country_code
616
+ customer_country_code
617
+ customer_country
618
+ release_code
619
+ card_group_id
620
+ card_sequence_number
621
+ check_digit
622
+ fleet_id_description
623
+ vat_rate
624
+ vat_category
625
+ effective_discount_in_trx_currency
626
+ transaction_type
627
+ pin_indicator
628
+ vat_applicable
629
+ net_invoice_indicator
630
+ customer_currency_code
631
+ customer_currency_symbol
632
+ effective_unit_discount_in_customer_currency
633
+ effective_discount_in_customer_currency
634
+ va_ton_net_amount_in_customer_currency
635
+ discount_type
636
+ transaction_status
637
+ payer_group
638
+ refund_flag
639
+ original_sales_item_id
640
+ delco_name
641
+ delco_code
642
+ payer_number
643
+ payer_name
644
+ card_expiry_period
645
+ authorisation_code
646
+ transaction_id
647
+ transaction_line
648
+ allow_clearing
649
+ crm_number
650
+ dispute_status
651
+ rebate_rate
652
+ del_co_to_col_co_exchange_rate
653
+ net_euro_amount
654
+ euro_rebate_amount
655
+ euro_vat_amount
656
+ parent_customer_number
657
+ va_ton_net_amount
658
+ vat_country
659
+ ]
660
+ end
661
+
662
+ # An array for nullable fields
663
+ def self.nullables
664
+ %w[
665
+ sales_item_id
666
+ card_id
667
+ product_id
668
+ transaction_guid
669
+ transaction_date
670
+ customer_invoice_value_total_gross
671
+ card_pan
672
+ card_expiry
673
+ transaction_time
674
+ utc_offset
675
+ fleet_id_input
676
+ odometer_input
677
+ driver_name
678
+ vehicle_registration
679
+ invoice_currency_code
680
+ invoice_currency_symbol
681
+ transaction_currency_code
682
+ transaction_currency_symbol
683
+ transaction_net_amount
684
+ transaction_tax
685
+ transaction_gross_amount
686
+ invoice_net_amount
687
+ invoice_tax
688
+ invoice_gross_amount
689
+ purchased_in_country
690
+ account_id
691
+ account_number
692
+ account_name
693
+ account_short_name
694
+ quantity
695
+ fuel_product
696
+ unit_price_in_transaction_currency
697
+ unit_price_in_invoice_currency
698
+ unit_discount_transaction_currency
699
+ unit_discount_invoice_currency
700
+ is_invoiced
701
+ invoice_number
702
+ invoice_date
703
+ site_code
704
+ site_name
705
+ site_country
706
+ card_group_name
707
+ receipt_number
708
+ product_code
709
+ product_name
710
+ product_group_id
711
+ product_group_name
712
+ del_co_exchange_rate
713
+ col_co_exchange_rate
714
+ is_shell_site
715
+ network
716
+ site_group_id
717
+ site_group_name
718
+ posting_date
719
+ issuer_code
720
+ purchased_in_country_code
721
+ customer_country_code
722
+ customer_country
723
+ release_code
724
+ card_group_id
725
+ card_sequence_number
726
+ check_digit
727
+ fleet_id_description
728
+ vat_rate
729
+ vat_category
730
+ effective_discount_in_trx_currency
731
+ transaction_type
732
+ pin_indicator
733
+ vat_applicable
734
+ net_invoice_indicator
735
+ customer_currency_code
736
+ customer_currency_symbol
737
+ effective_unit_discount_in_customer_currency
738
+ effective_discount_in_customer_currency
739
+ va_ton_net_amount_in_customer_currency
740
+ discount_type
741
+ transaction_status
742
+ payer_group
743
+ refund_flag
744
+ original_sales_item_id
745
+ delco_name
746
+ delco_code
747
+ payer_number
748
+ payer_name
749
+ card_expiry_period
750
+ authorisation_code
751
+ transaction_id
752
+ transaction_line
753
+ allow_clearing
754
+ crm_number
755
+ dispute_status
756
+ rebate_rate
757
+ del_co_to_col_co_exchange_rate
758
+ net_euro_amount
759
+ euro_rebate_amount
760
+ euro_vat_amount
761
+ parent_customer_number
762
+ va_ton_net_amount
763
+ vat_country
764
+ ]
765
+ end
766
+
767
+ def initialize(sales_item_id = SKIP,
768
+ card_id = SKIP,
769
+ product_id = SKIP,
770
+ transaction_guid = SKIP,
771
+ transaction_date = SKIP,
772
+ customer_invoice_value_total_gross = SKIP,
773
+ card_pan = SKIP,
774
+ card_expiry = SKIP,
775
+ transaction_time = SKIP,
776
+ utc_offset = SKIP,
777
+ fleet_id_input = SKIP,
778
+ odometer_input = SKIP,
779
+ driver_name = SKIP,
780
+ vehicle_registration = SKIP,
781
+ invoice_currency_code = SKIP,
782
+ invoice_currency_symbol = SKIP,
783
+ transaction_currency_code = SKIP,
784
+ transaction_currency_symbol = SKIP,
785
+ transaction_net_amount = SKIP,
786
+ transaction_tax = SKIP,
787
+ transaction_gross_amount = SKIP,
788
+ invoice_net_amount = SKIP,
789
+ invoice_tax = SKIP,
790
+ invoice_gross_amount = SKIP,
791
+ purchased_in_country = SKIP,
792
+ account_id = SKIP,
793
+ account_number = SKIP,
794
+ account_name = SKIP,
795
+ account_short_name = SKIP,
796
+ quantity = SKIP,
797
+ fuel_product = SKIP,
798
+ unit_price_in_transaction_currency = SKIP,
799
+ unit_price_in_invoice_currency = SKIP,
800
+ unit_discount_transaction_currency = SKIP,
801
+ unit_discount_invoice_currency = SKIP,
802
+ is_invoiced = SKIP,
803
+ invoice_number = SKIP,
804
+ invoice_date = SKIP,
805
+ site_code = SKIP,
806
+ site_name = SKIP,
807
+ site_country = SKIP,
808
+ location = SKIP,
809
+ card_group_name = SKIP,
810
+ receipt_number = SKIP,
811
+ product_code = SKIP,
812
+ product_name = SKIP,
813
+ product_group_id = SKIP,
814
+ product_group_name = SKIP,
815
+ del_co_exchange_rate = SKIP,
816
+ col_co_exchange_rate = SKIP,
817
+ is_shell_site = SKIP,
818
+ network = SKIP,
819
+ site_group_id = SKIP,
820
+ site_group_name = SKIP,
821
+ posting_date = SKIP,
822
+ issuer_code = SKIP,
823
+ purchased_in_country_code = SKIP,
824
+ customer_country_code = SKIP,
825
+ customer_country = SKIP,
826
+ release_code = SKIP,
827
+ card_group_id = SKIP,
828
+ card_sequence_number = SKIP,
829
+ check_digit = SKIP,
830
+ fleet_id_description = SKIP,
831
+ vat_rate = SKIP,
832
+ vat_category = SKIP,
833
+ effective_discount_in_trx_currency = SKIP,
834
+ transaction_type = SKIP,
835
+ pin_indicator = SKIP,
836
+ vat_applicable = SKIP,
837
+ net_invoice_indicator = SKIP,
838
+ customer_currency_code = SKIP,
839
+ customer_currency_symbol = SKIP,
840
+ effective_unit_discount_in_customer_currency = SKIP,
841
+ effective_discount_in_customer_currency = SKIP,
842
+ va_ton_net_amount_in_customer_currency = SKIP,
843
+ discount_type = SKIP,
844
+ transaction_status = SKIP,
845
+ payer_group = SKIP,
846
+ refund_flag = SKIP,
847
+ original_sales_item_id = SKIP,
848
+ delco_name = SKIP,
849
+ delco_code = SKIP,
850
+ payer_number = SKIP,
851
+ payer_name = SKIP,
852
+ card_expiry_period = SKIP,
853
+ authorisation_code = SKIP,
854
+ transaction_id = SKIP,
855
+ transaction_line = SKIP,
856
+ allow_clearing = SKIP,
857
+ crm_number = SKIP,
858
+ dispute_status = SKIP,
859
+ rebate_rate = SKIP,
860
+ del_co_to_col_co_exchange_rate = SKIP,
861
+ net_euro_amount = SKIP,
862
+ euro_rebate_amount = SKIP,
863
+ euro_vat_amount = SKIP,
864
+ parent_customer_number = SKIP,
865
+ va_ton_net_amount = SKIP,
866
+ vat_country = SKIP)
867
+ @sales_item_id = sales_item_id unless sales_item_id == SKIP
868
+ @card_id = card_id unless card_id == SKIP
869
+ @product_id = product_id unless product_id == SKIP
870
+ @transaction_guid = transaction_guid unless transaction_guid == SKIP
871
+ @transaction_date = transaction_date unless transaction_date == SKIP
872
+ unless customer_invoice_value_total_gross == SKIP
873
+ @customer_invoice_value_total_gross =
874
+ customer_invoice_value_total_gross
875
+ end
876
+ @card_pan = card_pan unless card_pan == SKIP
877
+ @card_expiry = card_expiry unless card_expiry == SKIP
878
+ @transaction_time = transaction_time unless transaction_time == SKIP
879
+ @utc_offset = utc_offset unless utc_offset == SKIP
880
+ @fleet_id_input = fleet_id_input unless fleet_id_input == SKIP
881
+ @odometer_input = odometer_input unless odometer_input == SKIP
882
+ @driver_name = driver_name unless driver_name == SKIP
883
+ @vehicle_registration = vehicle_registration unless vehicle_registration == SKIP
884
+ @invoice_currency_code = invoice_currency_code unless invoice_currency_code == SKIP
885
+ @invoice_currency_symbol = invoice_currency_symbol unless invoice_currency_symbol == SKIP
886
+ unless transaction_currency_code == SKIP
887
+ @transaction_currency_code =
888
+ transaction_currency_code
889
+ end
890
+ unless transaction_currency_symbol == SKIP
891
+ @transaction_currency_symbol =
892
+ transaction_currency_symbol
893
+ end
894
+ @transaction_net_amount = transaction_net_amount unless transaction_net_amount == SKIP
895
+ @transaction_tax = transaction_tax unless transaction_tax == SKIP
896
+ @transaction_gross_amount = transaction_gross_amount unless transaction_gross_amount == SKIP
897
+ @invoice_net_amount = invoice_net_amount unless invoice_net_amount == SKIP
898
+ @invoice_tax = invoice_tax unless invoice_tax == SKIP
899
+ @invoice_gross_amount = invoice_gross_amount unless invoice_gross_amount == SKIP
900
+ @purchased_in_country = purchased_in_country unless purchased_in_country == SKIP
901
+ @account_id = account_id unless account_id == SKIP
902
+ @account_number = account_number unless account_number == SKIP
903
+ @account_name = account_name unless account_name == SKIP
904
+ @account_short_name = account_short_name unless account_short_name == SKIP
905
+ @quantity = quantity unless quantity == SKIP
906
+ @fuel_product = fuel_product unless fuel_product == SKIP
907
+ unless unit_price_in_transaction_currency == SKIP
908
+ @unit_price_in_transaction_currency =
909
+ unit_price_in_transaction_currency
910
+ end
911
+ unless unit_price_in_invoice_currency == SKIP
912
+ @unit_price_in_invoice_currency =
913
+ unit_price_in_invoice_currency
914
+ end
915
+ unless unit_discount_transaction_currency == SKIP
916
+ @unit_discount_transaction_currency =
917
+ unit_discount_transaction_currency
918
+ end
919
+ unless unit_discount_invoice_currency == SKIP
920
+ @unit_discount_invoice_currency =
921
+ unit_discount_invoice_currency
922
+ end
923
+ @is_invoiced = is_invoiced unless is_invoiced == SKIP
924
+ @invoice_number = invoice_number unless invoice_number == SKIP
925
+ @invoice_date = invoice_date unless invoice_date == SKIP
926
+ @site_code = site_code unless site_code == SKIP
927
+ @site_name = site_name unless site_name == SKIP
928
+ @site_country = site_country unless site_country == SKIP
929
+ @location = location unless location == SKIP
930
+ @card_group_name = card_group_name unless card_group_name == SKIP
931
+ @receipt_number = receipt_number unless receipt_number == SKIP
932
+ @product_code = product_code unless product_code == SKIP
933
+ @product_name = product_name unless product_name == SKIP
934
+ @product_group_id = product_group_id unless product_group_id == SKIP
935
+ @product_group_name = product_group_name unless product_group_name == SKIP
936
+ @del_co_exchange_rate = del_co_exchange_rate unless del_co_exchange_rate == SKIP
937
+ @col_co_exchange_rate = col_co_exchange_rate unless col_co_exchange_rate == SKIP
938
+ @is_shell_site = is_shell_site unless is_shell_site == SKIP
939
+ @network = network unless network == SKIP
940
+ @site_group_id = site_group_id unless site_group_id == SKIP
941
+ @site_group_name = site_group_name unless site_group_name == SKIP
942
+ @posting_date = posting_date unless posting_date == SKIP
943
+ @issuer_code = issuer_code unless issuer_code == SKIP
944
+ unless purchased_in_country_code == SKIP
945
+ @purchased_in_country_code =
946
+ purchased_in_country_code
947
+ end
948
+ @customer_country_code = customer_country_code unless customer_country_code == SKIP
949
+ @customer_country = customer_country unless customer_country == SKIP
950
+ @release_code = release_code unless release_code == SKIP
951
+ @card_group_id = card_group_id unless card_group_id == SKIP
952
+ @card_sequence_number = card_sequence_number unless card_sequence_number == SKIP
953
+ @check_digit = check_digit unless check_digit == SKIP
954
+ @fleet_id_description = fleet_id_description unless fleet_id_description == SKIP
955
+ @vat_rate = vat_rate unless vat_rate == SKIP
956
+ @vat_category = vat_category unless vat_category == SKIP
957
+ unless effective_discount_in_trx_currency == SKIP
958
+ @effective_discount_in_trx_currency =
959
+ effective_discount_in_trx_currency
960
+ end
961
+ @transaction_type = transaction_type unless transaction_type == SKIP
962
+ @pin_indicator = pin_indicator unless pin_indicator == SKIP
963
+ @vat_applicable = vat_applicable unless vat_applicable == SKIP
964
+ @net_invoice_indicator = net_invoice_indicator unless net_invoice_indicator == SKIP
965
+ @customer_currency_code = customer_currency_code unless customer_currency_code == SKIP
966
+ @customer_currency_symbol = customer_currency_symbol unless customer_currency_symbol == SKIP
967
+ unless effective_unit_discount_in_customer_currency == SKIP
968
+ @effective_unit_discount_in_customer_currency =
969
+ effective_unit_discount_in_customer_currency
970
+ end
971
+ unless effective_discount_in_customer_currency == SKIP
972
+ @effective_discount_in_customer_currency =
973
+ effective_discount_in_customer_currency
974
+ end
975
+ unless va_ton_net_amount_in_customer_currency == SKIP
976
+ @va_ton_net_amount_in_customer_currency =
977
+ va_ton_net_amount_in_customer_currency
978
+ end
979
+ @discount_type = discount_type unless discount_type == SKIP
980
+ @transaction_status = transaction_status unless transaction_status == SKIP
981
+ @payer_group = payer_group unless payer_group == SKIP
982
+ @refund_flag = refund_flag unless refund_flag == SKIP
983
+ @original_sales_item_id = original_sales_item_id unless original_sales_item_id == SKIP
984
+ @delco_name = delco_name unless delco_name == SKIP
985
+ @delco_code = delco_code unless delco_code == SKIP
986
+ @payer_number = payer_number unless payer_number == SKIP
987
+ @payer_name = payer_name unless payer_name == SKIP
988
+ @card_expiry_period = card_expiry_period unless card_expiry_period == SKIP
989
+ @authorisation_code = authorisation_code unless authorisation_code == SKIP
990
+ @transaction_id = transaction_id unless transaction_id == SKIP
991
+ @transaction_line = transaction_line unless transaction_line == SKIP
992
+ @allow_clearing = allow_clearing unless allow_clearing == SKIP
993
+ @crm_number = crm_number unless crm_number == SKIP
994
+ @dispute_status = dispute_status unless dispute_status == SKIP
995
+ @rebate_rate = rebate_rate unless rebate_rate == SKIP
996
+ unless del_co_to_col_co_exchange_rate == SKIP
997
+ @del_co_to_col_co_exchange_rate =
998
+ del_co_to_col_co_exchange_rate
999
+ end
1000
+ @net_euro_amount = net_euro_amount unless net_euro_amount == SKIP
1001
+ @euro_rebate_amount = euro_rebate_amount unless euro_rebate_amount == SKIP
1002
+ @euro_vat_amount = euro_vat_amount unless euro_vat_amount == SKIP
1003
+ @parent_customer_number = parent_customer_number unless parent_customer_number == SKIP
1004
+ @va_ton_net_amount = va_ton_net_amount unless va_ton_net_amount == SKIP
1005
+ @vat_country = vat_country unless vat_country == SKIP
1006
+ end
1007
+
1008
+ # Creates an instance of the object from a hash.
1009
+ def self.from_hash(hash)
1010
+ return nil unless hash
1011
+
1012
+ # Extract variables from the hash.
1013
+ sales_item_id = hash.key?('SalesItemId') ? hash['SalesItemId'] : SKIP
1014
+ card_id = hash.key?('CardId') ? hash['CardId'] : SKIP
1015
+ product_id = hash.key?('ProductId') ? hash['ProductId'] : SKIP
1016
+ transaction_guid =
1017
+ hash.key?('TransactionGUID') ? hash['TransactionGUID'] : SKIP
1018
+ transaction_date =
1019
+ hash.key?('TransactionDate') ? hash['TransactionDate'] : SKIP
1020
+ customer_invoice_value_total_gross =
1021
+ hash.key?('CustomerInvoiceValueTotalGross') ? hash['CustomerInvoiceValueTotalGross'] : SKIP
1022
+ card_pan = hash.key?('CardPAN') ? hash['CardPAN'] : SKIP
1023
+ card_expiry = hash.key?('CardExpiry') ? hash['CardExpiry'] : SKIP
1024
+ transaction_time =
1025
+ hash.key?('TransactionTime') ? hash['TransactionTime'] : SKIP
1026
+ utc_offset = hash.key?('UTCOffset') ? hash['UTCOffset'] : SKIP
1027
+ fleet_id_input = hash.key?('FleetIdInput') ? hash['FleetIdInput'] : SKIP
1028
+ odometer_input = hash.key?('OdometerInput') ? hash['OdometerInput'] : SKIP
1029
+ driver_name = hash.key?('DriverName') ? hash['DriverName'] : SKIP
1030
+ vehicle_registration =
1031
+ hash.key?('VehicleRegistration') ? hash['VehicleRegistration'] : SKIP
1032
+ invoice_currency_code =
1033
+ hash.key?('InvoiceCurrencyCode') ? hash['InvoiceCurrencyCode'] : SKIP
1034
+ invoice_currency_symbol =
1035
+ hash.key?('InvoiceCurrencySymbol') ? hash['InvoiceCurrencySymbol'] : SKIP
1036
+ transaction_currency_code =
1037
+ hash.key?('TransactionCurrencyCode') ? hash['TransactionCurrencyCode'] : SKIP
1038
+ transaction_currency_symbol =
1039
+ hash.key?('TransactionCurrencySymbol') ? hash['TransactionCurrencySymbol'] : SKIP
1040
+ transaction_net_amount =
1041
+ hash.key?('TransactionNetAmount') ? hash['TransactionNetAmount'] : SKIP
1042
+ transaction_tax =
1043
+ hash.key?('TransactionTax') ? hash['TransactionTax'] : SKIP
1044
+ transaction_gross_amount =
1045
+ hash.key?('TransactionGrossAmount') ? hash['TransactionGrossAmount'] : SKIP
1046
+ invoice_net_amount =
1047
+ hash.key?('InvoiceNetAmount') ? hash['InvoiceNetAmount'] : SKIP
1048
+ invoice_tax = hash.key?('InvoiceTax') ? hash['InvoiceTax'] : SKIP
1049
+ invoice_gross_amount =
1050
+ hash.key?('InvoiceGrossAmount') ? hash['InvoiceGrossAmount'] : SKIP
1051
+ purchased_in_country =
1052
+ hash.key?('PurchasedInCountry') ? hash['PurchasedInCountry'] : SKIP
1053
+ account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP
1054
+ account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
1055
+ account_name = hash.key?('AccountName') ? hash['AccountName'] : SKIP
1056
+ account_short_name =
1057
+ hash.key?('AccountShortName') ? hash['AccountShortName'] : SKIP
1058
+ quantity = hash.key?('Quantity') ? hash['Quantity'] : SKIP
1059
+ fuel_product = hash.key?('FuelProduct') ? hash['FuelProduct'] : SKIP
1060
+ unit_price_in_transaction_currency =
1061
+ hash.key?('UnitPriceInTransactionCurrency') ? hash['UnitPriceInTransactionCurrency'] : SKIP
1062
+ unit_price_in_invoice_currency =
1063
+ hash.key?('UnitPriceInInvoiceCurrency') ? hash['UnitPriceInInvoiceCurrency'] : SKIP
1064
+ unit_discount_transaction_currency =
1065
+ hash.key?('UnitDiscountTransactionCurrency') ? hash['UnitDiscountTransactionCurrency'] : SKIP
1066
+ unit_discount_invoice_currency =
1067
+ hash.key?('UnitDiscountInvoiceCurrency') ? hash['UnitDiscountInvoiceCurrency'] : SKIP
1068
+ is_invoiced = hash.key?('IsInvoiced') ? hash['IsInvoiced'] : SKIP
1069
+ invoice_number = hash.key?('InvoiceNumber') ? hash['InvoiceNumber'] : SKIP
1070
+ invoice_date = hash.key?('InvoiceDate') ? hash['InvoiceDate'] : SKIP
1071
+ site_code = hash.key?('SiteCode') ? hash['SiteCode'] : SKIP
1072
+ site_name = hash.key?('SiteName') ? hash['SiteName'] : SKIP
1073
+ site_country = hash.key?('SiteCountry') ? hash['SiteCountry'] : SKIP
1074
+ location = ExceptionSiteLocation.from_hash(hash['Location']) if hash['Location']
1075
+ card_group_name =
1076
+ hash.key?('CardGroupName') ? hash['CardGroupName'] : SKIP
1077
+ receipt_number = hash.key?('ReceiptNumber') ? hash['ReceiptNumber'] : SKIP
1078
+ product_code = hash.key?('ProductCode') ? hash['ProductCode'] : SKIP
1079
+ product_name = hash.key?('ProductName') ? hash['ProductName'] : SKIP
1080
+ product_group_id =
1081
+ hash.key?('ProductGroupId') ? hash['ProductGroupId'] : SKIP
1082
+ product_group_name =
1083
+ hash.key?('ProductGroupName') ? hash['ProductGroupName'] : SKIP
1084
+ del_co_exchange_rate =
1085
+ hash.key?('DelCoExchangeRate') ? hash['DelCoExchangeRate'] : SKIP
1086
+ col_co_exchange_rate =
1087
+ hash.key?('ColCoExchangeRate') ? hash['ColCoExchangeRate'] : SKIP
1088
+ is_shell_site = hash.key?('IsShellSite') ? hash['IsShellSite'] : SKIP
1089
+ network = hash.key?('Network') ? hash['Network'] : SKIP
1090
+ site_group_id = hash.key?('SiteGroupId') ? hash['SiteGroupId'] : SKIP
1091
+ site_group_name =
1092
+ hash.key?('SiteGroupName') ? hash['SiteGroupName'] : SKIP
1093
+ posting_date = hash.key?('PostingDate') ? hash['PostingDate'] : SKIP
1094
+ issuer_code = hash.key?('IssuerCode') ? hash['IssuerCode'] : SKIP
1095
+ purchased_in_country_code =
1096
+ hash.key?('PurchasedInCountryCode') ? hash['PurchasedInCountryCode'] : SKIP
1097
+ customer_country_code =
1098
+ hash.key?('CustomerCountryCode') ? hash['CustomerCountryCode'] : SKIP
1099
+ customer_country =
1100
+ hash.key?('CustomerCountry') ? hash['CustomerCountry'] : SKIP
1101
+ release_code = hash.key?('ReleaseCode') ? hash['ReleaseCode'] : SKIP
1102
+ card_group_id = hash.key?('CardGroupId') ? hash['CardGroupId'] : SKIP
1103
+ card_sequence_number =
1104
+ hash.key?('CardSequenceNumber') ? hash['CardSequenceNumber'] : SKIP
1105
+ check_digit = hash.key?('CheckDigit') ? hash['CheckDigit'] : SKIP
1106
+ fleet_id_description =
1107
+ hash.key?('FleetIDDescription') ? hash['FleetIDDescription'] : SKIP
1108
+ vat_rate = hash.key?('VATRate') ? hash['VATRate'] : SKIP
1109
+ vat_category = hash.key?('VATCategory') ? hash['VATCategory'] : SKIP
1110
+ effective_discount_in_trx_currency =
1111
+ hash.key?('EffectiveDiscountInTrxCurrency') ? hash['EffectiveDiscountInTrxCurrency'] : SKIP
1112
+ transaction_type =
1113
+ hash.key?('TransactionType') ? hash['TransactionType'] : SKIP
1114
+ pin_indicator = hash.key?('PINIndicator') ? hash['PINIndicator'] : SKIP
1115
+ vat_applicable = hash.key?('VATApplicable') ? hash['VATApplicable'] : SKIP
1116
+ net_invoice_indicator =
1117
+ hash.key?('NetInvoiceIndicator') ? hash['NetInvoiceIndicator'] : SKIP
1118
+ customer_currency_code =
1119
+ hash.key?('CustomerCurrencyCode') ? hash['CustomerCurrencyCode'] : SKIP
1120
+ customer_currency_symbol =
1121
+ hash.key?('CustomerCurrencySymbol') ? hash['CustomerCurrencySymbol'] : SKIP
1122
+ effective_unit_discount_in_customer_currency =
1123
+ hash.key?('EffectiveUnitDiscountInCustomerCurrency') ? hash['EffectiveUnitDiscountInCustomerCurrency'] : SKIP
1124
+ effective_discount_in_customer_currency =
1125
+ hash.key?('EffectiveDiscountInCustomerCurrency') ? hash['EffectiveDiscountInCustomerCurrency'] : SKIP
1126
+ va_ton_net_amount_in_customer_currency =
1127
+ hash.key?('VATonNetAmountInCustomerCurrency') ? hash['VATonNetAmountInCustomerCurrency'] : SKIP
1128
+ discount_type = hash.key?('DiscountType') ? hash['DiscountType'] : SKIP
1129
+ transaction_status =
1130
+ hash.key?('TransactionStatus') ? hash['TransactionStatus'] : SKIP
1131
+ payer_group = hash.key?('PayerGroup') ? hash['PayerGroup'] : SKIP
1132
+ refund_flag = hash.key?('RefundFlag') ? hash['RefundFlag'] : SKIP
1133
+ original_sales_item_id =
1134
+ hash.key?('OriginalSalesItemId') ? hash['OriginalSalesItemId'] : SKIP
1135
+ delco_name = hash.key?('DelcoName') ? hash['DelcoName'] : SKIP
1136
+ delco_code = hash.key?('DelcoCode') ? hash['DelcoCode'] : SKIP
1137
+ payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
1138
+ payer_name = hash.key?('PayerName') ? hash['PayerName'] : SKIP
1139
+ card_expiry_period =
1140
+ hash.key?('CardExpiryPeriod') ? hash['CardExpiryPeriod'] : SKIP
1141
+ authorisation_code =
1142
+ hash.key?('AuthorisationCode') ? hash['AuthorisationCode'] : SKIP
1143
+ transaction_id = hash.key?('TransactionId') ? hash['TransactionId'] : SKIP
1144
+ transaction_line =
1145
+ hash.key?('TransactionLine') ? hash['TransactionLine'] : SKIP
1146
+ allow_clearing = hash.key?('AllowClearing') ? hash['AllowClearing'] : SKIP
1147
+ crm_number = hash.key?('CRMNumber') ? hash['CRMNumber'] : SKIP
1148
+ dispute_status = hash.key?('DisputeStatus') ? hash['DisputeStatus'] : SKIP
1149
+ rebate_rate = hash.key?('RebateRate') ? hash['RebateRate'] : SKIP
1150
+ del_co_to_col_co_exchange_rate =
1151
+ hash.key?('DelCoToColCoExchangeRate') ? hash['DelCoToColCoExchangeRate'] : SKIP
1152
+ net_euro_amount =
1153
+ hash.key?('NetEuroAmount') ? hash['NetEuroAmount'] : SKIP
1154
+ euro_rebate_amount =
1155
+ hash.key?('EuroRebateAmount') ? hash['EuroRebateAmount'] : SKIP
1156
+ euro_vat_amount =
1157
+ hash.key?('EuroVATAmount') ? hash['EuroVATAmount'] : SKIP
1158
+ parent_customer_number =
1159
+ hash.key?('ParentCustomerNumber') ? hash['ParentCustomerNumber'] : SKIP
1160
+ va_ton_net_amount =
1161
+ hash.key?('VATonNetAmount') ? hash['VATonNetAmount'] : SKIP
1162
+ vat_country = hash.key?('VATCountry') ? hash['VATCountry'] : SKIP
1163
+
1164
+ # Create object from extracted values.
1165
+ TransactionExceptions.new(sales_item_id,
1166
+ card_id,
1167
+ product_id,
1168
+ transaction_guid,
1169
+ transaction_date,
1170
+ customer_invoice_value_total_gross,
1171
+ card_pan,
1172
+ card_expiry,
1173
+ transaction_time,
1174
+ utc_offset,
1175
+ fleet_id_input,
1176
+ odometer_input,
1177
+ driver_name,
1178
+ vehicle_registration,
1179
+ invoice_currency_code,
1180
+ invoice_currency_symbol,
1181
+ transaction_currency_code,
1182
+ transaction_currency_symbol,
1183
+ transaction_net_amount,
1184
+ transaction_tax,
1185
+ transaction_gross_amount,
1186
+ invoice_net_amount,
1187
+ invoice_tax,
1188
+ invoice_gross_amount,
1189
+ purchased_in_country,
1190
+ account_id,
1191
+ account_number,
1192
+ account_name,
1193
+ account_short_name,
1194
+ quantity,
1195
+ fuel_product,
1196
+ unit_price_in_transaction_currency,
1197
+ unit_price_in_invoice_currency,
1198
+ unit_discount_transaction_currency,
1199
+ unit_discount_invoice_currency,
1200
+ is_invoiced,
1201
+ invoice_number,
1202
+ invoice_date,
1203
+ site_code,
1204
+ site_name,
1205
+ site_country,
1206
+ location,
1207
+ card_group_name,
1208
+ receipt_number,
1209
+ product_code,
1210
+ product_name,
1211
+ product_group_id,
1212
+ product_group_name,
1213
+ del_co_exchange_rate,
1214
+ col_co_exchange_rate,
1215
+ is_shell_site,
1216
+ network,
1217
+ site_group_id,
1218
+ site_group_name,
1219
+ posting_date,
1220
+ issuer_code,
1221
+ purchased_in_country_code,
1222
+ customer_country_code,
1223
+ customer_country,
1224
+ release_code,
1225
+ card_group_id,
1226
+ card_sequence_number,
1227
+ check_digit,
1228
+ fleet_id_description,
1229
+ vat_rate,
1230
+ vat_category,
1231
+ effective_discount_in_trx_currency,
1232
+ transaction_type,
1233
+ pin_indicator,
1234
+ vat_applicable,
1235
+ net_invoice_indicator,
1236
+ customer_currency_code,
1237
+ customer_currency_symbol,
1238
+ effective_unit_discount_in_customer_currency,
1239
+ effective_discount_in_customer_currency,
1240
+ va_ton_net_amount_in_customer_currency,
1241
+ discount_type,
1242
+ transaction_status,
1243
+ payer_group,
1244
+ refund_flag,
1245
+ original_sales_item_id,
1246
+ delco_name,
1247
+ delco_code,
1248
+ payer_number,
1249
+ payer_name,
1250
+ card_expiry_period,
1251
+ authorisation_code,
1252
+ transaction_id,
1253
+ transaction_line,
1254
+ allow_clearing,
1255
+ crm_number,
1256
+ dispute_status,
1257
+ rebate_rate,
1258
+ del_co_to_col_co_exchange_rate,
1259
+ net_euro_amount,
1260
+ euro_rebate_amount,
1261
+ euro_vat_amount,
1262
+ parent_customer_number,
1263
+ va_ton_net_amount,
1264
+ vat_country)
1265
+ end
1266
+ end
1267
+ end