Skip to content

Commit

Permalink
Generated Xendit php SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
xendit-devx-bot committed Oct 18, 2023
1 parent fe6ca05 commit de6a316
Show file tree
Hide file tree
Showing 243 changed files with 3,598 additions and 2,611 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The official Xendit PHP SDK provides a simple and convenient way to call Xendit's REST API
in applications written in PHP.

* Package version: 3.3.0
* Package version: 3.4.0

# Getting Started

Expand All @@ -28,14 +28,14 @@ To install the bindings via [Composer](https://getcomposer.org/), add the follow
}
],
"require": {
"xendit/xendit-php": "3.3.0"
"xendit/xendit-php": "3.4.0"
}
}
```

Then run `composer install`

### Manual Installation
### Autoloading

Download the files and include `autoload.php`:

Expand All @@ -59,18 +59,18 @@ Configuration::setXenditKey('XENDIT_API_KEY');

Find detailed API information and examples for each of our product’s by clicking the links below,

* [Balance](docs/BalanceAndTransaction/BalanceApi.md)
* [Customer](docs/Customer/CustomerApi.md)
* [Invoice](docs/Invoice/InvoiceApi.md)
* [PaymentMethod](docs/PaymentMethod/PaymentMethodApi.md)
* [PaymentRequest](docs/PaymentRequest/PaymentRequestApi.md)
* [Payout](docs/Payout/PayoutApi.md)
* [PaymentMethod](docs/PaymentMethod/PaymentMethodApi.md)
* [Refund](docs/Refund/RefundApi.md)
* [Balance](docs/BalanceAndTransaction/BalanceApi.md)
* [Transaction](docs/BalanceAndTransaction/TransactionApi.md)
* [Customer](docs/Customer/CustomerApi.md)
* [Payout](docs/Payout/PayoutApi.md)

All URIs are relative to *https://api.xendit.co*. For more information about our API, please refer to *https://developers.xendit.co/*.

Further Reading

* [Xendit Docs](https://docs.xendit.co/)
* [Xendit API Reference](https://developers.xendit.co/)
* [Xendit API Reference](https://developers.xendit.co/)
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xendit/xendit-php",
"version": "3.3.0",
"version": "3.4.0",
"description": "Xendit PHP SDK",
"keywords": [
"openapitools",
Expand Down
3 changes: 3 additions & 0 deletions docs/BalanceAndTransaction/ChannelsCategories.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,8 @@ use Xendit\BalanceAndTransaction\ChannelsCategories;

* `OTHER` (value: `'OTHER'`)

* `XENDIT_ENUM_DEFAULT_FALLBACK` (value: `UNKNOWN_ENUM_VALUE`)

If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM.

[[Back to README]](../../README.md)
3 changes: 3 additions & 0 deletions docs/BalanceAndTransaction/Currency.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,5 +332,8 @@ use Xendit\BalanceAndTransaction\Currency;

* `ZWD` (value: `'ZWD'`)

* `XENDIT_ENUM_DEFAULT_FALLBACK` (value: `UNKNOWN_ENUM_VALUE`)

If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM.

[[Back to README]](../../README.md)
86 changes: 43 additions & 43 deletions docs/BalanceAndTransaction/TransactionApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ All URIs are relative to https://api.xendit.co, except if the operation defines

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**getAllTransactions()**](TransactionApi.md#getAllTransactions) | **GET** /transactions | Get a list of transactions |
| [**getTransactionByID()**](TransactionApi.md#getTransactionByID) | **GET** /transactions/{id} | Get a transaction based on its id |
| [**getAllTransactions()**](TransactionApi.md#getAllTransactions) | **GET** /transactions | Get a list of transactions |


## `getAllTransactions()`
## `getTransactionByID()`

```php
getAllTransactions($for_user_id, $types, $statuses, $channel_categories, $reference_id, $product_id, $account_identifier, $amount, $currency, $created, $updated, $limit, $after_id, $before_id): \BalanceAndTransaction\TransactionsResponse
getTransactionByID($id, $for_user_id): \BalanceAndTransaction\TransactionResponse
```

Get a list of transactions
Get a transaction based on its id

Get a list of all transactions based on filter and search parameters.
Get single specific transaction by transaction id.

### Example

Expand All @@ -30,26 +30,14 @@ use Xendit\BalanceAndTransaction\TransactionApi;
Configuration::setXenditKey("YOUR_API_KEY_HERE");

$apiInstance = new TransactionApi();
$id = "'id_example'"; // string
$for_user_id = "5dbf20d7c8eb0c0896f811b6"; // string | The sub-account user-id that you want to make this transaction for. This header is only used if you have access to xenPlatform. See xenPlatform for more information
$types = ["DISBURSEMENT","PAYMENT"]; // \BalanceAndTransaction\TransactionTypes[] | Transaction types that will be included in the result. Default is to include all transaction types
$statuses = ["SUCCESS","PENDING"]; // \BalanceAndTransaction\TransactionStatuses[] | Status of the transaction. Default is to include all status.
$channel_categories = ["BANK","INVOICE"]; // \BalanceAndTransaction\ChannelsCategories[] | Payment channels in which the transaction is carried out. Default is to include all channels.
$reference_id = "ref23232"; // string | To filter the result for transactions with matching reference given (case sensitive)
$product_id = "d290f1ee-6c54-4b01-90e6-d701748f0701"; // string | To filter the result for transactions with matching product_id (a.k.a payment_id) given (case sensitive)
$account_identifier = "123123123"; // string | Account identifier of transaction. The format will be different from each channel. For example, on `BANK` channel it will be account number and on `CARD` it will be masked card number.
$amount = 100; // float | Specific transaction amount to search for
$currency = new \Xendit\BalanceAndTransaction\Currency(); // Currency
$created = array('key' => new \Xendit\BalanceAndTransaction\DateRangeFilter()); // DateRangeFilter | Filter time of transaction by created date. If not specified will list all dates.
$updated = array('key' => new \Xendit\BalanceAndTransaction\DateRangeFilter()); // DateRangeFilter | Filter time of transaction by updated date. If not specified will list all dates.
$limit = 10; // float | number of items in the result per page. Another name for \"results_per_page\"
$after_id = "'after_id_example'"; // string
$before_id = "'before_id_example'"; // string

try {
$result = $apiInstance->getAllTransactions($for_user_id, $types, $statuses, $channel_categories, $reference_id, $product_id, $account_identifier, $amount, $currency, $created, $updated, $limit, $after_id, $before_id);
$result = $apiInstance->getTransactionByID($id, $for_user_id);
print_r($result);
} catch (\Xendit\XenditSdkException $e) {
echo 'Exception when calling TransactionApi->getAllTransactions: ', $e->getMessage(), PHP_EOL;
echo 'Exception when calling TransactionApi->getTransactionByID: ', $e->getMessage(), PHP_EOL;
echo 'Full Error: ', json_encode($e->getFullError()), PHP_EOL;
}
```
Expand All @@ -58,24 +46,12 @@ try {

| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| | |
| **for_user_id** | **string**| The sub-account user-id that you want to make this transaction for. This header is only used if you have access to xenPlatform. See xenPlatform for more information | [optional] |
| **types** | [**TransactionTypes**](TransactionTypes.md)| Transaction types that will be included in the result. Default is to include all transaction types | [optional] |
| **statuses** | [**TransactionStatuses**](TransactionStatuses.md)| Status of the transaction. Default is to include all status. | [optional] |
| **channel_categories** | [**ChannelsCategories**](ChannelsCategories.md)| Payment channels in which the transaction is carried out. Default is to include all channels. | [optional] |
| **reference_id** | **string**| To filter the result for transactions with matching reference given (case sensitive) | [optional] |
| **product_id** | **string**| To filter the result for transactions with matching product_id (a.k.a payment_id) given (case sensitive) | [optional] |
| **account_identifier** | **string**| Account identifier of transaction. The format will be different from each channel. For example, on `BANK` channel it will be account number and on `CARD` it will be masked card number. | [optional] |
| **amount** | **float**| Specific transaction amount to search for | [optional] |
| **currency** | [**Currency**](Currency.md)| | [optional] |
| **created** | [**DateRangeFilter**](DateRangeFilter.md)| Filter time of transaction by created date. If not specified will list all dates. | [optional] |
| **updated** | [**DateRangeFilter**](DateRangeFilter.md)| Filter time of transaction by updated date. If not specified will list all dates. | [optional] |
| **limit** | **float**| number of items in the result per page. Another name for \"results_per_page\" | [optional] [default to 10] |
| **after_id** | **string**| | [optional] |
| **before_id** | **string**| | [optional] |

### Return type

[**\Xendit\BalanceAndTransaction\TransactionsResponse**](TransactionsResponse.md)
[**\Xendit\BalanceAndTransaction\TransactionResponse**](TransactionResponse.md)

### Authorization

Expand All @@ -88,15 +64,15 @@ No authorization required

[[Back to README]](../../README.md)

## `getTransactionByID()`
## `getAllTransactions()`

```php
getTransactionByID($id, $for_user_id): \BalanceAndTransaction\TransactionResponse
getAllTransactions($for_user_id, $types, $statuses, $channel_categories, $reference_id, $product_id, $account_identifier, $amount, $currency, $created, $updated, $limit, $after_id, $before_id): \BalanceAndTransaction\TransactionsResponse
```

Get a transaction based on its id
Get a list of transactions

Get single specific transaction by transaction id.
Get a list of all transactions based on filter and search parameters.

### Example

Expand All @@ -110,14 +86,26 @@ use Xendit\BalanceAndTransaction\TransactionApi;
Configuration::setXenditKey("YOUR_API_KEY_HERE");

$apiInstance = new TransactionApi();
$id = "'id_example'"; // string
$for_user_id = "5dbf20d7c8eb0c0896f811b6"; // string | The sub-account user-id that you want to make this transaction for. This header is only used if you have access to xenPlatform. See xenPlatform for more information
$types = ["DISBURSEMENT","PAYMENT"]; // \BalanceAndTransaction\TransactionTypes[] | Transaction types that will be included in the result. Default is to include all transaction types
$statuses = ["SUCCESS","PENDING"]; // \BalanceAndTransaction\TransactionStatuses[] | Status of the transaction. Default is to include all status.
$channel_categories = ["BANK","INVOICE"]; // \BalanceAndTransaction\ChannelsCategories[] | Payment channels in which the transaction is carried out. Default is to include all channels.
$reference_id = "ref23232"; // string | To filter the result for transactions with matching reference given (case sensitive)
$product_id = "d290f1ee-6c54-4b01-90e6-d701748f0701"; // string | To filter the result for transactions with matching product_id (a.k.a payment_id) given (case sensitive)
$account_identifier = "123123123"; // string | Account identifier of transaction. The format will be different from each channel. For example, on `BANK` channel it will be account number and on `CARD` it will be masked card number.
$amount = 100; // float | Specific transaction amount to search for
$currency = new \Xendit\BalanceAndTransaction\Currency(); // Currency
$created = array('key' => new \Xendit\BalanceAndTransaction\DateRangeFilter()); // DateRangeFilter | Filter time of transaction by created date. If not specified will list all dates.
$updated = array('key' => new \Xendit\BalanceAndTransaction\DateRangeFilter()); // DateRangeFilter | Filter time of transaction by updated date. If not specified will list all dates.
$limit = 10; // float | number of items in the result per page. Another name for \"results_per_page\"
$after_id = "'after_id_example'"; // string
$before_id = "'before_id_example'"; // string

try {
$result = $apiInstance->getTransactionByID($id, $for_user_id);
$result = $apiInstance->getAllTransactions($for_user_id, $types, $statuses, $channel_categories, $reference_id, $product_id, $account_identifier, $amount, $currency, $created, $updated, $limit, $after_id, $before_id);
print_r($result);
} catch (\Xendit\XenditSdkException $e) {
echo 'Exception when calling TransactionApi->getTransactionByID: ', $e->getMessage(), PHP_EOL;
echo 'Exception when calling TransactionApi->getAllTransactions: ', $e->getMessage(), PHP_EOL;
echo 'Full Error: ', json_encode($e->getFullError()), PHP_EOL;
}
```
Expand All @@ -126,12 +114,24 @@ try {

| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| | |
| **for_user_id** | **string**| The sub-account user-id that you want to make this transaction for. This header is only used if you have access to xenPlatform. See xenPlatform for more information | [optional] |
| **types** | [**TransactionTypes**](TransactionTypes.md)| Transaction types that will be included in the result. Default is to include all transaction types | [optional] |
| **statuses** | [**TransactionStatuses**](TransactionStatuses.md)| Status of the transaction. Default is to include all status. | [optional] |
| **channel_categories** | [**ChannelsCategories**](ChannelsCategories.md)| Payment channels in which the transaction is carried out. Default is to include all channels. | [optional] |
| **reference_id** | **string**| To filter the result for transactions with matching reference given (case sensitive) | [optional] |
| **product_id** | **string**| To filter the result for transactions with matching product_id (a.k.a payment_id) given (case sensitive) | [optional] |
| **account_identifier** | **string**| Account identifier of transaction. The format will be different from each channel. For example, on `BANK` channel it will be account number and on `CARD` it will be masked card number. | [optional] |
| **amount** | **float**| Specific transaction amount to search for | [optional] |
| **currency** | [**Currency**](Currency.md)| | [optional] |
| **created** | [**DateRangeFilter**](DateRangeFilter.md)| Filter time of transaction by created date. If not specified will list all dates. | [optional] |
| **updated** | [**DateRangeFilter**](DateRangeFilter.md)| Filter time of transaction by updated date. If not specified will list all dates. | [optional] |
| **limit** | **float**| number of items in the result per page. Another name for \"results_per_page\" | [optional] [default to 10] |
| **after_id** | **string**| | [optional] |
| **before_id** | **string**| | [optional] |

### Return type

[**\Xendit\BalanceAndTransaction\TransactionResponse**](TransactionResponse.md)
[**\Xendit\BalanceAndTransaction\TransactionsResponse**](TransactionsResponse.md)

### Authorization

Expand Down
3 changes: 3 additions & 0 deletions docs/BalanceAndTransaction/TransactionStatuses.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@ use Xendit\BalanceAndTransaction\TransactionStatuses;

* `VOIDED` (value: `'VOIDED'`)

* `XENDIT_ENUM_DEFAULT_FALLBACK` (value: `UNKNOWN_ENUM_VALUE`)

If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM.

[[Back to README]](../../README.md)
3 changes: 3 additions & 0 deletions docs/BalanceAndTransaction/TransactionTypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,8 @@ use Xendit\BalanceAndTransaction\TransactionTypes;

* `OTHER` (value: `'OTHER'`)

* `XENDIT_ENUM_DEFAULT_FALLBACK` (value: `UNKNOWN_ENUM_VALUE`)

If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM.

[[Back to README]](../../README.md)
2 changes: 1 addition & 1 deletion docs/Customer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ paths:
- description: A unique key to prevent processing duplicate requests.
explode: false
in: header
name: IDEMPOTENCY-KEY
name: idempotency-key
required: false
schema:
example: idempotency-123
Expand Down
3 changes: 3 additions & 0 deletions docs/Customer/AddressStatus.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ use Xendit\Customer\AddressStatus;

* `DELETED` (value: `'DELETED'`)

* `XENDIT_ENUM_DEFAULT_FALLBACK` (value: `UNKNOWN_ENUM_VALUE`)

If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM.

[[Back to README]](../../README.md)
3 changes: 3 additions & 0 deletions docs/Customer/EndCustomerStatus.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@ use Xendit\Customer\EndCustomerStatus;

* `DELETED` (value: `'DELETED'`)

* `XENDIT_ENUM_DEFAULT_FALLBACK` (value: `UNKNOWN_ENUM_VALUE`)

If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM.

[[Back to README]](../../README.md)
3 changes: 3 additions & 0 deletions docs/Customer/IdentityAccountType.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@ use Xendit\Customer\IdentityAccountType;

* `QR_CODE` (value: `'QR_CODE'`)

* `XENDIT_ENUM_DEFAULT_FALLBACK` (value: `UNKNOWN_ENUM_VALUE`)

If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM.

[[Back to README]](../../README.md)
3 changes: 3 additions & 0 deletions docs/Customer/KYCDocumentSubType.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@ use Xendit\Customer\KYCDocumentSubType;

* `OTHERS` (value: `'OTHERS'`)

* `XENDIT_ENUM_DEFAULT_FALLBACK` (value: `UNKNOWN_ENUM_VALUE`)

If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM.

[[Back to README]](../../README.md)
3 changes: 3 additions & 0 deletions docs/Customer/KYCDocumentType.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@ use Xendit\Customer\KYCDocumentType;

* `BUSINESS_LICENSE` (value: `'BUSINESS_LICENSE'`)

* `XENDIT_ENUM_DEFAULT_FALLBACK` (value: `UNKNOWN_ENUM_VALUE`)

If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM.

[[Back to README]](../../README.md)
48 changes: 48 additions & 0 deletions docs/Invoice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ paths:
/v2/invoices/:
post:
operationId: createInvoice
parameters:
- description: Business ID of the sub-account merchant (XP feature)
explode: false
in: header
name: for-user-id
required: false
schema:
example: 62efe4c33e45694d63f585f8
type: string
style: simple
requestBody:
content:
application/json:
Expand Down Expand Up @@ -130,6 +140,15 @@ paths:
get:
operationId: getInvoiceById
parameters:
- description: Business ID of the sub-account merchant (XP feature)
explode: false
in: header
name: for-user-id
required: false
schema:
example: 62efe4c33e45694d63f585f8
type: string
style: simple
- description: Invoice ID
explode: false
in: path
Expand Down Expand Up @@ -185,6 +204,15 @@ paths:
get:
operationId: getInvoices
parameters:
- description: Business ID of the sub-account merchant (XP feature)
explode: false
in: header
name: for-user-id
required: false
schema:
example: 62efe4c33e45694d63f585f8
type: string
style: simple
- explode: true
in: query
name: external_id
Expand Down Expand Up @@ -343,6 +371,15 @@ paths:
post:
operationId: expireInvoice
parameters:
- description: Business ID of the sub-account merchant (XP feature)
explode: false
in: header
name: for-user-id
required: false
schema:
example: 62efe4c33e45694d63f585f8
type: string
style: simple
- description: Invoice ID to be expired
explode: false
in: path
Expand Down Expand Up @@ -510,6 +547,17 @@ components:
value:
error_code: INTERNAL_SERVER_ERROR
message: Something unxpected happened.
parameters:
ForUserId:
description: Business ID of the sub-account merchant (XP feature)
explode: false
in: header
name: for-user-id
required: false
schema:
example: 62efe4c33e45694d63f585f8
type: string
style: simple
schemas:
UnauthorizedError:
description: An error object used to indicate unauthorized access to an invoice-related
Expand Down
3 changes: 3 additions & 0 deletions docs/Invoice/BankCode.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@ use Xendit\Invoice\BankCode;

* `BNC` (value: `'BNC'`)

* `XENDIT_ENUM_DEFAULT_FALLBACK` (value: `UNKNOWN_ENUM_VALUE`)

If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM.

[[Back to README]](../../README.md)
Loading

0 comments on commit de6a316

Please sign in to comment.