Method: AdvancedBilling::ProformaInvoicesController#create_consolidated_proforma_invoice
- Defined in:
- lib/advanced_billing/controllers/proforma_invoices_controller.rb
#create_consolidated_proforma_invoice(uid) ⇒ void
This method returns an undefined value.
This endpoint will trigger the creation of a consolidated proforma invoice asynchronously. It will return a 201 with no message, or a 422 with any errors. To find and view the new consolidated proforma invoice, you may poll the subscription group listing for proforma invoices; only one consolidated proforma invoice may be created per group at a time. If the information becomes outdated, simply void the old consolidated proforma invoice and generate a new one. ## Restrictions Proforma invoices are only available on Relationship Invoicing sites. To create a proforma invoice, the subscription must not be prepaid, and must be in a live state. group
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/advanced_billing/controllers/proforma_invoices_controller.rb', line 23 def create_consolidated_proforma_invoice(uid) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/subscription_groups/{uid}/proforma_invoices.json', Server::PRODUCTION) .template_param(new_parameter(uid, key: 'uid') .is_required(true) .should_encode(true)) .auth(Single.new('BasicAuth'))) .response(new_response_handler .is_response_void(true) .local_error_template('422', 'HTTP Response Not OK. Status code: {$statusCode}.'\ ' Response: \'{$response.body}\'.', ErrorListResponseException)) .execute end |