Skip to content

idtlabs-xyz/noory-client-java

Repository files navigation

noory-api-client

Requirements

Building the API client library requires Maven to be installed.

Installation

To install the API client library to your local Maven repository, simply execute:

mvn install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn deploy

Refer to the official documentation for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
    <groupId>io.noory</groupId>
    <artifactId>noory-api-client</artifactId>
    <version>1.0.0</version>
    <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "io.noory:noory-api-client:1.0.0"

Others

At first generate the JAR by executing:

mvn package

Then manually install the following JARs:

  • target/noory-api-client-1.0.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

import io.noory.client.invoker.*;
import io.noory.client.invoker.auth.*;
import io.noory.client.model.*;
import io.noory.client.api.DevelopersApi;

import java.io.File;
import java.util.*;

public class DevelopersApiExample {

    public static void main(String[] args) {
        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();
        }
    }
}

Documentation for API Endpoints

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

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

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

basicAuth

  • Type: HTTP basic authentication

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

develop@noory.io

About

Java Client for the Noory Payment Gateway

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages