Skip to content

justapnet/justap-server-sdk-java

Repository files navigation

justap-server-sdk-java

Justap API

  • API version: 1.0
    • Build date: 2024-03-30T15:42:32.013Z

For more information, please visit https://www.justap.cn/docs

Requirements

Building the API client library requires:

  1. Java 1.8+
  2. Maven/Gradle

Installation

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

mvn clean install

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

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>justap-server-sdk-java</groupId>
  <artifactId>justap-server-sdk-java</artifactId>
  <version>1.0.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "justap-server-sdk-java:justap-server-sdk-java:1.0.0"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/justap-server-sdk-java-1.0.0.jar
  • target/lib/*.jar

Getting Started

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

import justap.*;
import justap.auth.*;
import io.swagger.client.model.*;
import justap_sdk.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        V1CreateUserRequest body = new V1CreateUserRequest(); // V1CreateUserRequest | 
        try {
            V1UserResponse result = apiInstance.businessUserServiceCreateUser(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#businessUserServiceCreateUser");
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to http://127.0.0.1:21011

Class Method HTTP request Description
DefaultApi businessUserServiceCreateUser POST /v1/business_users 创建 Business User 对象
DefaultApi businessUserServiceDeleteUser DELETE /v1/business_users/{id} 删除 Business User 对象
DefaultApi businessUserServiceListAllUsers GET /v1/business_users 查询 Business User 对象列表
DefaultApi businessUserServiceRetrieveUser GET /v1/business_users/{id} 查询 Business User 对象
DefaultApi businessUserServiceSearchUsers GET /v1/business_users/search 查询 Business User 对象列表
DefaultApi businessUserServiceUpdateUser PUT /v1/business_users/{user.id} 更新 Business User 对象
DefaultApi businessUserServiceUpdateUser2 PATCH /v1/business_users/{user.id} 更新 Business User 对象
DefaultApi chargeServiceCharges POST /transaction/v1/charges 创建 Charge 对象
DefaultApi chargeServiceCharges2 POST /v1/charges 创建 Charge 对象
DefaultApi chargeServiceQueryCharge GET /transaction/v1/charges/{charge_id} 查询 Charge 对象
DefaultApi chargeServiceQueryCharge2 GET /v1/charges/{charge_id} 查询 Charge 对象
DefaultApi chargeServiceQueryCharge3 GET /v1/charges/merchant_trade_id/{merchant_trade_id} 查询 Charge 对象
DefaultApi chargeServiceQueryChargeList GET /transaction/v1/charges 查询 Charge 对象列表
DefaultApi chargeServiceQueryChargeList2 GET /v1/charges 查询 Charge 对象列表
DefaultApi chargeServiceReverseCharge POST /transaction/v1/charges/{charge_id}/reverse 撤销 Charge 对象
DefaultApi chargeServiceReverseCharge2 POST /v1/charges/{charge_id}/reverse 撤销 Charge 对象
DefaultApi refundServiceQueryRefund GET /transaction/v1/charges/{charge_id}/refunds/{refund_id} 查询 Refund 对象
DefaultApi refundServiceQueryRefund2 GET /v1/refunds/{refund_id} 查询 Refund 对象
DefaultApi refundServiceQueryRefundList GET /transaction/v1/charges/{charge_id}/refunds 查询 Refund 对象列表
DefaultApi refundServiceQueryRefundList2 GET /v1/refunds 查询 Refund 对象列表
DefaultApi refundServiceRefunds POST /transaction/v1/refunds 创建 Refund 对象
DefaultApi refundServiceRefunds2 POST /v1/refunds 创建 Refund 对象
DefaultApi royaltyServiceCreateRoyalty POST /v1/royalties 创建 Royalty 对象
DefaultApi royaltyServiceListAllRoyalties GET /v1/royalties 查询 Royalty 对象列表
DefaultApi royaltyServiceRetrieveRoyalty GET /v1/royalties/{id} 查询 Royalty 对象
DefaultApi settlementServiceCreateSettlementAccount POST /v1/settlement_accounts 创建结算账户
DefaultApi settlementServiceDeleteSettlementAccount DELETE /v1/settlement_accounts/{id} 删除结算账户
DefaultApi settlementServiceListAllSettlementAccounts GET /v1/settlement_accounts 查询结算账户列表
DefaultApi settlementServiceRetrieveSettlementAccount GET /v1/settlement_accounts/{id} 查询结算账户
DefaultApi settlementServiceSearchSettlementAccounts GET /v1/settlement_accounts/search 查询结算账户列表
DefaultApi settlementServiceUpdateSettlementAccount PUT /v1/settlement_accounts/{settlementAccount.id} 更新结算账户
DefaultApi settlementServiceUpdateSettlementAccount2 PATCH /v1/settlement_accounts/{settlementAccount.id} 更新结算账户
CheckoutServiceApi checkoutServiceCreateUnionQrCheckout POST /v1/checkout/union_qr 通过聚合收款码创建订单
CustomerServiceApi customerServiceCreateCustomer POST /v1/customers
CustomerServiceApi customerServiceDeleteCustomer DELETE /v1/customers/{id}
CustomerServiceApi customerServiceListAllCustomers GET /v1/customers
CustomerServiceApi customerServiceRetrieveCustomer GET /v1/customers/{id}
CustomerServiceApi customerServiceSearchCustomers GET /v1/customers/search
CustomerServiceApi customerServiceUpdateCustomer POST /v1/customers/{id}

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

ApiKeyAuth

  • Type: API key
  • API key parameter name: X-JUSTAP-API-KEY
  • Location: HTTP header

Recommendation

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

Author

support@justap.net