All URIs are relative to https://connto.getopenpay.com
| Method | HTTP request | Description |
|---|---|---|
| CreateCustomer | Post /customers/ | Create Customer |
| CreateCustomerBalanceTransaction | Post /customers/{customer_id}/balance-transactions | Create Customer Balance Transaction |
| DeleteCustomerDiscount | Delete /customers/{customer_id}/discount | Delete Customer Discount |
| GetCustomer | Get /customers/{customer_id} | Get Customer |
| GetCustomerBalanceTransaction | Get /customers/{customer_id}/balance-transactions/{transaction_id} | Get Customer Balance Transaction |
| GetCustomerBalanceTransactions | Get /customers/{customer_id}/balance-transactions | Get Customer Balance Transactions |
| ListCustomerPaymentMethods | Post /customers/{customer_id}/payment-methods | List Customer Payment Methods |
| ListCustomers | Post /customers/list | List Customers |
| ListValidSubscriptions | Post /customers/{customer_id}/list_valid_subscriptions | List Valid Subscriptions |
| UpdateCustomer | Put /customers/{customer_external_id} | Update Customer |
CustomerExternal CreateCustomer(ctx).CreateCustomerRequest(createCustomerRequest).Execute()
Create Customer
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
createCustomerRequest := *openapiclient.NewCreateCustomerRequest("johndoes@xyz.com") // CreateCustomerRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomersAPI.CreateCustomer(context.Background()).CreateCustomerRequest(createCustomerRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomersAPI.CreateCustomer``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateCustomer`: CustomerExternal
fmt.Fprintf(os.Stdout, "Response from `CustomersAPI.CreateCustomer`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreateCustomerRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| createCustomerRequest | CreateCustomerRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CustomerBalanceTransactionExternal CreateCustomerBalanceTransaction(ctx, customerId).CreateCustomerBalanceTransactionRequest(createCustomerBalanceTransactionRequest).Execute()
Create Customer Balance Transaction
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
customerId := "customerId_example" // string |
createCustomerBalanceTransactionRequest := *openapiclient.NewCreateCustomerBalanceTransactionRequest(int32(123)) // CreateCustomerBalanceTransactionRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomersAPI.CreateCustomerBalanceTransaction(context.Background(), customerId).CreateCustomerBalanceTransactionRequest(createCustomerBalanceTransactionRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomersAPI.CreateCustomerBalanceTransaction``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateCustomerBalanceTransaction`: CustomerBalanceTransactionExternal
fmt.Fprintf(os.Stdout, "Response from `CustomersAPI.CreateCustomerBalanceTransaction`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| customerId | string |
Other parameters are passed through a pointer to a apiCreateCustomerBalanceTransactionRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
createCustomerBalanceTransactionRequest | CreateCustomerBalanceTransactionRequest | |
CustomerBalanceTransactionExternal
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CustomerExternal DeleteCustomerDiscount(ctx, customerId).Execute()
Delete Customer Discount
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
customerId := "customerId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomersAPI.DeleteCustomerDiscount(context.Background(), customerId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomersAPI.DeleteCustomerDiscount``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteCustomerDiscount`: CustomerExternal
fmt.Fprintf(os.Stdout, "Response from `CustomersAPI.DeleteCustomerDiscount`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| customerId | string |
Other parameters are passed through a pointer to a apiDeleteCustomerDiscountRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CustomerExternal GetCustomer(ctx, customerId).Expand(expand).Execute()
Get Customer
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
customerId := "customerId_example" // string |
expand := []*string{"Inner_example"} // []*string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomersAPI.GetCustomer(context.Background(), customerId).Expand(expand).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomersAPI.GetCustomer``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCustomer`: CustomerExternal
fmt.Fprintf(os.Stdout, "Response from `CustomersAPI.GetCustomer`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| customerId | string |
Other parameters are passed through a pointer to a apiGetCustomerRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
expand | []string | |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CustomerBalanceTransactionExternal GetCustomerBalanceTransaction(ctx, customerId, transactionId).Execute()
Get Customer Balance Transaction
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
customerId := "customerId_example" // string |
transactionId := "transactionId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomersAPI.GetCustomerBalanceTransaction(context.Background(), customerId, transactionId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomersAPI.GetCustomerBalanceTransaction``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCustomerBalanceTransaction`: CustomerBalanceTransactionExternal
fmt.Fprintf(os.Stdout, "Response from `CustomersAPI.GetCustomerBalanceTransaction`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| customerId | string | ||
| transactionId | string |
Other parameters are passed through a pointer to a apiGetCustomerBalanceTransactionRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
CustomerBalanceTransactionExternal
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]CustomerBalanceTransactionExternal GetCustomerBalanceTransactions(ctx, customerId).Execute()
Get Customer Balance Transactions
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
customerId := "customerId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomersAPI.GetCustomerBalanceTransactions(context.Background(), customerId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomersAPI.GetCustomerBalanceTransactions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCustomerBalanceTransactions`: []CustomerBalanceTransactionExternal
fmt.Fprintf(os.Stdout, "Response from `CustomersAPI.GetCustomerBalanceTransactions`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| customerId | string |
Other parameters are passed through a pointer to a apiGetCustomerBalanceTransactionsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
[]CustomerBalanceTransactionExternal
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListResponseUnionTokenizedCreditCardExternalPaymentMethodExternal ListCustomerPaymentMethods(ctx, customerId).CustomerPaymentMethodQueryParams(customerPaymentMethodQueryParams).Execute()
List Customer Payment Methods
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
customerId := "customerId_example" // string | Unique Identifier of the customer.
customerPaymentMethodQueryParams := *openapiclient.NewCustomerPaymentMethodQueryParams() // CustomerPaymentMethodQueryParams |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomersAPI.ListCustomerPaymentMethods(context.Background(), customerId).CustomerPaymentMethodQueryParams(customerPaymentMethodQueryParams).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomersAPI.ListCustomerPaymentMethods``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListCustomerPaymentMethods`: ListResponseUnionTokenizedCreditCardExternalPaymentMethodExternal
fmt.Fprintf(os.Stdout, "Response from `CustomersAPI.ListCustomerPaymentMethods`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| customerId | string | Unique Identifier of the customer. |
Other parameters are passed through a pointer to a apiListCustomerPaymentMethodsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
customerPaymentMethodQueryParams | CustomerPaymentMethodQueryParams | |
ListResponseUnionTokenizedCreditCardExternalPaymentMethodExternal
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListResponseCustomerExternal ListCustomers(ctx).CustomerQueryParams(customerQueryParams).Execute()
List Customers
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
customerQueryParams := *openapiclient.NewCustomerQueryParams() // CustomerQueryParams |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomersAPI.ListCustomers(context.Background()).CustomerQueryParams(customerQueryParams).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomersAPI.ListCustomers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListCustomers`: ListResponseCustomerExternal
fmt.Fprintf(os.Stdout, "Response from `CustomersAPI.ListCustomers`: %v\n", resp)
}Other parameters are passed through a pointer to a apiListCustomersRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| customerQueryParams | CustomerQueryParams |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ActiveSubResponse ListValidSubscriptions(ctx, customerId).ListActiveSubParams(listActiveSubParams).Execute()
List Valid Subscriptions
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
customerId := "customerId_example" // string | Unique Identifier of the customer.
listActiveSubParams := *openapiclient.NewListActiveSubParams() // ListActiveSubParams | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomersAPI.ListValidSubscriptions(context.Background(), customerId).ListActiveSubParams(listActiveSubParams).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomersAPI.ListValidSubscriptions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListValidSubscriptions`: ActiveSubResponse
fmt.Fprintf(os.Stdout, "Response from `CustomersAPI.ListValidSubscriptions`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| customerId | string | Unique Identifier of the customer. |
Other parameters are passed through a pointer to a apiListValidSubscriptionsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
listActiveSubParams | ListActiveSubParams | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CustomerExternal UpdateCustomer(ctx, customerExternalId).UpdateCustomerRequest(updateCustomerRequest).Execute()
Update Customer
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
customerExternalId := "customerExternalId_example" // string |
updateCustomerRequest := *openapiclient.NewUpdateCustomerRequest() // UpdateCustomerRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomersAPI.UpdateCustomer(context.Background(), customerExternalId).UpdateCustomerRequest(updateCustomerRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomersAPI.UpdateCustomer``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateCustomer`: CustomerExternal
fmt.Fprintf(os.Stdout, "Response from `CustomersAPI.UpdateCustomer`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| customerExternalId | string |
Other parameters are passed through a pointer to a apiUpdateCustomerRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
updateCustomerRequest | UpdateCustomerRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]