# ps.module.PaymentMethodApi

All URIs are relative to */*

Method | HTTP request | Description
------------- | ------------- | -------------
[**apiVersionPaymentmethodGet**](PaymentMethodApi.md#apiVersionPaymentmethodGet) | **GET** /api/{version}/paymentmethod | Returns a list of payment method.
[**apiVersionPaymentmethodIdDelete**](PaymentMethodApi.md#apiVersionPaymentmethodIdDelete) | **DELETE** /api/{version}/paymentmethod/{id} | Delete existing payment method.
[**apiVersionPaymentmethodIdGet**](PaymentMethodApi.md#apiVersionPaymentmethodIdGet) | **GET** /api/{version}/paymentmethod/{id} | Retrieves the details of an existing payment method.
[**apiVersionPaymentmethodIdPut**](PaymentMethodApi.md#apiVersionPaymentmethodIdPut) | **PUT** /api/{version}/paymentmethod/{id} | Update the details of an existing payment method.
[**apiVersionPaymentmethodPost**](PaymentMethodApi.md#apiVersionPaymentmethodPost) | **POST** /api/{version}/paymentmethod | Create payment method

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

Returns a list of payment method.

### 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.PaymentMethodApi();
let version = "version_example"; // String | 
let opts = { 
  'limit': 789, // Number | 
  'startAfter': "startAfter_example" // String | 
};
apiInstance.apiVersionPaymentmethodGet(version, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **version** | **String**|  | 
 **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="apiVersionPaymentmethodIdDelete"></a>
# **apiVersionPaymentmethodIdDelete**
> apiVersionPaymentmethodIdDelete(id, version)

Delete existing payment method.

### 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.PaymentMethodApi();
let id = "id_example"; // String | 
let version = "version_example"; // String | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**|  | 
 **version** | **String**|  | 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

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

<a name="apiVersionPaymentmethodIdGet"></a>
# **apiVersionPaymentmethodIdGet**
> apiVersionPaymentmethodIdGet(id, version)

Retrieves the details of an existing payment method.

### 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.PaymentMethodApi();
let id = "id_example"; // String | 
let version = "version_example"; // String | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**|  | 
 **version** | **String**|  | 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

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

<a name="apiVersionPaymentmethodIdPut"></a>
# **apiVersionPaymentmethodIdPut**
> apiVersionPaymentmethodIdPut(idversion)

Update the details of an existing payment method.

### 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.PaymentMethodApi();
let id = "id_example"; // String | 
let version = "version_example"; // String | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**|  | 
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCorePaymentMethodsUpdatePaymentMethodQuery**](PhoneSpeakServiceCorePaymentMethodsUpdatePaymentMethodQuery.md)|  | [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="apiVersionPaymentmethodPost"></a>
# **apiVersionPaymentmethodPost**
> apiVersionPaymentmethodPost(version)

Create payment method

### 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.PaymentMethodApi();
let version = "version_example"; // String | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCorePaymentMethodsCreatePaymentMethodQuery**](PhoneSpeakServiceCorePaymentMethodsCreatePaymentMethodQuery.md)|  | [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

