Class: ShellDataReportingApIs::InvoiceController
- Inherits:
-
BaseController
- Object
- BaseController
- ShellDataReportingApIs::InvoiceController
- Defined in:
- lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb
Overview
InvoiceController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#dates(request_id, body: nil) ⇒ InvoiceDatesResponseData
-
This API will return the list of Invoice Dates and Numbers for the given date range.
-
-
#download(request_id, body: nil) ⇒ Binary
-
This API downloads Invoice Documents i.e., ZIP file with Invoice PDF file and Proofing Elements in XML format from invoice repository.
-
-
#eid_download(request_id, body: nil) ⇒ Binary
-
This service allows downloading one or more EID documents and the corresponding signature material (where applicable) in one single request - The number of EID that can be downloaded at once is limited to 100 documents.
-
-
#eid_search(request_id, body: nil) ⇒ EIDDocumentResponse
-
This API provides the functionality needed for the screen “EID FILES” in the web interface.
-
-
#invoice_search(request_id, body: nil) ⇒ InvoiceSearchResponse
This API allows to search invoice data in the Shell Card Platform.
-
#invoice_summary(request_id, body: nil) ⇒ InvoiceSummaryResponse
This API returns the high level summary of invoices that match the given search criteria.
-
#search_documents(request_id, body: nil) ⇒ SearchDocumentsResponse
-
This API allows querying the details of all invoices successfully uploaded to the Worldline invoice repository and file reference numbers for downloading.
-
-
#search_statement_of_account(request_id, body: nil) ⇒ SearchStatementOfAccountResponse
-
This API will allow querying of SOA from different systems to RFC 4122 standards) for requests and responses.
-
-
#statement_of_account(request_id, body: nil) ⇒ StatementOfAccountResponse
This API allows querying the details of the latest statement of account (SOA) generated for a given Payer.
Methods inherited from BaseController
#initialize, #new_api_call_builder, #new_parameter, #new_request_builder, #new_response_handler, user_agent
Constructor Details
This class inherits a constructor from ShellDataReportingApIs::BaseController
Instance Method Details
#dates(request_id, body: nil) ⇒ InvoiceDatesResponseData
-
This API will return the list of Invoice Dates and Numbers for the given
date range. If the dates are not provided then it will fetch the data for past 13 months. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. RequestBody
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb', line 194 def dates(request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/invoice-management/v1/dates', Server::SHELL) .header_param(new_parameter(request_id, key: 'RequestId')) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('BearerToken'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(InvoiceDatesResponseData.method(:from_hash)) .local_error('400', 'The server cannot or will not process the request due to'\ ' something that is perceived to be a client error (e.g.,'\ ' malformed request syntax, invalid request message framing, or'\ ' deceptive request routing).', InvoiceManagementV1Dates400ErrorException) .local_error('401', 'The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.', InvoiceManagementV1Dates401ErrorException) .local_error('403', 'Forbidden', InvoiceManagementV1Dates403ErrorException) .local_error('404', 'The origin server did not find a current representation for'\ ' the target resource or is not willing to disclose that one'\ ' exists.', InvoiceManagementV1Dates404ErrorException) .local_error('500', 'The server encountered an unexpected condition that prevented'\ ' it from fulfilling the request.', InvoiceManagementV1Dates500ErrorException)) .execute end |
#download(request_id, body: nil) ⇒ Binary
-
This API downloads Invoice Documents i.e., ZIP file with Invoice PDF
file and Proofing Elements in XML format from invoice repository. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. RequestBody
386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 |
# File 'lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb', line 386 def download(request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/invoice-management/v1/download', Server::SHELL) .header_param(new_parameter(request_id, key: 'RequestId')) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body)) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('BearerToken'))) .response(new_response_handler .local_error('400', 'The server cannot or will not process the request due to'\ ' something that is perceived to be a client error (e.g.,'\ ' malformed request syntax, invalid request message framing, or'\ ' deceptive request routing).', InvoiceManagementV1Download400ErrorException) .local_error('401', 'The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.', InvoiceManagementV1Download401ErrorException) .local_error('403', 'Forbidden', InvoiceManagementV1Download403ErrorException) .local_error('404', 'The origin server did not find a current representation for'\ ' the target resource or is not willing to disclose that one'\ ' exists.', InvoiceManagementV1Download404ErrorException) .local_error('500', 'The server encountered an unexpected condition that prevented'\ ' it from fulfilling the request.', InvoiceManagementV1Download500ErrorException)) .execute end |
#eid_download(request_id, body: nil) ⇒ Binary
-
This service allows downloading one or more EID documents and the
corresponding signature material (where applicable) in one single request
-
The number of EID that can be downloaded at once is limited to 100
documents. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. RequestBody
433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 |
# File 'lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb', line 433 def eid_download(request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/invoice-management/v1/eiddownload', Server::SHELL) .header_param(new_parameter(request_id, key: 'RequestId')) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body)) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('BearerToken'))) .response(new_response_handler .local_error('400', 'The server cannot or will not process the request due to'\ ' something that is perceived to be a client error (e.g.,'\ ' malformed request syntax, invalid request message framing, or'\ ' deceptive request routing).', InvoiceManagementV1Eiddownload400ErrorException) .local_error('401', 'The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.', InvoiceManagementV1Eiddownload401ErrorException) .local_error('403', 'Forbidden', InvoiceManagementV1Eiddownload403ErrorException) .local_error('404', 'The origin server did not find a current representation for'\ ' the target resource or is not willing to disclose that one'\ ' exists.', InvoiceManagementV1Eiddownload404ErrorException) .local_error('500', 'The server encountered an unexpected condition that prevented'\ ' it from fulfilling the request.', InvoiceManagementV1Eiddownload500ErrorException)) .execute end |
#eid_search(request_id, body: nil) ⇒ EIDDocumentResponse
-
This API provides the functionality needed for the screen “EID FILES” in
the web interface. It allows retrieving a list of EIDs based on search criteria. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request.
338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 |
# File 'lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb', line 338 def eid_search(request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/invoice-management/v1/eidsearch', Server::SHELL) .header_param(new_parameter(request_id, key: 'RequestId')) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('BearerToken'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(EIDDocumentResponse.method(:from_hash)) .local_error('400', 'The server cannot or will not process the request due to'\ ' something that is perceived to be a client error (e.g.,'\ ' malformed request syntax, invalid request message framing, or'\ ' deceptive request routing).', InvoiceManagementV1Eidsearch400ErrorException) .local_error('401', 'The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.', InvoiceManagementV1Eidsearch401ErrorException) .local_error('403', 'Forbidden', InvoiceManagementV1Eidsearch403ErrorException) .local_error('404', 'The origin server did not find a current representation for'\ ' the target resource or is not willing to disclose that one'\ ' exists.', InvoiceManagementV1Eidsearch404ErrorException) .local_error('500', 'The server encountered an unexpected condition that prevented'\ ' it from fulfilling the request.', InvoiceManagementV1Eidsearch500ErrorException)) .execute end |
#invoice_search(request_id, body: nil) ⇒ InvoiceSearchResponse
This API allows to search invoice data in the Shell Card Platform. It provides flexible search criteria in the request body and supports paging. This API will also query the relevant invoice documents list and return a reference number that can be used to download invoice documents (PDF and Proofing elements in a zip file). #### Supported operations
* Search invoices by account
* Search invoices by invoice type or invoice status
* Search invoices by invoice id or number
* Search invoices by invoiced country
* Search invoices including einvoices
* Search invoices by summary document
* Search invoices by statement of account
* Search invoices by fixed and custom date periods
to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. RequestBody
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb', line 29 def invoice_search(request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/invoice-management/v1/search', Server::SHELL) .header_param(new_parameter(request_id, key: 'RequestId')) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('BearerToken'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(InvoiceSearchResponse.method(:from_hash)) .local_error('400', 'The server cannot or will not process the request due to'\ ' something that is perceived to be a client error (e.g.,'\ ' malformed request syntax, invalid request message framing, or'\ ' deceptive request routing).', InvoiceManagementV1Search400ErrorException) .local_error('401', 'The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.', InvoiceManagementV1Search401ErrorException) .local_error('403', 'Forbidden', InvoiceManagementV1Search403ErrorException) .local_error('404', 'The origin server did not find a current representation for'\ ' the target resource or is not willing to disclose that one'\ ' exists.', InvoiceManagementV1Search404ErrorException) .local_error('500', 'The server encountered an unexpected condition that prevented'\ ' it from fulfilling the request.', InvoiceManagementV1Search500ErrorException)) .execute end |
#invoice_summary(request_id, body: nil) ⇒ InvoiceSummaryResponse
This API returns the high level summary of invoices that match the given search criteria. The same search criteria as the endpoint ‘/v1/invoice/search` is supported with the exception of paging related parameters. #### Supported operations
* Search invoices by account
* Search invoices by invoice type or invoice status
* Search invoices by invoice id or number
* Search invoices by invoiced country
* Search invoices including einvoices
* Search invoices by summary document
* Search invoices by statement of account
* Search invoices by fixed and custom date periods
to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. RequestBody
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb', line 88 def invoice_summary(request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/invoice-management/v1/summary', Server::SHELL) .header_param(new_parameter(request_id, key: 'RequestId')) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('BearerToken'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(InvoiceSummaryResponse.method(:from_hash)) .local_error('400', 'The server cannot or will not process the request due to'\ ' something that is perceived to be a client error (e.g.,'\ ' malformed request syntax, invalid request message framing, or'\ ' deceptive request routing).', InvoiceManagementV1Summary400ErrorException) .local_error('401', 'The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.', InvoiceManagementV1Summary401ErrorException) .local_error('403', 'Forbidden', InvoiceManagementV1Summary403ErrorException) .local_error('404', 'The origin server did not find a current representation for'\ ' the target resource or is not willing to disclose that one'\ ' exists.', InvoiceManagementV1Summary404ErrorException) .local_error('500', 'The server encountered an unexpected condition that prevented'\ ' it from fulfilling the request.', InvoiceManagementV1Summary500ErrorException)) .execute end |
#search_documents(request_id, body: nil) ⇒ SearchDocumentsResponse
-
This API allows querying the details of all invoices successfully
uploaded to the Worldline invoice repository and file reference numbers for downloading. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. RequestBody
290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 |
# File 'lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb', line 290 def search_documents(request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/invoice-management/v1/searchdocuments', Server::SHELL) .header_param(new_parameter(request_id, key: 'RequestId')) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('BearerToken'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(SearchDocumentsResponse.method(:from_hash)) .local_error('400', 'The server cannot or will not process the request due to'\ ' something that is perceived to be a client error (e.g.,'\ ' malformed request syntax, invalid request message framing, or'\ ' deceptive request routing).', InvoiceManagementV1Searchdocuments400ErrorException) .local_error('401', 'The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.', InvoiceManagementV1Searchdocuments401ErrorException) .local_error('403', 'Forbidden', InvoiceManagementV1Searchdocuments403ErrorException) .local_error('404', 'The origin server did not find a current representation for'\ ' the target resource or is not willing to disclose that one'\ ' exists.', InvoiceManagementV1Searchdocuments404ErrorException) .local_error('500', 'The server encountered an unexpected condition that prevented'\ ' it from fulfilling the request.', InvoiceManagementV1Searchdocuments500ErrorException)) .execute end |
#search_statement_of_account(request_id, body: nil) ⇒ SearchStatementOfAccountResponse
-
This API will allow querying of SOA from different systems
to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. searchstatementofaccount RequestBody
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb', line 241 def search_statement_of_account(request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/invoice-management/v1/searchstatementofaccount', Server::SHELL) .header_param(new_parameter(request_id, key: 'RequestId')) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('BearerToken'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(SearchStatementOfAccountResponse.method(:from_hash)) .local_error('400', 'The server cannot or will not process the request due to'\ ' something that is perceived to be a client error (e.g.,'\ ' malformed request syntax, invalid request message framing, or'\ ' deceptive request routing).', InvoiceManagementV1Searchstatementofaccount400ErrorException) .local_error('401', 'The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.', InvoiceManagementV1Searchstatementofaccount401ErrorException) .local_error('403', 'Forbidden', InvoiceManagementV1Searchstatementofaccount403ErrorException) .local_error('404', 'The origin server did not find a current representation for'\ ' the target resource or is not willing to disclose that one'\ ' exists.', InvoiceManagementV1Searchstatementofaccount404ErrorException) .local_error('500', 'The server encountered an unexpected condition that prevented'\ ' it from fulfilling the request.', InvoiceManagementV1Searchstatementofaccount500ErrorException)) .execute end |
#statement_of_account(request_id, body: nil) ⇒ StatementOfAccountResponse
This API allows querying the details of the latest statement of account (SOA) generated for a given Payer. The endpoint supports querying SOA documents by various input parameters specified in the request body. #### Supported operations
* Search invoice SOA by payer and account
* Search invoice SOA including monthly trend (last 13 months invocie
trend summary)
* Search invoice SOA including past SOAs
* Search invoice SOA including due/overdue documents
* Search invoice SOA including invoice summary
to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. StatementOfAccount RequestBody
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb', line 145 def statement_of_account(request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/invoice-management/v1/statementofaccount', Server::SHELL) .header_param(new_parameter(request_id, key: 'RequestId')) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('BearerToken'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(StatementOfAccountResponse.method(:from_hash)) .local_error('400', 'The server cannot or will not process the request due to'\ ' something that is perceived to be a client error (e.g.,'\ ' malformed request syntax, invalid request message framing, or'\ ' deceptive request routing).', InvoiceManagementV1Statementofaccount400ErrorException) .local_error('401', 'The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.', InvoiceManagementV1Statementofaccount401ErrorException) .local_error('403', 'Forbidden', InvoiceManagementV1Statementofaccount403ErrorException) .local_error('404', 'The origin server did not find a current representation for'\ ' the target resource or is not willing to disclose that one'\ ' exists.', InvoiceManagementV1Statementofaccount404ErrorException) .local_error('500', 'The server encountered an unexpected condition that prevented'\ ' it from fulfilling the request.', InvoiceManagementV1Statementofaccount500ErrorException)) .execute end |