modulepackage
0.23.1
Repository: https://github.com/codatio/client-sdk-go.git
Documentation: pkg.go.dev
# README
Commerce API
Codat's Commerce API enables you to pull up-date-date commerce data from several leading payments, point-of-sale, and eCommerce systems. You can view your SMB customers' products, orders, payments, payouts, disputes, and more - all standardized to our Commerce data model.
SDK Installation
go get github.com/codatio/client-sdk-go/commerce
SDK Example Usage
package main
import(
"context"
"log"
"github.com/codatio/client-sdk-go/commerce"
"github.com/codatio/client-sdk-go/commerce/pkg/models/operations"
)
func main() {
s := codatcommerce.New(
codatcommerce.WithSecurity(shared.Security{
AuthHeader: "Basic BASE_64_ENCODED(API_KEY)",
}),
)
ctx := context.Background()
res, err := s.CompanyInfo.Get(ctx, operations.GetCompanyInfoRequest{
CompanyID: "8a210b68-6988-11ed-a1eb-0242ac120002",
ConnectionID: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
})
if err != nil {
log.Fatal(err)
}
if res.CompanyInfo != nil {
// handle response
}
}
Available Resources and Operations
CompanyInfo
- Get - Get company info
Customers
Disputes
Locations
Orders
Payments
- Get - Get payment
- GetMethod - Get payment method
- List - List payments
- ListMethods - List payment methods
Products
- Get - Get product
- GetCategory - Get product category
- List - List products
- ListCategories - List product categories
TaxComponents
Transactions
SDK Generated by Speakeasy
# Packages
No description provided by the author
# Functions
Bool provides a helper function to return a pointer to a bool.
Float32 provides a helper function to return a pointer to a float32.
Float64 provides a helper function to return a pointer to a float64.
Int provides a helper function to return a pointer to an int.
Int64 provides a helper function to return a pointer to an int64.
New creates a new instance of the SDK with the provided options.
String provides a helper function to return a pointer to a string.
WithClient allows the overriding of the default HTTP client used by the SDK.
WithSecurity configures the SDK to use the provided security details.
WithServerIndex allows the overriding of the default server by index.
WithServerURL allows the overriding of the default server URL.
WithTemplatedServerURL allows the overriding of the default server URL with a templated URL populated with the provided parameters.
# Variables
ServerList contains the list of servers available to the SDK.
# Structs
CodatCommerce - Commerce API: Codat's standardized API for accessing commerce data Codat's Commerce API allows you to access standardised data from over 11 commerce and POS systems.
# Interfaces
HTTPClient provides an interface for suplying the SDK with a custom HTTP client.
# Type aliases
No description provided by the author