data-and-reporting-sdk 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (178) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +104 -0
  4. data/lib/shell_data_reporting_ap_is/api_helper.rb +10 -0
  5. data/lib/shell_data_reporting_ap_is/client.rb +84 -0
  6. data/lib/shell_data_reporting_ap_is/configuration.rb +110 -0
  7. data/lib/shell_data_reporting_ap_is/controllers/base_controller.rb +66 -0
  8. data/lib/shell_data_reporting_ap_is/controllers/customer_controller.rb +478 -0
  9. data/lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb +470 -0
  10. data/lib/shell_data_reporting_ap_is/controllers/o_auth_authorization_controller.rb +42 -0
  11. data/lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb +878 -0
  12. data/lib/shell_data_reporting_ap_is/exceptions/api_exception.rb +10 -0
  13. data/lib/shell_data_reporting_ap_is/exceptions/default_error_exception.rb +32 -0
  14. data/lib/shell_data_reporting_ap_is/exceptions/error_object_exception.rb +54 -0
  15. data/lib/shell_data_reporting_ap_is/exceptions/error_user_access_error1_exception.rb +32 -0
  16. data/lib/shell_data_reporting_ap_is/exceptions/o_auth_provider_exception.rb +48 -0
  17. data/lib/shell_data_reporting_ap_is/http/auth/basic_auth.rb +50 -0
  18. data/lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb +89 -0
  19. data/lib/shell_data_reporting_ap_is/http/http_call_back.rb +10 -0
  20. data/lib/shell_data_reporting_ap_is/http/http_method_enum.rb +10 -0
  21. data/lib/shell_data_reporting_ap_is/http/http_request.rb +10 -0
  22. data/lib/shell_data_reporting_ap_is/http/http_response.rb +10 -0
  23. data/lib/shell_data_reporting_ap_is/models/account_access.rb +128 -0
  24. data/lib/shell_data_reporting_ap_is/models/account_request.rb +252 -0
  25. data/lib/shell_data_reporting_ap_is/models/account_response.rb +111 -0
  26. data/lib/shell_data_reporting_ap_is/models/account_response_accounts_items.rb +750 -0
  27. data/lib/shell_data_reporting_ap_is/models/accounts.rb +65 -0
  28. data/lib/shell_data_reporting_ap_is/models/address.rb +174 -0
  29. data/lib/shell_data_reporting_ap_is/models/associated_account.rb +98 -0
  30. data/lib/shell_data_reporting_ap_is/models/audit_request.rb +256 -0
  31. data/lib/shell_data_reporting_ap_is/models/audit_response.rb +111 -0
  32. data/lib/shell_data_reporting_ap_is/models/audit_response_audits_items.rb +450 -0
  33. data/lib/shell_data_reporting_ap_is/models/bank_account.rb +192 -0
  34. data/lib/shell_data_reporting_ap_is/models/base_model.rb +62 -0
  35. data/lib/shell_data_reporting_ap_is/models/bonus_configuration.rb +419 -0
  36. data/lib/shell_data_reporting_ap_is/models/bonus_history.rb +444 -0
  37. data/lib/shell_data_reporting_ap_is/models/card_day_time_restrictions.rb +159 -0
  38. data/lib/shell_data_reporting_ap_is/models/card_exceptions.rb +268 -0
  39. data/lib/shell_data_reporting_ap_is/models/card_group_request.rb +178 -0
  40. data/lib/shell_data_reporting_ap_is/models/card_group_response.rb +109 -0
  41. data/lib/shell_data_reporting_ap_is/models/card_group_response_card_groups_items.rb +301 -0
  42. data/lib/shell_data_reporting_ap_is/models/card_type_request.rb +145 -0
  43. data/lib/shell_data_reporting_ap_is/models/card_type_response.rb +79 -0
  44. data/lib/shell_data_reporting_ap_is/models/card_type_response_customer_card_types_items.rb +470 -0
  45. data/lib/shell_data_reporting_ap_is/models/card_type_response_error.rb +60 -0
  46. data/lib/shell_data_reporting_ap_is/models/card_usage_restrictions.rb +281 -0
  47. data/lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb +159 -0
  48. data/lib/shell_data_reporting_ap_is/models/card_usage_summary_response.rb +79 -0
  49. data/lib/shell_data_reporting_ap_is/models/col_co_access.rb +88 -0
  50. data/lib/shell_data_reporting_ap_is/models/current_volume.rb +99 -0
  51. data/lib/shell_data_reporting_ap_is/models/customer_contract.rb +63 -0
  52. data/lib/shell_data_reporting_ap_is/models/customer_detail_request.rb +123 -0
  53. data/lib/shell_data_reporting_ap_is/models/customer_detail_response.rb +437 -0
  54. data/lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb +200 -0
  55. data/lib/shell_data_reporting_ap_is/models/customer_price_list_response.rb +82 -0
  56. data/lib/shell_data_reporting_ap_is/models/default_error_fault.rb +60 -0
  57. data/lib/shell_data_reporting_ap_is/models/default_error_fault_detail.rb +50 -0
  58. data/lib/shell_data_reporting_ap_is/models/delivery_addresses.rb +258 -0
  59. data/lib/shell_data_reporting_ap_is/models/eid_access.rb +75 -0
  60. data/lib/shell_data_reporting_ap_is/models/eid_document.rb +166 -0
  61. data/lib/shell_data_reporting_ap_is/models/eid_document_response.rb +140 -0
  62. data/lib/shell_data_reporting_ap_is/models/eid_download_req.rb +86 -0
  63. data/lib/shell_data_reporting_ap_is/models/eid_download_request.rb +50 -0
  64. data/lib/shell_data_reporting_ap_is/models/eid_search_req.rb +160 -0
  65. data/lib/shell_data_reporting_ap_is/models/eid_search_request.rb +70 -0
  66. data/lib/shell_data_reporting_ap_is/models/error_details.rb +81 -0
  67. data/lib/shell_data_reporting_ap_is/models/error_status.rb +60 -0
  68. data/lib/shell_data_reporting_ap_is/models/error_user_access.rb +50 -0
  69. data/lib/shell_data_reporting_ap_is/models/error_user_access_error.rb +60 -0
  70. data/lib/shell_data_reporting_ap_is/models/exception_product.rb +65 -0
  71. data/lib/shell_data_reporting_ap_is/models/exception_site_location.rb +63 -0
  72. data/lib/shell_data_reporting_ap_is/models/fee_item.rb +977 -0
  73. data/lib/shell_data_reporting_ap_is/models/fee_item_summary_all_of0.rb +194 -0
  74. data/lib/shell_data_reporting_ap_is/models/fee_rule_location.rb +153 -0
  75. data/lib/shell_data_reporting_ap_is/models/fee_rule_product.rb +98 -0
  76. data/lib/shell_data_reporting_ap_is/models/fee_rule_tier.rb +74 -0
  77. data/lib/shell_data_reporting_ap_is/models/fee_summary_response.rb +85 -0
  78. data/lib/shell_data_reporting_ap_is/models/fees_fee_rule_tiers.rb +124 -0
  79. data/lib/shell_data_reporting_ap_is/models/finance_currency.rb +98 -0
  80. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_card.rb +73 -0
  81. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_data.rb +267 -0
  82. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_request.rb +197 -0
  83. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_response.rb +79 -0
  84. data/lib/shell_data_reporting_ap_is/models/invoice_dates_data.rb +62 -0
  85. data/lib/shell_data_reporting_ap_is/models/invoice_dates_request.rb +50 -0
  86. data/lib/shell_data_reporting_ap_is/models/invoice_dates_request_filters.rb +146 -0
  87. data/lib/shell_data_reporting_ap_is/models/invoice_dates_response_data.rb +80 -0
  88. data/lib/shell_data_reporting_ap_is/models/invoice_distribution_method.rb +99 -0
  89. data/lib/shell_data_reporting_ap_is/models/invoice_download_req.rb +99 -0
  90. data/lib/shell_data_reporting_ap_is/models/invoice_download_request.rb +50 -0
  91. data/lib/shell_data_reporting_ap_is/models/invoice_search_additional_document.rb +80 -0
  92. data/lib/shell_data_reporting_ap_is/models/invoice_search_details.rb +913 -0
  93. data/lib/shell_data_reporting_ap_is/models/invoice_search_request.rb +91 -0
  94. data/lib/shell_data_reporting_ap_is/models/invoice_search_request_filters.rb +344 -0
  95. data/lib/shell_data_reporting_ap_is/models/invoice_search_response.rb +127 -0
  96. data/lib/shell_data_reporting_ap_is/models/invoice_summary_details.rb +129 -0
  97. data/lib/shell_data_reporting_ap_is/models/invoice_summary_request.rb +50 -0
  98. data/lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb +345 -0
  99. data/lib/shell_data_reporting_ap_is/models/invoice_summary_response.rb +79 -0
  100. data/lib/shell_data_reporting_ap_is/models/invoices_summaries.rb +221 -0
  101. data/lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb +421 -0
  102. data/lib/shell_data_reporting_ap_is/models/logged_in_user_request.rb +107 -0
  103. data/lib/shell_data_reporting_ap_is/models/logged_in_user_response.rb +394 -0
  104. data/lib/shell_data_reporting_ap_is/models/monthly_invoice_trend.rb +112 -0
  105. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb +360 -0
  106. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request_accounts_items.rb +84 -0
  107. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response.rb +110 -0
  108. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response_transactions_items.rb +1724 -0
  109. data/lib/shell_data_reporting_ap_is/models/o_auth_provider_error_enum.rb +45 -0
  110. data/lib/shell_data_reporting_ap_is/models/o_auth_token.rb +100 -0
  111. data/lib/shell_data_reporting_ap_is/models/past_statement_of_accounts.rb +502 -0
  112. data/lib/shell_data_reporting_ap_is/models/payer_access.rb +147 -0
  113. data/lib/shell_data_reporting_ap_is/models/payer_details.rb +1412 -0
  114. data/lib/shell_data_reporting_ap_is/models/payer_request.rb +126 -0
  115. data/lib/shell_data_reporting_ap_is/models/payer_response.rb +115 -0
  116. data/lib/shell_data_reporting_ap_is/models/payers.rb +109 -0
  117. data/lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb +322 -0
  118. data/lib/shell_data_reporting_ap_is/models/pin_advice_types.rb +80 -0
  119. data/lib/shell_data_reporting_ap_is/models/price_list.rb +485 -0
  120. data/lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb +477 -0
  121. data/lib/shell_data_reporting_ap_is/models/price_transaction_request.rb +572 -0
  122. data/lib/shell_data_reporting_ap_is/models/priced_request_data.rb +485 -0
  123. data/lib/shell_data_reporting_ap_is/models/priced_response_data.rb +2132 -0
  124. data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response.rb +79 -0
  125. data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response_transactions_summary_items.rb +242 -0
  126. data/lib/shell_data_reporting_ap_is/models/priced_transaction_items_location_items.rb +67 -0
  127. data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_invoice_status_enum.rb +27 -0
  128. data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_period_enum.rb +27 -0
  129. data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_sort_order_enum.rb +37 -0
  130. data/lib/shell_data_reporting_ap_is/models/priced_transaction_request_v2.rb +72 -0
  131. data/lib/shell_data_reporting_ap_is/models/priced_transaction_resp_v2_refund_flag_enum.rb +23 -0
  132. data/lib/shell_data_reporting_ap_is/models/priced_transaction_response.rb +59 -0
  133. data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_transactions_items.rb +1719 -0
  134. data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_v2.rb +110 -0
  135. data/lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb +115 -0
  136. data/lib/shell_data_reporting_ap_is/models/pricing_history.rb +105 -0
  137. data/lib/shell_data_reporting_ap_is/models/purchase_categories.rb +114 -0
  138. data/lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb +217 -0
  139. data/lib/shell_data_reporting_ap_is/models/recent_transaction_request.rb +66 -0
  140. data/lib/shell_data_reporting_ap_is/models/recent_transactions.rb +918 -0
  141. data/lib/shell_data_reporting_ap_is/models/recent_transactions_response.rb +110 -0
  142. data/lib/shell_data_reporting_ap_is/models/role.rb +102 -0
  143. data/lib/shell_data_reporting_ap_is/models/search_doc_req.rb +269 -0
  144. data/lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb +204 -0
  145. data/lib/shell_data_reporting_ap_is/models/search_documents_request.rb +70 -0
  146. data/lib/shell_data_reporting_ap_is/models/search_documents_response.rb +122 -0
  147. data/lib/shell_data_reporting_ap_is/models/search_soa_req.rb +197 -0
  148. data/lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb +220 -0
  149. data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_request.rb +70 -0
  150. data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_response.rb +120 -0
  151. data/lib/shell_data_reporting_ap_is/models/site_location.rb +67 -0
  152. data/lib/shell_data_reporting_ap_is/models/statement_of_account_request.rb +50 -0
  153. data/lib/shell_data_reporting_ap_is/models/statement_of_account_request_filters.rb +197 -0
  154. data/lib/shell_data_reporting_ap_is/models/statement_of_account_resp.rb +138 -0
  155. data/lib/shell_data_reporting_ap_is/models/statement_of_account_response.rb +80 -0
  156. data/lib/shell_data_reporting_ap_is/models/tier.rb +167 -0
  157. data/lib/shell_data_reporting_ap_is/models/transaction_exceptions.rb +1267 -0
  158. data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb +267 -0
  159. data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_response.rb +100 -0
  160. data/lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb +348 -0
  161. data/lib/shell_data_reporting_ap_is/models/transaction_fees_response.rb +111 -0
  162. data/lib/shell_data_reporting_ap_is/models/update_odometer.rb +62 -0
  163. data/lib/shell_data_reporting_ap_is/models/update_odometer_reference.rb +67 -0
  164. data/lib/shell_data_reporting_ap_is/models/update_odometer_request.rb +146 -0
  165. data/lib/shell_data_reporting_ap_is/models/update_odometer_response.rb +93 -0
  166. data/lib/shell_data_reporting_ap_is/models/usage_summary.rb +202 -0
  167. data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb +118 -0
  168. data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_response.rb +120 -0
  169. data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_request.rb +103 -0
  170. data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_response.rb +120 -0
  171. data/lib/shell_data_reporting_ap_is/utilities/date_time_helper.rb +11 -0
  172. data/lib/shell_data_reporting_ap_is/utilities/file_wrapper.rb +16 -0
  173. data/lib/shell_data_reporting_ap_is.rb +229 -0
  174. data/test/controllers/controller_test_base.rb +34 -0
  175. data/test/controllers/test_invoice_controller.rb +398 -0
  176. data/test/controllers/test_transaction_controller.rb +235 -0
  177. data/test/http_response_catcher.rb +19 -0
  178. metadata +302 -0
@@ -0,0 +1,478 @@
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
+ # CustomerController
8
+ class CustomerController < BaseController
9
+ # This API allows querying the user data of the logged in user.</br>
10
+ # This API will return the user access details such as payers and/or
11
+ # accounts. </br>
12
+ # This API will also validate that logged in user has access to the
13
+ # requested API, on failure it will return HasAPIAccess flag as false in
14
+ # response.</br>
15
+ # @param [String] apikey Required parameter: This is the API key of the
16
+ # specific environment which needs to be passed by the client.
17
+ # @param [String] request_id Required parameter: Mandatory UUID (according
18
+ # to RFC 4122 standards) for requests and responses. This will be played
19
+ # back in the response from the request.
20
+ # @param [LoggedInUserRequest] body Optional parameter: Logged in user
21
+ # request body
22
+ # @return [LoggedInUserResponse] response from the API call
23
+ def loggedin_user(apikey,
24
+ request_id,
25
+ body: nil)
26
+ new_api_call_builder
27
+ .request(new_request_builder(HttpMethodEnum::POST,
28
+ '/fleetmanagement/v1/user/loggedinuser',
29
+ Server::SHELL)
30
+ .header_param(new_parameter(apikey, key: 'apikey'))
31
+ .header_param(new_parameter(request_id, key: 'RequestId'))
32
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
33
+ .body_param(new_parameter(body))
34
+ .header_param(new_parameter('application/json', key: 'accept'))
35
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
36
+ .auth(Single.new('BasicAuth')))
37
+ .response(new_response_handler
38
+ .deserializer(APIHelper.method(:custom_type_deserializer))
39
+ .deserialize_into(LoggedInUserResponse.method(:from_hash))
40
+ .local_error('400',
41
+ "The server cannot or will not process the request due to'\
42
+ ' something that is perceived to be a client\r\n error (e.g.,'\
43
+ ' malformed request syntax, invalid \r\n request message framing,'\
44
+ ' or deceptive request routing).",
45
+ DefaultErrorException)
46
+ .local_error('401',
47
+ "The request has not been applied because it lacks valid '\
48
+ ' authentication credentials for the target resource.\r\n",
49
+ DefaultErrorException)
50
+ .local_error('403',
51
+ "The server understood the request but refuses to authorize it.'\
52
+ '\r\n",
53
+ ErrorUserAccessError1Exception)
54
+ .local_error('404',
55
+ "The origin server did not find a current representation for'\
56
+ ' the target resource or is not willing to disclose that one'\
57
+ ' exists.\r\n",
58
+ DefaultErrorException)
59
+ .local_error('500',
60
+ "The server encountered an unexpected condition the prevented it'\
61
+ ' from fulfilling the request.\r\n",
62
+ DefaultErrorException))
63
+ .execute
64
+ end
65
+
66
+ # This API allows querying the payer accounts details from the Shell Cards
67
+ # Platform. It provides flexible search criteria for searching payer
68
+ # information and supports paging.
69
+ # Paging is applicable only when all the
70
+ # payers passed in the input are from the same ColCo.
71
+ # However, paging will
72
+ # be ignored and the API will return all the matching data by merging the
73
+ # data queried from each ColCo when payers passed in the input are from
74
+ # multiple ColCos.
75
+ # @param [String] apikey Required parameter: This is the API key of the
76
+ # specific environment which needs to be passed by the client.
77
+ # @param [String] request_id Required parameter: Mandatory UUID (according
78
+ # to RFC 4122 standards) for requests and responses. This will be played
79
+ # back in the response from the request.
80
+ # @param [PayerRequest] body Optional parameter: Serach payers request
81
+ # body
82
+ # @return [PayerResponse] response from the API call
83
+ def payers(apikey,
84
+ request_id,
85
+ body: nil)
86
+ new_api_call_builder
87
+ .request(new_request_builder(HttpMethodEnum::POST,
88
+ '/fleetmanagement/v1/customer/payers',
89
+ Server::SHELL)
90
+ .header_param(new_parameter(apikey, key: 'apikey'))
91
+ .header_param(new_parameter(request_id, key: 'RequestId'))
92
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
93
+ .body_param(new_parameter(body))
94
+ .header_param(new_parameter('application/json', key: 'accept'))
95
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
96
+ .auth(Single.new('BasicAuth')))
97
+ .response(new_response_handler
98
+ .deserializer(APIHelper.method(:custom_type_deserializer))
99
+ .deserialize_into(PayerResponse.method(:from_hash))
100
+ .local_error('400',
101
+ "The server cannot or will not process the request due to'\
102
+ ' something that is perceived to be a client\r\n error (e.g.,'\
103
+ ' malformed request syntax, invalid \r\n request message framing,'\
104
+ ' or deceptive request routing).",
105
+ DefaultErrorException)
106
+ .local_error('401',
107
+ "The request has not been applied because it lacks valid '\
108
+ ' authentication credentials for the target resource.\r\n",
109
+ DefaultErrorException)
110
+ .local_error('403',
111
+ "The server understood the request but refuses to authorize it.'\
112
+ '\r\n",
113
+ ErrorUserAccessError1Exception)
114
+ .local_error('404',
115
+ "The origin server did not find a current representation for'\
116
+ ' the target resource or is not willing to disclose that one'\
117
+ ' exists.\r\n",
118
+ DefaultErrorException)
119
+ .local_error('500',
120
+ "The server encountered an unexpected condition the prevented it'\
121
+ ' from fulfilling the request.\r\n",
122
+ DefaultErrorException))
123
+ .execute
124
+ end
125
+
126
+ # This API allows querying the card delivery addresses of a given account
127
+ # from the Shell Cards Platform.
128
+ # Only active delivery addresses will be returned.
129
+ # @param [String] apikey Required parameter: This is the API key of the
130
+ # specific environment which needs to be passed by the client.
131
+ # @param [String] request_id Required parameter: Mandatory UUID (according
132
+ # to RFC 4122 standards) for requests and responses. This will be played
133
+ # back in the response from the request.
134
+ # @param [CustomerDetailRequest] body Optional parameter: Customerdetails
135
+ # request body
136
+ # @return [CustomerDetailResponse] response from the API call
137
+ def customer(apikey,
138
+ request_id,
139
+ body: nil)
140
+ new_api_call_builder
141
+ .request(new_request_builder(HttpMethodEnum::POST,
142
+ '/fleetmanagement/v1/customer/customer',
143
+ Server::SHELL)
144
+ .header_param(new_parameter(apikey, key: 'apikey'))
145
+ .header_param(new_parameter(request_id, key: 'RequestId'))
146
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
147
+ .body_param(new_parameter(body))
148
+ .header_param(new_parameter('application/json', key: 'accept'))
149
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
150
+ .auth(Single.new('BasicAuth')))
151
+ .response(new_response_handler
152
+ .deserializer(APIHelper.method(:custom_type_deserializer))
153
+ .deserialize_into(CustomerDetailResponse.method(:from_hash))
154
+ .local_error('400',
155
+ "The server cannot or will not process the request due to'\
156
+ ' something that is perceived to be a client\r\n error (e.g.,'\
157
+ ' malformed request syntax, invalid \r\n request message framing,'\
158
+ ' or deceptive request routing).",
159
+ DefaultErrorException)
160
+ .local_error('401',
161
+ "The request has not been applied because it lacks valid '\
162
+ ' authentication credentials for the target resource.\r\n",
163
+ DefaultErrorException)
164
+ .local_error('403',
165
+ "The server understood the request but refuses to authorize it.'\
166
+ '\r\n",
167
+ ErrorUserAccessError1Exception)
168
+ .local_error('404',
169
+ "The origin server did not find a current representation for'\
170
+ ' the target resource or is not willing to disclose that one'\
171
+ ' exists.\r\n",
172
+ DefaultErrorException)
173
+ .local_error('500',
174
+ "The server encountered an unexpected condition the prevented it'\
175
+ ' from fulfilling the request.\r\n",
176
+ DefaultErrorException))
177
+ .execute
178
+ end
179
+
180
+ # - This operation fetches the International and National Price List and
181
+ # discount values set on pump prices & List Prices
182
+ # - It allows searching price list and discount values set on pump prices
183
+ # that are applicable for a given customer
184
+ # **Note**: Accounts with cancelled status will not be considered for this
185
+ # operation for the configured
186
+ # - When the search is based on customer specific price list then the
187
+ # customer price list is returned based on the associated pricing customer.
188
+ # - The discount values set on pump prices, which are returned by the
189
+ # operation are always customer specific values based on the customer
190
+ # associated price rules.
191
+ # @param [String] apikey Required parameter: This is the API key of the
192
+ # specific environment which needs to be passed by the client.
193
+ # @param [String] request_id Required parameter: Mandatory UUID (according
194
+ # to RFC 4122 standards) for requests and responses. This will be played
195
+ # back in the response from the request.
196
+ # @param [CustomerPriceListRequest] body Optional parameter: Customerdetails
197
+ # request body
198
+ # @return [CustomerPriceListResponse] response from the API call
199
+ def customer_price_list(apikey,
200
+ request_id,
201
+ body: nil)
202
+ new_api_call_builder
203
+ .request(new_request_builder(HttpMethodEnum::POST,
204
+ '/fleetmanagement/v2/customer/pricelist',
205
+ Server::SHELL)
206
+ .header_param(new_parameter(apikey, key: 'apikey'))
207
+ .header_param(new_parameter(request_id, key: 'RequestId'))
208
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
209
+ .body_param(new_parameter(body))
210
+ .header_param(new_parameter('application/json', key: 'accept'))
211
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
212
+ .auth(Single.new('BasicAuth')))
213
+ .response(new_response_handler
214
+ .deserializer(APIHelper.method(:custom_type_deserializer))
215
+ .deserialize_into(CustomerPriceListResponse.method(:from_hash))
216
+ .local_error('400',
217
+ "The server cannot or will not process the request due to'\
218
+ ' something that is perceived to be a client\r\n error (e.g.,'\
219
+ ' malformed request syntax, invalid \r\n request message framing,'\
220
+ ' or deceptive request routing).",
221
+ DefaultErrorException)
222
+ .local_error('401',
223
+ "The request has not been applied because it lacks valid '\
224
+ ' authentication credentials for the target resource.\r\n",
225
+ DefaultErrorException)
226
+ .local_error('403',
227
+ "The server understood the request but refuses to authorize it.'\
228
+ '\r\n",
229
+ ErrorUserAccessError1Exception)
230
+ .local_error('404',
231
+ "The origin server did not find a current representation for'\
232
+ ' the target resource or is not willing to disclose that one'\
233
+ ' exists.\r\n",
234
+ DefaultErrorException)
235
+ .local_error('500',
236
+ "The server encountered an unexpected condition the prevented it'\
237
+ ' from fulfilling the request.\r\n",
238
+ DefaultErrorException))
239
+ .execute
240
+ end
241
+
242
+ # This API allows querying the customer account details from the Shell Cards
243
+ # Platform.
244
+ # It provides a flexible search criterion and supports paging".
245
+ # @param [String] apikey Required parameter: This is the API key of the
246
+ # specific environment which needs to be passed by the client.
247
+ # @param [String] request_id Required parameter: Mandatory UUID (according
248
+ # to RFC 4122 standards) for requests and responses. This will be played
249
+ # back in the response from the request.
250
+ # @param [AccountRequest] body Optional parameter: Example:
251
+ # @return [AccountResponse] response from the API call
252
+ def accounts(apikey,
253
+ request_id,
254
+ body: nil)
255
+ new_api_call_builder
256
+ .request(new_request_builder(HttpMethodEnum::POST,
257
+ '/fleetmanagement/v1/customer/accounts',
258
+ Server::SHELL)
259
+ .header_param(new_parameter(apikey, key: 'apikey'))
260
+ .header_param(new_parameter(request_id, key: 'RequestId'))
261
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
262
+ .body_param(new_parameter(body))
263
+ .header_param(new_parameter('application/json', key: 'accept'))
264
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
265
+ .auth(Single.new('BasicAuth')))
266
+ .response(new_response_handler
267
+ .deserializer(APIHelper.method(:custom_type_deserializer))
268
+ .deserialize_into(AccountResponse.method(:from_hash))
269
+ .local_error('400',
270
+ "The server cannot or will not process the request due to'\
271
+ ' something that is perceived to be a client\r\n error (e.g.,'\
272
+ ' malformed request syntax, invalid \r\n request message framing,'\
273
+ ' or deceptive request routing).",
274
+ DefaultErrorException)
275
+ .local_error('401',
276
+ "The request has not been applied because it lacks valid '\
277
+ ' authentication credentials for the target resource.\r\n",
278
+ DefaultErrorException)
279
+ .local_error('403',
280
+ "The server understood the request but refuses to authorize it.'\
281
+ '\r\n",
282
+ ErrorUserAccessError1Exception)
283
+ .local_error('404',
284
+ "The origin server did not find a current representation for'\
285
+ ' the target resource or is not willing to disclose that one'\
286
+ ' exists.\r\n",
287
+ DefaultErrorException)
288
+ .local_error('500',
289
+ "The server encountered an unexpected condition the prevented it'\
290
+ ' from fulfilling the request.\r\n",
291
+ DefaultErrorException))
292
+ .execute
293
+ end
294
+
295
+ # This operation allows querying card types that are associated to the given
296
+ # account and are allowed to be shown to users.
297
+ # @param [String] apikey Required parameter: This is the API key of the
298
+ # specific environment which needs to be passed by the client.
299
+ # @param [String] request_id Required parameter: Mandatory UUID (according
300
+ # to RFC 4122 standards) for requests and responses. This will be played
301
+ # back in the response from the request.
302
+ # @param [CardTypeRequest] body Optional parameter: Get CardType Request
303
+ # Body
304
+ # @return [CardTypeResponse] response from the API call
305
+ def card_type(apikey,
306
+ request_id,
307
+ body: nil)
308
+ new_api_call_builder
309
+ .request(new_request_builder(HttpMethodEnum::POST,
310
+ '/fleetmanagement/v2/customer/cardtype',
311
+ Server::SHELL)
312
+ .header_param(new_parameter(apikey, key: 'apikey'))
313
+ .header_param(new_parameter(request_id, key: 'RequestId'))
314
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
315
+ .body_param(new_parameter(body))
316
+ .header_param(new_parameter('application/json', key: 'accept'))
317
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
318
+ .auth(Single.new('BasicAuth')))
319
+ .response(new_response_handler
320
+ .deserializer(APIHelper.method(:custom_type_deserializer))
321
+ .deserialize_into(CardTypeResponse.method(:from_hash))
322
+ .local_error('400',
323
+ "The server cannot or will not process the request due to'\
324
+ ' something that is perceived to be a client\r\n error (e.g.,'\
325
+ ' malformed request syntax, invalid \r\n request message framing,'\
326
+ ' or deceptive request routing).",
327
+ DefaultErrorException)
328
+ .local_error('401',
329
+ "The request has not been applied because it lacks valid '\
330
+ ' authentication credentials for the target resource.\r\n",
331
+ DefaultErrorException)
332
+ .local_error('403',
333
+ "The server understood the request but refuses to authorize it.'\
334
+ '\r\n",
335
+ ErrorUserAccessError1Exception)
336
+ .local_error('404',
337
+ "The origin server did not find a current representation for'\
338
+ ' the target resource or is not willing to disclose that one'\
339
+ ' exists.\r\n",
340
+ DefaultErrorException)
341
+ .local_error('500',
342
+ "The server encountered an unexpected condition the prevented it'\
343
+ ' from fulfilling the request.\r\n",
344
+ DefaultErrorException))
345
+ .execute
346
+ end
347
+
348
+ # This operation allows querying the card group details . It provides
349
+ # flexible search criteria and supports paging.\
350
+ # When the card group type is configured as ‘Vertical’ in cards platform,
351
+ # this operation will return all card groups from the given account or if no
352
+ # account is passed in the input, then will return card groups from all the
353
+ # accounts under the payer.
354
+ # When the card group type is configured as ‘Horizontal’ in cards platform,
355
+ # this API will return all card groups configured directly under the payer.
356
+ # Accounts with cancelled status will not be considered for cardgroups
357
+ # search for the configured (E.g., SFH) set of client apps.
358
+ # @param [String] apikey Required parameter: This is the API key of the
359
+ # specific environment which needs to be passed by the client.
360
+ # @param [String] request_id Required parameter: Mandatory UUID (according
361
+ # to RFC 4122 standards) for requests and responses. This will be played
362
+ # back in the response from the request.
363
+ # @param [CardGroupRequest] body Optional parameter: Request Body
364
+ # @return [CardGroupResponse] response from the API call
365
+ def card_groups(apikey,
366
+ request_id,
367
+ body: nil)
368
+ new_api_call_builder
369
+ .request(new_request_builder(HttpMethodEnum::POST,
370
+ '/fleetmanagement/v1/customer/cardgroups',
371
+ Server::SHELL)
372
+ .header_param(new_parameter(apikey, key: 'apikey'))
373
+ .header_param(new_parameter(request_id, key: 'RequestId'))
374
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
375
+ .body_param(new_parameter(body))
376
+ .header_param(new_parameter('application/json', key: 'accept'))
377
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
378
+ .auth(Single.new('BasicAuth')))
379
+ .response(new_response_handler
380
+ .deserializer(APIHelper.method(:custom_type_deserializer))
381
+ .deserialize_into(CardGroupResponse.method(:from_hash))
382
+ .local_error('400',
383
+ "The server cannot or will not process the request due to'\
384
+ ' something that is perceived to be a client\r\n error (e.g.,'\
385
+ ' malformed request syntax, invalid \r\n request message framing,'\
386
+ ' or deceptive request routing).",
387
+ DefaultErrorException)
388
+ .local_error('401',
389
+ "The request has not been applied because it lacks valid '\
390
+ ' authentication credentials for the target resource.\r\n",
391
+ DefaultErrorException)
392
+ .local_error('403',
393
+ "The server understood the request but refuses to authorize it.'\
394
+ '\r\n",
395
+ ErrorUserAccessError1Exception)
396
+ .local_error('404',
397
+ "The origin server did not find a current representation for'\
398
+ ' the target resource or is not willing to disclose that one'\
399
+ ' exists.\r\n",
400
+ DefaultErrorException)
401
+ .local_error('500',
402
+ "The server encountered an unexpected condition the prevented it'\
403
+ ' from fulfilling the request.\r\n",
404
+ DefaultErrorException))
405
+ .execute
406
+ end
407
+
408
+ # This operation allows users to fetch audit data of account or card
409
+ # operations performed by users of a given customer
410
+ # The audit data includes details of below API operations
411
+ # * Order Card
412
+ # * Create Card Group
413
+ # * PIN reminder
414
+ # * Move Cards
415
+ # * Update Card Status
416
+ # * Update Card Group
417
+ # * Auto renew
418
+ # * Bulk card order
419
+ # * Bulk card block
420
+ # * Bulk Card Order (Multi Account)
421
+ # * BCOSummary
422
+ # * BCOMultiAccountSummary
423
+ # * BCBSummary
424
+ # * Mobile Payment
425
+ # * Registration
426
+ # * Fund Transfer (Scheduled & Realtime)
427
+ # * Delivery Address Update.
428
+ # @param [String] apikey Required parameter: This is the API key of the
429
+ # specific environment which needs to be passed by the client.
430
+ # @param [String] request_id Required parameter: Mandatory UUID (according
431
+ # to RFC 4122 standards) for requests and responses. This will be played
432
+ # back in the response from the request.
433
+ # @param [AuditRequest] body Optional parameter: request body
434
+ # @return [AuditResponse] response from the API call
435
+ def audit_report(apikey,
436
+ request_id,
437
+ body: nil)
438
+ new_api_call_builder
439
+ .request(new_request_builder(HttpMethodEnum::POST,
440
+ '/fleetmanagement/v1/customer/auditreport',
441
+ Server::SHELL)
442
+ .header_param(new_parameter(apikey, key: 'apikey'))
443
+ .header_param(new_parameter(request_id, key: 'RequestId'))
444
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
445
+ .body_param(new_parameter(body))
446
+ .header_param(new_parameter('application/json', key: 'accept'))
447
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
448
+ .auth(Single.new('BasicAuth')))
449
+ .response(new_response_handler
450
+ .deserializer(APIHelper.method(:custom_type_deserializer))
451
+ .deserialize_into(AuditResponse.method(:from_hash))
452
+ .local_error('400',
453
+ "The server cannot or will not process the request due to'\
454
+ ' something that is perceived to be a client\r\n error (e.g.,'\
455
+ ' malformed request syntax, invalid \r\n request message framing,'\
456
+ ' or deceptive request routing).",
457
+ DefaultErrorException)
458
+ .local_error('401',
459
+ "The request has not been applied because it lacks valid '\
460
+ ' authentication credentials for the target resource.\r\n",
461
+ DefaultErrorException)
462
+ .local_error('403',
463
+ "The server understood the request but refuses to authorize it.'\
464
+ '\r\n",
465
+ ErrorUserAccessError1Exception)
466
+ .local_error('404',
467
+ "The origin server did not find a current representation for'\
468
+ ' the target resource or is not willing to disclose that one'\
469
+ ' exists.\r\n",
470
+ DefaultErrorException)
471
+ .local_error('500',
472
+ "The server encountered an unexpected condition the prevented it'\
473
+ ' from fulfilling the request.\r\n",
474
+ DefaultErrorException))
475
+ .execute
476
+ end
477
+ end
478
+ end