|
| 1 | +# WebService::Fastly::BillingInvoicesApi |
| 2 | + |
| 3 | +## Load the API package |
| 4 | +```perl |
| 5 | +use WebService::Fastly::Object::BillingInvoicesApi; |
| 6 | +``` |
| 7 | + |
| 8 | +All URIs are relative to *https://api.fastly.com* |
| 9 | + |
| 10 | +Method | HTTP request | Description |
| 11 | +------------- | ------------- | ------------- |
| 12 | +[**get_invoice_by_invoice_id**](BillingInvoicesApi.md#get_invoice_by_invoice_id) | **GET** /billing/v3/invoices/{invoice_id} | Get invoice by ID. |
| 13 | +[**list_invoices**](BillingInvoicesApi.md#list_invoices) | **GET** /billing/v3/invoices | List of invoices. |
| 14 | + |
| 15 | + |
| 16 | +# **get_invoice_by_invoice_id** |
| 17 | +> InvoiceResponse get_invoice_by_invoice_id(invoice_id => $invoice_id) |
| 18 | +
|
| 19 | +Get invoice by ID. |
| 20 | + |
| 21 | +Returns invoice associated with the invoice id. |
| 22 | + |
| 23 | +### Example |
| 24 | +```perl |
| 25 | +use Data::Dumper; |
| 26 | +use WebService::Fastly::BillingInvoicesApi; |
| 27 | +my $api_instance = WebService::Fastly::BillingInvoicesApi->new( |
| 28 | + |
| 29 | + # Configure API key authorization: token |
| 30 | + api_key => {'Fastly-Key' => 'YOUR_API_KEY'}, |
| 31 | + # uncomment below to setup prefix (e.g. Bearer) for API key, if needed |
| 32 | + #api_key_prefix => {'Fastly-Key' => 'Bearer'}, |
| 33 | +); |
| 34 | + |
| 35 | +my $invoice_id = "invoice_id_example"; # string | Alphanumeric string identifying the invoice. |
| 36 | + |
| 37 | +eval { |
| 38 | + my $result = $api_instance->get_invoice_by_invoice_id(invoice_id => $invoice_id); |
| 39 | + print Dumper($result); |
| 40 | +}; |
| 41 | +if ($@) { |
| 42 | + warn "Exception when calling BillingInvoicesApi->get_invoice_by_invoice_id: $@\n"; |
| 43 | +} |
| 44 | +``` |
| 45 | + |
| 46 | +### Parameters |
| 47 | + |
| 48 | +Name | Type | Description | Notes |
| 49 | +------------- | ------------- | ------------- | ------------- |
| 50 | + **invoice_id** | **string**| Alphanumeric string identifying the invoice. | |
| 51 | + |
| 52 | +### Return type |
| 53 | + |
| 54 | +[**InvoiceResponse**](InvoiceResponse.md) |
| 55 | + |
| 56 | +### Authorization |
| 57 | + |
| 58 | +[token](../README.md#token) |
| 59 | + |
| 60 | +### HTTP request headers |
| 61 | + |
| 62 | + - **Content-Type**: Not defined |
| 63 | + - **Accept**: application/json |
| 64 | + |
| 65 | +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) |
| 66 | + |
| 67 | +# **list_invoices** |
| 68 | +> ListInvoicesResponse list_invoices(billing_start_date => $billing_start_date, billing_end_date => $billing_end_date, limit => $limit, cursor => $cursor) |
| 69 | +
|
| 70 | +List of invoices. |
| 71 | + |
| 72 | +Returns the list of invoices, sorted by billing start date (newest to oldest). |
| 73 | + |
| 74 | +### Example |
| 75 | +```perl |
| 76 | +use Data::Dumper; |
| 77 | +use WebService::Fastly::BillingInvoicesApi; |
| 78 | +my $api_instance = WebService::Fastly::BillingInvoicesApi->new( |
| 79 | + |
| 80 | + # Configure API key authorization: token |
| 81 | + api_key => {'Fastly-Key' => 'YOUR_API_KEY'}, |
| 82 | + # uncomment below to setup prefix (e.g. Bearer) for API key, if needed |
| 83 | + #api_key_prefix => {'Fastly-Key' => 'Bearer'}, |
| 84 | +); |
| 85 | + |
| 86 | +my $billing_start_date = 2023-01-01T00:00:00Z; # string | |
| 87 | +my $billing_end_date = 2023-01-31T00:00:00Z; # string | |
| 88 | +my $limit = '100'; # string | Number of results per page. The maximum is 200. |
| 89 | +my $cursor = "cursor_example"; # string | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. |
| 90 | + |
| 91 | +eval { |
| 92 | + my $result = $api_instance->list_invoices(billing_start_date => $billing_start_date, billing_end_date => $billing_end_date, limit => $limit, cursor => $cursor); |
| 93 | + print Dumper($result); |
| 94 | +}; |
| 95 | +if ($@) { |
| 96 | + warn "Exception when calling BillingInvoicesApi->list_invoices: $@\n"; |
| 97 | +} |
| 98 | +``` |
| 99 | + |
| 100 | +### Parameters |
| 101 | + |
| 102 | +Name | Type | Description | Notes |
| 103 | +------------- | ------------- | ------------- | ------------- |
| 104 | + **billing_start_date** | **string**| | [optional] |
| 105 | + **billing_end_date** | **string**| | [optional] |
| 106 | + **limit** | **string**| Number of results per page. The maximum is 200. | [optional] [default to '100'] |
| 107 | + **cursor** | **string**| Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] |
| 108 | + |
| 109 | +### Return type |
| 110 | + |
| 111 | +[**ListInvoicesResponse**](ListInvoicesResponse.md) |
| 112 | + |
| 113 | +### Authorization |
| 114 | + |
| 115 | +[token](../README.md#token) |
| 116 | + |
| 117 | +### HTTP request headers |
| 118 | + |
| 119 | + - **Content-Type**: Not defined |
| 120 | + - **Accept**: application/json |
| 121 | + |
| 122 | +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) |
| 123 | + |
0 commit comments