# ps.module.InvoiceApi

All URIs are relative to */*

Method | HTTP request | Description
------------- | ------------- | -------------
[**apiVersionInvoiceGet**](InvoiceApi.md#apiVersionInvoiceGet) | **GET** /api/{version}/invoice | Retrieve billing/payment history
[**apiVersionInvoicePut**](InvoiceApi.md#apiVersionInvoicePut) | **PUT** /api/{version}/invoice | Pay invoice
[**apiVersionInvoiceRefundPost**](InvoiceApi.md#apiVersionInvoiceRefundPost) | **POST** /api/{version}/invoice/refund | Refund Charges

<a name="apiVersionInvoiceGet"></a>
# **apiVersionInvoiceGet**
> apiVersionInvoiceGet(version, opts)

Retrieve billing/payment history

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.InvoiceApi();
let version = "version_example"; // String | 
let opts = { 
  'tenantId': "tenantId_example", // String | 
  'campaignId': "campaignId_example", // String | 
  'defaultSubcription': true, // Boolean | 
  'limit': 789, // Number | 
  'startAfter': "startAfter_example" // String | 
};
apiInstance.apiVersionInvoiceGet(version, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **version** | **String**|  | 
 **tenantId** | **String**|  | [optional] 
 **campaignId** | **String**|  | [optional] 
 **defaultSubcription** | **Boolean**|  | [optional] 
 **limit** | **Number**|  | [optional] 
 **startAfter** | **String**|  | [optional] 

### Return type

null (empty response body)

### Authorization

[oauth2](../README.md#oauth2)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="apiVersionInvoicePut"></a>
# **apiVersionInvoicePut**
> apiVersionInvoicePut(version)

Pay invoice

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.InvoiceApi();
let version = "version_example"; // String | 

apiInstance.apiVersionInvoicePut(version, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCoreInvoicesPayInvoiceQuery**](PhoneSpeakServiceCoreInvoicesPayInvoiceQuery.md)| Pay invoice parameter | [optional] 

### Return type

null (empty response body)

### Authorization

[oauth2](../README.md#oauth2)

### HTTP request headers

 - **Content-Type**: audio/x-wav, text/plain, application/octet-stream, application/json-patch+json, application/json, text/json, application/_*+json, application/xml, text/xml, application/_*+xml
 - **Accept**: Not defined

<a name="apiVersionInvoiceRefundPost"></a>
# **apiVersionInvoiceRefundPost**
> apiVersionInvoiceRefundPost(version)

Refund Charges

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.InvoiceApi();
let version = "version_example"; // String | 

apiInstance.apiVersionInvoiceRefundPost(version, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCoreRefundsCreateRefundQuery**](PhoneSpeakServiceCoreRefundsCreateRefundQuery.md)| Refund charges | [optional] 

### Return type

null (empty response body)

### Authorization

[oauth2](../README.md#oauth2)

### HTTP request headers

 - **Content-Type**: audio/x-wav, text/plain, application/octet-stream, application/json-patch+json, application/json, text/json, application/_*+json, application/xml, text/xml, application/_*+xml
 - **Accept**: Not defined

