data-and-reporting-sdk 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -16
  3. data/lib/shell_data_reporting_ap_is/controllers/base_controller.rb +9 -9
  4. data/lib/shell_data_reporting_ap_is/controllers/customer_controller.rb +210 -210
  5. data/lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb +221 -221
  6. data/lib/shell_data_reporting_ap_is/controllers/o_auth_authorization_controller.rb +9 -9
  7. data/lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb +354 -354
  8. data/lib/shell_data_reporting_ap_is/exceptions/default_error_exception.rb +15 -15
  9. data/lib/shell_data_reporting_ap_is/exceptions/error_object_exception.rb +15 -15
  10. data/lib/shell_data_reporting_ap_is/exceptions/error_user_access_error1_exception.rb +15 -15
  11. data/lib/shell_data_reporting_ap_is/exceptions/o_auth_provider_exception.rb +15 -15
  12. data/lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb +54 -10
  13. data/lib/shell_data_reporting_ap_is/models/account_access.rb +3 -8
  14. data/lib/shell_data_reporting_ap_is/models/account_request.rb +17 -26
  15. data/lib/shell_data_reporting_ap_is/models/account_response.rb +2 -6
  16. data/lib/shell_data_reporting_ap_is/models/account_response_accounts_items.rb +29 -53
  17. data/lib/shell_data_reporting_ap_is/models/accounts.rb +1 -2
  18. data/lib/shell_data_reporting_ap_is/models/address.rb +4 -11
  19. data/lib/shell_data_reporting_ap_is/models/audit_request.rb +17 -25
  20. data/lib/shell_data_reporting_ap_is/models/audit_response.rb +2 -6
  21. data/lib/shell_data_reporting_ap_is/models/audit_response_audits_items.rb +50 -63
  22. data/lib/shell_data_reporting_ap_is/models/bank_account.rb +5 -13
  23. data/lib/shell_data_reporting_ap_is/models/base_model.rb +76 -28
  24. data/lib/shell_data_reporting_ap_is/models/bonus_configuration.rb +9 -18
  25. data/lib/shell_data_reporting_ap_is/models/bonus_history.rb +14 -29
  26. data/lib/shell_data_reporting_ap_is/models/card_day_time_restrictions.rb +3 -9
  27. data/lib/shell_data_reporting_ap_is/models/card_exceptions.rb +8 -19
  28. data/lib/shell_data_reporting_ap_is/models/card_group_request.rb +6 -12
  29. data/lib/shell_data_reporting_ap_is/models/card_group_response.rb +2 -6
  30. data/lib/shell_data_reporting_ap_is/models/card_group_response_card_groups_items.rb +10 -20
  31. data/lib/shell_data_reporting_ap_is/models/card_type_request.rb +3 -7
  32. data/lib/shell_data_reporting_ap_is/models/card_type_response.rb +1 -3
  33. data/lib/shell_data_reporting_ap_is/models/card_type_response_customer_card_types_items.rb +15 -31
  34. data/lib/shell_data_reporting_ap_is/models/card_type_response_error.rb +1 -2
  35. data/lib/shell_data_reporting_ap_is/models/card_usage_restrictions.rb +5 -10
  36. data/lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb +3 -8
  37. data/lib/shell_data_reporting_ap_is/models/card_usage_summary_response.rb +1 -3
  38. data/lib/shell_data_reporting_ap_is/models/col_co_access.rb +2 -4
  39. data/lib/shell_data_reporting_ap_is/models/current_volume.rb +2 -5
  40. data/lib/shell_data_reporting_ap_is/models/customer_contract.rb +1 -2
  41. data/lib/shell_data_reporting_ap_is/models/customer_detail_request.rb +2 -5
  42. data/lib/shell_data_reporting_ap_is/models/customer_detail_response.rb +31 -45
  43. data/lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb +5 -12
  44. data/lib/shell_data_reporting_ap_is/models/customer_price_list_response.rb +1 -3
  45. data/lib/shell_data_reporting_ap_is/models/default_error_fault.rb +1 -2
  46. data/lib/shell_data_reporting_ap_is/models/delivery_addresses.rb +7 -18
  47. data/lib/shell_data_reporting_ap_is/models/eid_access.rb +1 -2
  48. data/lib/shell_data_reporting_ap_is/models/eid_document.rb +11 -16
  49. data/lib/shell_data_reporting_ap_is/models/eid_document_response.rb +3 -8
  50. data/lib/shell_data_reporting_ap_is/models/eid_download_req.rb +2 -4
  51. data/lib/shell_data_reporting_ap_is/models/eid_search_req.rb +10 -15
  52. data/lib/shell_data_reporting_ap_is/models/eid_search_request.rb +2 -4
  53. data/lib/shell_data_reporting_ap_is/models/error_details.rb +1 -3
  54. data/lib/shell_data_reporting_ap_is/models/error_status.rb +11 -2
  55. data/lib/shell_data_reporting_ap_is/models/error_user_access_error.rb +1 -2
  56. data/lib/shell_data_reporting_ap_is/models/exception_product.rb +1 -2
  57. data/lib/shell_data_reporting_ap_is/models/exception_site_location.rb +1 -2
  58. data/lib/shell_data_reporting_ap_is/models/fee_item.rb +35 -71
  59. data/lib/shell_data_reporting_ap_is/models/fee_item_summary_all_of0.rb +5 -11
  60. data/lib/shell_data_reporting_ap_is/models/fee_rule_location.rb +4 -10
  61. data/lib/shell_data_reporting_ap_is/models/fee_rule_product.rb +2 -5
  62. data/lib/shell_data_reporting_ap_is/models/fee_rule_tier.rb +1 -3
  63. data/lib/shell_data_reporting_ap_is/models/fee_summary_response.rb +1 -3
  64. data/lib/shell_data_reporting_ap_is/models/fees_fee_rule_tiers.rb +3 -7
  65. data/lib/shell_data_reporting_ap_is/models/finance_currency.rb +1 -2
  66. data/lib/shell_data_reporting_ap_is/models/fleetmanagement_v1_user_loggedinuser_request.rb +104 -0
  67. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_card.rb +1 -3
  68. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_data.rb +9 -20
  69. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_request.rb +7 -14
  70. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_response.rb +1 -3
  71. data/lib/shell_data_reporting_ap_is/models/invoice_dates_data.rb +1 -2
  72. data/lib/shell_data_reporting_ap_is/models/invoice_dates_request_filters.rb +2 -6
  73. data/lib/shell_data_reporting_ap_is/models/invoice_dates_response_data.rb +1 -3
  74. data/lib/shell_data_reporting_ap_is/models/invoice_distribution_method.rb +2 -4
  75. data/lib/shell_data_reporting_ap_is/models/invoice_download_req.rb +2 -5
  76. data/lib/shell_data_reporting_ap_is/models/invoice_search_additional_document.rb +2 -4
  77. data/lib/shell_data_reporting_ap_is/models/invoice_search_details.rb +86 -107
  78. data/lib/shell_data_reporting_ap_is/models/invoice_search_request.rb +5 -7
  79. data/lib/shell_data_reporting_ap_is/models/invoice_search_request_filters.rb +21 -31
  80. data/lib/shell_data_reporting_ap_is/models/invoice_search_response.rb +2 -7
  81. data/lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb +21 -31
  82. data/lib/shell_data_reporting_ap_is/models/invoice_summary_response.rb +1 -3
  83. data/lib/shell_data_reporting_ap_is/models/invoices_summaries.rb +5 -10
  84. data/lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb +39 -48
  85. data/lib/shell_data_reporting_ap_is/models/logged_in_user_request.rb +2 -4
  86. data/lib/shell_data_reporting_ap_is/models/logged_in_user_response.rb +12 -25
  87. data/lib/shell_data_reporting_ap_is/models/monthly_invoice_trend.rb +2 -5
  88. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb +21 -32
  89. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request_accounts_items.rb +1 -3
  90. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response.rb +2 -6
  91. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response_transactions_items.rb +70 -122
  92. data/lib/shell_data_reporting_ap_is/models/o_auth_token.rb +2 -6
  93. data/lib/shell_data_reporting_ap_is/models/past_statement_of_accounts.rb +11 -22
  94. data/lib/shell_data_reporting_ap_is/models/payer_access.rb +3 -8
  95. data/lib/shell_data_reporting_ap_is/models/payer_details.rb +49 -92
  96. data/lib/shell_data_reporting_ap_is/models/payer_request.rb +9 -12
  97. data/lib/shell_data_reporting_ap_is/models/payer_response.rb +2 -6
  98. data/lib/shell_data_reporting_ap_is/models/payers.rb +2 -5
  99. data/lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb +8 -17
  100. data/lib/shell_data_reporting_ap_is/models/pin_advice_types.rb +5 -6
  101. data/lib/shell_data_reporting_ap_is/models/price_list.rb +25 -45
  102. data/lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb +28 -44
  103. data/lib/shell_data_reporting_ap_is/models/price_transaction_request.rb +41 -59
  104. data/lib/shell_data_reporting_ap_is/models/priced_request_data.rb +20 -46
  105. data/lib/shell_data_reporting_ap_is/models/priced_response_data.rb +91 -201
  106. data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response.rb +1 -3
  107. data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response_transactions_summary_items.rb +22 -28
  108. data/lib/shell_data_reporting_ap_is/models/priced_transaction_items_location_items.rb +11 -2
  109. data/lib/shell_data_reporting_ap_is/models/priced_transaction_request_v2.rb +1 -3
  110. data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_transactions_items.rb +91 -141
  111. data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_v2.rb +2 -6
  112. data/lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb +3 -6
  113. data/lib/shell_data_reporting_ap_is/models/pricing_history.rb +2 -5
  114. data/lib/shell_data_reporting_ap_is/models/purchase_categories.rb +1 -4
  115. data/lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb +6 -14
  116. data/lib/shell_data_reporting_ap_is/models/recent_transaction_request.rb +1 -3
  117. data/lib/shell_data_reporting_ap_is/models/recent_transactions.rb +29 -60
  118. data/lib/shell_data_reporting_ap_is/models/recent_transactions_response.rb +2 -6
  119. data/lib/shell_data_reporting_ap_is/models/role.rb +3 -6
  120. data/lib/shell_data_reporting_ap_is/models/search_doc_req.rb +19 -27
  121. data/lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb +9 -16
  122. data/lib/shell_data_reporting_ap_is/models/search_documents_request.rb +1 -3
  123. data/lib/shell_data_reporting_ap_is/models/search_documents_response.rb +3 -7
  124. data/lib/shell_data_reporting_ap_is/models/search_soa_req.rb +4 -11
  125. data/lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb +11 -18
  126. data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_request.rb +1 -3
  127. data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_response.rb +2 -7
  128. data/lib/shell_data_reporting_ap_is/models/site_location.rb +11 -2
  129. data/lib/shell_data_reporting_ap_is/models/statement_of_account_request_filters.rb +2 -5
  130. data/lib/shell_data_reporting_ap_is/models/statement_of_account_resp.rb +1 -2
  131. data/lib/shell_data_reporting_ap_is/models/statement_of_account_response.rb +1 -3
  132. data/lib/shell_data_reporting_ap_is/models/tier.rb +8 -12
  133. data/lib/shell_data_reporting_ap_is/models/transaction_exceptions.rb +47 -92
  134. data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb +12 -21
  135. data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_response.rb +2 -4
  136. data/lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb +21 -33
  137. data/lib/shell_data_reporting_ap_is/models/transaction_fees_response.rb +2 -6
  138. data/lib/shell_data_reporting_ap_is/models/update_odometer.rb +1 -2
  139. data/lib/shell_data_reporting_ap_is/models/update_odometer_reference.rb +1 -2
  140. data/lib/shell_data_reporting_ap_is/models/update_odometer_request.rb +3 -8
  141. data/lib/shell_data_reporting_ap_is/models/update_odometer_response.rb +2 -4
  142. data/lib/shell_data_reporting_ap_is/models/usage_summary.rb +6 -14
  143. data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb +2 -5
  144. data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_response.rb +2 -4
  145. data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_request.rb +2 -5
  146. data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_response.rb +2 -5
  147. data/lib/shell_data_reporting_ap_is/utilities/file_wrapper.rb +9 -9
  148. data/lib/shell_data_reporting_ap_is/utilities/union_type_lookup.rb +35 -0
  149. data/lib/shell_data_reporting_ap_is.rb +3 -0
  150. data/test/controllers/controller_test_base.rb +0 -5
  151. data/test/controllers/test_invoice_controller.rb +1 -1
  152. data/test/controllers/test_transaction_controller.rb +83 -75
  153. metadata +12 -16
@@ -173,15 +173,15 @@ module ShellDataReportingApIs
173
173
 
174
174
  # Site Code
175
175
  # Example:
176
- # 050001 - CHARNOCK RICHARD NTHBOUND MWSA 0755
177
- # 050002 - CHARNOCK RICHARD STHBOUND MWSA 0755
176
+ # 050001 - CHARNOCK RICHARD NTHBOUND MWSA 0755
177
+ # 050002 - CHARNOCK RICHARD STHBOUND MWSA 0755
178
178
  # @return [String]
179
179
  attr_accessor :site_code
180
180
 
181
181
  # Site Name
182
182
  # Example:
183
- # 050001 - CHARNOCK RICHARD NTHBOUND MWSA 0755
184
- # 050002 - CHARNOCK RICHARD STHBOUND MWSA 0755
183
+ # 050001 - CHARNOCK RICHARD NTHBOUND MWSA 0755
184
+ # 050002 - CHARNOCK RICHARD STHBOUND MWSA 0755
185
185
  # @return [String]
186
186
  attr_accessor :site_name
187
187
 
@@ -195,7 +195,7 @@ module ShellDataReportingApIs
195
195
 
196
196
  # Geography Location entity for Site Location
197
197
  # Note: - The value could be null/blank for fees item
198
- # @return [Array[PricedTransactionItemsLocationItems]]
198
+ # @return [Array[Object]]
199
199
  attr_accessor :location
200
200
 
201
201
  # Card Group Name
@@ -207,10 +207,10 @@ module ShellDataReportingApIs
207
207
  attr_accessor :receipt_number
208
208
 
209
209
  # Product Code
210
- # 10 TMF Charges
211
- # 11 Tunnel/Bridges
212
- # 12 Motorway toll
213
- # 13 Ferries
210
+ # 10 TMF Charges
211
+ # 11 Tunnel/Bridges
212
+ # 12 Motorway toll
213
+ # 13 Ferries
214
214
  # @return [String]
215
215
  attr_accessor :product_code
216
216
 
@@ -224,24 +224,24 @@ module ShellDataReportingApIs
224
224
 
225
225
  # Product Group Id
226
226
  # Example:
227
- # 1 Parent Product Group
228
- # 2 All Fuels
229
- # 3 Motor gasoline
230
- # 4 2 stroke
231
- # 5 Autogas
232
- # 6 CNG
227
+ # 1 Parent Product Group
228
+ # 2 All Fuels
229
+ # 3 Motor gasoline
230
+ # 4 2 stroke
231
+ # 5 Autogas
232
+ # 6 CNG
233
233
  # @return [Integer]
234
234
  attr_accessor :product_group_id
235
235
 
236
236
  # Product Group Name
237
237
  # Example:
238
- # 1 Parent Product Group
239
- # 2 All Fuels
240
- # 3 Motor gasoline
241
- # 4 2 stroke
242
- # 5 Autogas
243
- # 6 CNG
244
- # 7 Automotive Gas Oil
238
+ # 1 Parent Product Group
239
+ # 2 All Fuels
240
+ # 3 Motor gasoline
241
+ # 4 2 stroke
242
+ # 5 Autogas
243
+ # 6 CNG
244
+ # 7 Automotive Gas Oil
245
245
  # @return [String]
246
246
  attr_accessor :product_group_name
247
247
 
@@ -259,9 +259,9 @@ module ShellDataReportingApIs
259
259
  attr_accessor :is_shell_site
260
260
 
261
261
  # Network as configured in GFN (Shell PH, ESSO, etc.,)
262
- # 100013 STEINDORFER
263
- # 100015 S.A. BELGIAN SHELL N.V.
264
- # 100016 ESSO BE
262
+ # 100013 STEINDORFER
263
+ # 100015 S.A. BELGIAN SHELL N.V.
264
+ # 100016 ESSO BE
265
265
  # Note: - The value could be null/blank for fees item
266
266
  # @return [String]
267
267
  attr_accessor :network
@@ -470,13 +470,13 @@ module ShellDataReportingApIs
470
470
  attr_accessor :crm_number
471
471
 
472
472
  # Sales Item Dispute Status if disputed
473
- # 0 No Dispute
474
- # 1 In Dispute
475
- # 2 Re-Instated
476
- # 3 Adjusted
477
- # 4 Written Off by Colco
478
- # 5 Written Off by Delco
479
- # 6 Charged Back to Site
473
+ # 0 No Dispute
474
+ # 1 In Dispute
475
+ # 2 Re-Instated
476
+ # 3 Adjusted
477
+ # 4 Written Off by Colco
478
+ # 5 Written Off by Delco
479
+ # 6 Charged Back to Site
480
480
  # Note: - The value could be null/blank for fees item.
481
481
  # @return [String]
482
482
  attr_accessor :dispute_status
@@ -1053,121 +1053,69 @@ module ShellDataReportingApIs
1053
1053
  ]
1054
1054
  end
1055
1055
 
1056
- def initialize(type = SKIP,
1057
- card_id = SKIP,
1058
- card_pan = SKIP,
1059
- card_expiry = SKIP,
1060
- transaction_date = SKIP,
1061
- transaction_time = SKIP,
1062
- utc_offset = SKIP,
1063
- fleet_id_input = SKIP,
1064
- odometer_input = SKIP,
1065
- driver_name = SKIP,
1066
- vehicle_registration = SKIP,
1067
- invoice_currency_code = SKIP,
1068
- invoice_currency_symbol = SKIP,
1056
+ def initialize(type = SKIP, card_id = SKIP, card_pan = SKIP,
1057
+ card_expiry = SKIP, transaction_date = SKIP,
1058
+ transaction_time = SKIP, utc_offset = SKIP,
1059
+ fleet_id_input = SKIP, odometer_input = SKIP,
1060
+ driver_name = SKIP, vehicle_registration = SKIP,
1061
+ invoice_currency_code = SKIP, invoice_currency_symbol = SKIP,
1069
1062
  transaction_currency_code = SKIP,
1070
1063
  transaction_currency_symbol = SKIP,
1071
- transaction_net_amount = SKIP,
1072
- transaction_tax = SKIP,
1073
- transaction_gross_amount = SKIP,
1074
- invoice_net_amount = SKIP,
1075
- invoice_tax = SKIP,
1076
- invoice_gross_amount = SKIP,
1077
- purchased_in_country = SKIP,
1078
- account_id = SKIP,
1079
- account_number = SKIP,
1080
- account_name = SKIP,
1081
- account_short_name = SKIP,
1082
- quantity = SKIP,
1064
+ transaction_net_amount = SKIP, transaction_tax = SKIP,
1065
+ transaction_gross_amount = SKIP, invoice_net_amount = SKIP,
1066
+ invoice_tax = SKIP, invoice_gross_amount = SKIP,
1067
+ purchased_in_country = SKIP, account_id = SKIP,
1068
+ account_number = SKIP, account_name = SKIP,
1069
+ account_short_name = SKIP, quantity = SKIP,
1083
1070
  fuel_product = SKIP,
1084
1071
  unit_price_in_transaction_currency = SKIP,
1085
1072
  unit_price_in_invoice_currency = SKIP,
1086
1073
  unit_discount_transaction_currency = SKIP,
1087
- unit_discount_invoice_currency = SKIP,
1088
- is_invoiced = SKIP,
1089
- invoice_number = SKIP,
1090
- invoice_date = SKIP,
1091
- site_code = SKIP,
1092
- site_name = SKIP,
1093
- site_country = SKIP,
1094
- location = SKIP,
1095
- card_group_name = SKIP,
1096
- receipt_number = SKIP,
1097
- product_code = SKIP,
1098
- product_name = SKIP,
1099
- product_group_id = SKIP,
1100
- product_group_name = SKIP,
1101
- del_co_exchange_rate = SKIP,
1102
- col_co_exchange_rate = SKIP,
1103
- is_shell_site = SKIP,
1104
- network = SKIP,
1105
- site_group_id = SKIP,
1106
- site_group_name = SKIP,
1107
- posting_date = SKIP,
1108
- issuer_code = SKIP,
1109
- purchased_in_country_code = SKIP,
1110
- customer_country_code = SKIP,
1111
- customer_country = SKIP,
1112
- release_code = SKIP,
1113
- card_group_id = SKIP,
1114
- card_sequence_number = SKIP,
1115
- check_digit = SKIP,
1116
- fleet_id_description = SKIP,
1117
- vat_rate = SKIP,
1118
- vat_category = SKIP,
1119
- vat_country = SKIP,
1074
+ unit_discount_invoice_currency = SKIP, is_invoiced = SKIP,
1075
+ invoice_number = SKIP, invoice_date = SKIP, site_code = SKIP,
1076
+ site_name = SKIP, site_country = SKIP, location = SKIP,
1077
+ card_group_name = SKIP, receipt_number = SKIP,
1078
+ product_code = SKIP, product_name = SKIP,
1079
+ product_group_id = SKIP, product_group_name = SKIP,
1080
+ del_co_exchange_rate = SKIP, col_co_exchange_rate = SKIP,
1081
+ is_shell_site = SKIP, network = SKIP, site_group_id = SKIP,
1082
+ site_group_name = SKIP, posting_date = SKIP,
1083
+ issuer_code = SKIP, purchased_in_country_code = SKIP,
1084
+ customer_country_code = SKIP, customer_country = SKIP,
1085
+ release_code = SKIP, card_group_id = SKIP,
1086
+ card_sequence_number = SKIP, check_digit = SKIP,
1087
+ fleet_id_description = SKIP, vat_rate = SKIP,
1088
+ vat_category = SKIP, vat_country = SKIP,
1120
1089
  effective_discount_in_trx_currency = SKIP,
1121
- transaction_type = SKIP,
1122
- pin_indicator = SKIP,
1123
- vat_applicable = SKIP,
1124
- net_invoice_indicator = SKIP,
1090
+ transaction_type = SKIP, pin_indicator = SKIP,
1091
+ vat_applicable = SKIP, net_invoice_indicator = SKIP,
1125
1092
  customer_currency_code = SKIP,
1126
1093
  customer_currency_symbol = SKIP,
1127
1094
  effective_unit_discount_in_customer_currency = SKIP,
1128
1095
  effective_discount_in_customer_currency = SKIP,
1129
1096
  va_ton_net_amount_in_customer_currency = SKIP,
1130
- discount_type = SKIP,
1131
- transaction_status = SKIP,
1132
- sales_item_id = SKIP,
1133
- payer_group = SKIP,
1134
- payer_group_name = SKIP,
1135
- refund_flag = SKIP,
1136
- original_sales_item_id = SKIP,
1137
- delco_name = SKIP,
1138
- delco_code = SKIP,
1139
- payer_number = SKIP,
1140
- payer_name = SKIP,
1141
- card_expiry_period = SKIP,
1142
- authorisation_code = SKIP,
1143
- transaction_id = SKIP,
1144
- transaction_line = SKIP,
1145
- allow_clearing = SKIP,
1146
- crm_number = SKIP,
1147
- dispute_status = SKIP,
1148
- rebate_rate = SKIP,
1097
+ discount_type = SKIP, transaction_status = SKIP,
1098
+ sales_item_id = SKIP, payer_group = SKIP,
1099
+ payer_group_name = SKIP, refund_flag = SKIP,
1100
+ original_sales_item_id = SKIP, delco_name = SKIP,
1101
+ delco_code = SKIP, payer_number = SKIP, payer_name = SKIP,
1102
+ card_expiry_period = SKIP, authorisation_code = SKIP,
1103
+ transaction_id = SKIP, transaction_line = SKIP,
1104
+ allow_clearing = SKIP, crm_number = SKIP,
1105
+ dispute_status = SKIP, rebate_rate = SKIP,
1149
1106
  del_co_to_col_co_exchange_rate = SKIP,
1150
- net_euro_amount = SKIP,
1151
- euro_rebate_amount = SKIP,
1152
- euro_vat_amount = SKIP,
1153
- parent_customer_number = SKIP,
1154
- parent_customer_name = SKIP,
1155
- parent_customer_id = SKIP,
1107
+ net_euro_amount = SKIP, euro_rebate_amount = SKIP,
1108
+ euro_vat_amount = SKIP, parent_customer_number = SKIP,
1109
+ parent_customer_name = SKIP, parent_customer_id = SKIP,
1156
1110
  incoming_site_number = SKIP,
1157
1111
  incoming_site_description = SKIP,
1158
- incoming_currency_code = SKIP,
1159
- incoming_product_code = SKIP,
1160
- credit_debit_code = SKIP,
1161
- correction_flag = SKIP,
1162
- additional1 = SKIP,
1163
- additional2 = SKIP,
1164
- additional3 = SKIP,
1112
+ incoming_currency_code = SKIP, incoming_product_code = SKIP,
1113
+ credit_debit_code = SKIP, correction_flag = SKIP,
1114
+ additional1 = SKIP, additional2 = SKIP, additional3 = SKIP,
1165
1115
  additional4 = SKIP,
1166
1116
  rebateon_net_amount_in_customer_currency = SKIP,
1167
1117
  rebateon_net_amount_in_transaction_currency = SKIP,
1168
- network_code = SKIP,
1169
- trn_identifier = SKIP,
1170
- card_type = SKIP,
1118
+ network_code = SKIP, trn_identifier = SKIP, card_type = SKIP,
1171
1119
  delco_list_price_unit_net = SKIP,
1172
1120
  delco_retail_price_unit_net = SKIP,
1173
1121
  delco_retail_price_unit_gross = SKIP,
@@ -1176,8 +1124,7 @@ module ShellDataReportingApIs
1176
1124
  customer_retail_price_unit_gross = SKIP,
1177
1125
  customer_retail_value_total_gross = SKIP,
1178
1126
  customer_retail_value_total_net = SKIP,
1179
- transaction_type_description = SKIP,
1180
- error = SKIP,
1127
+ transaction_type_description = SKIP, error = SKIP,
1181
1128
  request_id = SKIP)
1182
1129
  @type = type unless type == SKIP
1183
1130
  @card_id = card_id unless card_id == SKIP
@@ -1440,16 +1387,9 @@ module ShellDataReportingApIs
1440
1387
  site_code = hash.key?('SiteCode') ? hash['SiteCode'] : SKIP
1441
1388
  site_name = hash.key?('SiteName') ? hash['SiteName'] : SKIP
1442
1389
  site_country = hash.key?('SiteCountry') ? hash['SiteCountry'] : SKIP
1443
- # Parameter is an array, so we need to iterate through it
1444
- location = nil
1445
- unless hash['Location'].nil?
1446
- location = []
1447
- hash['Location'].each do |structure|
1448
- location << (PricedTransactionItemsLocationItems.from_hash(structure) if structure)
1449
- end
1450
- end
1451
-
1452
- location = SKIP unless hash.key?('Location')
1390
+ location = hash.key?('Location') ? APIHelper.deserialize_union_type(
1391
+ UnionTypeLookUp.get(:PricedTransactionResponseTransactionsItemsLocation), hash['Location']
1392
+ ) : SKIP
1453
1393
  card_group_name =
1454
1394
  hash.key?('CardGroupName') ? hash['CardGroupName'] : SKIP
1455
1395
  receipt_number = hash.key?('ReceiptNumber') ? hash['ReceiptNumber'] : SKIP
@@ -1715,5 +1655,15 @@ module ShellDataReportingApIs
1715
1655
  error,
1716
1656
  request_id)
1717
1657
  end
1658
+
1659
+ # Validates an instance of the object from a given value.
1660
+ # @param [PricedTransactionResponseTransactionsItems | Hash] The value against the validation is performed.
1661
+ def self.validate(value)
1662
+ return true if value.instance_of? self
1663
+
1664
+ return false unless value.instance_of? Hash
1665
+
1666
+ true
1667
+ end
1718
1668
  end
1719
1669
  end
@@ -63,12 +63,8 @@ module ShellDataReportingApIs
63
63
  []
64
64
  end
65
65
 
66
- def initialize(request_id = SKIP,
67
- status = SKIP,
68
- data = SKIP,
69
- page = SKIP,
70
- page_size = SKIP,
71
- total_pages = SKIP)
66
+ def initialize(request_id = SKIP, status = SKIP, data = SKIP, page = SKIP,
67
+ page_size = SKIP, total_pages = SKIP)
72
68
  @request_id = request_id unless request_id == SKIP
73
69
  @status = status unless status == SKIP
74
70
  @data = data unless data == SKIP
@@ -74,12 +74,9 @@ module ShellDataReportingApIs
74
74
  ]
75
75
  end
76
76
 
77
- def initialize(fee_rule_id = SKIP,
78
- fee_rule_description = SKIP,
79
- price_rule_id = SKIP,
80
- price_rule_description = SKIP,
81
- total_volume = SKIP,
82
- next_fee_creation_date = SKIP)
77
+ def initialize(fee_rule_id = SKIP, fee_rule_description = SKIP,
78
+ price_rule_id = SKIP, price_rule_description = SKIP,
79
+ total_volume = SKIP, next_fee_creation_date = SKIP)
83
80
  @fee_rule_id = fee_rule_id unless fee_rule_id == SKIP
84
81
  @fee_rule_description = fee_rule_description unless fee_rule_description == SKIP
85
82
  @price_rule_id = price_rule_id unless price_rule_id == SKIP
@@ -70,11 +70,8 @@ module ShellDataReportingApIs
70
70
  ]
71
71
  end
72
72
 
73
- def initialize(from_date = SKIP,
74
- to_date = SKIP,
75
- fees_rule_id = SKIP,
76
- fees_rule_description = SKIP,
77
- total_volume = SKIP)
73
+ def initialize(from_date = SKIP, to_date = SKIP, fees_rule_id = SKIP,
74
+ fees_rule_description = SKIP, total_volume = SKIP)
78
75
  @from_date = from_date unless from_date == SKIP
79
76
  @to_date = to_date unless to_date == SKIP
80
77
  @fees_rule_id = fees_rule_id unless fees_rule_id == SKIP
@@ -80,10 +80,7 @@ module ShellDataReportingApIs
80
80
  []
81
81
  end
82
82
 
83
- def initialize(id = SKIP,
84
- code = SKIP,
85
- name = SKIP,
86
- is_visible = SKIP,
83
+ def initialize(id = SKIP, code = SKIP, name = SKIP, is_visible = SKIP,
87
84
  product_groups = SKIP)
88
85
  @id = id unless id == SKIP
89
86
  @code = code unless code == SKIP
@@ -134,21 +134,13 @@ module ShellDataReportingApIs
134
134
  ]
135
135
  end
136
136
 
137
- def initialize(col_co_code = nil,
138
- payer_number = nil,
139
- account_number = SKIP,
140
- product_code = SKIP,
141
- purchased_in_country = SKIP,
142
- card_pan = SKIP,
143
- from_date_time = SKIP,
144
- to_date_time = SKIP,
145
- transaction_status = SKIP,
146
- fuel_only = SKIP,
137
+ def initialize(col_co_code = nil, payer_number = nil, account_number = SKIP,
138
+ product_code = SKIP, purchased_in_country = SKIP,
139
+ card_pan = SKIP, from_date_time = SKIP, to_date_time = SKIP,
140
+ transaction_status = SKIP, fuel_only = SKIP,
147
141
  product_group_name = SKIP,
148
- vehicle_registration_number = SKIP,
149
- include_declines = SKIP,
150
- card_issuer_name = SKIP,
151
- column_list = SKIP)
142
+ vehicle_registration_number = SKIP, include_declines = SKIP,
143
+ card_issuer_name = SKIP, column_list = SKIP)
152
144
  @col_co_code = col_co_code
153
145
  @payer_number = payer_number
154
146
  @account_number = account_number unless account_number == SKIP
@@ -40,9 +40,7 @@ module ShellDataReportingApIs
40
40
  []
41
41
  end
42
42
 
43
- def initialize(page_size = nil,
44
- page = nil,
45
- filters = nil)
43
+ def initialize(page_size = nil, page = nil, filters = nil)
46
44
  @page_size = page_size
47
45
  @page = page
48
46
  @filters = filters
@@ -535,78 +535,47 @@ module ShellDataReportingApIs
535
535
  ]
536
536
  end
537
537
 
538
- def initialize(col_co_code = SKIP,
539
- payer_number = SKIP,
540
- account_number = SKIP,
541
- card_issue_number = SKIP,
538
+ def initialize(col_co_code = SKIP, payer_number = SKIP,
539
+ account_number = SKIP, card_issue_number = SKIP,
542
540
  collecting_company_currency_code = SKIP,
543
541
  cust_data_customer_entered = SKIP,
544
542
  cust_data_driver_id = SKIP,
545
- cust_data_fleet_description = SKIP,
546
- fleet_id_input = SKIP,
547
- amount = SKIP,
548
- euroshell_site_number = SKIP,
549
- incoming_product_code = SKIP,
550
- product_code = SKIP,
551
- product_name = SKIP,
552
- site_code = SKIP,
543
+ cust_data_fleet_description = SKIP, fleet_id_input = SKIP,
544
+ amount = SKIP, euroshell_site_number = SKIP,
545
+ incoming_product_code = SKIP, product_code = SKIP,
546
+ product_name = SKIP, site_code = SKIP,
553
547
  hosting_collecting_company_name = SKIP,
554
548
  hosting_collecting_company_number = SKIP,
555
- iccdata_tran_type_code = SKIP,
556
- transaction_type = SKIP,
557
- latitude = SKIP,
558
- longitude = SKIP,
559
- merchant_category = SKIP,
549
+ iccdata_tran_type_code = SKIP, transaction_type = SKIP,
550
+ latitude = SKIP, longitude = SKIP, merchant_category = SKIP,
560
551
  merchant_category_description = SKIP,
561
- purchased_in_country = SKIP,
562
- merchant_id = SKIP,
563
- site_name = SKIP,
564
- network = SKIP,
565
- delco_code = SKIP,
566
- odometer_input = SKIP,
567
- odometer_reading_km = SKIP,
568
- odometer_reading_miles = SKIP,
569
- card_pan = SKIP,
570
- pin_indicator = SKIP,
571
- poi_receipt_number = SKIP,
572
- products_code_additional = SKIP,
573
- products_tax_code = SKIP,
574
- fuel_volume = SKIP,
575
- sfgw_card_date_of_expiry = SKIP,
576
- site_currency_iso_code = SKIP,
577
- card_id = SKIP,
578
- transaction_date = SKIP,
579
- transaction_date_time = SKIP,
580
- transaction_id = SKIP,
581
- transaction_status = SKIP,
582
- unit_of_measure = SKIP,
583
- vehicle_registration_number = SKIP,
584
- network_delco_name = SKIP,
585
- product_group_name = SKIP,
586
- fuel_product = SKIP,
587
- account_customer_name = SKIP,
588
- payer_name = SKIP,
589
- transaction_time = SKIP,
590
- transaction_currency = SKIP,
591
- unit_price = SKIP,
592
- authorised_flag = SKIP,
593
- transaction_time_gmt = SKIP,
594
- reason_code = SKIP,
595
- issuer_action_code = SKIP,
552
+ purchased_in_country = SKIP, merchant_id = SKIP,
553
+ site_name = SKIP, network = SKIP, delco_code = SKIP,
554
+ odometer_input = SKIP, odometer_reading_km = SKIP,
555
+ odometer_reading_miles = SKIP, card_pan = SKIP,
556
+ pin_indicator = SKIP, poi_receipt_number = SKIP,
557
+ products_code_additional = SKIP, products_tax_code = SKIP,
558
+ fuel_volume = SKIP, sfgw_card_date_of_expiry = SKIP,
559
+ site_currency_iso_code = SKIP, card_id = SKIP,
560
+ transaction_date = SKIP, transaction_date_time = SKIP,
561
+ transaction_id = SKIP, transaction_status = SKIP,
562
+ unit_of_measure = SKIP, vehicle_registration_number = SKIP,
563
+ network_delco_name = SKIP, product_group_name = SKIP,
564
+ fuel_product = SKIP, account_customer_name = SKIP,
565
+ payer_name = SKIP, transaction_time = SKIP,
566
+ transaction_currency = SKIP, unit_price = SKIP,
567
+ authorised_flag = SKIP, transaction_time_gmt = SKIP,
568
+ reason_code = SKIP, issuer_action_code = SKIP,
596
569
  issuer_action_code_description = SKIP,
597
570
  declined_reason = SKIP,
598
571
  card_status_reason_description = SKIP,
599
572
  transaction_country = SKIP,
600
573
  issuing_collecting_company_name = SKIP,
601
- card_issuer_name = SKIP,
602
- driver_name = SKIP,
603
- bearer_description = SKIP,
604
- card_category_description = SKIP,
574
+ card_issuer_name = SKIP, driver_name = SKIP,
575
+ bearer_description = SKIP, card_category_description = SKIP,
605
576
  card_type_description = SKIP,
606
- card_token_type_description = SKIP,
607
- emboss_type = SKIP,
608
- ev_printed_number = SKIP,
609
- is_rfid = SKIP)
577
+ card_token_type_description = SKIP, emboss_type = SKIP,
578
+ ev_printed_number = SKIP, is_rfid = SKIP)
610
579
  @col_co_code = col_co_code unless col_co_code == SKIP
611
580
  @payer_number = payer_number unless payer_number == SKIP
612
581
  @account_number = account_number unless account_number == SKIP
@@ -63,12 +63,8 @@ module ShellDataReportingApIs
63
63
  []
64
64
  end
65
65
 
66
- def initialize(request_id = SKIP,
67
- status = SKIP,
68
- page = SKIP,
69
- row_count = SKIP,
70
- total_pages = SKIP,
71
- data = SKIP)
66
+ def initialize(request_id = SKIP, status = SKIP, page = SKIP,
67
+ row_count = SKIP, total_pages = SKIP, data = SKIP)
72
68
  @request_id = request_id unless request_id == SKIP
73
69
  @status = status unless status == SKIP
74
70
  @page = page unless page == SKIP
@@ -64,12 +64,9 @@ module ShellDataReportingApIs
64
64
  []
65
65
  end
66
66
 
67
- def initialize(role_name = SKIP,
68
- is_customer_admin = true,
69
- is_customer_user = false,
70
- is_shell_admin = false,
71
- is_service_account = false,
72
- is_user_admin = true)
67
+ def initialize(role_name = SKIP, is_customer_admin = true,
68
+ is_customer_user = false, is_shell_admin = false,
69
+ is_service_account = false, is_user_admin = true)
73
70
  @role_name = role_name unless role_name == SKIP
74
71
  @is_customer_admin = is_customer_admin unless is_customer_admin == SKIP
75
72
  @is_customer_user = is_customer_user unless is_customer_user == SKIP
@@ -45,10 +45,10 @@ module ShellDataReportingApIs
45
45
  # The status of the invoices
46
46
  # Optional
47
47
  # One of the following values:
48
- # • NEW
49
- # • VIEWED
50
- # • DOWNLOADED
51
- # • RESTORED
48
+ # • NEW
49
+ # • VIEWED
50
+ # • DOWNLOADED
51
+ # • RESTORED
52
52
  # @return [String]
53
53
  attr_accessor :invoice_status
54
54
 
@@ -87,20 +87,20 @@ module ShellDataReportingApIs
87
87
  # Optional
88
88
  # This parameter will be ignored if GrossAmount parameter is not set.
89
89
  # One of the following values:
90
- # • LT (Less Than)
91
- # • LE (Lesser or Equal)
92
- # • EQ (equal)
93
- # • GE (Greater or equal)
94
- # • GT (Greater than)
90
+ # • LT (Less Than)
91
+ # • LE (Lesser or Equal)
92
+ # • EQ (equal)
93
+ # • GE (Greater or equal)
94
+ # • GT (Greater than)
95
95
  # @return [String]
96
96
  attr_accessor :gross_amount_operator
97
97
 
98
98
  # Document Type
99
99
  # Optional
100
100
  # One of the following values:
101
- # • NAT (National)
102
- # • INT (International)
103
- # • SOA (Statement of Account)
101
+ # • NAT (National)
102
+ # • INT (International)
103
+ # • SOA (Statement of Account)
104
104
  # @return [String]
105
105
  attr_accessor :document_type
106
106
 
@@ -185,21 +185,13 @@ module ShellDataReportingApIs
185
185
  ]
186
186
  end
187
187
 
188
- def initialize(payer_number = nil,
189
- col_co_code = nil,
190
- account_number = SKIP,
191
- account_number_list = SKIP,
192
- invoice_number = SKIP,
193
- invoice_number_list = SKIP,
194
- invoice_status = SKIP,
195
- issuing_date_from = SKIP,
196
- issuing_date_to = SKIP,
197
- due_date_from = SKIP,
198
- due_date_to = SKIP,
199
- gross_amount = SKIP,
200
- gross_amount_operator = SKIP,
201
- document_type = SKIP,
202
- vat_issuer_country = SKIP,
188
+ def initialize(payer_number = nil, col_co_code = nil, account_number = SKIP,
189
+ account_number_list = SKIP, invoice_number = SKIP,
190
+ invoice_number_list = SKIP, invoice_status = SKIP,
191
+ issuing_date_from = SKIP, issuing_date_to = SKIP,
192
+ due_date_from = SKIP, due_date_to = SKIP,
193
+ gross_amount = SKIP, gross_amount_operator = SKIP,
194
+ document_type = SKIP, vat_issuer_country = SKIP,
203
195
  sorty_by = SKIP)
204
196
  @payer_number = payer_number
205
197
  @account_number = account_number unless account_number == SKIP