diff --git a/README.md b/README.md index 18372c5..f005429 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,16 @@ This library is the abstraction of Xendit API for access from applications writt - [Gradle](#gradle) - [Usage](#usage) - [Disbursement Services](#disbursement-services) - - [Create a disbursement](#create-a-disbursement) - - [Get banks with available disbursement service](#get-banks-with-available-disbursement-service) - - [Get a disbursement by external ID](#get-a-disbursement-by-external-id) - - [Get a disbursement by ID](#get-a-disbursement-by-id) + - [Create an IDR disbursement](#create-an-idr-disbursement) + - [Create a PHP disbursement](#create-a-php-disbursement) + - [Get banks with available IDR disbursement service](#get-banks-with-available-idr-disbursement-service) + - [Get disbursements channels](#get-disbursements-channels) + - [Get disbursements channels by channel category](#get-disbursement-channels-by-channel-category) + - [Get disbursements channels by channel code](#get-disbursement-channels-by-channel-code) + - [Get an IDR disbursement by external ID](#get-an-idr-disbursement-by-external-id) + - [Get a PHP disbursement by reference ID](#get-a-php-disbursement-by-reference-id) + - [Get an IDR disbursement by ID](#get-an-idr-disbursement-by-id) + - [Get a PHP disbursement by ID](#get-a-php-disbursement-by-id) - [Invoice services](#invoice-services) - [Create an invoice](#create-an-invoice) - [Get an invoice by ID](#get-an-invoice-by-id) @@ -135,7 +141,7 @@ More information: https://search.maven.org/artifact/com.xendit/xendit-java-lib You need to use secret API key in order to use functionality in this library. The key can be obtained from your [Xendit Dashboard](https://dashboard.xendit.co/settings/developers#api-keys). ### Without Client -If you're only dealing with a single secret key, you can simply import the packages required for the products you're interacting with without the need to create a client. +If you're only dealing with a single secret key, you can simply import the packages required for the products you're interacting with without the need to create a client. Xendit Disbursement class is being used for IDR Disbursement. There is another way to set secret key using **Xendit.Opt.setApiKey(")** which is recommended way to use instead of **Xendit.apiKey**. @@ -151,7 +157,7 @@ public class Example { } ``` ### With Client -If you're dealing with multiple secret keys, it is recommended that you use **XenditClient**. This allows you to create as many clients as needed, each with their own individual key. +If you're dealing with multiple secret keys, it is recommended that you use **XenditClient**. This allows you to create as many clients as needed, each with their own individual key. Xendit Disbursement Client is being used for IDR Disbursements. ```java import com.xendit.XenditClient; @@ -168,7 +174,7 @@ public class Example { } } ``` -Example: Create a disbursement +Example: Create an IDR disbursement ###### Without Client ```java @@ -202,6 +208,7 @@ public class ExampleCreateDisbursement { } ``` ###### With Client +Xendit Disbursement Client is being used for IDR Disbursement. ```java import com.xendit.exception.XenditException; import com.xendit.XenditClient; @@ -241,9 +248,9 @@ There are some examples provided for you [here](https://github.com/xendit/xendit ### Disbursement Services -#### Create a disbursement +#### Create an IDR disbursement -You can choose whether want to put the attributes as parameters or to put in inside a Map object. +You can choose whether want to put the attributes as parameters or to put in inside a Map object.
++DisbursementPHP.createPHPDisbursement( + String xendit_idempotency_key, + String reference_id, + String currency, + String channel_code, + String account_name, + String account_number, + String description, + Integer amount, + ReceiptNotification receiptNotification, + Beneficiary beneficiary +); +ReceiptNotification receiptNotification = ReceiptNotification.builder() + .emailTo(new String[] { "test@emailTo.com" }) + .emailCC(new String[] { "test@emailCC.com" }) + .emailBcc(new String[] { "test@emailBcc.com" }) + .build(); +Beneficiary beneficiary = + Beneficiary.builder() + .type("test-type") + .givenNames("Test Name") + .middleName("Middle Name") + .surname("Sur Name") + .businessName("Test") + .streetLine1("Jl. 123") + .streetLine2("Jl. 456") + .city("Jakarta Selatan") + .province("DKI Jakarta") + .state("Test") + .country("Test") + .zipCode("12345") + .mobileNumber("123456789") + .phoneNumber("12345678") + .email("email@test.com") + .build(); ++ |
+
++DisbursementPHP.createPHPDisbursement( + Map<String, String> headers, Map<String, Object> params +); ++ |
+