Method: ShellDataReportingApIs::InvoiceController#invoice_summary
- Defined in:
- lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb
#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).\n", ErrorObjectException) .local_error('401', "The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.\n", ErrorObjectException) .local_error('403', 'Forbidden', ErrorObjectException) .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.\n", ErrorObjectException) .local_error('500', "The server encountered an unexpected condition that prevented'\ ' it from fulfilling the request.\n", ErrorObjectException)) .execute end |