Method: AdvancedBilling::ProformaInvoicesController#list_proforma_invoices
- Defined in:
- lib/advanced_billing/controllers/proforma_invoices_controller.rb
#list_proforma_invoices(options = {}) ⇒ ListProformaInvoicesResponse
By default, proforma invoices returned on the index will only include totals, not detailed breakdowns for ‘line_items`, `discounts`, `taxes`, `credits`, `payments`, or `custom_fields`. To include breakdowns, pass the specific field as a key in the query with a value set to `true`. the subscription for the invoice’s Due Date, in the YYYY-MM-DD format. invoice’s Due Date, in the YYYY-MM-DD format. status of the invoice. Allowed Values: draft, open, paid, pending, voided pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned. Use in query ‘page=1`. many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200. Use in query `per_page=200`. returned invoices. line items data discounts data data credits data payments data custom fields data
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/advanced_billing/controllers/proforma_invoices_controller.rb', line 183 def list_proforma_invoices( = {}) new_api_call_builder .request(new_request_builder(HttpMethodEnum::GET, '/subscriptions/{subscription_id}/proforma_invoices.json', Server::PRODUCTION) .template_param(new_parameter(['subscription_id'], key: 'subscription_id') .is_required(true) .should_encode(true)) .query_param(new_parameter(['start_date'], key: 'start_date')) .query_param(new_parameter(['end_date'], key: 'end_date')) .query_param(new_parameter(['status'], key: 'status')) .query_param(new_parameter(['page'], key: 'page')) .query_param(new_parameter(['per_page'], key: 'per_page')) .query_param(new_parameter(['direction'], key: 'direction')) .query_param(new_parameter(['line_items'], key: 'line_items')) .query_param(new_parameter(['discounts'], key: 'discounts')) .query_param(new_parameter(['taxes'], key: 'taxes')) .query_param(new_parameter(['credits'], key: 'credits')) .query_param(new_parameter(['payments'], key: 'payments')) .query_param(new_parameter(['custom_fields'], key: 'custom_fields')) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('BasicAuth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(ListProformaInvoicesResponse.method(:from_hash))) .execute end |