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
@@ -50,10 +50,8 @@ module ShellDataReportingApIs
50
50
  []
51
51
  end
52
52
 
53
- def initialize(service_reference = SKIP,
54
- update_odometer_references = SKIP,
55
- error = SKIP,
56
- request_id = SKIP)
53
+ def initialize(service_reference = SKIP, update_odometer_references = SKIP,
54
+ error = SKIP, request_id = SKIP)
57
55
  @service_reference = service_reference unless service_reference == SKIP
58
56
  unless update_odometer_references == SKIP
59
57
  @update_odometer_references =
@@ -127,20 +127,12 @@ module ShellDataReportingApIs
127
127
  ]
128
128
  end
129
129
 
130
- def initialize(date = SKIP,
131
- product_id = SKIP,
132
- product_code = SKIP,
133
- product_name = SKIP,
134
- is_fuel_product = SKIP,
135
- site_group_id = SKIP,
136
- site_group_name = SKIP,
137
- total_volume = SKIP,
138
- total_gross = SKIP,
139
- total_net = SKIP,
140
- currency_code = SKIP,
141
- currency_symbol = SKIP,
142
- product_group_id = SKIP,
143
- product_group_name = SKIP)
130
+ def initialize(date = SKIP, product_id = SKIP, product_code = SKIP,
131
+ product_name = SKIP, is_fuel_product = SKIP,
132
+ site_group_id = SKIP, site_group_name = SKIP,
133
+ total_volume = SKIP, total_gross = SKIP, total_net = SKIP,
134
+ currency_code = SKIP, currency_symbol = SKIP,
135
+ product_group_id = SKIP, product_group_name = SKIP)
144
136
  @date = date unless date == SKIP
145
137
  @product_id = product_id unless product_id == SKIP
146
138
  @product_code = product_code unless product_code == SKIP
@@ -75,11 +75,8 @@ module ShellDataReportingApIs
75
75
  []
76
76
  end
77
77
 
78
- def initialize(col_co_id = SKIP,
79
- col_co_code = SKIP,
80
- payer_id = SKIP,
81
- payer_number = SKIP,
82
- include_history = SKIP,
78
+ def initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP,
79
+ payer_number = SKIP, include_history = SKIP,
83
80
  include_current_period_volume = SKIP)
84
81
  @col_co_id = col_co_id unless col_co_id == SKIP
85
82
  @col_co_code = col_co_code unless col_co_code == SKIP
@@ -56,10 +56,8 @@ module ShellDataReportingApIs
56
56
  []
57
57
  end
58
58
 
59
- def initialize(configuration = SKIP,
60
- current_period_consumption = SKIP,
61
- historical_bonus_paid = SKIP,
62
- error = SKIP,
59
+ def initialize(configuration = SKIP, current_period_consumption = SKIP,
60
+ historical_bonus_paid = SKIP, error = SKIP,
63
61
  request_id = SKIP)
64
62
  @configuration = configuration unless configuration == SKIP
65
63
  unless current_period_consumption == SKIP
@@ -68,11 +68,8 @@ module ShellDataReportingApIs
68
68
  []
69
69
  end
70
70
 
71
- def initialize(col_co_id = SKIP,
72
- col_co_code = SKIP,
73
- payer_id = SKIP,
74
- payer_number = SKIP,
75
- include_history = SKIP)
71
+ def initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP,
72
+ payer_number = SKIP, include_history = SKIP)
76
73
  @col_co_id = col_co_id unless col_co_id == SKIP
77
74
  @col_co_code = col_co_code unless col_co_code == SKIP
78
75
  @payer_id = payer_id unless payer_id == SKIP
@@ -56,11 +56,8 @@ module ShellDataReportingApIs
56
56
  []
57
57
  end
58
58
 
59
- def initialize(configuration = SKIP,
60
- current_period_consumption = SKIP,
61
- history = SKIP,
62
- error = SKIP,
63
- request_id = SKIP)
59
+ def initialize(configuration = SKIP, current_period_consumption = SKIP,
60
+ history = SKIP, error = SKIP, request_id = SKIP)
64
61
  @configuration = configuration unless configuration == SKIP
65
62
  unless current_period_consumption == SKIP
66
63
  @current_period_consumption =
@@ -5,12 +5,12 @@
5
5
 
6
6
  module ShellDataReportingApIs
7
7
  # A utility to allow users to set the content-type for files
8
- class FileWrapper < CoreLibrary::FileWrapper
9
- # The constructor.
10
- # @param [File] file The file to be sent in the request.
11
- # @param [string] content_type The content type of the provided file.
12
- def initialize(file, content_type: 'application/octet-stream')
13
- super
14
- end
15
- end
16
- end
8
+ class FileWrapper < CoreLibrary::FileWrapper
9
+ # The constructor.
10
+ # @param [File] file The file to be sent in the request.
11
+ # @param [string] content_type The content type of the provided file.
12
+ def initialize(file, content_type: 'application/octet-stream')
13
+ super
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,35 @@
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
+ # The `UnionTypeLookUp` class serves as a utility class for
8
+ # storing and managing type combinator templates. It acts as a container for the templates
9
+ # used in handling various oneof/anyof instances within the sdk.
10
+ class UnionTypeLookUp
11
+ include CoreLibrary
12
+ # rubocop:disable Lint/RedundantCopDisableDirective, Style/HashSyntax, Layout/FirstArgumentIndentation
13
+ def self.union_types
14
+ {
15
+ :PricedTransactionResponseTransactionsItemsLocation => OneOf.new(
16
+ [
17
+ LeafType.new(Object, UnionTypeContext.new(
18
+ is_nullable: true
19
+ )),
20
+ LeafType.new(PricedTransactionItemsLocationItems)
21
+ ],
22
+ UnionTypeContext.new(
23
+ is_array: true,
24
+ is_optional: true
25
+ )
26
+ )
27
+ }
28
+ end
29
+ # rubocop:enable Lint/RedundantCopDisableDirective, Style/HashSyntax, Layout/FirstArgumentIndentation
30
+
31
+ def self.get(name)
32
+ UnionTypeLookUp.union_types[name]
33
+ end
34
+ end
35
+ end
@@ -16,6 +16,7 @@ require_relative 'shell_data_reporting_ap_is/client'
16
16
  # Utilities
17
17
  require_relative 'shell_data_reporting_ap_is/utilities/file_wrapper'
18
18
  require_relative 'shell_data_reporting_ap_is/utilities/date_time_helper'
19
+ require_relative 'shell_data_reporting_ap_is/utilities/union_type_lookup'
19
20
 
20
21
  # Http
21
22
  require_relative 'shell_data_reporting_ap_is/http/http_call_back'
@@ -198,6 +199,8 @@ require_relative 'shell_data_reporting_ap_is/models/' \
198
199
  'statement_of_account_request_filters'
199
200
  require_relative 'shell_data_reporting_ap_is/models/' \
200
201
  'invoice_dates_request_filters'
202
+ require_relative 'shell_data_reporting_ap_is/models/' \
203
+ 'fleetmanagement_v1_user_loggedinuser_request'
201
204
  require_relative 'shell_data_reporting_ap_is/models/o_auth_token'
202
205
  require_relative 'shell_data_reporting_ap_is/models/' \
203
206
  'priced_transaction_req_v2_invoice_status_enum'
@@ -25,10 +25,5 @@ class ControllerTestBase < Minitest::Test
25
25
  def setup_class
26
26
  _config = create_configuration
27
27
  @client = Client.new(config: _config)
28
-
29
- bearer_token_token = @client.bearer_token.fetch_token()
30
- bearer_token_credentials = _config.bearer_token_credentials.clone_with(o_auth_token: bearer_token_token)
31
- _config = _config.clone_with(bearer_token_credentials: bearer_token_credentials)
32
- @client = Client.new(config: _config)
33
28
  end
34
29
  end
@@ -96,7 +96,7 @@ class InvoiceControllerTests < ControllerTestBase
96
96
  # * Search invoices including einvoices
97
97
  # * Search invoices by summary document
98
98
  # * Search invoices by statement of account
99
- # * Search invoices by fixed and custom date periods
99
+ # * Search invoices by fixed and custom date periods
100
100
  def test_invoice_summary
101
101
  # Parameters for the API call
102
102
  request_id = '2b0cbe11-f109-4c43-9201-49af0370df1c'
@@ -13,16 +13,25 @@ class TransactionControllerTests < ControllerTestBase
13
13
  @response_catcher = @controller.http_call_back
14
14
  end
15
15
 
16
- # This endpoint allows querying last 48 hours of transaction data of Shell Card (i.e. Priced, Billed, Unbilled etc. sales items). It provides a flexible search criteria and supports pagination. E.g., if the request is made at 08:30 AM on 18 Aug 2022 then transactions until 16 Aug 2022 08:30 AM (including) can be retrieved.
17
- #
18
- ##### Supported operations
19
- # * Search by Date and Time range (within the last 48 hours only)
20
- # * Search by Payer and/or Account number
21
- # * Search by Card
22
- # * Search by Purchased Country
23
- # * Search by Transaction posting date
24
- # * Search by Driver Name or Vehicle registration number
25
- # * Search by Fuel only transactions
16
+ # This endpoint allows querying last 48 hours of transaction data of Shell Card (i.e. Priced, Billed, Unbilled etc. sales items). It provides a flexible search criteria and supports pagination. E.g., if the request is made at 08:30 AM on 18 Aug 2022 then transactions until 16 Aug 2022 08:30 AM (including) can be retrieved.
17
+ #
18
+ #
19
+ ##### Supported operations
20
+ #
21
+ # * Search by Date and Time range (within the last 48 hours only)
22
+ #
23
+ # * Search by Payer and/or Account number
24
+ #
25
+ # * Search by Card
26
+ #
27
+ # * Search by Purchased Country
28
+ #
29
+ # * Search by Transaction posting date
30
+ #
31
+ # * Search by Driver Name or Vehicle registration number
32
+ #
33
+ # * Search by Fuel only transactions
34
+ #
26
35
  # * Search by Product and/or Product group
27
36
  def test_recent_transactions_new
28
37
  # Parameters for the API call
@@ -121,7 +130,7 @@ class TransactionControllerTests < ControllerTestBase
121
130
  # * EVChargeStartDate
122
131
  # * EVChargeStartTime
123
132
  # * EVChargeEndDate
124
- # * EVChargeEndTime
133
+ # * EVChargeEndTime
125
134
  def test_priced_transactions_v2
126
135
  # Parameters for the API call
127
136
  request_id = '2b0cbe11-f109-4c43-9201-49af0370df1c'
@@ -163,70 +172,69 @@ class TransactionControllerTests < ControllerTestBase
163
172
  '2452","Additional2":"GBALLEGO0002452","Additional3":"GBALLEGO0002452","'\
164
173
  'Additional4":"GBALLEGO0002452","AllowClearing":"Null","AuthorisationCod'\
165
174
  'e":300796,"TransactionStatus":"Y","DriverName":"SATTY BHAMRA","CardExpi'\
166
- 'ryPeriod":2204,"CardExpiry":"2022-01-01","CardGroupId":40000,"CardGroup'\
167
- 'Name":"006240 FIRE BRIGHT SOLUTIONS","IssuerCode":7002,"CardPAN":"70020'\
168
- '53465789891000","ReleaseCode":9,"CardSequenceNumber":617,"CardType":"GB'\
169
- ' STD FLT NAT SINGLE R9","ColCoCode":"014","UnitDiscountInvoiceCurrency"'\
170
- ':-0.0051,"ColCoExchangeRate":0.851858,"InvoiceCurrencySymbol":"GBP","Co'\
171
- 'rrectionFlag":true,"CRMNumber":10,"CustomerCountry":"United Kingdom","C'\
172
- 'ustomerCurrencyCode":"GBP","CustomerCurrencySymbol":"£","RebateonNetAmo'\
173
- 'untInCustomerCurrency":0,"EffectiveDiscountInCustomerCurrency":-0.22,"E'\
174
- 'ffectiveUnitDiscountInCustomerCurrency":-0.0051,"UnitPriceInInvoiceCurr'\
175
- 'ency":1.1024,"InvoiceTax":0,"InvoiceGrossAmount":57.25,"InvoiceNetAmoun'\
176
- 't":47.71,"VATonNetAmountInCustomerCurrency":9.54,"CustomerRetailPriceUn'\
177
- 'itGross":0,"CustomerRetailValueTotalGross":57.52,"CustomerRetailValueTo'\
178
- 'talNet":47.93,"TransactionTypeDescription":9.59,"RebateonNetAmountInTra'\
179
- 'nsactionCurrency":-0.22,"EffectiveDiscountInTrxCurrency":-0.22,"DelCoTo'\
180
- 'ColCoExchangeRate":0,"Cards":[275549],"UnitDiscountTransactionCurrency"'\
181
- ':-0.005,"TransactionGrossAmount":57.25,"TransactionNetAmount":47.71,"Tr'\
182
- 'ansactionTax":9.54,"VATonNetAmount":9.54,"DelcoListPriceUnitNet":0,"Del'\
183
- 'coRetailPriceUnitGross":1.32888,"UnitPriceInTransactionCurrency":1.1074'\
184
- ',"DelcoRetailPriceUnitNet":1.1074,"DelcoRetailValueTotalGross":57.52,"D'\
185
- 'elcoRetailValueTotalNet":47.93,"TransactionCurrencySymbol":"$","Discoun'\
186
- 'tType":"Retail","DisputeStatus":false,"IsShellSite":false,"FleetIdInput'\
187
- '":"YG67OUM","IncomingProductCode":23,"PostingDate":"2021-08-02","Postin'\
188
- 'gTime":"0001-01-01T14:15:22Z","ProductCode":30,"ProductName":"Unleaded '\
189
- '- Medium octane","ProductGroupId":22,"IncomingCurrencyCode":"GBP","Inco'\
190
- 'mingSiteDescription":"Shell Broadway Ring","Location":"Shell Broadway R'\
191
- 'ing","SiteName":"Shell Broadway Ring","SiteCode":32,"IncomingSiteNumber'\
192
- '":15,"InvoiceCurrencyCode":"GBP","InvoiceDate":"2021-08-02","InvoiceNum'\
193
- 'ber":3201016193,"FuelProduct":true,"VATApplicable":"Y","PayerName":"Col'\
194
- 'ours Services Ltd","PayerNumber":"GB12121212","ParentCustomerNumber":"G'\
195
- 'B12121212","PayerGroup":"H312066","PayerGroupName":"12162566 - FUEL CAR'\
196
- 'D SERVICE","CheckDigit":6,"NetInvoiceIndicator":"Y","DelcoCode":5,"Netw'\
197
- 'orkCode":3,"PurchasedInCountry":"United Kingdom","SiteCountry":"United '\
198
- 'Kingdom","VATCountry":"United Kingdom","DelcoName":"Shell U.K. Oil Prod'\
199
- 'ucts Limited","Network":"Shell","OdometerInput":0,"OriginalSalesItemId"'\
200
- ':"Null","FleetIDDescription":"YG67OUM","ParentCustomerId":6494,"PINIndi'\
201
- 'cator":"Y, N","ProductGroupName":"Fees","PurchasedInCountryCode":"GB","'\
202
- 'Quantity":43.28,"RebateRate":0.0022,"ReceiptNumber":6803,"RefundFlag":"'\
203
- 'Y","SiteGroupId":202,"SiteGroupName":"CZ 9100 ECONOMY NETWORK","Latitud'\
204
- 'e":53.83606,"Longitude":-1.61854,"DelCoExchangeRate":0.851858,"EuroReba'\
205
- 'teAmount":-0.258259,"NetEuroAmount":56.01,"EuroVATAmount":11.2,"ParentC'\
206
- 'ustomerName":"FUEL CARD SERVICES LTD","IsInvoiced":false,"TransactionCu'\
207
- 'rrencyCode":"GBP","CreditDebitCode":"D or C","TransactionDate":"2021-08'\
208
- '-01","TransactionTime":"0001-01-01T12:16:58Z","TransactionItemId":"H305'\
209
- '908971030","TrnIdentifier":"H305908971030","Type":"SALE","TransactionLi'\
210
- 'ne":1,"TransactionType":"Purchase","UTCOffset":"Europe/London","VATCate'\
211
- 'gory":"United Kingdom Standard VAT Rate","VATRate":0.2,"VehicleRegistra'\
212
- 'tion":"YG67OUM","IsCancelled":"Y","ColCoGrossAmount":57.25,"ColCoNetAmo'\
213
- 'unt":47.71,"ColCoVATAmount":9.54,"OriginalCurrencySymbol":"$","Original'\
214
- 'CurrencyCode":"$","OriginalVATAmount":0,"EmbossText":"PARKLANE PROPERTI'\
215
- 'ES LTD","OriginalExchangeRate":0,"OriginalTransactionItemInvoiceDate":"'\
216
- '2022-02-02","FeeTypeId":1,"LineItemDescription":true,"FeeRuleDescriptio'\
217
- 'n":"Simple Fee","Frequency":1,"FeeRuleId":1,"SystemEntryDate":"2021-08-'\
218
- '28","SystemEntryTime":"0001-01-01T20:21:08Z","IsManual":"Y","OriginalTr'\
219
- 'ansactionItemId":"Y","OriginalTransactionItemInvoiceNumber":6750802,"Or'\
220
- 'iginalTransactionItemInvoiceId":234,"PayerShortName":"FUEL CARD SERVICE'\
221
- 'S LTD","ReverseCharge":"Y","OriginalGrossAmount":57.25,"OriginalNetAmou'\
222
- 'nt":57.25,"UnitOfMeasure":"L","RoadType":"National Road","CustomerCount'\
223
- 'ryIsoCode":"DE","EVOperator":"Shell Recharge","EVSerialId":"GBALLEGO000'\
224
- '2452","EVChargePointSerial":"GBALLEGO0002452","EVChargePointConnectorTy'\
225
- 'pe":5,"EVChargePointConnectorTypeDescription":"DC 50 kW","EVChargeDurat'\
226
- 'ion":"PT3205S","EVChargeStartDate":"2021-08-01","EVChargeStartTime":"00'\
227
- '01-01-01T20:08:01Z","EVChargeEndDate":"2022-08-01","EVChargeEndTime":"0'\
228
- '001-01-01T20:08:01Z","HostingCollectingCompanyNumber":0,"TransactionId"'\
229
- ':0,"FuelOnly":true}],"Page":3,"PageSize":30,"TotalPages":5}'
175
+ 'ryPeriod":2204,"CardExpiry":"20220101","CardGroupId":40000,"CardGroupNa'\
176
+ 'me":"006240 FIRE BRIGHT SOLUTIONS","IssuerCode":7002,"CardPAN":"7002053'\
177
+ '465789891000","ReleaseCode":9,"CardSequenceNumber":617,"CardType":"GB S'\
178
+ 'TD FLT NAT SINGLE R9","ColCoCode":"014","UnitDiscountInvoiceCurrency":-'\
179
+ '0.0051,"ColCoExchangeRate":0.851858,"InvoiceCurrencySymbol":"GBP","Corr'\
180
+ 'ectionFlag":true,"CRMNumber":10,"CustomerCountry":"United Kingdom","Cus'\
181
+ 'tomerCurrencyCode":"GBP","CustomerCurrencySymbol":"£","RebateonNetAmoun'\
182
+ 'tInCustomerCurrency":0,"EffectiveDiscountInCustomerCurrency":-0.22,"Eff'\
183
+ 'ectiveUnitDiscountInCustomerCurrency":-0.0051,"UnitPriceInInvoiceCurren'\
184
+ 'cy":1.1024,"InvoiceTax":0,"InvoiceGrossAmount":57.25,"InvoiceNetAmount"'\
185
+ ':47.71,"VATonNetAmountInCustomerCurrency":9.54,"CustomerRetailPriceUnit'\
186
+ 'Gross":0,"CustomerRetailValueTotalGross":57.52,"CustomerRetailValueTota'\
187
+ 'lNet":47.93,"TransactionTypeDescription":9.59,"RebateonNetAmountInTrans'\
188
+ 'actionCurrency":-0.22,"EffectiveDiscountInTrxCurrency":-0.22,"DelCoToCo'\
189
+ 'lCoExchangeRate":0,"Cards":[275549],"UnitDiscountTransactionCurrency":-'\
190
+ '0.005,"TransactionGrossAmount":57.25,"TransactionNetAmount":47.71,"Tran'\
191
+ 'sactionTax":9.54,"VATonNetAmount":9.54,"DelcoListPriceUnitNet":0,"Delco'\
192
+ 'RetailPriceUnitGross":1.32888,"UnitPriceInTransactionCurrency":1.1074,"'\
193
+ 'DelcoRetailPriceUnitNet":1.1074,"DelcoRetailValueTotalGross":57.52,"Del'\
194
+ 'coRetailValueTotalNet":47.93,"TransactionCurrencySymbol":"$","DiscountT'\
195
+ 'ype":"Retail","DisputeStatus":false,"IsShellSite":false,"FleetIdInput":'\
196
+ '"YG67OUM","IncomingProductCode":23,"PostingDate":"20210802","PostingTim'\
197
+ 'e":"14:15:22","ProductCode":30,"ProductName":"Unleaded - Medium octane"'\
198
+ ',"ProductGroupId":22,"IncomingCurrencyCode":"GBP","IncomingSiteDescript'\
199
+ 'ion":"Shell Broadway Ring","Location":"Shell Broadway Ring","SiteName":'\
200
+ '"Shell Broadway Ring","SiteCode":32,"IncomingSiteNumber":15,"InvoiceCur'\
201
+ 'rencyCode":"GBP","InvoiceDate":"20210802","InvoiceNumber":3201016193,"F'\
202
+ 'uelProduct":true,"VATApplicable":"Y","PayerName":"Colours Services Ltd"'\
203
+ ',"PayerNumber":"GB12121212","ParentCustomerNumber":"GB12121212","PayerG'\
204
+ 'roup":"H312066","PayerGroupName":"12162566 - FUEL CARD SERVICE","CheckD'\
205
+ 'igit":6,"NetInvoiceIndicator":"Y","DelcoCode":5,"NetworkCode":3,"Purcha'\
206
+ 'sedInCountry":"United Kingdom","SiteCountry":"United Kingdom","VATCount'\
207
+ 'ry":"United Kingdom","DelcoName":"Shell U.K. Oil Products Limited","Net'\
208
+ 'work":"Shell","OdometerInput":0,"OriginalSalesItemId":"Null","FleetIDDe'\
209
+ 'scription":"YG67OUM","ParentCustomerId":6494,"PINIndicator":"Y, N","Pro'\
210
+ 'ductGroupName":"Fees","PurchasedInCountryCode":"GB","Quantity":43.28,"R'\
211
+ 'ebateRate":0.0022,"ReceiptNumber":6803,"RefundFlag":"Y","SiteGroupId":2'\
212
+ '02,"SiteGroupName":"CZ 9100 ECONOMY NETWORK","Latitude":53.83606,"Longi'\
213
+ 'tude":-1.61854,"DelCoExchangeRate":0.851858,"EuroRebateAmount":-0.25825'\
214
+ '9,"NetEuroAmount":56.01,"EuroVATAmount":11.2,"ParentCustomerName":"FUEL'\
215
+ ' CARD SERVICES LTD","IsInvoiced":false,"TransactionCurrencyCode":"GBP",'\
216
+ '"CreditDebitCode":"D or C","TransactionDate":"20210801","TransactionTim'\
217
+ 'e":"12:16:58","TransactionItemId":"H305908971030","TrnIdentifier":"H305'\
218
+ '908971030","Type":"SALE","TransactionLine":1,"TransactionType":"Purchas'\
219
+ 'e","UTCOffset":"Europe/London","VATCategory":"United Kingdom Standard V'\
220
+ 'AT Rate","VATRate":0.2,"VehicleRegistration":"YG67OUM","IsCancelled":"Y'\
221
+ '","ColCoGrossAmount":57.25,"ColCoNetAmount":47.71,"ColCoVATAmount":9.54'\
222
+ ',"OriginalCurrencySymbol":"$","OriginalCurrencyCode":"$","OriginalVATAm'\
223
+ 'ount":0,"EmbossText":"PARKLANE PROPERTIES LTD","OriginalExchangeRate":0'\
224
+ ',"OriginalTransactionItemInvoiceDate":"20220202","FeeTypeId":1,"LineIte'\
225
+ 'mDescription":true,"FeeRuleDescription":"Simple Fee","Frequency":1,"Fee'\
226
+ 'RuleId":1,"SystemEntryDate":"20210828","SystemEntryTime":"20:21:08","Is'\
227
+ 'Manual":"Y","OriginalTransactionItemId":"Y","OriginalTransactionItemInv'\
228
+ 'oiceNumber":6750802,"OriginalTransactionItemInvoiceId":234,"PayerShortN'\
229
+ 'ame":"FUEL CARD SERVICES LTD","ReverseCharge":"Y","OriginalGrossAmount"'\
230
+ ':57.25,"OriginalNetAmount":57.25,"UnitOfMeasure":"L","RoadType":"Nation'\
231
+ 'al Road","CustomerCountryIsoCode":"DE","EVOperator":"Shell Recharge","E'\
232
+ 'VSerialId":"GBALLEGO0002452","EVChargePointSerial":"GBALLEGO0002452","E'\
233
+ 'VChargePointConnectorType":5,"EVChargePointConnectorTypeDescription":"D'\
234
+ 'C 50 kW","EVChargeDuration":"PT3205S","EVChargeStartDate":"2021-08-01",'\
235
+ '"EVChargeStartTime":"20:08:01","EVChargeEndDate":"2022-08-01","EVCharge'\
236
+ 'EndTime":"20:08:01","HostingCollectingCompanyNumber":0,"TransactionId":'\
237
+ '0,"FuelOnly":true}],"Page":3,"PageSize":30,"TotalPages":5}'
230
238
  )
231
239
  received_body = JSON.parse(@response_catcher.response.raw_body)
232
240
  assert(ComparisonHelper.match_body(expected_body, received_body))
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data-and-reporting-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - developer sdksio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-28 00:00:00.000000000 Z
11
+ date: 2024-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apimatic_core_interfaces
@@ -16,62 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.2.0
19
+ version: 0.2.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.2.0
26
+ version: 0.2.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: apimatic_core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.3.0
33
+ version: 0.3.11
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.3.0
40
+ version: 0.3.11
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: apimatic_faraday_client_adapter
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.1.0
47
+ version: 0.1.4
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.1.0
54
+ version: 0.1.4
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: minitest
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '5.14'
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- version: 5.14.1
61
+ version: 5.24.0
65
62
  type: :development
66
63
  prerelease: false
67
64
  version_requirements: !ruby/object:Gem::Requirement
68
65
  requirements:
69
66
  - - "~>"
70
67
  - !ruby/object:Gem::Version
71
- version: '5.14'
72
- - - ">="
73
- - !ruby/object:Gem::Version
74
- version: 5.14.1
68
+ version: 5.24.0
75
69
  - !ruby/object:Gem::Dependency
76
70
  name: minitest-proveit
77
71
  requirement: !ruby/object:Gem::Requirement
@@ -179,6 +173,7 @@ files:
179
173
  - lib/shell_data_reporting_ap_is/models/fee_summary_response.rb
180
174
  - lib/shell_data_reporting_ap_is/models/fees_fee_rule_tiers.rb
181
175
  - lib/shell_data_reporting_ap_is/models/finance_currency.rb
176
+ - lib/shell_data_reporting_ap_is/models/fleetmanagement_v1_user_loggedinuser_request.rb
182
177
  - lib/shell_data_reporting_ap_is/models/fuel_consumption_card.rb
183
178
  - lib/shell_data_reporting_ap_is/models/fuel_consumption_data.rb
184
179
  - lib/shell_data_reporting_ap_is/models/fuel_consumption_request.rb
@@ -272,6 +267,7 @@ files:
272
267
  - lib/shell_data_reporting_ap_is/models/volume_based_pricing_response.rb
273
268
  - lib/shell_data_reporting_ap_is/utilities/date_time_helper.rb
274
269
  - lib/shell_data_reporting_ap_is/utilities/file_wrapper.rb
270
+ - lib/shell_data_reporting_ap_is/utilities/union_type_lookup.rb
275
271
  - test/controllers/controller_test_base.rb
276
272
  - test/controllers/test_invoice_controller.rb
277
273
  - test/controllers/test_transaction_controller.rb