Skip to content

Latest commit

 

History

History
351 lines (229 loc) · 9.71 KB

PaymentMethodsApi.md

File metadata and controls

351 lines (229 loc) · 9.71 KB

\PaymentMethodsApi

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

ConfirmPaymentAuthorization

ConfirmPaymentAuthorizationReply ConfirmPaymentAuthorization(ctx, id).Body(body).Execute()

Confirm payment authorization

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

Other parameters are passed through a pointer to a apiConfirmPaymentAuthorizationRequest struct via the builder pattern

Name Type Description Notes

body | map[string]interface{} | |

Return type

ConfirmPaymentAuthorizationReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CreatePaymentAuthorization

CreatePaymentAuthorizationReply CreatePaymentAuthorization(ctx).Body(body).Execute()

Create payment authorization

Example

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)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreatePaymentAuthorizationRequest struct via the builder pattern

Name Type Description Notes
body map[string]interface{}

Return type

CreatePaymentAuthorizationReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeletePaymentMethod

map[string]interface{} DeletePaymentMethod(ctx, id).Execute()

Delete payment method

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

Other parameters are passed through a pointer to a apiDeletePaymentMethodRequest struct via the builder pattern

Name Type Description Notes

Return type

map[string]interface{}

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetPaymentMethod

GetPaymentMethodReply GetPaymentMethod(ctx, id).Execute()

Get payment method

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

Other parameters are passed through a pointer to a apiGetPaymentMethodRequest struct via the builder pattern

Name Type Description Notes

Return type

GetPaymentMethodReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListPaymentMethods

ListPaymentMethodsReply ListPaymentMethods(ctx).Limit(limit).Offset(offset).Statuses(statuses).Execute()

List payment methods

Example

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)
}

Path Parameters

Other Parameters

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

Return type

ListPaymentMethodsReply

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]