Skip to content

Latest commit

 

History

History
121 lines (88 loc) · 3.3 KB

CustomerApi.md

File metadata and controls

121 lines (88 loc) · 3.3 KB

CustomerApi

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

addCustomer

InlineResponse2003 addCustomer(body, xApiKey)

Add a customer

Adds a customer to an account

Example

// 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();
}

Parameters

Name Type Description Notes
body CustomerRequest Customer object that needs to be added to the account
xApiKey String

Return type

InlineResponse2003

Authorization

api_key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getCustomer

InlineResponse2002 getCustomer(xApiKey)

Get customers

Get customers

Example

// 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();
}

Parameters

Name Type Description Notes
xApiKey String

Return type

InlineResponse2002

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json