threecommon

package module
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 4 Imported by: 0

README

github.com/3-Common/sdk/sdk-go

pkg.go.dev Go Report Card Go

Official Go client for the 3Common Public API.

Install

go get github.com/3-Common/sdk/sdk-go

Requires Go ≥ 1.22.

Quick start

package main

import (
    "context"
    "log"

    threecommon "github.com/3-Common/sdk/sdk-go"
    "github.com/3-Common/sdk/sdk-go/client"
    "github.com/3-Common/sdk/sdk-go/event"
)

func main() {
    api, err := client.New(threecommon.Config{APIKey: "3co_..."})
    if err != nil {
        log.Fatal(err)
    }

    ctx := context.Background()

    // List
    pageSize := 50
    result, err := api.Events.List(ctx, &event.ListParams{
        Status:   event.StatusOpen,
        PageSize: &pageSize,
    })
    if err != nil {
        log.Fatal(err)
    }
    _ = result.Data

    // Retrieve
    ev, err := api.Events.Retrieve(ctx, "evt_123", nil)
    if err != nil {
        log.Fatal(err)
    }
    _ = ev

    // Update
    updated, err := api.Events.Update(ctx, "evt_123", &event.UpdateParams{
        Name: threecommon.String("New name"),
    })
    if err != nil {
        log.Fatal(err)
    }
    _ = updated

    // Auto-paginate
    iter := api.Events.ListAutoPaginate(ctx, &event.ListParams{Status: event.StatusOpen})
    for iter.Next() {
        _ = iter.Current()
    }
    if err := iter.Err(); err != nil {
        log.Fatal(err)
    }
}

Generate API keys in the 3Common organizer dashboard (Settings -> API Keys). The key may also be supplied via the THREECOMMON_API_KEY environment variable.

Configuration

api, err := client.New(threecommon.Config{
    APIKey:     "3co_...",                  // required (or via env var)
    BaseURL:    "https://api.3common.com",  // default
    APIVersion: "2026-04-29",               // pinned API version
    Timeout:    30 * time.Second,           // per-request deadline
    MaxRetries: threecommon.Int(3),         // automatic retries on 408/425/429/5xx
    RetryDelay: threecommon.RetryDelay{
        Initial: 500 * time.Millisecond,
        Max:     8 * time.Second,
        Jitter:  true,
    },
    HTTPClient: &http.Client{Timeout: 60 * time.Second},  // override transport
    Logger:     myLogger,                                 // optional debug logger
    Telemetry:  threecommon.Bool(true),                   // opt-out of anonymous telemetry
})

Error handling

Every error returned by the SDK wraps a *threecommon.APIError and is one of the typed subtypes. Branch with errors.As:

import "errors"

_, err := api.Events.Retrieve(ctx, "evt_missing", nil)
if err != nil {
    var notFound *threecommon.NotFoundError
    var auth *threecommon.AuthError
    var rate *threecommon.RateLimitError

    switch {
    case errors.As(err, &notFound):
        // 404
    case errors.As(err, &auth):
        // 401 — bad or expired API key
    case errors.As(err, &rate):
        // 429 — rate.RetryAfter tells you when to retry
    default:
        return err
    }
}

Every error carries Code, Message, HTTPStatus, RequestID, Details, and RawResponse. The default Error() format includes the request ID for log correlation:

[not_found] Event evt_missing not found (request_id=req-dfx-abc)

Pagination

Two flavors:

// One page at a time
result, err := api.Events.List(ctx, &event.ListParams{PageSize: threecommon.Int(50)})

// All pages, lazy
iter := api.Events.ListAutoPaginate(ctx, nil)
for iter.Next() {
    ev := iter.Current()
    _ = ev
}
if err := iter.Err(); err != nil {
    return err
}

Go 1.23+ the iterator also support range-over-func variant:

for ev, err := range api.Events.ListAutoPaginate(ctx, nil).All() {
    if err != nil {
        return err
    }
    _ = ev
}

Filters

The filters subpackage provides a typed builder for the API's filters query parameter:

import "github.com/3-Common/sdk/sdk-go/filters"

f := filters.And(
    filters.Field("status").IsAnyOf("open"),
    filters.Field("ticketSum").IsGreaterThan(10),
)

params := (&event.ListParams{}).FilterWith(f)
api.Events.List(ctx, params)

The full operator set is enumerated in filters/types.go.

Retries

Idempotent methods (GET, PATCH, PUT) retry automatically on 408, 425, 429, 500, 502, 503, 504 and on network errors. Backoff is exponential with full jitter, capped at RetryDelay.Max. The SDK honors a server-provided Retry-After header on 429.

POST and DELETE do not retry by default; pass an Idempotency-Key via per-request options to opt in (forward-compat — no v1 endpoints currently use this).

Telemetry

The SDK sends a small, anonymized Threecommon-Client-Telemetry header on every request (SDK version, language, last-request latency). This helps debug performance reports from real customers without instrumenting their code. Disable globally:

api, _ := client.New(threecommon.Config{APIKey: "...", Telemetry: threecommon.Bool(false)})

Or at runtime:

api.DisableTelemetry()

The header never contains your API key, request bodies, or response bodies.

Repository layout

The package layout mirrors the Node SDK so behavior stays in lockstep:

sdk-go/
├── doc.go              # package overview for pkg.go.dev
├── config.go           # Config + Logger + RetryDelay
├── errors_base.go      # *APIError + Error() + Unwrap()
├── errors_types.go     # typed subtypes: AuthError, NotFoundError, ...
├── helpers.go          # String / Int / Int64 / Bool / Float64 pointer helpers
├── version.go          # SDK version constant
├── api_version.go      # pinned API version + path
├── client/             # aggregator: client.New(cfg) → *client.API
├── resources/events/   # events resource (client + types)
├── resources/invoices/ # invoices resource (client + types)
├── resources/subscriptions/ # subscriptions resource (client + types)
├── filters/            # typed filter builder
├── pagination/         # generic Iter[T] auto-paginator
├── internal/core/      # HTTP transport (not user-importable)
└── generated/          # oapi-codegen output (re-run via `make gen`)

Versioning

The SDK follows SemVer. The pinned API version (sent as Threecommon-Version) is independent — the API can evolve without breaking already-deployed SDKs. Bump APIVersion to opt into newer server behavior.

Module path: github.com/3-Common/sdk/sdk-go. Major bumps follow the standard Go major-version suffix convention (/v2 from v2.0.0 onward).

Examples

End-to-end runnable examples live under examples/:

# Events
go run ./examples/events/list
go run ./examples/events/retrieve
go run ./examples/events/update
go run ./examples/events/auto_paginate
go run ./examples/events/error_handling
go run ./examples/events/filters

# Invoices
go run ./examples/invoices/list
go run ./examples/invoices/retrieve
go run ./examples/invoices/create
go run ./examples/invoices/record_payment
go run ./examples/invoices/void
go run ./examples/invoices/auto_paginate
go run ./examples/invoices/error_handling

# Subscriptions
go run ./examples/subscriptions/list
go run ./examples/subscriptions/retrieve
go run ./examples/subscriptions/create
go run ./examples/subscriptions/update
go run ./examples/subscriptions/cancel
go run ./examples/subscriptions/preview_upcoming_invoice
go run ./examples/subscriptions/auto_paginate

Replace 3co_your_api_key_here and evt_replace_with_real_id with real values before running.

Contributing

See the repository CONTRIBUTING guide. Issues and PRs welcome.

License

MIT

Documentation

Overview

Package threecommon is the official Go client for the 3Common Public API.

Layout

The package layout mirrors the Node SDK so behavior changes can be paired across languages:

File map of this package

  • config.go — Config, Logger, RetryDelay, DefaultRetryDelay
  • errors_base.go — *APIError + Error() + Unwrap()
  • errors_types.go — AuthError, PermissionError, NotFoundError, ValidationError, ConflictError, RateLimitError, ServerError, ConnectionError
  • helpers.go — String / Int / Int64 / Bool / Float64 pointer helpers
  • version.go — Version (the SDK package version)
  • api_version.go — APIVersion + APIPath

Quick start

Construct a client and call any resource method:

import (
	"context"
	"log"
	"os"

	threecommon "github.com/3-Common/sdk/sdk-go"
	"github.com/3-Common/sdk/sdk-go/client"
	"github.com/3-Common/sdk/sdk-go/resources/events"
)

api, err := client.New(threecommon.Config{APIKey: os.Getenv("THREECOMMON_API_KEY")})
if err != nil {
	log.Fatal(err)
}

result, err := api.Events.List(context.Background(), &events.ListParams{
	Status:   events.StatusOpen,
	PageSize: threecommon.Int(50),
})

Errors

Every error returned by the SDK is or wraps a *APIError. Branch on the typed subtypes via errors.As:

var notFound *threecommon.NotFoundError
if errors.As(err, &notFound) {
	// 404 — notFound.RequestID, notFound.Code, etc.
}

Pagination

Each list endpoint returns a single page plus an iterator for auto-pagination. The iterator type lives in github.com/3-Common/sdk/sdk-go/pagination:

iter := api.Events.ListAutoPaginate(ctx, nil)
for iter.Next() {
	ev := iter.Current()
	_ = ev
}
if err := iter.Err(); err != nil {
	log.Fatal(err)
}

On Go 1.23+ the iterator also exposes a range-over-func variant:

for ev, err := range api.Events.ListAutoPaginate(ctx, nil).All() {
	if err != nil {
		log.Fatal(err)
	}
	_ = ev
}

Versioning

The SDK follows SemVer. The pinned API version (sent as the Threecommon-Version header) is independent — the API can evolve without breaking already-deployed SDKs. Override it via Config.APIVersion.

Index

Constants

View Source
const APIPath = "/v1"

APIPath is the path segment appended to Config.BaseURL when constructing request URLs. Pinned to /v1 for now; will become configurable when API v2 ships.

View Source
const APIVersion = "2026-04-29"

APIVersion is the version of the 3Common Public API this SDK is built against. Sent as the Threecommon-Version header on every request. The server uses it to dispatch to the matching version of its internal handlers, so older SDKs continue to receive the response shape they were compiled against even after the API evolves.

View Source
const Version = "0.13.0"

Version is the SDK package version, replaced by the release pipeline at publish time. Sent as part of the User-Agent and Threecommon-Client-Telemetry headers on every request.

Variables

View Source
var DefaultRetryDelay = RetryDelay{
	Initial: 500 * time.Millisecond,
	Max:     8 * time.Second,
	Jitter:  true,
}

DefaultRetryDelay is the schedule applied when Config.RetryDelay is the zero value: 500ms initial, 8s cap, jitter on.

Functions

func Bool

func Bool(v bool) *bool

Bool returns a *bool pointing at v.

func Float64

func Float64(v float64) *float64

Float64 returns a *float64 pointing at v.

func Int

func Int(v int) *int

Int returns a *int pointing at v.

func Int64

func Int64(v int64) *int64

Int64 returns a *int64 pointing at v.

func String

func String(v string) *string

String returns a *string pointing at v. Convenient for populating optional pointer fields in request bodies:

api.Events.Update(ctx, "evt_123", &events.UpdateParams{
	Name: threecommon.String("New name"),
})

Types

type APIError

type APIError struct {
	// Code is a stable string matching the API's error.code field, e.g.
	// "not_found" or "rate_limit_exceeded". For SDK-originated errors it
	// describes the local condition (e.g. "missing_api_key").
	Code string

	// Message is human-readable. Safe to surface to end users.
	Message string

	// HTTPStatus is the response status, or 0 if the error originated before any response was received.
	HTTPStatus int

	// RequestID is the value of the X-Request-ID response header, when present. Useful for support correlation.
	RequestID string

	// Details is the parsed API error.details payload, when present.
	Details map[string]any

	// RawResponse is the raw response body, retained for debugging.
	RawResponse string

	// Cause is the underlying error for transport-level failures. Read it via [errors.Unwrap] or directly.
	Cause error
}

APIError is the base type carried by every error the SDK returns from a request. The HTTP-status-specific subtypes (NotFoundError, AuthError, etc.) embed *APIError so its fields are accessible directly via field promotion. Branch on the subtype with errors.As:

var notFound *threecommon.NotFoundError
if errors.As(err, &notFound) {
	log.Println("missing:", notFound.RequestID)
}

Fields are populated best-effort: HTTPStatus is zero for connection errors, RequestID is empty when the server didn't return one, RawResponse is empty for non-text responses.

func (*APIError) Error

func (e *APIError) Error() string

Error implements the error interface.

func (*APIError) Unwrap

func (e *APIError) Unwrap() error

Unwrap exposes APIError.Cause for errors.Is, errors.As, and the %w verb.

type AuthError

type AuthError struct{ *APIError }

AuthError is returned for 401 Unauthorized — invalid, missing, or expired API key.

type Config

type Config struct {
	// APIKey authenticates every request. Required. Generate keys in the
	// 3Common organizer dashboard (Settings -> API Keys). May also be supplied
	// via the THREECOMMON_API_KEY environment variable.
	APIKey string

	// BaseURL is the API root. Defaults to https://api.3common.com.
	BaseURL string

	// APIVersion is sent as the Threecommon-Version header. Defaults to
	// [APIVersion]. Override only if you need to opt into a newer server
	// behavior than this SDK was built against.
	APIVersion string

	// Timeout is the per-request deadline applied via context. A zero value
	// means 30s. To disable, pass a value larger than any expected request.
	Timeout time.Duration

	// MaxRetries is the number of retry attempts for idempotent requests on
	// retryable failures (408, 425, 429, 5xx, network errors). nil uses the
	// default of 3; pass [Int](0) to disable retries explicitly.
	MaxRetries *int

	// RetryDelay configures the exponential-backoff schedule. A zero value
	// uses [DefaultRetryDelay].
	RetryDelay RetryDelay

	// HTTPClient overrides the underlying *http.Client. Useful for injecting
	// a custom transport, proxy, or timeout. When nil, a fresh
	// http.DefaultClient is used.
	HTTPClient *http.Client

	// Logger receives debug-level events. When nil, no logging occurs. The
	// SDK never logs the API key or request/response bodies.
	Logger Logger

	// Telemetry, when non-nil, overrides the default opt-in behavior. Pass
	// [Bool](false) to disable.
	Telemetry *bool
}

Config controls how a github.com/3-Common/sdk/sdk-go/client.API talks to the 3Common API. Every field is optional except Config.APIKey. Zero values fall back to sensible defaults.

type ConflictError

type ConflictError struct{ *APIError }

ConflictError is returned for 409 Conflict — the request conflicts with current resource state.

type ConnectionError

type ConnectionError struct{ *APIError }

ConnectionError is returned when the request never completed: DNS failure, TCP reset, TLS error, context cancellation, etc. The original cause is available via errors.Unwrap.

type Logger

type Logger interface {
	Debug(msg string, kv ...any)
}

Logger is an optional sink for SDK-internal debug events. The interface is minimal on purpose: any logger that exposes a key/value method (slog, logrus, zap, etc.) is trivial to adapt.

type NotFoundError

type NotFoundError struct{ *APIError }

NotFoundError is returned for 404 Not Found.

type Nullable added in v0.8.0

type Nullable[T any] struct {
	// Value is the concrete value to send. Ignored when IsNull is true.
	Value T
	// IsNull, when true, serializes the field as JSON null.
	IsNull bool
}

Nullable is an optional request field with three states: absent (a nil *Nullable, omitted from the request), an explicit JSON null (IsNull true, which the API reads as "clear this setting"), or a concrete Value.

Construct values with NullableOf and explicit nulls with Null:

api.Forms.UpdateElement(ctx, "frm_123", "elm_1", &forms.UpdateElementParams{
	Placeholder: threecommon.NullableOf("Pick one..."),
	HelperText:  threecommon.Null[string](), // clear server-side
})

func Null added in v0.8.0

func Null[T any]() *Nullable[T]

Null returns a Nullable that serializes as JSON null, which the API reads as "clear this setting".

func NullableOf added in v0.8.0

func NullableOf[T any](v T) *Nullable[T]

NullableOf returns a Nullable carrying the concrete value v.

func (Nullable[T]) MarshalJSON added in v0.8.0

func (n Nullable[T]) MarshalJSON() ([]byte, error)

MarshalJSON implements encoding/json.Marshaler.

func (*Nullable[T]) UnmarshalJSON added in v0.8.0

func (n *Nullable[T]) UnmarshalJSON(data []byte) error

UnmarshalJSON implements encoding/json.Unmarshaler. Note that encoding/json decodes a JSON null into a nil *Nullable struct field without calling this method, so the null branch applies only when decoding into a Nullable that already exists.

type PaymentRequiredError added in v0.13.0

type PaymentRequiredError struct{ *APIError }

PaymentRequiredError is returned for 402 Payment Required — the request cannot proceed until a payment or billing prerequisite is satisfied (e.g. the host account is past due or lacks an active plan for the operation).

type PermissionError

type PermissionError struct{ *APIError }

PermissionError is returned for 403 Forbidden — the API key lacks the scope required by the endpoint.

type RateLimitError

type RateLimitError struct {
	*APIError
	RetryAfter time.Duration
}

RateLimitError is returned for 429 Too Many Requests. RetryAfter carries the parsed Retry-After header so callers can implement their own backoff; it is zero when the server did not provide one.

type RetryDelay

type RetryDelay struct {
	Initial time.Duration
	Max     time.Duration
	Jitter  bool
}

RetryDelay configures the exponential-backoff schedule. Backoff doubles each attempt, capped at RetryDelay.Max. When RetryDelay.Jitter is true the SDK picks a random value in [0, capped].

type ServerError

type ServerError struct{ *APIError }

ServerError is returned for 5xx — the API returned an unexpected server-side failure.

type ValidationError

type ValidationError struct{ *APIError }

ValidationError is returned for 400 Bad Request and 422 Unprocessable Entity — request validation failed.

Directories

Path Synopsis
Package client is the recommended entry point for the SDK.
Package client is the recommended entry point for the SDK.
examples
contacts/attach_payment_method command
Run with: go run ./examples/contacts/attach_payment_method
Run with: go run ./examples/contacts/attach_payment_method
contacts/auto_paginate command
Run with: go run ./examples/contacts/auto_paginate
Run with: go run ./examples/contacts/auto_paginate
contacts/bulk_upsert command
Run with: go run ./examples/contacts/bulk_upsert
Run with: go run ./examples/contacts/bulk_upsert
contacts/count command
Run with: go run ./examples/contacts/count
Run with: go run ./examples/contacts/count
contacts/create command
Run with: go run ./examples/contacts/create
Run with: go run ./examples/contacts/create
contacts/create_payment_method_setup_intent command
Run with: go run ./examples/contacts/create_payment_method_setup_intent
Run with: go run ./examples/contacts/create_payment_method_setup_intent
contacts/delete command
Run with: go run ./examples/contacts/delete
Run with: go run ./examples/contacts/delete
contacts/error_handling command
Run with: go run ./examples/contacts/error_handling
Run with: go run ./examples/contacts/error_handling
contacts/filters command
Run with: go run ./examples/contacts/filters
Run with: go run ./examples/contacts/filters
contacts/list command
Run with: go run ./examples/contacts/list
Run with: go run ./examples/contacts/list
contacts/list_activity command
Run with: go run ./examples/contacts/list_activity
Run with: go run ./examples/contacts/list_activity
contacts/remove_payment_method command
Run with: go run ./examples/contacts/remove_payment_method
Run with: go run ./examples/contacts/remove_payment_method
contacts/retrieve command
Run with: go run ./examples/contacts/retrieve
Run with: go run ./examples/contacts/retrieve
contacts/retrieve_payment_method command
Run with: go run ./examples/contacts/retrieve_payment_method
Run with: go run ./examples/contacts/retrieve_payment_method
contacts/update command
Run with: go run ./examples/contacts/update
Run with: go run ./examples/contacts/update
entitlements/auto_paginate command
Run with: go run ./examples/entitlements/auto_paginate
Run with: go run ./examples/entitlements/auto_paginate
entitlements/consume command
Run with: go run ./examples/entitlements/consume
Run with: go run ./examples/entitlements/consume
entitlements/error_handling command
Run with: go run ./examples/entitlements/error_handling
Run with: go run ./examples/entitlements/error_handling
entitlements/grant command
Run with: go run ./examples/entitlements/grant
Run with: go run ./examples/entitlements/grant
entitlements/list command
Run with: go run ./examples/entitlements/list
Run with: go run ./examples/entitlements/list
entitlements/lookup command
Run with: go run ./examples/entitlements/lookup
Run with: go run ./examples/entitlements/lookup
entitlements/retrieve command
Run with: go run ./examples/entitlements/retrieve
Run with: go run ./examples/entitlements/retrieve
events/auto_paginate command
Run with: go run ./examples/events/auto_paginate
Run with: go run ./examples/events/auto_paginate
events/error_handling command
Run with: go run ./examples/events/error_handling
Run with: go run ./examples/events/error_handling
events/filters command
Run with: go run ./examples/events/filters
Run with: go run ./examples/events/filters
events/list command
Run with: go run ./examples/events/list
Run with: go run ./examples/events/list
events/retrieve command
Run with: go run ./examples/events/retrieve
Run with: go run ./examples/events/retrieve
events/update command
Run with: go run ./examples/events/update
Run with: go run ./examples/events/update
features/archive command
Run with: go run ./examples/features/archive
Run with: go run ./examples/features/archive
features/auto_paginate command
Run with: go run ./examples/features/auto_paginate
Run with: go run ./examples/features/auto_paginate
features/create command
Run with: go run ./examples/features/create
Run with: go run ./examples/features/create
features/error_handling command
Run with: go run ./examples/features/error_handling
Run with: go run ./examples/features/error_handling
features/list command
Run with: go run ./examples/features/list
Run with: go run ./examples/features/list
features/resolve command
Run with: go run ./examples/features/resolve
Run with: go run ./examples/features/resolve
features/retrieve command
Run with: go run ./examples/features/retrieve
Run with: go run ./examples/features/retrieve
features/unarchive command
Run with: go run ./examples/features/unarchive
Run with: go run ./examples/features/unarchive
features/update command
Run with: go run ./examples/features/update
Run with: go run ./examples/features/update
forms/add_element command
Run with: go run ./examples/forms/add_element
Run with: go run ./examples/forms/add_element
forms/add_logic_rule command
Run with: go run ./examples/forms/add_logic_rule
Run with: go run ./examples/forms/add_logic_rule
forms/auto_paginate command
Run with: go run ./examples/forms/auto_paginate
Run with: go run ./examples/forms/auto_paginate
forms/create command
Run with: go run ./examples/forms/create
Run with: go run ./examples/forms/create
forms/delete_element command
Run with: go run ./examples/forms/delete_element
Run with: go run ./examples/forms/delete_element
forms/disable_other_option command
Run with: go run ./examples/forms/disable_other_option
Run with: go run ./examples/forms/disable_other_option
forms/duplicate command
Run with: go run ./examples/forms/duplicate
Run with: go run ./examples/forms/duplicate
forms/enable_other_option command
Run with: go run ./examples/forms/enable_other_option
Run with: go run ./examples/forms/enable_other_option
forms/error_handling command
Run with: go run ./examples/forms/error_handling
Run with: go run ./examples/forms/error_handling
forms/list command
Run with: go run ./examples/forms/list
Run with: go run ./examples/forms/list
forms/move_element command
Run with: go run ./examples/forms/move_element
Run with: go run ./examples/forms/move_element
forms/remove_logic_rule command
Run with: go run ./examples/forms/remove_logic_rule
Run with: go run ./examples/forms/remove_logic_rule
forms/retrieve command
Run with: go run ./examples/forms/retrieve
Run with: go run ./examples/forms/retrieve
forms/update command
Run with: go run ./examples/forms/update
Run with: go run ./examples/forms/update
forms/update_element command
Run with: go run ./examples/forms/update_element
Run with: go run ./examples/forms/update_element
invoices/auto_charge command
Run with: go run ./examples/invoices/auto_charge
Run with: go run ./examples/invoices/auto_charge
invoices/auto_paginate command
Run with: go run ./examples/invoices/auto_paginate
Run with: go run ./examples/invoices/auto_paginate
invoices/create command
Run with: go run ./examples/invoices/create
Run with: go run ./examples/invoices/create
invoices/delete_draft command
Run with: go run ./examples/invoices/delete_draft
Run with: go run ./examples/invoices/delete_draft
invoices/error_handling command
Run with: go run ./examples/invoices/error_handling
Run with: go run ./examples/invoices/error_handling
invoices/list command
Run with: go run ./examples/invoices/list
Run with: go run ./examples/invoices/list
invoices/record_payment command
Run with: go run ./examples/invoices/record_payment
Run with: go run ./examples/invoices/record_payment
invoices/refund_payment command
Run with: go run ./examples/invoices/refund_payment
Run with: go run ./examples/invoices/refund_payment
invoices/retrieve command
Run with: go run ./examples/invoices/retrieve
Run with: go run ./examples/invoices/retrieve
invoices/send command
Run with: go run ./examples/invoices/send
Run with: go run ./examples/invoices/send
invoices/update command
Run with: go run ./examples/invoices/update
Run with: go run ./examples/invoices/update
invoices/void command
Run with: go run ./examples/invoices/void
Run with: go run ./examples/invoices/void
prices/archive command
Run with: go run ./examples/prices/archive
Run with: go run ./examples/prices/archive
prices/auto_paginate command
Run with: go run ./examples/prices/auto_paginate
Run with: go run ./examples/prices/auto_paginate
prices/create command
Run with: go run ./examples/prices/create
Run with: go run ./examples/prices/create
prices/error_handling command
Run with: go run ./examples/prices/error_handling
Run with: go run ./examples/prices/error_handling
prices/list command
Run with: go run ./examples/prices/list
Run with: go run ./examples/prices/list
prices/retrieve command
Run with: go run ./examples/prices/retrieve
Run with: go run ./examples/prices/retrieve
prices/unarchive command
Run with: go run ./examples/prices/unarchive
Run with: go run ./examples/prices/unarchive
prices/update command
Run with: go run ./examples/prices/update
Run with: go run ./examples/prices/update
properties/auto_paginate command
Run with: go run ./examples/properties/auto_paginate
Run with: go run ./examples/properties/auto_paginate
properties/create command
Run with: go run ./examples/properties/create
Run with: go run ./examples/properties/create
properties/error_handling command
Run with: go run ./examples/properties/error_handling
Run with: go run ./examples/properties/error_handling
properties/list command
Run with: go run ./examples/properties/list
Run with: go run ./examples/properties/list
properties/retrieve command
Run with: go run ./examples/properties/retrieve
Run with: go run ./examples/properties/retrieve
properties/update command
Run with: go run ./examples/properties/update
Run with: go run ./examples/properties/update
subscriptions/auto_paginate command
Run with: go run ./examples/subscriptions/auto_paginate
Run with: go run ./examples/subscriptions/auto_paginate
subscriptions/cancel command
Run with: go run ./examples/subscriptions/cancel
Run with: go run ./examples/subscriptions/cancel
subscriptions/comp_next_cycle command
Run with: go run ./examples/subscriptions/comp_next_cycle
Run with: go run ./examples/subscriptions/comp_next_cycle
subscriptions/create command
Run with: go run ./examples/subscriptions/create
Run with: go run ./examples/subscriptions/create
subscriptions/list command
Run with: go run ./examples/subscriptions/list
Run with: go run ./examples/subscriptions/list
subscriptions/manage_url command
Run with: go run ./examples/subscriptions/manage_url
Run with: go run ./examples/subscriptions/manage_url
subscriptions/preview_upcoming_invoice command
Run with: go run ./examples/subscriptions/preview_upcoming_invoice
Run with: go run ./examples/subscriptions/preview_upcoming_invoice
subscriptions/retrieve command
Run with: go run ./examples/subscriptions/retrieve
Run with: go run ./examples/subscriptions/retrieve
subscriptions/uncomp_next_cycle command
Run with: go run ./examples/subscriptions/uncomp_next_cycle
Run with: go run ./examples/subscriptions/uncomp_next_cycle
subscriptions/update command
Run with: go run ./examples/subscriptions/update
Run with: go run ./examples/subscriptions/update
Package filters provides the typed builder and wire types for the API's `filters` query parameter.
Package filters provides the typed builder and wire types for the API's `filters` query parameter.
Package generated provides primitives to interact with the openapi HTTP API.
Package generated provides primitives to interact with the openapi HTTP API.
internal
core
Package core implements the HTTP machinery shared by every resource package.
Package core implements the HTTP machinery shared by every resource package.
Package pagination contains the generic auto-paginating iterator returned by every list endpoint's auto-paginate variant.
Package pagination contains the generic auto-paginating iterator returned by every list endpoint's auto-paginate variant.
resources
contacts
Package contacts provides the contacts resource client for the 3Common API.
Package contacts provides the contacts resource client for the 3Common API.
entitlements
Package entitlements provides the entitlements resource client for the 3Common API.
Package entitlements provides the entitlements resource client for the 3Common API.
events
Package events provides the events resource client for the 3Common API.
Package events provides the events resource client for the 3Common API.
features
Package features provides the features resource client for the 3Common API.
Package features provides the features resource client for the 3Common API.
forms
Package forms provides the forms resource client for the 3Common API.
Package forms provides the forms resource client for the 3Common API.
invoices
Package invoices provides the invoices resource client for the 3Common API.
Package invoices provides the invoices resource client for the 3Common API.
prices
Package prices provides the prices resource client for the 3Common API.
Package prices provides the prices resource client for the 3Common API.
properties
Package properties provides the properties resource client for the 3Common API.
Package properties provides the properties resource client for the 3Common API.
subscriptions
Package subscriptions provides the subscriptions resource client for the 3Common API.
Package subscriptions provides the subscriptions resource client for the 3Common API.
scripts
livesmoke command
Pre-release smoke test against the live API.
Pre-release smoke test against the live API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL