Skip to content

Latest commit

 

History

History
executable file
·
458 lines (334 loc) · 13.4 KB

DevelopersApi.md

File metadata and controls

executable file
·
458 lines (334 loc) · 13.4 KB

DevelopersApi

All URIs are relative to https://virtserver.swaggerhub.com/iDT-Labs/Noory/1.0.0

Method HTTP request Description
addCustomer POST /customers adds a customer
deleteCustomer DELETE /customers/{id} Delete a single customer record.
getByExternalID GET /customers/byExternalId/{externalId} GETs a single customer its external ID
getCustomer GET /customers/{id} Gets a single customer
listCustomers GET /customers Gets a list of customers
markCustomerSourceDefault POST /customers/{id}/sources/{sid}/default Marks a customer payment source as default
updateCustomer PUT /customers/{id} Updates a customer
updateCustomerSources POST /customers/{id}/sources Adds a payment source to customer

addCustomer

Customer addCustomer(customerCreateDto)

adds a customer

Adds a customer

Example

// Import classes:
//import io.noory.client.invoker.ApiClient;
//import io.noory.client.invoker.ApiException;
//import io.noory.client.invoker.Configuration;
//import io.noory.client.invoker.auth.*;
//import io.noory.client.api.DevelopersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

DevelopersApi apiInstance = new DevelopersApi();
CustomerCreateDto customerCreateDto = new CustomerCreateDto(); // CustomerCreateDto | Customer record to add
try {
    Customer result = apiInstance.addCustomer(customerCreateDto);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling DevelopersApi#addCustomer");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
customerCreateDto CustomerCreateDto Customer record to add [optional]

Return type

Customer

Authorization

basicAuth

HTTP request headers

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

deleteCustomer

Customer deleteCustomer(id)

Delete a single customer record.

Delete a single customer record. Deletion does not remove the record from the database but soft deletes it by setting the deleted attribute to true. You can still access the customer record but it won't show up in listings

Example

// Import classes:
//import io.noory.client.invoker.ApiClient;
//import io.noory.client.invoker.ApiException;
//import io.noory.client.invoker.Configuration;
//import io.noory.client.invoker.auth.*;
//import io.noory.client.api.DevelopersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

DevelopersApi apiInstance = new DevelopersApi();
String id = "id_example"; // String | Unique ID of customer
try {
    Customer result = apiInstance.deleteCustomer(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling DevelopersApi#deleteCustomer");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String Unique ID of customer

Return type

Customer

Authorization

basicAuth

HTTP request headers

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

getByExternalID

Customer getByExternalID(externalId)

GETs a single customer its external ID

GETs a single customer its external ID

Example

// Import classes:
//import io.noory.client.invoker.ApiClient;
//import io.noory.client.invoker.ApiException;
//import io.noory.client.invoker.Configuration;
//import io.noory.client.invoker.auth.*;
//import io.noory.client.api.DevelopersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

DevelopersApi apiInstance = new DevelopersApi();
String externalId = "externalId_example"; // String | Unique externalId of customer
try {
    Customer result = apiInstance.getByExternalID(externalId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling DevelopersApi#getByExternalID");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
externalId String Unique externalId of customer

Return type

Customer

Authorization

basicAuth

HTTP request headers

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

getCustomer

Customer getCustomer(id)

Gets a single customer

Gets a single customer

Example

// Import classes:
//import io.noory.client.invoker.ApiClient;
//import io.noory.client.invoker.ApiException;
//import io.noory.client.invoker.Configuration;
//import io.noory.client.invoker.auth.*;
//import io.noory.client.api.DevelopersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

DevelopersApi apiInstance = new DevelopersApi();
String id = "id_example"; // String | Unique ID of customer
try {
    Customer result = apiInstance.getCustomer(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling DevelopersApi#getCustomer");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String Unique ID of customer

Return type

Customer

Authorization

basicAuth

HTTP request headers

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

listCustomers

List<Customer> listCustomers(search, page, size)

Gets a list of customers

Gets a list of customers; supports filtering, size, page by

Example

// Import classes:
//import io.noory.client.invoker.ApiClient;
//import io.noory.client.invoker.ApiException;
//import io.noory.client.invoker.Configuration;
//import io.noory.client.invoker.auth.*;
//import io.noory.client.api.DevelopersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

DevelopersApi apiInstance = new DevelopersApi();
String search = "search_example"; // String | pass an optional RSQL search string for looking up inventory
Integer page = 56; // Integer | page for pagination
Integer size = 56; // Integer | maximum number of records to return
try {
    List<Customer> result = apiInstance.listCustomers(search, page, size);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling DevelopersApi#listCustomers");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
search String pass an optional RSQL search string for looking up inventory [optional]
page Integer page for pagination [optional]
size Integer maximum number of records to return [optional]

Return type

List<Customer>

Authorization

basicAuth

HTTP request headers

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

markCustomerSourceDefault

Customer markCustomerSourceDefault(id, sid)

Marks a customer payment source as default

Marks a customer payment source as default

Example

// Import classes:
//import io.noory.client.invoker.ApiClient;
//import io.noory.client.invoker.ApiException;
//import io.noory.client.invoker.Configuration;
//import io.noory.client.invoker.auth.*;
//import io.noory.client.api.DevelopersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

DevelopersApi apiInstance = new DevelopersApi();
String id = "id_example"; // String | Unique ID of customer
String sid = "sid_example"; // String | ID of source we wish to make default
try {
    Customer result = apiInstance.markCustomerSourceDefault(id, sid);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling DevelopersApi#markCustomerSourceDefault");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String Unique ID of customer
sid String ID of source we wish to make default

Return type

Customer

Authorization

basicAuth

HTTP request headers

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

updateCustomer

Customer updateCustomer(id, customerUpdateDto)

Updates a customer

Update a customer's record

Example

// Import classes:
//import io.noory.client.invoker.ApiClient;
//import io.noory.client.invoker.ApiException;
//import io.noory.client.invoker.Configuration;
//import io.noory.client.invoker.auth.*;
//import io.noory.client.api.DevelopersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

DevelopersApi apiInstance = new DevelopersApi();
String id = "id_example"; // String | Unique ID of customer
CustomerUpdateDto customerUpdateDto = new CustomerUpdateDto(); // CustomerUpdateDto | Customer record to update
try {
    Customer result = apiInstance.updateCustomer(id, customerUpdateDto);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling DevelopersApi#updateCustomer");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String Unique ID of customer
customerUpdateDto CustomerUpdateDto Customer record to update [optional]

Return type

Customer

Authorization

basicAuth

HTTP request headers

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

updateCustomerSources

Customer updateCustomerSources(id, sourceCreateDto)

Adds a payment source to customer

Adds a payment source to customer

Example

// Import classes:
//import io.noory.client.invoker.ApiClient;
//import io.noory.client.invoker.ApiException;
//import io.noory.client.invoker.Configuration;
//import io.noory.client.invoker.auth.*;
//import io.noory.client.api.DevelopersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

DevelopersApi apiInstance = new DevelopersApi();
String id = "id_example"; // String | Unique ID of customer
SourceCreateDto sourceCreateDto = new SourceCreateDto(); // SourceCreateDto | Soruce record to create
try {
    Customer result = apiInstance.updateCustomerSources(id, sourceCreateDto);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling DevelopersApi#updateCustomerSources");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String Unique ID of customer
sourceCreateDto SourceCreateDto Soruce record to create [optional]

Return type

Customer

Authorization

basicAuth

HTTP request headers

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