Skip to content

Commit

Permalink
Generated Xendit python SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
xendit-devx-bot committed Jan 30, 2025
1 parent ec58a0d commit 63f50bf
Show file tree
Hide file tree
Showing 56 changed files with 727 additions and 66 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017-2024 Xendit
Copyright (c) 2017-2025 Xendit

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The official Xendit Python SDK provides a simple and convenient way to call Xendit's REST API
in applications written in Python.

* Package version: 6.0.0
* Package version: 6.1.0

## Requirements

Expand Down
14 changes: 13 additions & 1 deletion docs/InvoiceApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ create_invoice_request = CreateInvoiceRequest(
should_authenticate_credit_card=True,
currency="currency_example",
reminder_time=3.14,
local="local_example",
locale="locale_example",
reminder_time_unit="reminder_time_unit_example",
items=[
InvoiceItem(
Expand All @@ -147,8 +147,20 @@ create_invoice_request = CreateInvoiceRequest(
allowed_bins=[
"allowed_bins_example",
],
installment_configuration=ChannelPropertiesCardsInstallmentConfiguration(
allow_full_payment=True,
allowed_terms=[
ChannelPropertiesCardsInstallmentConfigurationAllowedTermsInner(
issuer="issuer_example",
allowed_terms=[
3.14,
],
),
],
),
),
),
metadata={},
) # CreateInvoiceRequest
for_user_id = "62efe4c33e45694d63f585f0" # str | Business ID of the sub-account merchant (XP feature)

Expand Down
14 changes: 14 additions & 0 deletions docs/invoice/BankCode.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@ Representing the available bank channels used for invoice-related transactions.

* `CIMB` (value: `"CIMB"`)

* `VIETCAPITAL` (value: `"VIETCAPITAL"`)

* `WOORI` (value: `"WOORI"`)

* `PV` (value: `"PV"`)

* `MSB` (value: `"MSB"`)

* `VPB` (value: `"VPB"`)

* `BIDV` (value: `"BIDV"`)

* `CAKE` (value: `"CAKE"`)

* `BNC` (value: `"BNC"`)

* `HANA` (value: `"HANA"`)
Expand Down
1 change: 1 addition & 0 deletions docs/invoice/ChannelPropertiesCards.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ An object representing properties specific for credit card payment method.
| Name | Type | Required | Description | Examples |
|------------|:-------------:|:-------------:|-------------|:-------------:|
| **allowed_bins** | **[str]** | | An array of allowed BINs (6 or 8 digits) for credit card payments. | |
| **installment_configuration** | [**ChannelPropertiesCardsInstallmentConfiguration**](ChannelPropertiesCardsInstallmentConfiguration.md) | | | |


[[Back to README]](../../README.md)
Expand Down
15 changes: 15 additions & 0 deletions docs/invoice/ChannelPropertiesCardsInstallmentConfiguration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# ChannelPropertiesCardsInstallmentConfiguration
> xendit.invoice.model.ChannelPropertiesCardsInstallmentConfiguration
An object to pre-set cards installment for a specific invoice

## Properties
| Name | Type | Required | Description | Examples |
|------------|:-------------:|:-------------:|-------------|:-------------:|
| **allow_full_payment** | **bool** | | Indicate whether full payment (without installment) is allowed | |
| **allowed_terms** | [**[ChannelPropertiesCardsInstallmentConfigurationAllowedTermsInner]**](ChannelPropertiesCardsInstallmentConfigurationAllowedTermsInner.md) | | An object to set what kind (from specific bank / specific tenor) of cards installments will be available on a specific invoice | |


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


Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# ChannelPropertiesCardsInstallmentConfigurationAllowedTermsInner
> xendit.invoice.model.ChannelPropertiesCardsInstallmentConfigurationAllowedTermsInner

## Properties
| Name | Type | Required | Description | Examples |
|------------|:-------------:|:-------------:|-------------|:-------------:|
| **issuer** | **str** | | The bank code of the installment provider / issuer | |
| **allowed_terms** | **[float]** | | An array containing list of installment tenor available to choose | |


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


3 changes: 2 additions & 1 deletion docs/invoice/CreateInvoiceRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ An object representing for an invoice creation request.
| **should_authenticate_credit_card** | **bool** | | Indicates whether credit card authentication is required. | |
| **currency** | **str** | | The currency of the invoice. | |
| **reminder_time** | **float** | | The reminder time. | |
| **local** | **str** | | The local. | |
| **locale** | **str** | | The default language to display. | |
| **reminder_time_unit** | **str** | | The unit of the reminder time. | |
| **items** | [**[InvoiceItem]**](InvoiceItem.md) | | An array of items included in the invoice. | |
| **fees** | [**[InvoiceFee]**](InvoiceFee.md) | | An array of fees associated with the invoice. | |
| **channel_properties** | [**ChannelProperties**](ChannelProperties.md) | | | |
| **metadata** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | A free-format JSON for additional information that you may use. Object can be up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. | |


[[Back to README]](../../README.md)
Expand Down
1 change: 1 addition & 0 deletions docs/invoice/Invoice.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ An object representing details for an invoice.
| **customer_notification_preference** | [**NotificationPreference**](NotificationPreference.md) | | | |
| **fees** | [**[InvoiceFee]**](InvoiceFee.md) | | An array of fees associated with the invoice. | |
| **channel_properties** | [**ChannelProperties**](ChannelProperties.md) | | | |
| **metadata** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | A free-format JSON for additional information that you may use. Object can be up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. | |


[[Back to README]](../../README.md)
Expand Down
2 changes: 2 additions & 0 deletions docs/invoice/InvoiceCurrency.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Representing the currency used for an invoice.

* `PHP` (value: `"PHP"`)

* `MYR` (value: `"MYR"`)

* `XenditEnumDefaultFallback` (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.
Expand Down
2 changes: 2 additions & 0 deletions docs/invoice/QrCodeType.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Representing the available QR Code channels used for invoice-related transaction

* `PROMPTPAY` (value: `"PROMPTPAY"`)

* `QRPH` (value: `"QRPH"`)

* `XenditEnumDefaultFallback` (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.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "xendit-python"
version = "6.0.0"
version = "6.1.0"
description = "Xendit REST API Client for Python - Invoice, Payment Request, Payment Method, Refund, Balance, Transaction, Customer, and Payout Services https://xendit.github.io/apireference/"
authors = ["DevX Team <[email protected]>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from setuptools import setup, find_packages # noqa: H301

NAME = "xendit"
VERSION = "6.0.0"
VERSION = "6.1.0"
# To install the library, run the following
#
# python setup.py install
Expand Down
2 changes: 1 addition & 1 deletion xendit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""


__version__ = "6.0.0"
__version__ = "6.1.0"

# import ApiClient
from xendit.api_client import ApiClient
Expand Down
4 changes: 2 additions & 2 deletions xendit/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ def __init__(self, configuration=None, header_name=None, header_value=None,

# XENDIT headers
self.default_headers['xendit-lib'] = 'python'
self.default_headers['xendit-lib-ver'] = '6.0.0'
self.default_headers['xendit-lib-ver'] = '6.1.0'

self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Generator/6.0.0/python'
self.user_agent = 'OpenAPI-Generator/6.1.0/python'

def __enter__(self):
return self
Expand Down
2 changes: 1 addition & 1 deletion xendit/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 1.70.0\n"\
"SDK Package Version: 6.0.0".\
"SDK Package Version: 6.1.0".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self):
Expand Down
2 changes: 1 addition & 1 deletion xendit/invoice/invoice_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xendit-invoice-service descriptions # noqa: E501
The version of the OpenAPI document: 1.7.6
The version of the OpenAPI document: 1.8.7
"""

import re # noqa: F401
Expand Down
2 changes: 2 additions & 0 deletions xendit/invoice/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
from xendit.invoice.model.bank_code import BankCode
from xendit.invoice.model.channel_properties import ChannelProperties
from xendit.invoice.model.channel_properties_cards import ChannelPropertiesCards
from xendit.invoice.model.channel_properties_cards_installment_configuration import ChannelPropertiesCardsInstallmentConfiguration
from xendit.invoice.model.channel_properties_cards_installment_configuration_allowed_terms_inner import ChannelPropertiesCardsInstallmentConfigurationAllowedTermsInner
from xendit.invoice.model.create_invoice_request import CreateInvoiceRequest
from xendit.invoice.model.customer_object import CustomerObject
from xendit.invoice.model.direct_debit import DirectDebit
Expand Down
2 changes: 1 addition & 1 deletion xendit/invoice/model/address_object.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
The version of the XENDIT API: 1.7.6
The version of the XENDIT API: 1.8.7
"""


Expand Down
2 changes: 1 addition & 1 deletion xendit/invoice/model/alternative_display_item.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
The version of the XENDIT API: 1.7.6
The version of the XENDIT API: 1.8.7
"""


Expand Down
2 changes: 1 addition & 1 deletion xendit/invoice/model/bad_request_error.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
The version of the XENDIT API: 1.7.6
The version of the XENDIT API: 1.8.7
"""


Expand Down
2 changes: 1 addition & 1 deletion xendit/invoice/model/bank.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
The version of the XENDIT API: 1.7.6
The version of the XENDIT API: 1.8.7
"""


Expand Down
17 changes: 12 additions & 5 deletions xendit/invoice/model/bank_code.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
The version of the XENDIT API: 1.7.6
The version of the XENDIT API: 1.8.7
"""


Expand Down Expand Up @@ -59,6 +59,13 @@ class BankCode(ModelSimple):
'BJB': "BJB",
'SAHABAT_SAMPOERNA': "SAHABAT_SAMPOERNA",
'CIMB': "CIMB",
'VIETCAPITAL': "VIETCAPITAL",
'WOORI': "WOORI",
'PV': "PV",
'MSB': "MSB",
'VPB': "VPB",
'BIDV': "BIDV",
'CAKE': "CAKE",
'BNC': "BNC",
'HANA': "HANA",
'MUAMALAT': "MUAMALAT",
Expand Down Expand Up @@ -114,10 +121,10 @@ def __init__(self, *args, **kwargs):
Note that value can be passed either in args or in kwargs, but not in both.
Args:
args[0] (str): Representing the available bank channels used for invoice-related transactions.., must be one of ["BCA", "BNI", "BRI", "MANDIRI", "PERMATA", "BSI", "BJB", "SAHABAT_SAMPOERNA", "CIMB", "BNC", "HANA", "MUAMALAT", ] # noqa: E501
args[0] (str): Representing the available bank channels used for invoice-related transactions.., must be one of ["BCA", "BNI", "BRI", "MANDIRI", "PERMATA", "BSI", "BJB", "SAHABAT_SAMPOERNA", "CIMB", "VIETCAPITAL", "WOORI", "PV", "MSB", "VPB", "BIDV", "CAKE", "BNC", "HANA", "MUAMALAT", ] # noqa: E501
Keyword Args:
value (str): Representing the available bank channels used for invoice-related transactions.., must be one of ["BCA", "BNI", "BRI", "MANDIRI", "PERMATA", "BSI", "BJB", "SAHABAT_SAMPOERNA", "CIMB", "BNC", "HANA", "MUAMALAT", ] # noqa: E501
value (str): Representing the available bank channels used for invoice-related transactions.., must be one of ["BCA", "BNI", "BRI", "MANDIRI", "PERMATA", "BSI", "BJB", "SAHABAT_SAMPOERNA", "CIMB", "VIETCAPITAL", "WOORI", "PV", "MSB", "VPB", "BIDV", "CAKE", "BNC", "HANA", "MUAMALAT", ] # noqa: E501
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Expand Down Expand Up @@ -210,10 +217,10 @@ def _from_openapi_data(cls, *args, **kwargs):
Note that value can be passed either in args or in kwargs, but not in both.
Args:
args[0] (str): Representing the available bank channels used for invoice-related transactions.., must be one of ["BCA", "BNI", "BRI", "MANDIRI", "PERMATA", "BSI", "BJB", "SAHABAT_SAMPOERNA", "CIMB", "BNC", "HANA", "MUAMALAT", ] # noqa: E501
args[0] (str): Representing the available bank channels used for invoice-related transactions.., must be one of ["BCA", "BNI", "BRI", "MANDIRI", "PERMATA", "BSI", "BJB", "SAHABAT_SAMPOERNA", "CIMB", "VIETCAPITAL", "WOORI", "PV", "MSB", "VPB", "BIDV", "CAKE", "BNC", "HANA", "MUAMALAT", ] # noqa: E501
Keyword Args:
value (str): Representing the available bank channels used for invoice-related transactions.., must be one of ["BCA", "BNI", "BRI", "MANDIRI", "PERMATA", "BSI", "BJB", "SAHABAT_SAMPOERNA", "CIMB", "BNC", "HANA", "MUAMALAT", ] # noqa: E501
value (str): Representing the available bank channels used for invoice-related transactions.., must be one of ["BCA", "BNI", "BRI", "MANDIRI", "PERMATA", "BSI", "BJB", "SAHABAT_SAMPOERNA", "CIMB", "VIETCAPITAL", "WOORI", "PV", "MSB", "VPB", "BIDV", "CAKE", "BNC", "HANA", "MUAMALAT", ] # noqa: E501
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Expand Down
2 changes: 1 addition & 1 deletion xendit/invoice/model/channel_properties.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
The version of the XENDIT API: 1.7.6
The version of the XENDIT API: 1.8.7
"""


Expand Down
13 changes: 12 additions & 1 deletion xendit/invoice/model/channel_properties_cards.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
The version of the XENDIT API: 1.7.6
The version of the XENDIT API: 1.8.7
"""


Expand All @@ -24,6 +24,8 @@
)
from xendit.exceptions import ApiAttributeError

from xendit.invoice.model.channel_properties_cards_installment_configuration import ChannelPropertiesCardsInstallmentConfiguration
globals()['ChannelPropertiesCardsInstallmentConfiguration'] = ChannelPropertiesCardsInstallmentConfiguration

def lazy_import():
pass
Expand Down Expand Up @@ -64,6 +66,7 @@ def additional_properties_type():
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
"""
lazy_import()
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501

_nullable = False
Expand All @@ -78,8 +81,10 @@ def openapi_types():
openapi_types (dict): The key is attribute name
and the value is attribute type.
"""
lazy_import()
return {
'allowed_bins': ([str], none_type), # noqa: E501
'installment_configuration': (ChannelPropertiesCardsInstallmentConfiguration, none_type), # noqa: E501
}

@cached_property
Expand All @@ -89,6 +94,7 @@ def discriminator():

attribute_map = {
'allowed_bins': 'allowed_bins', # noqa: E501
'installment_configuration': 'installment_configuration', # noqa: E501
}

read_only_vars = {
Expand Down Expand Up @@ -133,6 +139,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
allowed_bins ([str]): An array of allowed BINs (6 or 8 digits) for credit card payments.. [optional] # noqa: E501
installment_configuration (ChannelPropertiesCardsInstallmentConfiguration): [optional] # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down Expand Up @@ -188,6 +195,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
@convert_js_args_to_python_args
def __init__(self,
allowed_bins: list | None = None,
installment_configuration: ChannelPropertiesCardsInstallmentConfiguration | None = None,
*args, **kwargs
): # noqa: E501
"""ChannelPropertiesCards - a model defined in OpenAPI
Expand Down Expand Up @@ -225,6 +233,7 @@ def __init__(self,
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
allowed_bins ([str]): An array of allowed BINs (6 or 8 digits) for credit card payments.. [optional] # noqa: E501
installment_configuration (ChannelPropertiesCardsInstallmentConfiguration): [optional] # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down Expand Up @@ -258,6 +267,8 @@ def __init__(self,

if allowed_bins is not None:
self.allowed_bins = allowed_bins
if installment_configuration is not None:
self.installment_configuration = installment_configuration
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
Expand Down
Loading

0 comments on commit 63f50bf

Please sign in to comment.