All URIs are relative to https://connto.getopenpay.com
| Method | HTTP request | Description |
|---|---|---|
| CreatePriceForProduct | Post /prices/ | Create Price For Product |
| DeletePriceForProduct | Delete /prices/{price_id} | Delete Price For Product |
| FindPriceByAmount | Get /prices/find-by-amount/{amount} | Find Price By Amount |
| GetPriceAddOns | Get /prices/{price_id}/add-ons | Get Price Add Ons |
| GetPriceForProduct | Get /prices/{price_id} | Get Price For Product |
| ListPrices | Post /prices/list | List Prices |
| UpdatePriceForProduct | Put /prices/{price_id} | Update Price For Product |
PriceExternal CreatePriceForProduct(ctx).CreatePriceRequest(createPriceRequest).Execute()
Create Price For Product
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
createPriceRequest := *openapiclient.NewCreatePriceRequest(true, openapiclient.PriceTypeEnum("one_time"), openapiclient.PricingModel("standard"), "product_dev_abc123") // CreatePriceRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PricesAPI.CreatePriceForProduct(context.Background()).CreatePriceRequest(createPriceRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PricesAPI.CreatePriceForProduct``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreatePriceForProduct`: PriceExternal
fmt.Fprintf(os.Stdout, "Response from `PricesAPI.CreatePriceForProduct`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreatePriceForProductRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| createPriceRequest | CreatePriceRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeletePriceResponse DeletePriceForProduct(ctx, priceId).Execute()
Delete Price For Product
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
priceId := "price_dev_abc123" // string | Unique identifier of the price.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PricesAPI.DeletePriceForProduct(context.Background(), priceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PricesAPI.DeletePriceForProduct``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeletePriceForProduct`: DeletePriceResponse
fmt.Fprintf(os.Stdout, "Response from `PricesAPI.DeletePriceForProduct`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| priceId | string | Unique identifier of the price. |
Other parameters are passed through a pointer to a apiDeletePriceForProductRequest 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]
ListResponsePriceExternal FindPriceByAmount(ctx, amount).ProductId(productId).PageSize(pageSize).Execute()
Find Price By Amount
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
amount := "10.00" // string | Full or partial amount to find matching prices. Decimal points are ignored in matching.
productId := "product_dev_abc123" // string | Optional product ID to filter prices by specific product (optional)
pageSize := int32(5) // int32 | Number of results to return per page (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PricesAPI.FindPriceByAmount(context.Background(), amount).ProductId(productId).PageSize(pageSize).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PricesAPI.FindPriceByAmount``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `FindPriceByAmount`: ListResponsePriceExternal
fmt.Fprintf(os.Stdout, "Response from `PricesAPI.FindPriceByAmount`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| amount | string | Full or partial amount to find matching prices. Decimal points are ignored in matching. |
Other parameters are passed through a pointer to a apiFindPriceByAmountRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
productId | string | Optional product ID to filter prices by specific product | pageSize | int32 | Number of results to return per page |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]PriceExternal GetPriceAddOns(ctx, priceId).Execute()
Get Price Add Ons
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
priceId := "price_dev_abc123" // string | Unique identifier of the price.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PricesAPI.GetPriceAddOns(context.Background(), priceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PricesAPI.GetPriceAddOns``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetPriceAddOns`: []PriceExternal
fmt.Fprintf(os.Stdout, "Response from `PricesAPI.GetPriceAddOns`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| priceId | string | Unique identifier of the price. |
Other parameters are passed through a pointer to a apiGetPriceAddOnsRequest 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]
PriceExternal GetPriceForProduct(ctx, priceId).Expand(expand).Execute()
Get Price For Product
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
priceId := "price_dev_abc123" // string | Unique identifier of the price.
expand := []string{"Inner_example"} // []string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PricesAPI.GetPriceForProduct(context.Background(), priceId).Expand(expand).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PricesAPI.GetPriceForProduct``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetPriceForProduct`: PriceExternal
fmt.Fprintf(os.Stdout, "Response from `PricesAPI.GetPriceForProduct`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| priceId | string | Unique identifier of the price. |
Other parameters are passed through a pointer to a apiGetPriceForProductRequest 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]
ListResponsePriceExternal ListPrices(ctx).PriceQueryParams(priceQueryParams).Execute()
List Prices
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
priceQueryParams := *openapiclient.NewPriceQueryParams() // PriceQueryParams |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PricesAPI.ListPrices(context.Background()).PriceQueryParams(priceQueryParams).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PricesAPI.ListPrices``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListPrices`: ListResponsePriceExternal
fmt.Fprintf(os.Stdout, "Response from `PricesAPI.ListPrices`: %v\n", resp)
}Other parameters are passed through a pointer to a apiListPricesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| priceQueryParams | PriceQueryParams |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PriceExternal UpdatePriceForProduct(ctx, priceId).UpdatePriceRequest(updatePriceRequest).Execute()
Update Price For Product
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/getopenpay/getopenpay-go"
)
func main() {
priceId := "price_dev_abc123" // string | Unique identifier of the price.
updatePriceRequest := *openapiclient.NewUpdatePriceRequest() // UpdatePriceRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PricesAPI.UpdatePriceForProduct(context.Background(), priceId).UpdatePriceRequest(updatePriceRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PricesAPI.UpdatePriceForProduct``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdatePriceForProduct`: PriceExternal
fmt.Fprintf(os.Stdout, "Response from `PricesAPI.UpdatePriceForProduct`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| priceId | string | Unique identifier of the price. |
Other parameters are passed through a pointer to a apiUpdatePriceForProductRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
updatePriceRequest | UpdatePriceRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]