data-and-reporting-sdk 1.3.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +66 -35
  3. data/lib/shell_data_reporting_ap_is/api_helper.rb +2 -2
  4. data/lib/shell_data_reporting_ap_is/client.rb +11 -12
  5. data/lib/shell_data_reporting_ap_is/configuration.rb +23 -25
  6. data/lib/shell_data_reporting_ap_is/controllers/base_controller.rb +3 -9
  7. data/lib/shell_data_reporting_ap_is/controllers/customer_controller.rb +251 -288
  8. data/lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb +20 -20
  9. data/lib/shell_data_reporting_ap_is/controllers/o_auth_authorization_controller.rb +7 -7
  10. data/lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb +204 -259
  11. data/lib/shell_data_reporting_ap_is/exceptions/api_exception.rb +2 -2
  12. data/lib/shell_data_reporting_ap_is/exceptions/error_object_exception.rb +7 -5
  13. data/lib/shell_data_reporting_ap_is/exceptions/o_auth_provider_exception.rb +7 -5
  14. data/lib/shell_data_reporting_ap_is/http/auth/{bearer_token.rb → o_auth2.rb} +28 -27
  15. data/lib/shell_data_reporting_ap_is/http/http_call_back.rb +2 -2
  16. data/lib/shell_data_reporting_ap_is/http/http_method_enum.rb +2 -2
  17. data/lib/shell_data_reporting_ap_is/http/http_request.rb +2 -2
  18. data/lib/shell_data_reporting_ap_is/http/http_response.rb +2 -2
  19. data/lib/shell_data_reporting_ap_is/http/proxy_settings.rb +13 -0
  20. data/lib/shell_data_reporting_ap_is/models/account_access.rb +2 -2
  21. data/lib/shell_data_reporting_ap_is/models/account_req.rb +84 -0
  22. data/lib/shell_data_reporting_ap_is/models/account_request.rb +3 -3
  23. data/lib/shell_data_reporting_ap_is/models/account_res.rb +158 -0
  24. data/lib/shell_data_reporting_ap_is/models/account_response_accounts_items.rb +2 -2
  25. data/lib/shell_data_reporting_ap_is/models/accounts.rb +2 -2
  26. data/lib/shell_data_reporting_ap_is/models/address.rb +2 -2
  27. data/lib/shell_data_reporting_ap_is/models/associated_account.rb +2 -2
  28. data/lib/shell_data_reporting_ap_is/models/audit_array_elements.rb +71 -0
  29. data/lib/shell_data_reporting_ap_is/models/audit_req.rb +84 -0
  30. data/lib/shell_data_reporting_ap_is/models/audit_request.rb +29 -41
  31. data/lib/shell_data_reporting_ap_is/models/audit_response.rb +88 -53
  32. data/lib/shell_data_reporting_ap_is/models/audit_response_audits_items.rb +29 -6
  33. data/lib/shell_data_reporting_ap_is/models/bank_account.rb +2 -2
  34. data/lib/shell_data_reporting_ap_is/models/base_model.rb +2 -2
  35. data/lib/shell_data_reporting_ap_is/models/bonus_configuration.rb +2 -2
  36. data/lib/shell_data_reporting_ap_is/models/bonus_history.rb +2 -2
  37. data/lib/shell_data_reporting_ap_is/models/card_day_time_restrictions.rb +2 -2
  38. data/lib/shell_data_reporting_ap_is/models/card_exceptions.rb +2 -2
  39. data/lib/shell_data_reporting_ap_is/models/card_group_req.rb +84 -0
  40. data/lib/shell_data_reporting_ap_is/models/card_group_request.rb +6 -31
  41. data/lib/shell_data_reporting_ap_is/models/card_group_res.rb +158 -0
  42. data/lib/shell_data_reporting_ap_is/models/card_group_response_card_groups_items.rb +2 -2
  43. data/lib/shell_data_reporting_ap_is/models/{error_user_access.rb → card_type_req.rb} +14 -14
  44. data/lib/shell_data_reporting_ap_is/models/card_type_request.rb +2 -2
  45. data/lib/shell_data_reporting_ap_is/models/card_type_res.rb +91 -0
  46. data/lib/shell_data_reporting_ap_is/models/card_type_response_customer_card_types_items.rb +3 -3
  47. data/lib/shell_data_reporting_ap_is/models/card_usage_restrictions.rb +2 -2
  48. data/lib/shell_data_reporting_ap_is/models/card_usage_summary_req.rb +62 -0
  49. data/lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb +2 -2
  50. data/lib/shell_data_reporting_ap_is/models/card_usage_summary_res.rb +116 -0
  51. data/lib/shell_data_reporting_ap_is/models/card_usage_summary_response.rb +6 -26
  52. data/lib/shell_data_reporting_ap_is/models/col_co_access.rb +4 -4
  53. data/lib/shell_data_reporting_ap_is/models/current_volume.rb +2 -2
  54. data/lib/shell_data_reporting_ap_is/models/customer_contract.rb +2 -2
  55. data/lib/shell_data_reporting_ap_is/models/customer_detail_request.rb +4 -4
  56. data/lib/shell_data_reporting_ap_is/models/customer_detail_response.rb +5 -32
  57. data/lib/shell_data_reporting_ap_is/models/customer_price_list_req.rb +62 -0
  58. data/lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb +2 -2
  59. data/lib/shell_data_reporting_ap_is/models/customer_price_list_res.rb +91 -0
  60. data/lib/shell_data_reporting_ap_is/models/customer_price_list_response.rb +7 -29
  61. data/lib/shell_data_reporting_ap_is/models/{default_error_fault_detail.rb → customer_req.rb} +15 -15
  62. data/lib/shell_data_reporting_ap_is/models/customer_res.rb +91 -0
  63. data/lib/shell_data_reporting_ap_is/models/delivery_addresses.rb +2 -2
  64. data/lib/shell_data_reporting_ap_is/models/eid_access.rb +3 -3
  65. data/lib/shell_data_reporting_ap_is/models/eid_document.rb +2 -2
  66. data/lib/shell_data_reporting_ap_is/models/eid_document_response.rb +2 -2
  67. data/lib/shell_data_reporting_ap_is/models/eid_download_req.rb +2 -2
  68. data/lib/shell_data_reporting_ap_is/models/eid_download_request.rb +2 -2
  69. data/lib/shell_data_reporting_ap_is/models/eid_search_req.rb +2 -2
  70. data/lib/shell_data_reporting_ap_is/models/eid_search_request.rb +2 -2
  71. data/lib/shell_data_reporting_ap_is/models/error_details.rb +2 -2
  72. data/lib/shell_data_reporting_ap_is/models/exception_product.rb +2 -2
  73. data/lib/shell_data_reporting_ap_is/models/exception_site_location.rb +2 -2
  74. data/lib/shell_data_reporting_ap_is/models/fee_item.rb +2 -2
  75. data/lib/shell_data_reporting_ap_is/models/fee_item_summary_all_of0.rb +2 -2
  76. data/lib/shell_data_reporting_ap_is/models/fee_rule_location.rb +2 -2
  77. data/lib/shell_data_reporting_ap_is/models/fee_rule_product.rb +2 -2
  78. data/lib/shell_data_reporting_ap_is/models/fee_rule_tier.rb +2 -2
  79. data/lib/shell_data_reporting_ap_is/models/fee_summary_response.rb +57 -38
  80. data/lib/shell_data_reporting_ap_is/models/fees_fee_rule_tiers.rb +2 -2
  81. data/lib/shell_data_reporting_ap_is/models/filters.rb +522 -0
  82. data/lib/shell_data_reporting_ap_is/models/{finance_currency.rb → finance_currency2.rb} +8 -9
  83. data/lib/shell_data_reporting_ap_is/models/fleetmanagement_v1_user_loggedinuser_request.rb +2 -2
  84. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_card.rb +2 -2
  85. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_data.rb +2 -2
  86. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_req.rb +62 -0
  87. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_request.rb +2 -2
  88. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_response.rb +58 -33
  89. data/lib/shell_data_reporting_ap_is/models/invoice_dates_data.rb +2 -2
  90. data/lib/shell_data_reporting_ap_is/models/invoice_dates_request.rb +2 -2
  91. data/lib/shell_data_reporting_ap_is/models/invoice_dates_request_filters.rb +2 -2
  92. data/lib/shell_data_reporting_ap_is/models/invoice_dates_response_data.rb +2 -2
  93. data/lib/shell_data_reporting_ap_is/models/invoice_distribution_method.rb +2 -2
  94. data/lib/shell_data_reporting_ap_is/models/invoice_download_req.rb +2 -2
  95. data/lib/shell_data_reporting_ap_is/models/invoice_download_request.rb +2 -2
  96. data/lib/shell_data_reporting_ap_is/models/invoice_search_additional_document.rb +2 -2
  97. data/lib/shell_data_reporting_ap_is/models/invoice_search_details.rb +2 -2
  98. data/lib/shell_data_reporting_ap_is/models/invoice_search_request.rb +2 -2
  99. data/lib/shell_data_reporting_ap_is/models/invoice_search_request_filters.rb +2 -2
  100. data/lib/shell_data_reporting_ap_is/models/invoice_search_response.rb +2 -2
  101. data/lib/shell_data_reporting_ap_is/models/invoice_summary_details.rb +2 -2
  102. data/lib/shell_data_reporting_ap_is/models/invoice_summary_request.rb +2 -2
  103. data/lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb +2 -2
  104. data/lib/shell_data_reporting_ap_is/models/invoice_summary_response.rb +2 -2
  105. data/lib/shell_data_reporting_ap_is/models/invoices_summaries.rb +2 -2
  106. data/lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb +2 -2
  107. data/lib/shell_data_reporting_ap_is/models/last_statement_of_account2.rb +457 -0
  108. data/lib/shell_data_reporting_ap_is/models/{error_user_access_error.rb → location.rb} +25 -22
  109. data/lib/shell_data_reporting_ap_is/models/logged_in_user_req.rb +63 -0
  110. data/lib/shell_data_reporting_ap_is/models/logged_in_user_res.rb +91 -0
  111. data/lib/shell_data_reporting_ap_is/models/logged_in_user_response.rb +6 -30
  112. data/lib/shell_data_reporting_ap_is/models/monthly_invoice_trend.rb +2 -2
  113. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_req.rb +84 -0
  114. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb +2 -2
  115. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request_accounts_items.rb +2 -2
  116. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_res.rb +158 -0
  117. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response.rb +6 -57
  118. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response_transactions_items.rb +2 -2
  119. data/lib/shell_data_reporting_ap_is/models/o_auth_provider_error_enum.rb +2 -2
  120. data/lib/shell_data_reporting_ap_is/models/o_auth_token.rb +2 -2
  121. data/lib/shell_data_reporting_ap_is/models/past_statement_of_accounts.rb +2 -2
  122. data/lib/shell_data_reporting_ap_is/models/payer_access.rb +2 -2
  123. data/lib/shell_data_reporting_ap_is/models/payer_details.rb +8 -6
  124. data/lib/shell_data_reporting_ap_is/models/payer_req.rb +84 -0
  125. data/lib/shell_data_reporting_ap_is/models/payer_request.rb +6 -33
  126. data/lib/shell_data_reporting_ap_is/models/payer_res.rb +158 -0
  127. data/lib/shell_data_reporting_ap_is/models/payers.rb +2 -2
  128. data/lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb +2 -2
  129. data/lib/shell_data_reporting_ap_is/models/pin_advice_types.rb +2 -2
  130. data/lib/shell_data_reporting_ap_is/models/price_list.rb +2 -2
  131. data/lib/shell_data_reporting_ap_is/models/price_trans_summary_req.rb +62 -0
  132. data/lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb +2 -2
  133. data/lib/shell_data_reporting_ap_is/models/price_transaction_req.rb +84 -0
  134. data/lib/shell_data_reporting_ap_is/models/price_transaction_request.rb +2 -2
  135. data/lib/shell_data_reporting_ap_is/models/priced_request_data.rb +4 -8
  136. data/lib/shell_data_reporting_ap_is/models/priced_response_data.rb +2 -2
  137. data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_resp.rb +116 -0
  138. data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response_transactions_summary_items.rb +2 -2
  139. data/lib/shell_data_reporting_ap_is/models/priced_transaction_items_location_items.rb +2 -2
  140. data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_invoice_status_enum.rb +2 -2
  141. data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_period_enum.rb +2 -2
  142. data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_sort_order_enum.rb +2 -2
  143. data/lib/shell_data_reporting_ap_is/models/priced_transaction_request_v2.rb +5 -7
  144. data/lib/shell_data_reporting_ap_is/models/priced_transaction_res.rb +158 -0
  145. data/lib/shell_data_reporting_ap_is/models/priced_transaction_resp_v2_refund_flag_enum.rb +2 -2
  146. data/lib/shell_data_reporting_ap_is/models/priced_transaction_response.rb +2 -2
  147. data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_transactions_items.rb +6 -27
  148. data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_v2.rb +2 -2
  149. data/lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb +2 -2
  150. data/lib/shell_data_reporting_ap_is/models/pricing_history.rb +2 -2
  151. data/lib/shell_data_reporting_ap_is/models/purchase_categories.rb +2 -2
  152. data/lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb +2 -2
  153. data/lib/shell_data_reporting_ap_is/models/recent_transaction_request.rb +2 -2
  154. data/lib/shell_data_reporting_ap_is/models/recent_transactions.rb +2 -2
  155. data/lib/shell_data_reporting_ap_is/models/recent_transactions_response.rb +2 -2
  156. data/lib/shell_data_reporting_ap_is/models/role.rb +2 -2
  157. data/lib/shell_data_reporting_ap_is/models/search_doc_req.rb +2 -2
  158. data/lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb +2 -2
  159. data/lib/shell_data_reporting_ap_is/models/search_documents_request.rb +2 -2
  160. data/lib/shell_data_reporting_ap_is/models/search_documents_response.rb +2 -2
  161. data/lib/shell_data_reporting_ap_is/models/search_soa_req.rb +2 -2
  162. data/lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb +2 -2
  163. data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_request.rb +2 -2
  164. data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_response.rb +2 -2
  165. data/lib/shell_data_reporting_ap_is/models/site_location.rb +2 -2
  166. data/lib/shell_data_reporting_ap_is/models/statement_of_account_request.rb +2 -2
  167. data/lib/shell_data_reporting_ap_is/models/statement_of_account_request_filters.rb +2 -2
  168. data/lib/shell_data_reporting_ap_is/models/statement_of_account_resp.rb +9 -9
  169. data/lib/shell_data_reporting_ap_is/models/statement_of_account_response.rb +2 -2
  170. data/lib/shell_data_reporting_ap_is/models/tier.rb +2 -2
  171. data/lib/shell_data_reporting_ap_is/models/transaction_exceptions.rb +5 -5
  172. data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_req.rb +62 -0
  173. data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb +2 -2
  174. data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_res.rb +116 -0
  175. data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_response.rb +6 -26
  176. data/lib/shell_data_reporting_ap_is/models/transaction_fees_req.rb +84 -0
  177. data/lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb +6 -28
  178. data/lib/shell_data_reporting_ap_is/models/transaction_fees_res.rb +158 -0
  179. data/lib/shell_data_reporting_ap_is/models/transaction_fees_summary_req.rb +62 -0
  180. data/lib/shell_data_reporting_ap_is/models/update_odometer.rb +2 -2
  181. data/lib/shell_data_reporting_ap_is/models/update_odometer_reference.rb +2 -2
  182. data/lib/shell_data_reporting_ap_is/models/update_odometer_request.rb +2 -2
  183. data/lib/shell_data_reporting_ap_is/models/update_odometer_resp.rb +116 -0
  184. data/lib/shell_data_reporting_ap_is/models/update_odometer_response.rb +6 -26
  185. data/lib/shell_data_reporting_ap_is/models/usage_summary.rb +2 -2
  186. data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_req.rb +62 -0
  187. data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb +2 -2
  188. data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_res.rb +116 -0
  189. data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_response.rb +6 -27
  190. data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_req.rb +62 -0
  191. data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_request.rb +2 -2
  192. data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_res.rb +91 -0
  193. data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_response.rb +28 -24
  194. data/lib/shell_data_reporting_ap_is/models/warning.rb +69 -0
  195. data/lib/shell_data_reporting_ap_is/utilities/date_time_helper.rb +2 -2
  196. data/lib/shell_data_reporting_ap_is/utilities/file_wrapper.rb +2 -2
  197. data/lib/shell_data_reporting_ap_is/utilities/union_type_lookup.rb +2 -2
  198. data/lib/shell_data_reporting_ap_is.rb +54 -29
  199. data/test/controllers/controller_test_base.rb +2 -2
  200. data/test/controllers/test_invoice_controller.rb +3 -12
  201. data/test/controllers/test_transaction_controller.rb +3 -5
  202. data/test/http_response_catcher.rb +3 -3
  203. metadata +50 -26
  204. data/lib/shell_data_reporting_ap_is/exceptions/default_error_exception.rb +0 -44
  205. data/lib/shell_data_reporting_ap_is/exceptions/error_user_access_error1_exception.rb +0 -44
  206. data/lib/shell_data_reporting_ap_is/http/auth/basic_auth.rb +0 -50
  207. data/lib/shell_data_reporting_ap_is/models/account_response.rb +0 -123
  208. data/lib/shell_data_reporting_ap_is/models/card_group_response.rb +0 -121
  209. data/lib/shell_data_reporting_ap_is/models/card_type_response.rb +0 -91
  210. data/lib/shell_data_reporting_ap_is/models/card_type_response_error.rb +0 -71
  211. data/lib/shell_data_reporting_ap_is/models/default_error_fault.rb +0 -71
  212. data/lib/shell_data_reporting_ap_is/models/error_status.rb +0 -81
  213. data/lib/shell_data_reporting_ap_is/models/logged_in_user_request.rb +0 -121
  214. data/lib/shell_data_reporting_ap_is/models/payer_response.rb +0 -127
  215. data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response.rb +0 -91
  216. data/lib/shell_data_reporting_ap_is/models/transaction_fees_response.rb +0 -123
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 031356f55355649745088ded676766dd0c8f982f6e4d740a8979f326191f977d
4
- data.tar.gz: e2ed061fda9bc950ea7add678935bad2114cd314a37e9475274632499567b231
3
+ metadata.gz: '029daa034be160955c29be965509aadc2b080bfb587f24225b26b144b774b258'
4
+ data.tar.gz: 1c7f87bb1def847aba87695075112c83f91414b7998d1d55f313c61af7fc28b4
5
5
  SHA512:
6
- metadata.gz: 6011a74f2cfcb42eef0b02ef087a2b1665d3d1d18eb48e9bfb236ad41909e07b02c199a1ad8a15d9ad9061227b5f8b5ba23d08888531c31533b19c55ded48d31
7
- data.tar.gz: bce0d017e652d317d75a1a19e50dc48f8278761166f63df102745bb48448881e73d179d0fbb5268f256e3fb653383259f430ca2936399ea439433b03403ccfa0
6
+ metadata.gz: a3ab34fbd35187ac36a8442076cb6cf9cd0afc01a0b870074e0d4308c650996ed4f36d810ef84b883bb23d80c176d0ce6a9112dce5cda7af2a5104f0ed49242d
7
+ data.tar.gz: e6ada66e602acf2b3edaf55ea8b6c248bf9354cb58c215daab2297962b3435aa8db98e799d50b4681893d27b3af2027faaeb65d0c2627f064522a9758ddc330e
data/README.md CHANGED
@@ -3,10 +3,33 @@
3
3
 
4
4
  ## Introduction
5
5
 
6
- Data And Reporting product consists of API's which provides details of transaction and invoice informations about shell cards.
7
- The Shell Card Transaction and Invoice API is REST-based and employs Basic authentication in Version 1 and Oauth authentication in Version 2 end points. The API endpoints accept JSON-encoded request bodies, return JSON-encoded responses and use standard HTTP response codes.
8
- All resources are located in the Shell Card Platform. The Shell Card Platform is the overall platform that encompasses all the internal Shell systems used to manage resources.
9
- All endpoints use the `POST` verb for retrieving, updating, creating and deleting resources in the Shell Card Platform. The endpoints that retrieve resources from the Shell Card Platform allow flexible search parameters in the API request body.
6
+ The Shell Card Transaction and Invoice API is part of the Data and Reporting product suite, designed to provide secure and flexible access to transaction and invoice data related to Shell Cards.
7
+
8
+ ### Authentication
9
+
10
+ - OAuth 2.0 Authentication.
11
+
12
+ ### Architecture
13
+
14
+ - RESTful API design.
15
+ - All endpoints use the `POST` HTTP method for all operations including retrieval, creation, update, and deletion of resources.
16
+ - Requests and responses are encoded in JSON format.
17
+ - Standard HTTP status codes are used for response handling.
18
+
19
+ ### Platform
20
+
21
+ - All resources are managed within the **Shell Card Platform**, which integrates multiple internal Shell systems for resource management.
22
+
23
+ ### Features
24
+
25
+ - Flexible search parameters supported in the request body for data retrieval.
26
+ - Designed for integration with enterprise systems requiring Shell Card transaction and invoice data.
27
+
28
+ ### Use Cases
29
+
30
+ - Retrieve detailed transaction history for Shell Cards.
31
+ - Access invoice summaries and line-item details.
32
+ - Integrate Shell Card financial data into internal reporting tools.
10
33
 
11
34
  Go to the Shell Developer Portal: [https://developer.shell.com](https://developer.shell.com)
12
35
 
@@ -15,16 +38,16 @@ Go to the Shell Developer Portal: [https://developer.shell.com](https://develope
15
38
  Install the gem from the command line:
16
39
 
17
40
  ```bash
18
- gem install data-and-reporting-sdk -v 1.3.0
41
+ gem install data-and-reporting-sdk -v 2.0.0
19
42
  ```
20
43
 
21
44
  Or add the gem to your Gemfile and run `bundle`:
22
45
 
23
46
  ```ruby
24
- gem 'data-and-reporting-sdk', '1.3.0'
47
+ gem 'data-and-reporting-sdk', '2.0.0'
25
48
  ```
26
49
 
27
- For additional gem details, see the [RubyGems page for the data-and-reporting-sdk gem](https://rubygems.org/gems/data-and-reporting-sdk/versions/1.3.0).
50
+ For additional gem details, see the [RubyGems page for the data-and-reporting-sdk gem](https://rubygems.org/gems/data-and-reporting-sdk/versions/2.0.0).
28
51
 
29
52
  ## Test the SDK
30
53
 
@@ -36,34 +59,33 @@ rake
36
59
 
37
60
  ## Initialize the API Client
38
61
 
39
- **_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/data-and-reporting-ruby-sdk/tree/1.3.0/doc/client.md)
62
+ **_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/data-and-reporting-ruby-sdk/tree/2.0.0/doc/client.md)
40
63
 
41
64
  The following parameters are configurable for the API Client:
42
65
 
43
66
  | Parameter | Type | Description |
44
67
  | --- | --- | --- |
45
- | `environment` | `Environment` | The API environment. <br> **Default: `Environment.SIT`** |
46
- | `connection` | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
47
- | `adapter` | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests |
48
- | `timeout` | `Float` | The value to use for connection timeout. <br> **Default: 60** |
49
- | `max_retries` | `Integer` | The number of times to retry an endpoint call if it fails. <br> **Default: 0** |
50
- | `retry_interval` | `Float` | Pause in seconds between retries. <br> **Default: 1** |
51
- | `backoff_factor` | `Float` | The amount to multiply each successive retry's interval amount by in order to provide backoff. <br> **Default: 2** |
52
- | `retry_statuses` | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
53
- | `retry_methods` | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
54
- | `http_callback` | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
55
- | `basic_auth_credentials` | [`BasicAuthCredentials`](https://www.github.com/sdks-io/data-and-reporting-ruby-sdk/tree/1.3.0/doc/auth/basic-authentication.md) | The credential object for Basic Authentication |
56
- | `bearer_token_credentials` | [`BearerTokenCredentials`](https://www.github.com/sdks-io/data-and-reporting-ruby-sdk/tree/1.3.0/doc/auth/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant |
68
+ | environment | `Environment` | The API environment. <br> **Default: `Environment.SIT`** |
69
+ | connection | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
70
+ | adapter | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests |
71
+ | timeout | `Float` | The value to use for connection timeout. <br> **Default: 60** |
72
+ | max_retries | `Integer` | The number of times to retry an endpoint call if it fails. <br> **Default: 0** |
73
+ | retry_interval | `Float` | Pause in seconds between retries. <br> **Default: 1** |
74
+ | backoff_factor | `Float` | The amount to multiply each successive retry's interval amount by in order to provide backoff. <br> **Default: 2** |
75
+ | retry_statuses | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
76
+ | retry_methods | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
77
+ | http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
78
+ | proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/data-and-reporting-ruby-sdk/tree/2.0.0/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
79
+ | client_credentials_auth_credentials | [`ClientCredentialsAuthCredentials`](https://www.github.com/sdks-io/data-and-reporting-ruby-sdk/tree/2.0.0/doc/auth/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant |
57
80
 
58
81
  The API client can be initialized as follows:
59
82
 
60
83
  ```ruby
61
- client = ShellDataReportingApIs::Client.new(
62
- basic_auth_credentials: BasicAuthCredentials.new(
63
- username: 'Username',
64
- password: 'Password'
65
- ),
66
- bearer_token_credentials: BearerTokenCredentials.new(
84
+ require 'shell_data_reporting_ap_is'
85
+ include ShellDataReportingApIs
86
+
87
+ client = Client.new(
88
+ client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(
67
89
  o_auth_client_id: 'OAuthClientId',
68
90
  o_auth_client_secret: 'OAuthClientSecret'
69
91
  ),
@@ -86,18 +108,27 @@ The SDK can be configured to use a different environment for making API calls. A
86
108
 
87
109
  This API uses the following authentication schemes.
88
110
 
89
- * [`BasicAuth (Basic Authentication)`](https://www.github.com/sdks-io/data-and-reporting-ruby-sdk/tree/1.3.0/doc/auth/basic-authentication.md)
90
- * [`BearerToken (OAuth 2 Client Credentials Grant)`](https://www.github.com/sdks-io/data-and-reporting-ruby-sdk/tree/1.3.0/doc/auth/oauth-2-client-credentials-grant.md)
111
+ * [`BearerToken (OAuth 2 Client Credentials Grant)`](https://www.github.com/sdks-io/data-and-reporting-ruby-sdk/tree/2.0.0/doc/auth/oauth-2-client-credentials-grant.md)
91
112
 
92
113
  ## List of APIs
93
114
 
94
- * [Customer](https://www.github.com/sdks-io/data-and-reporting-ruby-sdk/tree/1.3.0/doc/controllers/customer.md)
95
- * [Transaction](https://www.github.com/sdks-io/data-and-reporting-ruby-sdk/tree/1.3.0/doc/controllers/transaction.md)
96
- * [Invoice](https://www.github.com/sdks-io/data-and-reporting-ruby-sdk/tree/1.3.0/doc/controllers/invoice.md)
115
+ * [Customer](https://www.github.com/sdks-io/data-and-reporting-ruby-sdk/tree/2.0.0/doc/controllers/customer.md)
116
+ * [Transaction](https://www.github.com/sdks-io/data-and-reporting-ruby-sdk/tree/2.0.0/doc/controllers/transaction.md)
117
+ * [Invoice](https://www.github.com/sdks-io/data-and-reporting-ruby-sdk/tree/2.0.0/doc/controllers/invoice.md)
97
118
 
98
- ## Classes Documentation
119
+ ## SDK Infrastructure
99
120
 
100
- * [Utility Classes](https://www.github.com/sdks-io/data-and-reporting-ruby-sdk/tree/1.3.0/doc/utility-classes.md)
101
- * [HttpResponse](https://www.github.com/sdks-io/data-and-reporting-ruby-sdk/tree/1.3.0/doc/http-response.md)
102
- * [HttpRequest](https://www.github.com/sdks-io/data-and-reporting-ruby-sdk/tree/1.3.0/doc/http-request.md)
121
+ ### Configuration
122
+
123
+ * [ProxySettings](https://www.github.com/sdks-io/data-and-reporting-ruby-sdk/tree/2.0.0/doc/proxy-settings.md)
124
+
125
+ ### HTTP
126
+
127
+ * [HttpResponse](https://www.github.com/sdks-io/data-and-reporting-ruby-sdk/tree/2.0.0/doc/http-response.md)
128
+ * [HttpRequest](https://www.github.com/sdks-io/data-and-reporting-ruby-sdk/tree/2.0.0/doc/http-request.md)
129
+
130
+ ### Utilities
131
+
132
+ * [ApiHelper](https://www.github.com/sdks-io/data-and-reporting-ruby-sdk/tree/2.0.0/doc/api-helper.md)
133
+ * [DateTimeHelper](https://www.github.com/sdks-io/data-and-reporting-ruby-sdk/tree/2.0.0/doc/date-time-helper.md)
103
134
 
@@ -1,7 +1,7 @@
1
1
  # shell_data_reporting_ap_is
2
2
  #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
3
+ # This file was automatically generated by
4
+ # APIMATIC v3.0 ( https://www.apimatic.io ).
5
5
 
6
6
  module ShellDataReportingApIs
7
7
  # API utility class
@@ -1,7 +1,7 @@
1
1
  # shell_data_reporting_ap_is
2
2
  #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
3
+ # This file was automatically generated by
4
+ # APIMATIC v3.0 ( https://www.apimatic.io ).
5
5
 
6
6
  module ShellDataReportingApIs
7
7
  # shell_data_reporting_ap_is client class.
@@ -42,9 +42,9 @@ module ShellDataReportingApIs
42
42
  connection: nil, adapter: :net_http_persistent, timeout: 60,
43
43
  max_retries: 0, retry_interval: 1, backoff_factor: 2,
44
44
  retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
45
- retry_methods: %i[get put], http_callback: nil,
46
- environment: Environment::SIT, basic_auth_credentials: nil,
47
- bearer_token_credentials: nil, config: nil
45
+ retry_methods: %i[get put], http_callback: nil, proxy_settings: nil,
46
+ environment: Environment::SIT, client_credentials_auth_credentials: nil,
47
+ config: nil
48
48
  )
49
49
  @config = if config.nil?
50
50
  Configuration.new(
@@ -53,9 +53,8 @@ module ShellDataReportingApIs
53
53
  backoff_factor: backoff_factor,
54
54
  retry_statuses: retry_statuses,
55
55
  retry_methods: retry_methods, http_callback: http_callback,
56
- environment: environment,
57
- basic_auth_credentials: basic_auth_credentials,
58
- bearer_token_credentials: bearer_token_credentials
56
+ proxy_settings: proxy_settings, environment: environment,
57
+ client_credentials_auth_credentials: client_credentials_auth_credentials
59
58
  )
60
59
  else
61
60
  config
@@ -75,10 +74,10 @@ module ShellDataReportingApIs
75
74
  def initialize_auth_managers(global_config)
76
75
  @auth_managers = {}
77
76
  http_client_config = global_config.client_configuration
78
- %w[BasicAuth BearerToken].each { |auth| @auth_managers[auth] = nil }
79
- @auth_managers['BasicAuth'] = BasicAuth.new(http_client_config.basic_auth_credentials)
80
- @auth_managers['BearerToken'] = BearerToken.new(http_client_config.bearer_token_credentials,
81
- global_config)
77
+ %w[BearerToken].each { |auth| @auth_managers[auth] = nil }
78
+ @auth_managers['BearerToken'] = OAuth2.new(
79
+ http_client_config.client_credentials_auth_credentials, global_config
80
+ )
82
81
  end
83
82
  end
84
83
  end
@@ -1,7 +1,7 @@
1
1
  # shell_data_reporting_ap_is
2
2
  #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
3
+ # This file was automatically generated by
4
+ # APIMATIC v3.0 ( https://www.apimatic.io ).
5
5
 
6
6
  module ShellDataReportingApIs
7
7
  # An enum for SDK environments.
@@ -24,7 +24,7 @@ module ShellDataReportingApIs
24
24
  # are configured in this class.
25
25
  class Configuration < CoreLibrary::HttpClientConfiguration
26
26
  # The attribute readers for properties.
27
- attr_reader :environment, :basic_auth_credentials, :bearer_token_credentials
27
+ attr_reader :environment, :client_credentials_auth_credentials
28
28
 
29
29
  class << self
30
30
  attr_reader :environments
@@ -34,24 +34,23 @@ module ShellDataReportingApIs
34
34
  connection: nil, adapter: :net_http_persistent, timeout: 60,
35
35
  max_retries: 0, retry_interval: 1, backoff_factor: 2,
36
36
  retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
37
- retry_methods: %i[get put], http_callback: nil,
38
- environment: Environment::SIT, basic_auth_credentials: nil,
39
- bearer_token_credentials: nil
37
+ retry_methods: %i[get put], http_callback: nil, proxy_settings: nil,
38
+ environment: Environment::SIT, client_credentials_auth_credentials: nil
40
39
  )
41
-
42
40
  super connection: connection, adapter: adapter, timeout: timeout,
43
41
  max_retries: max_retries, retry_interval: retry_interval,
44
42
  backoff_factor: backoff_factor, retry_statuses: retry_statuses,
45
- retry_methods: retry_methods, http_callback: http_callback
43
+ retry_methods: retry_methods, http_callback: http_callback,
44
+ proxy_settings: proxy_settings
46
45
 
47
46
  # Current API environment
48
47
  @environment = String(environment)
49
48
 
50
- # The object holding Basic Authentication credentials
51
- @basic_auth_credentials = basic_auth_credentials
52
-
53
49
  # The object holding OAuth 2 Client Credentials Grant credentials
54
- @bearer_token_credentials = bearer_token_credentials
50
+ @client_credentials_auth_credentials = client_credentials_auth_credentials
51
+
52
+ # Initializing OAuth 2 Client Credentials Grant credentials with the provided auth parameters
53
+ @client_credentials_auth_credentials = client_credentials_auth_credentials
55
54
 
56
55
  # The Http Client to use for making requests.
57
56
  set_http_client CoreLibrary::FaradayClient.new(self)
@@ -60,8 +59,8 @@ module ShellDataReportingApIs
60
59
  def clone_with(connection: nil, adapter: nil, timeout: nil,
61
60
  max_retries: nil, retry_interval: nil, backoff_factor: nil,
62
61
  retry_statuses: nil, retry_methods: nil, http_callback: nil,
63
- environment: nil, basic_auth_credentials: nil,
64
- bearer_token_credentials: nil)
62
+ proxy_settings: nil, environment: nil,
63
+ client_credentials_auth_credentials: nil)
65
64
  connection ||= self.connection
66
65
  adapter ||= self.adapter
67
66
  timeout ||= self.timeout
@@ -71,19 +70,18 @@ module ShellDataReportingApIs
71
70
  retry_statuses ||= self.retry_statuses
72
71
  retry_methods ||= self.retry_methods
73
72
  http_callback ||= self.http_callback
73
+ proxy_settings ||= self.proxy_settings
74
74
  environment ||= self.environment
75
- basic_auth_credentials ||= self.basic_auth_credentials
76
- bearer_token_credentials ||= self.bearer_token_credentials
75
+ client_credentials_auth_credentials ||= self.client_credentials_auth_credentials
77
76
 
78
- Configuration.new(connection: connection, adapter: adapter,
79
- timeout: timeout, max_retries: max_retries,
80
- retry_interval: retry_interval,
81
- backoff_factor: backoff_factor,
82
- retry_statuses: retry_statuses,
83
- retry_methods: retry_methods,
84
- http_callback: http_callback, environment: environment,
85
- basic_auth_credentials: basic_auth_credentials,
86
- bearer_token_credentials: bearer_token_credentials)
77
+ Configuration.new(
78
+ connection: connection, adapter: adapter, timeout: timeout,
79
+ max_retries: max_retries, retry_interval: retry_interval,
80
+ backoff_factor: backoff_factor, retry_statuses: retry_statuses,
81
+ retry_methods: retry_methods, http_callback: http_callback,
82
+ proxy_settings: proxy_settings, environment: environment,
83
+ client_credentials_auth_credentials: client_credentials_auth_credentials
84
+ )
87
85
  end
88
86
 
89
87
 
@@ -1,7 +1,7 @@
1
1
  # shell_data_reporting_ap_is
2
2
  #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
3
+ # This file was automatically generated by
4
+ # APIMATIC v3.0 ( https://www.apimatic.io ).
5
5
 
6
6
  module ShellDataReportingApIs
7
7
  # BaseController.
@@ -26,13 +26,7 @@ module ShellDataReportingApIs
26
26
  @global_configuration = global_configuration
27
27
  @config = @global_configuration.client_configuration
28
28
  @http_call_back = @config.http_callback
29
- @api_call = ApiCall.new(@global_configuration)
30
- end
31
-
32
- # Creates a new builder for the Api Call instance.
33
- # @return [ApiCall] The instance of ApiCall.
34
- def new_api_call_builder
35
- @api_call.new_builder
29
+ @api_call = ApiCall.new(@global_configuration)
36
30
  end
37
31
 
38
32
  # Creates a new instance of the request builder.