All URIs are relative to https://api.swirepay.com/v1
Method | HTTP request | Description |
---|---|---|
addCustomer | POST /customer | Add a customer |
getCustomer | GET /customer | Get customers |
InlineResponse2003 addCustomer(body, xApiKey)
Add a customer
Adds a customer to an account
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.CustomerApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
CustomerApi apiInstance = new CustomerApi();
CustomerRequest body = new CustomerRequest(); // CustomerRequest | Customer object that needs to be added to the account
String xApiKey = "xApiKey_example"; // String |
try {
InlineResponse2003 result = apiInstance.addCustomer(body, xApiKey);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CustomerApi#addCustomer");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | CustomerRequest | Customer object that needs to be added to the account | |
xApiKey | String |
- Content-Type: application/json
- Accept: application/json
InlineResponse2002 getCustomer(xApiKey)
Get customers
Get customers
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.CustomerApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
CustomerApi apiInstance = new CustomerApi();
String xApiKey = "xApiKey_example"; // String |
try {
InlineResponse2002 result = apiInstance.getCustomer(xApiKey);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CustomerApi#getCustomer");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
xApiKey | String |
- Content-Type: Not defined
- Accept: application/json