Skip to content

Commit

Permalink
Generated Xendit go SDK
Browse files Browse the repository at this point in the history
xendit-devx-bot committed Dec 11, 2023
1 parent 78a9cc1 commit 10680ec
Showing 48 changed files with 105 additions and 60 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
The official Xendit Go SDK provides a simple and convenient way to call Xendit's REST API
in applications written in Go.

* Package version: 4.0.0
* Package version: 4.1.0

# Getting Started

2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
@@ -154,7 +154,7 @@ func (c *APIClient) PrepareRequest(
headerParams["xendit-lib"] = "go"

// TODO: overwrite this line from buddy pipeline
headerParams["xendit-lib-ver"] = "4.0.0"
headerParams["xendit-lib-ver"] = "4.1.0"

var body *bytes.Buffer

2 changes: 1 addition & 1 deletion configuration.go
Original file line number Diff line number Diff line change
@@ -78,7 +78,7 @@ var Default Configuration = *NewConfiguration()
func NewConfiguration() *Configuration {
cfg := &Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/4.0.0/go",
UserAgent: "OpenAPI-Generator/4.1.0/go",
Debug: false,
Servers: ServerConfigurations{
{
2 changes: 1 addition & 1 deletion docs/InvoiceApi.md
Original file line number Diff line number Diff line change
@@ -352,7 +352,7 @@ Use the following callback objects provided by Xendit to receive callbacks (also
### InvoiceCallback Object
>Invoice Callback Object
Model Documentation: [InvoiceCallback](/InvoiceCallback.md)
Model Documentation: [InvoiceCallback](invoice/InvoiceCallback.md)
#### Usage Example
Note that the example is meant to illustrate the contents of the callback object -- you will not need to instantiate these objects in practice
```go
2 changes: 1 addition & 1 deletion docs/PaymentMethodApi.md
Original file line number Diff line number Diff line change
@@ -668,7 +668,7 @@ Use the following callback objects provided by Xendit to receive callbacks (also
### PaymentMethodCallback Object
>Callback for active or expired E-Wallet or Direct Debit account linking, Virtual Accounts or QR strings
Model Documentation: [PaymentMethodCallback](/PaymentMethodCallback.md)
Model Documentation: [PaymentMethodCallback](payment_method/PaymentMethodCallback.md)
#### Usage Example
Note that the example is meant to illustrate the contents of the callback object -- you will not need to instantiate these objects in practice
```go
2 changes: 1 addition & 1 deletion docs/PaymentRequestApi.md
Original file line number Diff line number Diff line change
@@ -544,7 +544,7 @@ Use the following callback objects provided by Xendit to receive callbacks (also
### PaymentCallback Object
>Callback for successful or failed payments made via the Payments API
Model Documentation: [PaymentCallback](/PaymentCallback.md)
Model Documentation: [PaymentCallback](payment_request/PaymentCallback.md)
#### Usage Example
Note that the example is meant to illustrate the contents of the callback object -- you will not need to instantiate these objects in practice
```go
2 changes: 1 addition & 1 deletion docs/RefundApi.md
Original file line number Diff line number Diff line change
@@ -329,7 +329,7 @@ Use the following callback objects provided by Xendit to receive callbacks (also
### RefundCallback Object
>Callback for successful or failed Refunds made via the Payments API
Model Documentation: [RefundCallback](/RefundCallback.md)
Model Documentation: [RefundCallback](refund/RefundCallback.md)
#### Usage Example
Note that the example is meant to illustrate the contents of the callback object -- you will not need to instantiate these objects in practice
```go
10 changes: 10 additions & 0 deletions docs/invoice/EwalletType.md
Original file line number Diff line number Diff line change
@@ -23,6 +23,16 @@ Representing the available eWallet channels used for invoice-related transaction

* `JENIUSPAY` (value: `"JENIUSPAY"`)

* `MOMO` (value: `"MOMO"`)

* `ZALOPAY` (value: `"ZALOPAY"`)

* `VIETTELPAY` (value: `"VIETTELPAY"`)

* `VNPTWALLET` (value: `"VNPTWALLET"`)

* `APPOTA` (value: `"APPOTA"`)

* `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.
8 changes: 4 additions & 4 deletions docs/payment_request/PaymentCallbackData.md
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ Represents the actual funds transaction/attempt made to a payment method
| **PaymentMethod** | [**PaymentMethod**](PaymentMethod.md) | ☑️ | | |
| **ChannelProperties** | Pointer to [**NullablePaymentRequestChannelProperties**](PaymentRequestChannelProperties.md) | | | |
| **PaymentDetail** | Pointer to **map[string]interface{}** | | | |
| **FailureCode** | Pointer to **map[string]interface{}** | | | |
| **FailureCode** | Pointer to **NullableString** | | | |
| **Created** | **string** | ☑️ | | |
| **Updated** | **string** | ☑️ | | |
| **Metadata** | Pointer to **map[string]interface{}** | | | |
@@ -321,20 +321,20 @@ HasPaymentDetail returns a boolean if a field has been set.
UnsetPaymentDetail ensures that no value is present for PaymentDetail, not even an explicit nil
### GetFailureCode

`func (o *PaymentCallbackData) GetFailureCode() map[string]interface{}`
`func (o *PaymentCallbackData) GetFailureCode() string`

GetFailureCode returns the FailureCode field if non-nil, zero value otherwise.

### GetFailureCodeOk

`func (o *PaymentCallbackData) GetFailureCodeOk() (*map[string]interface{}, bool)`
`func (o *PaymentCallbackData) GetFailureCodeOk() (*string, bool)`

GetFailureCodeOk returns a tuple with the FailureCode field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetFailureCode

`func (o *PaymentCallbackData) SetFailureCode(v map[string]interface{})`
`func (o *PaymentCallbackData) SetFailureCode(v string)`

SetFailureCode sets FailureCode field to given value.

2 changes: 2 additions & 0 deletions docs/payment_request/QRCodeChannelCode.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,8 @@ QR Code Channel Code

## Enum

* `QRIS` (value: `"QRIS"`)

* `DANA` (value: `"DANA"`)

* `RCBC` (value: `"RCBC"`)
6 changes: 6 additions & 0 deletions docs/payment_request/VirtualAccountChannelCode.md
Original file line number Diff line number Diff line change
@@ -35,6 +35,12 @@ Virtual Account Channel Code

* `AMBANK` (value: `"AMBANK"`)

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

* `HANA` (value: `"HANA"`)

* `MUAMALAT` (value: `"MUAMALAT"`)

* `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.
2 changes: 1 addition & 1 deletion invoice/model_address_object.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_alternative_display_item.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_bad_request_error.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_bank.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_bank_code.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_create_invoice_request.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_customer_object.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_direct_debit.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_direct_debit_type.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_ewallet.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


12 changes: 11 additions & 1 deletion invoice/model_ewallet_type.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


@@ -30,6 +30,11 @@ const (
EWALLETTYPE_ASTRAPAY EwalletType = "ASTRAPAY"
EWALLETTYPE_NEXCASH EwalletType = "NEXCASH"
EWALLETTYPE_JENIUSPAY EwalletType = "JENIUSPAY"
EWALLETTYPE_MOMO EwalletType = "MOMO"
EWALLETTYPE_ZALOPAY EwalletType = "ZALOPAY"
EWALLETTYPE_VIETTELPAY EwalletType = "VIETTELPAY"
EWALLETTYPE_VNPTWALLET EwalletType = "VNPTWALLET"
EWALLETTYPE_APPOTA EwalletType = "APPOTA"
EWALLETTYPE_XENDIT_ENUM_DEFAULT_FALLBACK EwalletType = "UNKNOWN_ENUM_VALUE"
)

@@ -45,6 +50,11 @@ var AllowedEwalletTypeEnumValues = []EwalletType{
"ASTRAPAY",
"NEXCASH",
"JENIUSPAY",
"MOMO",
"ZALOPAY",
"VIETTELPAY",
"VNPTWALLET",
"APPOTA",
"UNKNOWN_ENUM_VALUE",
}

2 changes: 1 addition & 1 deletion invoice/model_forbidden_error.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_invoice.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_invoice_callback.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_invoice_callback_item.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_invoice_client_type.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_invoice_currency.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_invoice_error404_response_definition.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_invoice_fee.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_invoice_item.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_invoice_not_found_error.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_invoice_payment_method.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_invoice_status.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_notification_channel.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_notification_preference.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_paylater.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_paylater_type.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_payment_details.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_qr_code.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_qr_code_type.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_retail_outlet.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_retail_outlet_name.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_server_error.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


2 changes: 1 addition & 1 deletion invoice/model_unauthorized_error.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ xendit-invoice-service
xendit-invoice-service descriptions
API version: 1.5.0
API version: 1.6.0
*/


39 changes: 24 additions & 15 deletions payment_request/model_payment_callback_data.go
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ type PaymentCallbackData struct {
PaymentMethod PaymentMethod `json:"payment_method"`
ChannelProperties NullablePaymentRequestChannelProperties `json:"channel_properties,omitempty"`
PaymentDetail map[string]interface{} `json:"payment_detail,omitempty"`
FailureCode map[string]interface{} `json:"failure_code,omitempty"`
FailureCode NullableString `json:"failure_code,omitempty"`
Created string `json:"created"`
Updated string `json:"updated"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
@@ -391,36 +391,45 @@ func (o *PaymentCallbackData) SetPaymentDetail(v map[string]interface{}) {
}

// GetFailureCode returns the FailureCode field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *PaymentCallbackData) GetFailureCode() map[string]interface{} {
if o == nil {
var ret map[string]interface{}
func (o *PaymentCallbackData) GetFailureCode() string {
if o == nil || utils.IsNil(o.FailureCode.Get()) {
var ret string
return ret
}
return o.FailureCode
return *o.FailureCode.Get()
}

// GetFailureCodeOk returns a tuple with the FailureCode field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *PaymentCallbackData) GetFailureCodeOk() (map[string]interface{}, bool) {
if o == nil || utils.IsNil(o.FailureCode) {
return map[string]interface{}{}, false
func (o *PaymentCallbackData) GetFailureCodeOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.FailureCode, true
return o.FailureCode.Get(), o.FailureCode.IsSet()
}

// HasFailureCode returns a boolean if a field has been set.
func (o *PaymentCallbackData) HasFailureCode() bool {
if o != nil && utils.IsNil(o.FailureCode) {
if o != nil && o.FailureCode.IsSet() {
return true
}

return false
}

// SetFailureCode gets a reference to the given map[string]interface{} and assigns it to the FailureCode field.
func (o *PaymentCallbackData) SetFailureCode(v map[string]interface{}) {
o.FailureCode = v
// SetFailureCode gets a reference to the given NullableString and assigns it to the FailureCode field.
func (o *PaymentCallbackData) SetFailureCode(v string) {
o.FailureCode.Set(&v)
}
// SetFailureCodeNil sets the value for FailureCode to be an explicit nil
func (o *PaymentCallbackData) SetFailureCodeNil() {
o.FailureCode.Set(nil)
}

// UnsetFailureCode ensures that no value is present for FailureCode, not even an explicit nil
func (o *PaymentCallbackData) UnsetFailureCode() {
o.FailureCode.Unset()
}

// GetCreated returns the Created field value
@@ -533,8 +542,8 @@ func (o PaymentCallbackData) ToMap() (map[string]interface{}, error) {
if o.PaymentDetail != nil {
toSerialize["payment_detail"] = o.PaymentDetail
}
if o.FailureCode != nil {
toSerialize["failure_code"] = o.FailureCode
if o.FailureCode.IsSet() {
toSerialize["failure_code"] = o.FailureCode.Get()
}
toSerialize["created"] = o.Created
toSerialize["updated"] = o.Updated
2 changes: 2 additions & 0 deletions payment_request/model_qr_code_channel_code.go
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ type QRCodeChannelCode string

// List of QRCodeChannelCode
const (
QRCODECHANNELCODE_QRIS QRCodeChannelCode = "QRIS"
QRCODECHANNELCODE_DANA QRCodeChannelCode = "DANA"
QRCODECHANNELCODE_RCBC QRCodeChannelCode = "RCBC"
QRCODECHANNELCODE_LINKAJA QRCodeChannelCode = "LINKAJA"
@@ -29,6 +30,7 @@ const (

// All allowed values of QRCodeChannelCode enum
var AllowedQRCodeChannelCodeEnumValues = []QRCodeChannelCode{
"QRIS",
"DANA",
"RCBC",
"LINKAJA",
6 changes: 6 additions & 0 deletions payment_request/model_virtual_account_channel_code.go
Original file line number Diff line number Diff line change
@@ -36,6 +36,9 @@ const (
VIRTUALACCOUNTCHANNELCODE_MSB VirtualAccountChannelCode = "MSB"
VIRTUALACCOUNTCHANNELCODE_STANDARD_CHARTERED VirtualAccountChannelCode = "STANDARD_CHARTERED"
VIRTUALACCOUNTCHANNELCODE_AMBANK VirtualAccountChannelCode = "AMBANK"
VIRTUALACCOUNTCHANNELCODE_BNC VirtualAccountChannelCode = "BNC"
VIRTUALACCOUNTCHANNELCODE_HANA VirtualAccountChannelCode = "HANA"
VIRTUALACCOUNTCHANNELCODE_MUAMALAT VirtualAccountChannelCode = "MUAMALAT"
VIRTUALACCOUNTCHANNELCODE_XENDIT_ENUM_DEFAULT_FALLBACK VirtualAccountChannelCode = "UNKNOWN_ENUM_VALUE"
)

@@ -57,6 +60,9 @@ var AllowedVirtualAccountChannelCodeEnumValues = []VirtualAccountChannelCode{
"MSB",
"STANDARD_CHARTERED",
"AMBANK",
"BNC",
"HANA",
"MUAMALAT",
"UNKNOWN_ENUM_VALUE",
}

0 comments on commit 10680ec

Please sign in to comment.