All URIs are relative to https://app.koyeb.com
Method | HTTP request | Description |
---|---|---|
ConfirmPaymentAuthorization | Post /v1/payment_methods/{id}/confirm | Confirm payment authorization |
CreatePaymentAuthorization | Post /v1/payment_methods | Create payment authorization |
DeletePaymentMethod | Delete /v1/payment_methods/{id} | Delete payment method |
GetPaymentMethod | Get /v1/payment_methods/{id} | Get payment method |
ListPaymentMethods | Get /v1/payment_methods | List payment methods |
ConfirmPaymentAuthorizationReply ConfirmPaymentAuthorization(ctx, id).Body(body).Execute()
Confirm payment authorization
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string |
body := map[string]interface{}{ ... } // map[string]interface{} |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PaymentMethodsApi.ConfirmPaymentAuthorization(context.Background(), id).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PaymentMethodsApi.ConfirmPaymentAuthorization``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ConfirmPaymentAuthorization`: ConfirmPaymentAuthorizationReply
fmt.Fprintf(os.Stdout, "Response from `PaymentMethodsApi.ConfirmPaymentAuthorization`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string |
Other parameters are passed through a pointer to a apiConfirmPaymentAuthorizationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
body | map[string]interface{} | |
ConfirmPaymentAuthorizationReply
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreatePaymentAuthorizationReply CreatePaymentAuthorization(ctx).Body(body).Execute()
Create payment authorization
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
body := map[string]interface{}{ ... } // map[string]interface{} |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PaymentMethodsApi.CreatePaymentAuthorization(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PaymentMethodsApi.CreatePaymentAuthorization``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreatePaymentAuthorization`: CreatePaymentAuthorizationReply
fmt.Fprintf(os.Stdout, "Response from `PaymentMethodsApi.CreatePaymentAuthorization`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreatePaymentAuthorizationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
body | map[string]interface{} |
CreatePaymentAuthorizationReply
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string]interface{} DeletePaymentMethod(ctx, id).Execute()
Delete payment method
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PaymentMethodsApi.DeletePaymentMethod(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PaymentMethodsApi.DeletePaymentMethod``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeletePaymentMethod`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `PaymentMethodsApi.DeletePaymentMethod`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string |
Other parameters are passed through a pointer to a apiDeletePaymentMethodRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
map[string]interface{}
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetPaymentMethodReply GetPaymentMethod(ctx, id).Execute()
Get payment method
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PaymentMethodsApi.GetPaymentMethod(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PaymentMethodsApi.GetPaymentMethod``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetPaymentMethod`: GetPaymentMethodReply
fmt.Fprintf(os.Stdout, "Response from `PaymentMethodsApi.GetPaymentMethod`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string |
Other parameters are passed through a pointer to a apiGetPaymentMethodRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListPaymentMethodsReply ListPaymentMethods(ctx).Limit(limit).Offset(offset).Statuses(statuses).Execute()
List payment methods
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
limit := "limit_example" // string | (Optional) The number of items to return (optional)
offset := "offset_example" // string | (Optional) The offset in the list of item to return (optional)
statuses := []string{"Statuses_example"} // []string | (Optional) Filter on payment method statuses (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PaymentMethodsApi.ListPaymentMethods(context.Background()).Limit(limit).Offset(offset).Statuses(statuses).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PaymentMethodsApi.ListPaymentMethods``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListPaymentMethods`: ListPaymentMethodsReply
fmt.Fprintf(os.Stdout, "Response from `PaymentMethodsApi.ListPaymentMethods`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListPaymentMethodsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
limit | string | (Optional) The number of items to return | |
offset | string | (Optional) The offset in the list of item to return | |
statuses | []string | (Optional) Filter on payment method statuses |
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]