Skip to content

Commit

Permalink
Generated Xendit go SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
xendit-devx-bot committed Sep 21, 2023
1 parent 15b9b81 commit e116766
Show file tree
Hide file tree
Showing 217 changed files with 94 additions and 643 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: 3.0.0
* Package version: 3.1.0

# Getting Started

Expand Down Expand Up @@ -40,7 +40,7 @@ xnd := xendit.NewClient("API-KEY")

# Documentation

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

* [Balance](docs/BalanceApi.md)
* [Invoice](docs/InvoiceApi.md)
Expand Down
1 change: 0 additions & 1 deletion balance_and_transaction/api_balance.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Code generated by OpenAPI Generator; DO NOT EDIT.
package balance_and_transaction

import (
Expand Down
1 change: 0 additions & 1 deletion balance_and_transaction/api_transaction.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Code generated by OpenAPI Generator; DO NOT EDIT.
package balance_and_transaction

import (
Expand Down
3 changes: 0 additions & 3 deletions balance_and_transaction/model_balance.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ Transaction Service V4 API
API version: 3.4.2
*/

// Code generated by OpenAPI Generator; DO NOT EDIT.

package balance_and_transaction

import (
"encoding/json"


utils "github.com/xendit/xendit-go/v3/utils"

)

// checks if the Balance type satisfies the MappedNullable interface at compile time
Expand Down
1 change: 0 additions & 1 deletion balance_and_transaction/model_channels_categories.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Transaction Service V4 API
API version: 3.4.2
*/

// Code generated by OpenAPI Generator; DO NOT EDIT.

package balance_and_transaction

Expand Down
1 change: 0 additions & 1 deletion balance_and_transaction/model_currency.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Transaction Service V4 API
API version: 3.4.2
*/

// Code generated by OpenAPI Generator; DO NOT EDIT.

package balance_and_transaction

Expand Down
3 changes: 0 additions & 3 deletions balance_and_transaction/model_date_range_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ Transaction Service V4 API
API version: 3.4.2
*/

// Code generated by OpenAPI Generator; DO NOT EDIT.

package balance_and_transaction

import (
"encoding/json"


utils "github.com/xendit/xendit-go/v3/utils"

"time"
)

Expand Down
3 changes: 0 additions & 3 deletions balance_and_transaction/model_fee_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ Transaction Service V4 API
API version: 3.4.2
*/

// Code generated by OpenAPI Generator; DO NOT EDIT.

package balance_and_transaction

import (
"encoding/json"


utils "github.com/xendit/xendit-go/v3/utils"

)

// checks if the FeeResponse type satisfies the MappedNullable interface at compile time
Expand Down
3 changes: 0 additions & 3 deletions balance_and_transaction/model_link_item.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ Transaction Service V4 API
API version: 3.4.2
*/

// Code generated by OpenAPI Generator; DO NOT EDIT.

package balance_and_transaction

import (
"encoding/json"


utils "github.com/xendit/xendit-go/v3/utils"

)

// checks if the LinkItem type satisfies the MappedNullable interface at compile time
Expand Down
3 changes: 0 additions & 3 deletions balance_and_transaction/model_server_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ Transaction Service V4 API
API version: 3.4.2
*/

// Code generated by OpenAPI Generator; DO NOT EDIT.

package balance_and_transaction

import (
"encoding/json"


utils "github.com/xendit/xendit-go/v3/utils"

)

// checks if the ServerError type satisfies the MappedNullable interface at compile time
Expand Down
3 changes: 0 additions & 3 deletions balance_and_transaction/model_transaction_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ Transaction Service V4 API
API version: 3.4.2
*/

// Code generated by OpenAPI Generator; DO NOT EDIT.

package balance_and_transaction

import (
"encoding/json"


utils "github.com/xendit/xendit-go/v3/utils"

"time"
)

Expand Down
2 changes: 0 additions & 2 deletions balance_and_transaction/model_transaction_response_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ Transaction Service V4 API
API version: 3.4.2
*/

// Code generated by OpenAPI Generator; DO NOT EDIT.

package balance_and_transaction

import (
"encoding/json"

"fmt"
)

Expand Down
1 change: 0 additions & 1 deletion balance_and_transaction/model_transaction_statuses.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Transaction Service V4 API
API version: 3.4.2
*/

// Code generated by OpenAPI Generator; DO NOT EDIT.

package balance_and_transaction

Expand Down
1 change: 0 additions & 1 deletion balance_and_transaction/model_transaction_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Transaction Service V4 API
API version: 3.4.2
*/

// Code generated by OpenAPI Generator; DO NOT EDIT.

package balance_and_transaction

Expand Down
3 changes: 0 additions & 3 deletions balance_and_transaction/model_transactions_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ Transaction Service V4 API
API version: 3.4.2
*/

// Code generated by OpenAPI Generator; DO NOT EDIT.

package balance_and_transaction

import (
"encoding/json"


utils "github.com/xendit/xendit-go/v3/utils"

)

// checks if the TransactionsResponse type satisfies the MappedNullable interface at compile time
Expand Down
3 changes: 0 additions & 3 deletions balance_and_transaction/model_validation_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ Transaction Service V4 API
API version: 3.4.2
*/

// Code generated by OpenAPI Generator; DO NOT EDIT.

package balance_and_transaction

import (
"encoding/json"


utils "github.com/xendit/xendit-go/v3/utils"

)

// checks if the ValidationError type satisfies the MappedNullable interface at compile time
Expand Down
1 change: 0 additions & 1 deletion balance_and_transaction/nullable.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Code generated by Xendit OpenAPI Generator; DO NOT EDIT.
package balance_and_transaction

import (
Expand Down
19 changes: 2 additions & 17 deletions client.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Code generated by Xendit OpenAPI Generator; DO NOT EDIT.
package xendit

import (
Expand All @@ -20,8 +19,7 @@ import (
"regexp"
"strings"
"time"
"unicode/utf8"


common "github.com/xendit/xendit-go/v3/common"

balance "github.com/xendit/xendit-go/v3/balance_and_transaction"
Expand Down Expand Up @@ -153,7 +151,7 @@ func (c *APIClient) PrepareRequest(
headerParams["xendit-lib"] = "go"

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

var body *bytes.Buffer

Expand Down Expand Up @@ -368,15 +366,6 @@ func addFile(w *multipart.Writer, fieldName, path string) error {
return err
}



// A wrapper for strict JSON decoding
func newStrictDecoder(data []byte) *json.Decoder {
dec := json.NewDecoder(bytes.NewBuffer(data))
dec.DisallowUnknownFields()
return dec
}

// Set request body from an interface{}
func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) {
if bodyBuf == nil {
Expand Down Expand Up @@ -480,7 +469,3 @@ func CacheExpires(r *http.Response) time.Time {
}
return expires
}

func strlen(s string) int {
return utf8.RuneCountInString(s)
}
1 change: 0 additions & 1 deletion common/common.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Code generated by OpenAPI Generator; DO NOT EDIT.
package common

import (
Expand Down
3 changes: 1 addition & 2 deletions configuration.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Code generated by OpenAPI Generator; DO NOT EDIT.
package xendit

import (
Expand Down Expand Up @@ -79,7 +78,7 @@ var Default Configuration = *NewConfiguration()
func NewConfiguration() *Configuration {
cfg := &Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/3.0.0/go",
UserAgent: "OpenAPI-Generator/3.1.0/go",
Debug: false,
Servers: ServerConfigurations{
{
Expand Down
10 changes: 1 addition & 9 deletions docs/PaymentMethodApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -526,10 +526,6 @@ func main() {

limit := int32(56) // [OPTIONAL] | int32

afterId := "afterId_example" // [OPTIONAL] | string

beforeId := "beforeId_example" // [OPTIONAL] | string

xenditClient := xendit.NewClient("API-KEY")

resp, r, err := xenditClient.PaymentMethodApi.GetPaymentsByPaymentMethodId(context.Background(), paymentMethodId).
Expand All @@ -544,9 +540,7 @@ func main() {
CreatedLte(createdLte).
UpdatedGte(updatedGte).
UpdatedLte(updatedLte).
Limit(limit).
AfterId(afterId).
BeforeId(beforeId). // [OPTIONAL]
Limit(limit). // [OPTIONAL]
Execute()

if err != nil {
Expand Down Expand Up @@ -590,8 +584,6 @@ Other parameters are passed through a pointer to a apiGetPaymentsByPaymentMethod
| **updatedGte** |**time.Time**| | |
| **updatedLte** |**time.Time**| | |
| **limit** |**int32**| | |
| **afterId** |**string**| | |
| **beforeId** |**string**| | |

### Return type

Expand Down
15 changes: 1 addition & 14 deletions docs/payment_method.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -541,20 +541,6 @@ paths:
schema:
type: integer
style: form
- explode: true
in: query
name: after_id
required: false
schema:
type: string
style: form
- explode: true
in: query
name: before_id
required: false
schema:
type: string
style: form
responses:
"200":
content:
Expand Down Expand Up @@ -2203,6 +2189,7 @@ components:
- PAYMENT_METHOD_NOT_SUPPORTED
- INCORRECT_AMOUNT
- DUPLICATED_FIXED_PAYMENT_INSTRUMENT
- CURRENCY_MISMATCHED
type: string
message:
example: An internal server error occurred
Expand Down
8 changes: 7 additions & 1 deletion docs/payment_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.0
info:
description: This API is used for Payment Requests
title: Payment Requests
version: 1.42.3
version: 1.44.0
servers:
- description: Xendit API Server
url: https://api.xendit.co
Expand Down Expand Up @@ -112,6 +112,12 @@ paths:
schema:
$ref: '#/components/schemas/PaymentRequest'
description: Request successful
"201":
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentRequest'
description: Request successful
"400":
content:
application/json:
Expand Down
1 change: 0 additions & 1 deletion invoice/api_invoice.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Code generated by OpenAPI Generator; DO NOT EDIT.
package invoice

import (
Expand Down
3 changes: 0 additions & 3 deletions invoice/model_address_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ xendit-invoice-service descriptions
API version: 1.5.0
*/

// Code generated by OpenAPI Generator; DO NOT EDIT.

package invoice

import (
"encoding/json"


utils "github.com/xendit/xendit-go/v3/utils"

)

// checks if the AddressObject type satisfies the MappedNullable interface at compile time
Expand Down
Loading

0 comments on commit e116766

Please sign in to comment.