dodopayments

package module
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

README

Dodo Payments Go API Library

Go Reference

The Dodo Payments Go library provides convenient access to the Dodo Payments REST API from applications written in Go. The full API of this library can be found in api.md.

It is generated with Stainless.

Installation

import (
	"github.com/dodopayments/dodopayments-go" // imported as dodopayments
)

Or to pin the version:

go get -u 'github.com/dodopayments/dodopayments-go@v0.20.2'

Requirements

This library requires Go 1.18+.

Usage

The full API of this library can be found in api.md.

package main

import (
	"context"
	"fmt"

	"github.com/dodopayments/dodopayments-go"
	"github.com/dodopayments/dodopayments-go/option"
)

func main() {
	client := dodopayments.NewClient(
		option.WithBearerToken("My Bearer Token"), // defaults to os.LookupEnv("DODO_PAYMENTS_API_KEY")
		option.WithEnvironmentTestMode(),          // defaults to option.WithEnvironmentLiveMode()
	)
	payment, err := client.Payments.New(context.TODO(), dodopayments.PaymentNewParams{
		Billing: dodopayments.F(dodopayments.PaymentNewParamsBilling{
			City:    dodopayments.F("city"),
			Country: dodopayments.F(dodopayments.CountryCodeAf),
			State:   dodopayments.F("state"),
			Street:  dodopayments.F("street"),
			Zipcode: dodopayments.F("zipcode"),
		}),
		Customer: dodopayments.F[dodopayments.PaymentNewParamsCustomerUnion](dodopayments.PaymentNewParamsCustomerAttachExistingCustomer{
			CustomerID: dodopayments.F("customer_id"),
		}),
		ProductCart: dodopayments.F([]dodopayments.PaymentNewParamsProductCart{{
			ProductID: dodopayments.F("product_id"),
			Quantity:  dodopayments.F(int64(0)),
		}}),
	})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", payment.PaymentID)
}

Request fields

All request parameters are wrapped in a generic Field type, which we use to distinguish zero values from null or omitted fields.

This prevents accidentally sending a zero value if you forget a required parameter, and enables explicitly sending null, false, '', or 0 on optional parameters. Any field not specified is not sent.

To construct fields with values, use the helpers String(), Int(), Float(), or most commonly, the generic F[T](). To send a null, use Null[T](), and to send a nonconforming value, use Raw[T](any). For example:

params := FooParams{
	Name: dodopayments.F("hello"),

	// Explicitly send `"description": null`
	Description: dodopayments.Null[string](),

	Point: dodopayments.F(dodopayments.Point{
		X: dodopayments.Int(0),
		Y: dodopayments.Int(1),

		// In cases where the API specifies a given type,
		// but you want to send something else, use `Raw`:
		Z: dodopayments.Raw[int64](0.01), // sends a float
	}),
}
Response objects

All fields in response structs are value types (not pointers or wrappers).

If a given field is null, not present, or invalid, the corresponding field will simply be its zero value.

All response structs also include a special JSON field, containing more detailed information about each property, which you can use like so:

if res.Name == "" {
	// true if `"name"` is either not present or explicitly null
	res.JSON.Name.IsNull()

	// true if the `"name"` key was not present in the response JSON at all
	res.JSON.Name.IsMissing()

	// When the API returns data that cannot be coerced to the expected type:
	if res.JSON.Name.IsInvalid() {
		raw := res.JSON.Name.Raw()

		legacyName := struct{
			First string `json:"first"`
			Last  string `json:"last"`
		}{}
		json.Unmarshal([]byte(raw), &legacyName)
		name = legacyName.First + " " + legacyName.Last
	}
}

These .JSON structs also include an Extras map containing any properties in the json response that were not specified in the struct. This can be useful for API features not yet present in the SDK.

body := res.JSON.ExtraFields["my_unexpected_field"].Raw()
RequestOptions

This library uses the functional options pattern. Functions defined in the option package return a RequestOption, which is a closure that mutates a RequestConfig. These options can be supplied to the client or at individual requests. For example:

client := dodopayments.NewClient(
	// Adds a header to every request made by the client
	option.WithHeader("X-Some-Header", "custom_header_info"),
)

client.Payments.New(context.TODO(), ...,
	// Override the header
	option.WithHeader("X-Some-Header", "some_other_custom_header_info"),
	// Add an undocumented field to the request body, using sjson syntax
	option.WithJSONSet("some.json.path", map[string]string{"my": "object"}),
)

See the full list of request options.

Pagination

This library provides some conveniences for working with paginated list endpoints.

You can use .ListAutoPaging() methods to iterate through items across all pages:

iter := client.Payments.ListAutoPaging(context.TODO(), dodopayments.PaymentListParams{})
// Automatically fetches more pages as needed.
for iter.Next() {
	paymentListResponse := iter.Current()
	fmt.Printf("%+v\n", paymentListResponse)
}
if err := iter.Err(); err != nil {
	panic(err.Error())
}

Or you can use simple .List() methods to fetch a single page and receive a standard response object with additional helper methods like .GetNextPage(), e.g.:

page, err := client.Payments.List(context.TODO(), dodopayments.PaymentListParams{})
for page != nil {
	for _, payment := range page.Items {
		fmt.Printf("%+v\n", payment)
	}
	page, err = page.GetNextPage()
}
if err != nil {
	panic(err.Error())
}
Errors

When the API returns a non-success status code, we return an error with type *dodopayments.Error. This contains the StatusCode, *http.Request, and *http.Response values of the request, as well as the JSON of the error body (much like other response objects in the SDK).

To handle errors, we recommend that you use the errors.As pattern:

_, err := client.Payments.New(context.TODO(), dodopayments.PaymentNewParams{
	Billing: dodopayments.F(dodopayments.PaymentNewParamsBilling{
		City:    dodopayments.F("city"),
		Country: dodopayments.F(dodopayments.CountryCodeAf),
		State:   dodopayments.F("state"),
		Street:  dodopayments.F("street"),
		Zipcode: dodopayments.F("zipcode"),
	}),
	Customer: dodopayments.F[dodopayments.PaymentNewParamsCustomerUnion](dodopayments.PaymentNewParamsCustomerAttachExistingCustomer{
		CustomerID: dodopayments.F("customer_id"),
	}),
	ProductCart: dodopayments.F([]dodopayments.PaymentNewParamsProductCart{{
		ProductID: dodopayments.F("product_id"),
		Quantity:  dodopayments.F(int64(0)),
	}}),
})
if err != nil {
	var apierr *dodopayments.Error
	if errors.As(err, &apierr) {
		println(string(apierr.DumpRequest(true)))  // Prints the serialized HTTP request
		println(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response
	}
	panic(err.Error()) // GET "/payments": 400 Bad Request { ... }
}

When other errors occur, they are returned unwrapped; for example, if HTTP transport fails, you might receive *url.Error wrapping *net.OpError.

Timeouts

Requests do not time out by default; use context to configure a timeout for a request lifecycle.

Note that if a request is retried, the context timeout does not start over. To set a per-retry timeout, use option.WithRequestTimeout().

// This sets the timeout for the request, including all the retries.
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
client.Payments.New(
	ctx,
	dodopayments.PaymentNewParams{
		Billing: dodopayments.F(dodopayments.PaymentNewParamsBilling{
			City:    dodopayments.F("city"),
			Country: dodopayments.F(dodopayments.CountryCodeAf),
			State:   dodopayments.F("state"),
			Street:  dodopayments.F("street"),
			Zipcode: dodopayments.F("zipcode"),
		}),
		Customer: dodopayments.F[dodopayments.PaymentNewParamsCustomerUnion](dodopayments.PaymentNewParamsCustomerAttachExistingCustomer{
			CustomerID: dodopayments.F("customer_id"),
		}),
		ProductCart: dodopayments.F([]dodopayments.PaymentNewParamsProductCart{{
			ProductID: dodopayments.F("product_id"),
			Quantity:  dodopayments.F(int64(0)),
		}}),
	},
	// This sets the per-retry timeout
	option.WithRequestTimeout(20*time.Second),
)
File uploads

Request parameters that correspond to file uploads in multipart requests are typed as param.Field[io.Reader]. The contents of the io.Reader will by default be sent as a multipart form part with the file name of "anonymous_file" and content-type of "application/octet-stream".

The file name and content-type can be customized by implementing Name() string or ContentType() string on the run-time type of io.Reader. Note that os.File implements Name() string, so a file returned by os.Open will be sent with the file name on disk.

We also provide a helper dodopayments.FileParam(reader io.Reader, filename string, contentType string) which can be used to wrap any io.Reader with the appropriate file name and content type.

Retries

Certain errors will be automatically retried 2 times by default, with a short exponential backoff. We retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit, and >=500 Internal errors.

You can use the WithMaxRetries option to configure or disable this:

// Configure the default for all requests:
client := dodopayments.NewClient(
	option.WithMaxRetries(0), // default is 2
)

// Override per-request:
client.Payments.New(
	context.TODO(),
	dodopayments.PaymentNewParams{
		Billing: dodopayments.F(dodopayments.PaymentNewParamsBilling{
			City:    dodopayments.F("city"),
			Country: dodopayments.F(dodopayments.CountryCodeAf),
			State:   dodopayments.F("state"),
			Street:  dodopayments.F("street"),
			Zipcode: dodopayments.F("zipcode"),
		}),
		Customer: dodopayments.F[dodopayments.PaymentNewParamsCustomerUnion](dodopayments.PaymentNewParamsCustomerAttachExistingCustomer{
			CustomerID: dodopayments.F("customer_id"),
		}),
		ProductCart: dodopayments.F([]dodopayments.PaymentNewParamsProductCart{{
			ProductID: dodopayments.F("product_id"),
			Quantity:  dodopayments.F(int64(0)),
		}}),
	},
	option.WithMaxRetries(5),
)
Accessing raw response data (e.g. response headers)

You can access the raw HTTP response data by using the option.WithResponseInto() request option. This is useful when you need to examine response headers, status codes, or other details.

// Create a variable to store the HTTP response
var response *http.Response
payment, err := client.Payments.New(
	context.TODO(),
	dodopayments.PaymentNewParams{
		Billing: dodopayments.F(dodopayments.PaymentNewParamsBilling{
			City:    dodopayments.F("city"),
			Country: dodopayments.F(dodopayments.CountryCodeAf),
			State:   dodopayments.F("state"),
			Street:  dodopayments.F("street"),
			Zipcode: dodopayments.F("zipcode"),
		}),
		Customer: dodopayments.F[dodopayments.PaymentNewParamsCustomerUnion](dodopayments.PaymentNewParamsCustomerAttachExistingCustomer{
			CustomerID: dodopayments.F("customer_id"),
		}),
		ProductCart: dodopayments.F([]dodopayments.PaymentNewParamsProductCart{{
			ProductID: dodopayments.F("product_id"),
			Quantity:  dodopayments.F(int64(0)),
		}}),
	},
	option.WithResponseInto(&response),
)
if err != nil {
	// handle error
}
fmt.Printf("%+v\n", payment)

fmt.Printf("Status Code: %d\n", response.StatusCode)
fmt.Printf("Headers: %+#v\n", response.Header)
Making custom/undocumented requests

This library is typed for convenient access to the documented API. If you need to access undocumented endpoints, params, or response properties, the library can still be used.

Undocumented endpoints

To make requests to undocumented endpoints, you can use client.Get, client.Post, and other HTTP verbs. RequestOptions on the client, such as retries, will be respected when making these requests.

var (
    // params can be an io.Reader, a []byte, an encoding/json serializable object,
    // or a "…Params" struct defined in this library.
    params map[string]interface{}

    // result can be an []byte, *http.Response, a encoding/json deserializable object,
    // or a model defined in this library.
    result *http.Response
)
err := client.Post(context.Background(), "/unspecified", params, &result)
if err != nil {
    …
}
Undocumented request params

To make requests using undocumented parameters, you may use either the option.WithQuerySet() or the option.WithJSONSet() methods.

params := FooNewParams{
    ID:   dodopayments.F("id_xxxx"),
    Data: dodopayments.F(FooNewParamsData{
        FirstName: dodopayments.F("John"),
    }),
}
client.Foo.New(context.Background(), params, option.WithJSONSet("data.last_name", "Doe"))
Undocumented response properties

To access undocumented response properties, you may either access the raw JSON of the response as a string with result.JSON.RawJSON(), or get the raw JSON of a particular field on the result with result.JSON.Foo.Raw().

Any fields that are not present on the response struct will be saved and can be accessed by result.JSON.ExtraFields() which returns the extra fields as a map[string]Field.

Middleware

We provide option.WithMiddleware which applies the given middleware to requests.

func Logger(req *http.Request, next option.MiddlewareNext) (res *http.Response, err error) {
	// Before the request
	start := time.Now()
	LogReq(req)

	// Forward the request to the next handler
	res, err = next(req)

	// Handle stuff after the request
	end := time.Now()
	LogRes(res, err, start - end)

    return res, err
}

client := dodopayments.NewClient(
	option.WithMiddleware(Logger),
)

When multiple middlewares are provided as variadic arguments, the middlewares are applied left to right. If option.WithMiddleware is given multiple times, for example first in the client then the method, the middleware in the client will run first and the middleware given in the method will run next.

You may also replace the default http.Client with option.WithHTTPClient(client). Only one http client is accepted (this overwrites any previous client) and receives requests after any middleware has been applied.

Semantic versioning

This package generally follows SemVer conventions, though certain backwards-incompatible changes may be released as minor versions:

  1. Changes to library internals which are technically public but not intended or documented for external use. (Please open a GitHub issue to let us know if you are relying on such internals.)
  2. Changes that we do not expect to impact the vast majority of users in practice.

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an issue with questions, bugs, or suggestions.

Contributing

See the contributing documentation.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(value bool) param.Field[bool]

Bool is a param field helper which helps specify bools.

func F

func F[T any](value T) param.Field[T]

F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.

func FileParam

func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]

FileParam is a param field helper which helps files with a mime content-type.

func Float

func Float(value float64) param.Field[float64]

Float is a param field helper which helps specify floats.

func Int

func Int(value int64) param.Field[int64]

Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.

func Null

func Null[T any]() param.Field[T]

Null is a param field helper which explicitly sends null to the API.

func Raw

func Raw[T any](value any) param.Field[T]

Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).

func String

func String(value string) param.Field[string]

String is a param field helper which helps specify strings.

Types

type Client

type Client struct {
	Options             []option.RequestOption
	Payments            *PaymentService
	Subscriptions       *SubscriptionService
	Invoices            *InvoiceService
	Licenses            *LicenseService
	LicenseKeys         *LicenseKeyService
	LicenseKeyInstances *LicenseKeyInstanceService
	Customers           *CustomerService
	Refunds             *RefundService
	Disputes            *DisputeService
	Payouts             *PayoutService
	WebhookEvents       *WebhookEventService
	Products            *ProductService
	Misc                *MiscService
}

Client creates a struct with services and top level methods that help with interacting with the Dodo Payments API. You should not instantiate this client directly, and instead use the NewClient method instead.

func NewClient

func NewClient(opts ...option.RequestOption) (r *Client)

NewClient generates a new client with the default option read from the environment (DODO_PAYMENTS_API_KEY). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.

func (*Client) Delete

func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Execute

func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.

If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.

The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.

If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.

Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.

The response body will be deserialized into the res variable, depending on its type:

  • A pointer to a *http.Response is populated by the raw response.
  • A pointer to a byte array will be populated with the contents of the request body.
  • A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
  • A nil value will not read the response body.

For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.

func (*Client) Get

func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Patch

func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Post

func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Put

func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Put makes a PUT request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

type CountryCode

type CountryCode string

ISO country code alpha2 variant

const (
	CountryCodeAf CountryCode = "AF"
	CountryCodeAx CountryCode = "AX"
	CountryCodeAl CountryCode = "AL"
	CountryCodeDz CountryCode = "DZ"
	CountryCodeAs CountryCode = "AS"
	CountryCodeAd CountryCode = "AD"
	CountryCodeAo CountryCode = "AO"
	CountryCodeAI CountryCode = "AI"
	CountryCodeAq CountryCode = "AQ"
	CountryCodeAg CountryCode = "AG"
	CountryCodeAr CountryCode = "AR"
	CountryCodeAm CountryCode = "AM"
	CountryCodeAw CountryCode = "AW"
	CountryCodeAu CountryCode = "AU"
	CountryCodeAt CountryCode = "AT"
	CountryCodeAz CountryCode = "AZ"
	CountryCodeBs CountryCode = "BS"
	CountryCodeBh CountryCode = "BH"
	CountryCodeBd CountryCode = "BD"
	CountryCodeBb CountryCode = "BB"
	CountryCodeBy CountryCode = "BY"
	CountryCodeBe CountryCode = "BE"
	CountryCodeBz CountryCode = "BZ"
	CountryCodeBj CountryCode = "BJ"
	CountryCodeBm CountryCode = "BM"
	CountryCodeBt CountryCode = "BT"
	CountryCodeBo CountryCode = "BO"
	CountryCodeBq CountryCode = "BQ"
	CountryCodeBa CountryCode = "BA"
	CountryCodeBw CountryCode = "BW"
	CountryCodeBv CountryCode = "BV"
	CountryCodeBr CountryCode = "BR"
	CountryCodeIo CountryCode = "IO"
	CountryCodeBn CountryCode = "BN"
	CountryCodeBg CountryCode = "BG"
	CountryCodeBf CountryCode = "BF"
	CountryCodeBi CountryCode = "BI"
	CountryCodeKh CountryCode = "KH"
	CountryCodeCm CountryCode = "CM"
	CountryCodeCa CountryCode = "CA"
	CountryCodeCv CountryCode = "CV"
	CountryCodeKy CountryCode = "KY"
	CountryCodeCf CountryCode = "CF"
	CountryCodeTd CountryCode = "TD"
	CountryCodeCl CountryCode = "CL"
	CountryCodeCn CountryCode = "CN"
	CountryCodeCx CountryCode = "CX"
	CountryCodeCc CountryCode = "CC"
	CountryCodeCo CountryCode = "CO"
	CountryCodeKm CountryCode = "KM"
	CountryCodeCg CountryCode = "CG"
	CountryCodeCd CountryCode = "CD"
	CountryCodeCk CountryCode = "CK"
	CountryCodeCr CountryCode = "CR"
	CountryCodeCi CountryCode = "CI"
	CountryCodeHr CountryCode = "HR"
	CountryCodeCu CountryCode = "CU"
	CountryCodeCw CountryCode = "CW"
	CountryCodeCy CountryCode = "CY"
	CountryCodeCz CountryCode = "CZ"
	CountryCodeDk CountryCode = "DK"
	CountryCodeDj CountryCode = "DJ"
	CountryCodeDm CountryCode = "DM"
	CountryCodeDo CountryCode = "DO"
	CountryCodeEc CountryCode = "EC"
	CountryCodeEg CountryCode = "EG"
	CountryCodeSv CountryCode = "SV"
	CountryCodeGq CountryCode = "GQ"
	CountryCodeEr CountryCode = "ER"
	CountryCodeEe CountryCode = "EE"
	CountryCodeEt CountryCode = "ET"
	CountryCodeFk CountryCode = "FK"
	CountryCodeFo CountryCode = "FO"
	CountryCodeFj CountryCode = "FJ"
	CountryCodeFi CountryCode = "FI"
	CountryCodeFr CountryCode = "FR"
	CountryCodeGf CountryCode = "GF"
	CountryCodePf CountryCode = "PF"
	CountryCodeTf CountryCode = "TF"
	CountryCodeGa CountryCode = "GA"
	CountryCodeGm CountryCode = "GM"
	CountryCodeGe CountryCode = "GE"
	CountryCodeDe CountryCode = "DE"
	CountryCodeGh CountryCode = "GH"
	CountryCodeGi CountryCode = "GI"
	CountryCodeGr CountryCode = "GR"
	CountryCodeGl CountryCode = "GL"
	CountryCodeGd CountryCode = "GD"
	CountryCodeGp CountryCode = "GP"
	CountryCodeGu CountryCode = "GU"
	CountryCodeGt CountryCode = "GT"
	CountryCodeGg CountryCode = "GG"
	CountryCodeGn CountryCode = "GN"
	CountryCodeGw CountryCode = "GW"
	CountryCodeGy CountryCode = "GY"
	CountryCodeHt CountryCode = "HT"
	CountryCodeHm CountryCode = "HM"
	CountryCodeVa CountryCode = "VA"
	CountryCodeHn CountryCode = "HN"
	CountryCodeHk CountryCode = "HK"
	CountryCodeHu CountryCode = "HU"
	CountryCodeIs CountryCode = "IS"
	CountryCodeIn CountryCode = "IN"
	CountryCodeID CountryCode = "ID"
	CountryCodeIr CountryCode = "IR"
	CountryCodeIq CountryCode = "IQ"
	CountryCodeIe CountryCode = "IE"
	CountryCodeIm CountryCode = "IM"
	CountryCodeIl CountryCode = "IL"
	CountryCodeIt CountryCode = "IT"
	CountryCodeJm CountryCode = "JM"
	CountryCodeJp CountryCode = "JP"
	CountryCodeJe CountryCode = "JE"
	CountryCodeJo CountryCode = "JO"
	CountryCodeKz CountryCode = "KZ"
	CountryCodeKe CountryCode = "KE"
	CountryCodeKi CountryCode = "KI"
	CountryCodeKp CountryCode = "KP"
	CountryCodeKr CountryCode = "KR"
	CountryCodeKw CountryCode = "KW"
	CountryCodeKg CountryCode = "KG"
	CountryCodeLa CountryCode = "LA"
	CountryCodeLv CountryCode = "LV"
	CountryCodeLb CountryCode = "LB"
	CountryCodeLs CountryCode = "LS"
	CountryCodeLr CountryCode = "LR"
	CountryCodeLy CountryCode = "LY"
	CountryCodeLi CountryCode = "LI"
	CountryCodeLt CountryCode = "LT"
	CountryCodeLu CountryCode = "LU"
	CountryCodeMo CountryCode = "MO"
	CountryCodeMk CountryCode = "MK"
	CountryCodeMg CountryCode = "MG"
	CountryCodeMw CountryCode = "MW"
	CountryCodeMy CountryCode = "MY"
	CountryCodeMv CountryCode = "MV"
	CountryCodeMl CountryCode = "ML"
	CountryCodeMt CountryCode = "MT"
	CountryCodeMh CountryCode = "MH"
	CountryCodeMq CountryCode = "MQ"
	CountryCodeMr CountryCode = "MR"
	CountryCodeMu CountryCode = "MU"
	CountryCodeYt CountryCode = "YT"
	CountryCodeMx CountryCode = "MX"
	CountryCodeFm CountryCode = "FM"
	CountryCodeMd CountryCode = "MD"
	CountryCodeMc CountryCode = "MC"
	CountryCodeMn CountryCode = "MN"
	CountryCodeMe CountryCode = "ME"
	CountryCodeMs CountryCode = "MS"
	CountryCodeMa CountryCode = "MA"
	CountryCodeMz CountryCode = "MZ"
	CountryCodeMm CountryCode = "MM"
	CountryCodeNa CountryCode = "NA"
	CountryCodeNr CountryCode = "NR"
	CountryCodeNp CountryCode = "NP"
	CountryCodeNl CountryCode = "NL"
	CountryCodeNc CountryCode = "NC"
	CountryCodeNz CountryCode = "NZ"
	CountryCodeNi CountryCode = "NI"
	CountryCodeNe CountryCode = "NE"
	CountryCodeNg CountryCode = "NG"
	CountryCodeNu CountryCode = "NU"
	CountryCodeNf CountryCode = "NF"
	CountryCodeMp CountryCode = "MP"
	CountryCodeNo CountryCode = "NO"
	CountryCodeOm CountryCode = "OM"
	CountryCodePk CountryCode = "PK"
	CountryCodePw CountryCode = "PW"
	CountryCodePs CountryCode = "PS"
	CountryCodePa CountryCode = "PA"
	CountryCodePg CountryCode = "PG"
	CountryCodePy CountryCode = "PY"
	CountryCodePe CountryCode = "PE"
	CountryCodePh CountryCode = "PH"
	CountryCodePn CountryCode = "PN"
	CountryCodePl CountryCode = "PL"
	CountryCodePt CountryCode = "PT"
	CountryCodePr CountryCode = "PR"
	CountryCodeQa CountryCode = "QA"
	CountryCodeRe CountryCode = "RE"
	CountryCodeRo CountryCode = "RO"
	CountryCodeRu CountryCode = "RU"
	CountryCodeRw CountryCode = "RW"
	CountryCodeBl CountryCode = "BL"
	CountryCodeSh CountryCode = "SH"
	CountryCodeKn CountryCode = "KN"
	CountryCodeLc CountryCode = "LC"
	CountryCodeMf CountryCode = "MF"
	CountryCodePm CountryCode = "PM"
	CountryCodeVc CountryCode = "VC"
	CountryCodeWs CountryCode = "WS"
	CountryCodeSm CountryCode = "SM"
	CountryCodeSt CountryCode = "ST"
	CountryCodeSa CountryCode = "SA"
	CountryCodeSn CountryCode = "SN"
	CountryCodeRs CountryCode = "RS"
	CountryCodeSc CountryCode = "SC"
	CountryCodeSl CountryCode = "SL"
	CountryCodeSg CountryCode = "SG"
	CountryCodeSx CountryCode = "SX"
	CountryCodeSk CountryCode = "SK"
	CountryCodeSi CountryCode = "SI"
	CountryCodeSb CountryCode = "SB"
	CountryCodeSo CountryCode = "SO"
	CountryCodeZa CountryCode = "ZA"
	CountryCodeGs CountryCode = "GS"
	CountryCodeSS CountryCode = "SS"
	CountryCodeEs CountryCode = "ES"
	CountryCodeLk CountryCode = "LK"
	CountryCodeSd CountryCode = "SD"
	CountryCodeSr CountryCode = "SR"
	CountryCodeSj CountryCode = "SJ"
	CountryCodeSz CountryCode = "SZ"
	CountryCodeSe CountryCode = "SE"
	CountryCodeCh CountryCode = "CH"
	CountryCodeSy CountryCode = "SY"
	CountryCodeTw CountryCode = "TW"
	CountryCodeTj CountryCode = "TJ"
	CountryCodeTz CountryCode = "TZ"
	CountryCodeTh CountryCode = "TH"
	CountryCodeTl CountryCode = "TL"
	CountryCodeTg CountryCode = "TG"
	CountryCodeTk CountryCode = "TK"
	CountryCodeTo CountryCode = "TO"
	CountryCodeTt CountryCode = "TT"
	CountryCodeTn CountryCode = "TN"
	CountryCodeTr CountryCode = "TR"
	CountryCodeTm CountryCode = "TM"
	CountryCodeTc CountryCode = "TC"
	CountryCodeTv CountryCode = "TV"
	CountryCodeUg CountryCode = "UG"
	CountryCodeUa CountryCode = "UA"
	CountryCodeAe CountryCode = "AE"
	CountryCodeGB CountryCode = "GB"
	CountryCodeUm CountryCode = "UM"
	CountryCodeUs CountryCode = "US"
	CountryCodeUy CountryCode = "UY"
	CountryCodeUz CountryCode = "UZ"
	CountryCodeVu CountryCode = "VU"
	CountryCodeVe CountryCode = "VE"
	CountryCodeVn CountryCode = "VN"
	CountryCodeVg CountryCode = "VG"
	CountryCodeVi CountryCode = "VI"
	CountryCodeWf CountryCode = "WF"
	CountryCodeEh CountryCode = "EH"
	CountryCodeYe CountryCode = "YE"
	CountryCodeZm CountryCode = "ZM"
	CountryCodeZw CountryCode = "ZW"
)

func (CountryCode) IsKnown

func (r CountryCode) IsKnown() bool

type Customer

type Customer struct {
	BusinessID  string       `json:"business_id,required"`
	CreatedAt   time.Time    `json:"created_at,required" format:"date-time"`
	CustomerID  string       `json:"customer_id,required"`
	Email       string       `json:"email,required"`
	Name        string       `json:"name,required"`
	PhoneNumber string       `json:"phone_number,nullable"`
	JSON        customerJSON `json:"-"`
}

func (*Customer) UnmarshalJSON

func (r *Customer) UnmarshalJSON(data []byte) (err error)

type CustomerListParams

type CustomerListParams struct {
	// Page number default is 0
	PageNumber param.Field[int64] `query:"page_number"`
	// Page size default is 10 max is 100
	PageSize param.Field[int64] `query:"page_size"`
}

func (CustomerListParams) URLQuery

func (r CustomerListParams) URLQuery() (v url.Values)

URLQuery serializes CustomerListParams's query parameters as `url.Values`.

type CustomerNewParams added in v0.12.0

type CustomerNewParams struct {
	Email       param.Field[string] `json:"email,required"`
	Name        param.Field[string] `json:"name,required"`
	PhoneNumber param.Field[string] `json:"phone_number"`
}

func (CustomerNewParams) MarshalJSON added in v0.12.0

func (r CustomerNewParams) MarshalJSON() (data []byte, err error)

type CustomerService

type CustomerService struct {
	Options []option.RequestOption
}

CustomerService contains methods and other services that help with interacting with the Dodo Payments API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCustomerService method instead.

func NewCustomerService

func NewCustomerService(opts ...option.RequestOption) (r *CustomerService)

NewCustomerService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CustomerService) Get

func (r *CustomerService) Get(ctx context.Context, customerID string, opts ...option.RequestOption) (res *Customer, err error)

func (*CustomerService) List

func (*CustomerService) New added in v0.12.0

func (r *CustomerService) New(ctx context.Context, body CustomerNewParams, opts ...option.RequestOption) (res *Customer, err error)

func (*CustomerService) Update added in v0.12.0

func (r *CustomerService) Update(ctx context.Context, customerID string, body CustomerUpdateParams, opts ...option.RequestOption) (res *Customer, err error)

type CustomerUpdateParams added in v0.12.0

type CustomerUpdateParams struct {
	Name        param.Field[string] `json:"name"`
	PhoneNumber param.Field[string] `json:"phone_number"`
}

func (CustomerUpdateParams) MarshalJSON added in v0.12.0

func (r CustomerUpdateParams) MarshalJSON() (data []byte, err error)

type Dispute

type Dispute struct {
	// The amount involved in the dispute, represented as a string to accommodate
	// precision.
	Amount string `json:"amount,required"`
	// The unique identifier of the business involved in the dispute.
	BusinessID string `json:"business_id,required"`
	// The timestamp of when the dispute was created, in UTC.
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// The currency of the disputed amount, represented as an ISO 4217 currency code.
	Currency string `json:"currency,required"`
	// The unique identifier of the dispute.
	DisputeID     string               `json:"dispute_id,required"`
	DisputeStage  DisputeDisputeStage  `json:"dispute_stage,required"`
	DisputeStatus DisputeDisputeStatus `json:"dispute_status,required"`
	// The unique identifier of the payment associated with the dispute.
	PaymentID string      `json:"payment_id,required"`
	JSON      disputeJSON `json:"-"`
}

func (*Dispute) UnmarshalJSON

func (r *Dispute) UnmarshalJSON(data []byte) (err error)

type DisputeDisputeStage

type DisputeDisputeStage string
const (
	DisputeDisputeStagePreDispute     DisputeDisputeStage = "pre_dispute"
	DisputeDisputeStageDispute        DisputeDisputeStage = "dispute"
	DisputeDisputeStagePreArbitration DisputeDisputeStage = "pre_arbitration"
)

func (DisputeDisputeStage) IsKnown

func (r DisputeDisputeStage) IsKnown() bool

type DisputeDisputeStatus

type DisputeDisputeStatus string
const (
	DisputeDisputeStatusDisputeOpened     DisputeDisputeStatus = "dispute_opened"
	DisputeDisputeStatusDisputeExpired    DisputeDisputeStatus = "dispute_expired"
	DisputeDisputeStatusDisputeAccepted   DisputeDisputeStatus = "dispute_accepted"
	DisputeDisputeStatusDisputeCancelled  DisputeDisputeStatus = "dispute_cancelled"
	DisputeDisputeStatusDisputeChallenged DisputeDisputeStatus = "dispute_challenged"
	DisputeDisputeStatusDisputeWon        DisputeDisputeStatus = "dispute_won"
	DisputeDisputeStatusDisputeLost       DisputeDisputeStatus = "dispute_lost"
)

func (DisputeDisputeStatus) IsKnown

func (r DisputeDisputeStatus) IsKnown() bool

type DisputeListParams

type DisputeListParams struct {
	// Get events after this created time
	CreatedAtGte param.Field[time.Time] `query:"created_at_gte" format:"date-time"`
	// Get events created before this time
	CreatedAtLte param.Field[time.Time] `query:"created_at_lte" format:"date-time"`
	// Filter by dispute stage
	DisputeStage param.Field[DisputeListParamsDisputeStage] `query:"dispute_stage"`
	// Filter by dispute status
	DisputeStatus param.Field[DisputeListParamsDisputeStatus] `query:"dispute_status"`
	// Page number default is 0
	PageNumber param.Field[int64] `query:"page_number"`
	// Page size default is 10 max is 100
	PageSize param.Field[int64] `query:"page_size"`
}

func (DisputeListParams) URLQuery

func (r DisputeListParams) URLQuery() (v url.Values)

URLQuery serializes DisputeListParams's query parameters as `url.Values`.

type DisputeListParamsDisputeStage added in v0.17.0

type DisputeListParamsDisputeStage string

Filter by dispute stage

const (
	DisputeListParamsDisputeStagePreDispute     DisputeListParamsDisputeStage = "pre_dispute"
	DisputeListParamsDisputeStageDispute        DisputeListParamsDisputeStage = "dispute"
	DisputeListParamsDisputeStagePreArbitration DisputeListParamsDisputeStage = "pre_arbitration"
)

func (DisputeListParamsDisputeStage) IsKnown added in v0.17.0

func (r DisputeListParamsDisputeStage) IsKnown() bool

type DisputeListParamsDisputeStatus added in v0.17.0

type DisputeListParamsDisputeStatus string

Filter by dispute status

const (
	DisputeListParamsDisputeStatusDisputeOpened     DisputeListParamsDisputeStatus = "dispute_opened"
	DisputeListParamsDisputeStatusDisputeExpired    DisputeListParamsDisputeStatus = "dispute_expired"
	DisputeListParamsDisputeStatusDisputeAccepted   DisputeListParamsDisputeStatus = "dispute_accepted"
	DisputeListParamsDisputeStatusDisputeCancelled  DisputeListParamsDisputeStatus = "dispute_cancelled"
	DisputeListParamsDisputeStatusDisputeChallenged DisputeListParamsDisputeStatus = "dispute_challenged"
	DisputeListParamsDisputeStatusDisputeWon        DisputeListParamsDisputeStatus = "dispute_won"
	DisputeListParamsDisputeStatusDisputeLost       DisputeListParamsDisputeStatus = "dispute_lost"
)

func (DisputeListParamsDisputeStatus) IsKnown added in v0.17.0

type DisputeService

type DisputeService struct {
	Options []option.RequestOption
}

DisputeService contains methods and other services that help with interacting with the Dodo Payments API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDisputeService method instead.

func NewDisputeService

func NewDisputeService(opts ...option.RequestOption) (r *DisputeService)

NewDisputeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*DisputeService) Get

func (r *DisputeService) Get(ctx context.Context, disputeID string, opts ...option.RequestOption) (res *Dispute, err error)

func (*DisputeService) List

type Error

type Error = apierror.Error

type InvoicePaymentService added in v0.15.1

type InvoicePaymentService struct {
	Options []option.RequestOption
}

InvoicePaymentService contains methods and other services that help with interacting with the Dodo Payments API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInvoicePaymentService method instead.

func NewInvoicePaymentService added in v0.15.1

func NewInvoicePaymentService(opts ...option.RequestOption) (r *InvoicePaymentService)

NewInvoicePaymentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*InvoicePaymentService) Get added in v0.15.1

func (r *InvoicePaymentService) Get(ctx context.Context, paymentID string, opts ...option.RequestOption) (err error)

type InvoiceService added in v0.15.1

type InvoiceService struct {
	Options  []option.RequestOption
	Payments *InvoicePaymentService
}

InvoiceService contains methods and other services that help with interacting with the Dodo Payments API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInvoiceService method instead.

func NewInvoiceService added in v0.15.1

func NewInvoiceService(opts ...option.RequestOption) (r *InvoiceService)

NewInvoiceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type LicenseActivateParams added in v0.14.0

type LicenseActivateParams struct {
	LicenseKey param.Field[string] `json:"license_key,required"`
	Name       param.Field[string] `json:"name,required"`
}

func (LicenseActivateParams) MarshalJSON added in v0.14.0

func (r LicenseActivateParams) MarshalJSON() (data []byte, err error)

type LicenseDeactivateParams added in v0.14.0

type LicenseDeactivateParams struct {
	LicenseKey           param.Field[string] `json:"license_key,required"`
	LicenseKeyInstanceID param.Field[string] `json:"license_key_instance_id,required"`
}

func (LicenseDeactivateParams) MarshalJSON added in v0.14.0

func (r LicenseDeactivateParams) MarshalJSON() (data []byte, err error)

type LicenseKey added in v0.14.0

type LicenseKey struct {
	// The unique identifier of the license key.
	ID string `json:"id,required"`
	// The unique identifier of the business associated with the license key.
	BusinessID string `json:"business_id,required"`
	// The timestamp indicating when the license key was created, in UTC.
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// The unique identifier of the customer associated with the license key.
	CustomerID string `json:"customer_id,required"`
	// The current number of instances activated for this license key.
	InstancesCount int64 `json:"instances_count,required"`
	// The license key string.
	Key string `json:"key,required"`
	// The unique identifier of the payment associated with the license key.
	PaymentID string `json:"payment_id,required"`
	// The unique identifier of the product associated with the license key.
	ProductID string           `json:"product_id,required"`
	Status    LicenseKeyStatus `json:"status,required"`
	// The maximum number of activations allowed for this license key.
	ActivationsLimit int64 `json:"activations_limit,nullable"`
	// The timestamp indicating when the license key expires, in UTC.
	ExpiresAt time.Time `json:"expires_at,nullable" format:"date-time"`
	// The unique identifier of the subscription associated with the license key, if
	// any.
	SubscriptionID string         `json:"subscription_id,nullable"`
	JSON           licenseKeyJSON `json:"-"`
}

func (*LicenseKey) UnmarshalJSON added in v0.14.0

func (r *LicenseKey) UnmarshalJSON(data []byte) (err error)

type LicenseKeyInstance added in v0.14.0

type LicenseKeyInstance struct {
	ID           string                 `json:"id,required"`
	BusinessID   string                 `json:"business_id,required"`
	CreatedAt    time.Time              `json:"created_at,required" format:"date-time"`
	LicenseKeyID string                 `json:"license_key_id,required"`
	Name         string                 `json:"name,required"`
	JSON         licenseKeyInstanceJSON `json:"-"`
}

func (*LicenseKeyInstance) UnmarshalJSON added in v0.14.0

func (r *LicenseKeyInstance) UnmarshalJSON(data []byte) (err error)

type LicenseKeyInstanceListParams added in v0.14.0

type LicenseKeyInstanceListParams struct {
	// Filter by license key ID
	LicenseKeyID param.Field[string] `query:"license_key_id"`
	// Page number default is 0
	PageNumber param.Field[int64] `query:"page_number"`
	// Page size default is 10 max is 100
	PageSize param.Field[int64] `query:"page_size"`
}

func (LicenseKeyInstanceListParams) URLQuery added in v0.14.0

func (r LicenseKeyInstanceListParams) URLQuery() (v url.Values)

URLQuery serializes LicenseKeyInstanceListParams's query parameters as `url.Values`.

type LicenseKeyInstanceListResponse added in v0.14.0

type LicenseKeyInstanceListResponse struct {
	Items []LicenseKeyInstance               `json:"items,required"`
	JSON  licenseKeyInstanceListResponseJSON `json:"-"`
}

func (*LicenseKeyInstanceListResponse) UnmarshalJSON added in v0.14.0

func (r *LicenseKeyInstanceListResponse) UnmarshalJSON(data []byte) (err error)

type LicenseKeyInstanceService added in v0.14.0

type LicenseKeyInstanceService struct {
	Options []option.RequestOption
}

LicenseKeyInstanceService contains methods and other services that help with interacting with the Dodo Payments API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLicenseKeyInstanceService method instead.

func NewLicenseKeyInstanceService added in v0.14.0

func NewLicenseKeyInstanceService(opts ...option.RequestOption) (r *LicenseKeyInstanceService)

NewLicenseKeyInstanceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*LicenseKeyInstanceService) Get added in v0.14.0

func (*LicenseKeyInstanceService) List added in v0.14.0

func (*LicenseKeyInstanceService) Update added in v0.14.0

type LicenseKeyInstanceUpdateParams added in v0.14.0

type LicenseKeyInstanceUpdateParams struct {
	Name param.Field[string] `json:"name,required"`
}

func (LicenseKeyInstanceUpdateParams) MarshalJSON added in v0.14.0

func (r LicenseKeyInstanceUpdateParams) MarshalJSON() (data []byte, err error)

type LicenseKeyListParams added in v0.14.0

type LicenseKeyListParams struct {
	// Filter by customer ID
	CustomerID param.Field[string] `query:"customer_id"`
	// Page number default is 0
	PageNumber param.Field[int64] `query:"page_number"`
	// Page size default is 10 max is 100
	PageSize param.Field[int64] `query:"page_size"`
	// Filter by product ID
	ProductID param.Field[string] `query:"product_id"`
	// Filter by license key status
	Status param.Field[LicenseKeyListParamsStatus] `query:"status"`
}

func (LicenseKeyListParams) URLQuery added in v0.14.0

func (r LicenseKeyListParams) URLQuery() (v url.Values)

URLQuery serializes LicenseKeyListParams's query parameters as `url.Values`.

type LicenseKeyListParamsStatus added in v0.14.0

type LicenseKeyListParamsStatus string

Filter by license key status

const (
	LicenseKeyListParamsStatusActive   LicenseKeyListParamsStatus = "active"
	LicenseKeyListParamsStatusExpired  LicenseKeyListParamsStatus = "expired"
	LicenseKeyListParamsStatusDisabled LicenseKeyListParamsStatus = "disabled"
)

func (LicenseKeyListParamsStatus) IsKnown added in v0.14.0

func (r LicenseKeyListParamsStatus) IsKnown() bool

type LicenseKeyListResponse added in v0.14.0

type LicenseKeyListResponse struct {
	Items []LicenseKey               `json:"items,required"`
	JSON  licenseKeyListResponseJSON `json:"-"`
}

func (*LicenseKeyListResponse) UnmarshalJSON added in v0.14.0

func (r *LicenseKeyListResponse) UnmarshalJSON(data []byte) (err error)

type LicenseKeyService added in v0.14.0

type LicenseKeyService struct {
	Options []option.RequestOption
}

LicenseKeyService contains methods and other services that help with interacting with the Dodo Payments API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLicenseKeyService method instead.

func NewLicenseKeyService added in v0.14.0

func NewLicenseKeyService(opts ...option.RequestOption) (r *LicenseKeyService)

NewLicenseKeyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*LicenseKeyService) Get added in v0.14.0

func (r *LicenseKeyService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *LicenseKey, err error)

func (*LicenseKeyService) List added in v0.14.0

func (*LicenseKeyService) Update added in v0.14.0

func (r *LicenseKeyService) Update(ctx context.Context, id string, body LicenseKeyUpdateParams, opts ...option.RequestOption) (res *LicenseKey, err error)

type LicenseKeyStatus added in v0.14.0

type LicenseKeyStatus string
const (
	LicenseKeyStatusActive   LicenseKeyStatus = "active"
	LicenseKeyStatusExpired  LicenseKeyStatus = "expired"
	LicenseKeyStatusDisabled LicenseKeyStatus = "disabled"
)

func (LicenseKeyStatus) IsKnown added in v0.14.0

func (r LicenseKeyStatus) IsKnown() bool

type LicenseKeyUpdateParams added in v0.14.0

type LicenseKeyUpdateParams struct {
	// The updated activation limit for the license key. Use `null` to remove the
	// limit, or omit this field to leave it unchanged.
	ActivationsLimit param.Field[int64] `json:"activations_limit"`
	// Indicates whether the license key should be disabled. A value of `true` disables
	// the key, while `false` enables it. Omit this field to leave it unchanged.
	Disabled param.Field[bool] `json:"disabled"`
	// The updated expiration timestamp for the license key in UTC. Use `null` to
	// remove the expiration date, or omit this field to leave it unchanged.
	ExpiresAt param.Field[time.Time] `json:"expires_at" format:"date-time"`
}

func (LicenseKeyUpdateParams) MarshalJSON added in v0.14.0

func (r LicenseKeyUpdateParams) MarshalJSON() (data []byte, err error)

type LicenseService added in v0.14.0

type LicenseService struct {
	Options []option.RequestOption
}

LicenseService contains methods and other services that help with interacting with the Dodo Payments API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLicenseService method instead.

func NewLicenseService added in v0.14.0

func NewLicenseService(opts ...option.RequestOption) (r *LicenseService)

NewLicenseService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*LicenseService) Activate added in v0.14.0

func (*LicenseService) Deactivate added in v0.14.0

func (r *LicenseService) Deactivate(ctx context.Context, body LicenseDeactivateParams, opts ...option.RequestOption) (err error)

func (*LicenseService) Validate added in v0.14.0

type LicenseValidateParams added in v0.14.0

type LicenseValidateParams struct {
	LicenseKey           param.Field[string] `json:"license_key,required"`
	LicenseKeyInstanceID param.Field[string] `json:"license_key_instance_id"`
}

func (LicenseValidateParams) MarshalJSON added in v0.14.0

func (r LicenseValidateParams) MarshalJSON() (data []byte, err error)

type LicenseValidateResponse added in v0.14.0

type LicenseValidateResponse struct {
	Valid bool                        `json:"valid,required"`
	JSON  licenseValidateResponseJSON `json:"-"`
}

func (*LicenseValidateResponse) UnmarshalJSON added in v0.14.0

func (r *LicenseValidateResponse) UnmarshalJSON(data []byte) (err error)

type MiscService

type MiscService struct {
	Options            []option.RequestOption
	SupportedCountries *MiscSupportedCountryService
}

MiscService contains methods and other services that help with interacting with the Dodo Payments API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMiscService method instead.

func NewMiscService

func NewMiscService(opts ...option.RequestOption) (r *MiscService)

NewMiscService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type MiscSupportedCountryService

type MiscSupportedCountryService struct {
	Options []option.RequestOption
}

MiscSupportedCountryService contains methods and other services that help with interacting with the Dodo Payments API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMiscSupportedCountryService method instead.

func NewMiscSupportedCountryService

func NewMiscSupportedCountryService(opts ...option.RequestOption) (r *MiscSupportedCountryService)

NewMiscSupportedCountryService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*MiscSupportedCountryService) List

func (r *MiscSupportedCountryService) List(ctx context.Context, opts ...option.RequestOption) (res *[]CountryCode, err error)

type Payment

type Payment struct {
	// Identifier of the business associated with the payment
	BusinessID string `json:"business_id,required"`
	// Timestamp when the payment was created
	CreatedAt time.Time       `json:"created_at,required" format:"date-time"`
	Currency  PaymentCurrency `json:"currency,required"`
	Customer  PaymentCustomer `json:"customer,required"`
	// List of disputes associated with this payment
	Disputes []Dispute         `json:"disputes,required"`
	Metadata map[string]string `json:"metadata,required"`
	// Unique identifier for the payment
	PaymentID string `json:"payment_id,required"`
	// List of refunds issued for this payment
	Refunds []Refund `json:"refunds,required"`
	// Total amount charged to the customer including tax, in smallest currency unit
	// (e.g. cents)
	TotalAmount int64 `json:"total_amount,required"`
	// Checkout URL
	PaymentLink string `json:"payment_link,nullable"`
	// Payment method used by customer (e.g. "card", "bank_transfer")
	PaymentMethod string `json:"payment_method,nullable"`
	// Specific type of payment method (e.g. "visa", "mastercard")
	PaymentMethodType string `json:"payment_method_type,nullable"`
	// List of products purchased in a one-time payment
	ProductCart []PaymentProductCart `json:"product_cart,nullable"`
	Status      PaymentStatus        `json:"status,nullable"`
	// Identifier of the subscription if payment is part of a subscription
	SubscriptionID string `json:"subscription_id,nullable"`
	// Amount of tax collected in smallest currency unit (e.g. cents)
	Tax int64 `json:"tax,nullable"`
	// Timestamp when the payment was last updated
	UpdatedAt time.Time   `json:"updated_at,nullable" format:"date-time"`
	JSON      paymentJSON `json:"-"`
}

func (*Payment) UnmarshalJSON

func (r *Payment) UnmarshalJSON(data []byte) (err error)

type PaymentCurrency

type PaymentCurrency string
const (
	PaymentCurrencyAed PaymentCurrency = "AED"
	PaymentCurrencyAll PaymentCurrency = "ALL"
	PaymentCurrencyAmd PaymentCurrency = "AMD"
	PaymentCurrencyAng PaymentCurrency = "ANG"
	PaymentCurrencyAoa PaymentCurrency = "AOA"
	PaymentCurrencyArs PaymentCurrency = "ARS"
	PaymentCurrencyAud PaymentCurrency = "AUD"
	PaymentCurrencyAwg PaymentCurrency = "AWG"
	PaymentCurrencyAzn PaymentCurrency = "AZN"
	PaymentCurrencyBam PaymentCurrency = "BAM"
	PaymentCurrencyBbd PaymentCurrency = "BBD"
	PaymentCurrencyBdt PaymentCurrency = "BDT"
	PaymentCurrencyBgn PaymentCurrency = "BGN"
	PaymentCurrencyBhd PaymentCurrency = "BHD"
	PaymentCurrencyBif PaymentCurrency = "BIF"
	PaymentCurrencyBmd PaymentCurrency = "BMD"
	PaymentCurrencyBnd PaymentCurrency = "BND"
	PaymentCurrencyBob PaymentCurrency = "BOB"
	PaymentCurrencyBrl PaymentCurrency = "BRL"
	PaymentCurrencyBsd PaymentCurrency = "BSD"
	PaymentCurrencyBwp PaymentCurrency = "BWP"
	PaymentCurrencyByn PaymentCurrency = "BYN"
	PaymentCurrencyBzd PaymentCurrency = "BZD"
	PaymentCurrencyCad PaymentCurrency = "CAD"
	PaymentCurrencyChf PaymentCurrency = "CHF"
	PaymentCurrencyClp PaymentCurrency = "CLP"
	PaymentCurrencyCny PaymentCurrency = "CNY"
	PaymentCurrencyCop PaymentCurrency = "COP"
	PaymentCurrencyCrc PaymentCurrency = "CRC"
	PaymentCurrencyCup PaymentCurrency = "CUP"
	PaymentCurrencyCve PaymentCurrency = "CVE"
	PaymentCurrencyCzk PaymentCurrency = "CZK"
	PaymentCurrencyDjf PaymentCurrency = "DJF"
	PaymentCurrencyDkk PaymentCurrency = "DKK"
	PaymentCurrencyDop PaymentCurrency = "DOP"
	PaymentCurrencyDzd PaymentCurrency = "DZD"
	PaymentCurrencyEgp PaymentCurrency = "EGP"
	PaymentCurrencyEtb PaymentCurrency = "ETB"
	PaymentCurrencyEur PaymentCurrency = "EUR"
	PaymentCurrencyFjd PaymentCurrency = "FJD"
	PaymentCurrencyFkp PaymentCurrency = "FKP"
	PaymentCurrencyGbp PaymentCurrency = "GBP"
	PaymentCurrencyGel PaymentCurrency = "GEL"
	PaymentCurrencyGhs PaymentCurrency = "GHS"
	PaymentCurrencyGip PaymentCurrency = "GIP"
	PaymentCurrencyGmd PaymentCurrency = "GMD"
	PaymentCurrencyGnf PaymentCurrency = "GNF"
	PaymentCurrencyGtq PaymentCurrency = "GTQ"
	PaymentCurrencyGyd PaymentCurrency = "GYD"
	PaymentCurrencyHkd PaymentCurrency = "HKD"
	PaymentCurrencyHnl PaymentCurrency = "HNL"
	PaymentCurrencyHrk PaymentCurrency = "HRK"
	PaymentCurrencyHtg PaymentCurrency = "HTG"
	PaymentCurrencyHuf PaymentCurrency = "HUF"
	PaymentCurrencyIdr PaymentCurrency = "IDR"
	PaymentCurrencyIls PaymentCurrency = "ILS"
	PaymentCurrencyInr PaymentCurrency = "INR"
	PaymentCurrencyIqd PaymentCurrency = "IQD"
	PaymentCurrencyJmd PaymentCurrency = "JMD"
	PaymentCurrencyJod PaymentCurrency = "JOD"
	PaymentCurrencyJpy PaymentCurrency = "JPY"
	PaymentCurrencyKes PaymentCurrency = "KES"
	PaymentCurrencyKgs PaymentCurrency = "KGS"
	PaymentCurrencyKhr PaymentCurrency = "KHR"
	PaymentCurrencyKmf PaymentCurrency = "KMF"
	PaymentCurrencyKrw PaymentCurrency = "KRW"
	PaymentCurrencyKwd PaymentCurrency = "KWD"
	PaymentCurrencyKyd PaymentCurrency = "KYD"
	PaymentCurrencyKzt PaymentCurrency = "KZT"
	PaymentCurrencyLak PaymentCurrency = "LAK"
	PaymentCurrencyLbp PaymentCurrency = "LBP"
	PaymentCurrencyLkr PaymentCurrency = "LKR"
	PaymentCurrencyLrd PaymentCurrency = "LRD"
	PaymentCurrencyLsl PaymentCurrency = "LSL"
	PaymentCurrencyLyd PaymentCurrency = "LYD"
	PaymentCurrencyMad PaymentCurrency = "MAD"
	PaymentCurrencyMdl PaymentCurrency = "MDL"
	PaymentCurrencyMga PaymentCurrency = "MGA"
	PaymentCurrencyMkd PaymentCurrency = "MKD"
	PaymentCurrencyMmk PaymentCurrency = "MMK"
	PaymentCurrencyMnt PaymentCurrency = "MNT"
	PaymentCurrencyMop PaymentCurrency = "MOP"
	PaymentCurrencyMru PaymentCurrency = "MRU"
	PaymentCurrencyMur PaymentCurrency = "MUR"
	PaymentCurrencyMvr PaymentCurrency = "MVR"
	PaymentCurrencyMwk PaymentCurrency = "MWK"
	PaymentCurrencyMxn PaymentCurrency = "MXN"
	PaymentCurrencyMyr PaymentCurrency = "MYR"
	PaymentCurrencyMzn PaymentCurrency = "MZN"
	PaymentCurrencyNad PaymentCurrency = "NAD"
	PaymentCurrencyNgn PaymentCurrency = "NGN"
	PaymentCurrencyNio PaymentCurrency = "NIO"
	PaymentCurrencyNok PaymentCurrency = "NOK"
	PaymentCurrencyNpr PaymentCurrency = "NPR"
	PaymentCurrencyNzd PaymentCurrency = "NZD"
	PaymentCurrencyOmr PaymentCurrency = "OMR"
	PaymentCurrencyPab PaymentCurrency = "PAB"
	PaymentCurrencyPen PaymentCurrency = "PEN"
	PaymentCurrencyPgk PaymentCurrency = "PGK"
	PaymentCurrencyPhp PaymentCurrency = "PHP"
	PaymentCurrencyPkr PaymentCurrency = "PKR"
	PaymentCurrencyPln PaymentCurrency = "PLN"
	PaymentCurrencyPyg PaymentCurrency = "PYG"
	PaymentCurrencyQar PaymentCurrency = "QAR"
	PaymentCurrencyRon PaymentCurrency = "RON"
	PaymentCurrencyRsd PaymentCurrency = "RSD"
	PaymentCurrencyRub PaymentCurrency = "RUB"
	PaymentCurrencyRwf PaymentCurrency = "RWF"
	PaymentCurrencySar PaymentCurrency = "SAR"
	PaymentCurrencySbd PaymentCurrency = "SBD"
	PaymentCurrencyScr PaymentCurrency = "SCR"
	PaymentCurrencySek PaymentCurrency = "SEK"
	PaymentCurrencySgd PaymentCurrency = "SGD"
	PaymentCurrencyShp PaymentCurrency = "SHP"
	PaymentCurrencySle PaymentCurrency = "SLE"
	PaymentCurrencySll PaymentCurrency = "SLL"
	PaymentCurrencySos PaymentCurrency = "SOS"
	PaymentCurrencySrd PaymentCurrency = "SRD"
	PaymentCurrencySsp PaymentCurrency = "SSP"
	PaymentCurrencyStn PaymentCurrency = "STN"
	PaymentCurrencySvc PaymentCurrency = "SVC"
	PaymentCurrencySzl PaymentCurrency = "SZL"
	PaymentCurrencyThb PaymentCurrency = "THB"
	PaymentCurrencyTnd PaymentCurrency = "TND"
	PaymentCurrencyTop PaymentCurrency = "TOP"
	PaymentCurrencyTry PaymentCurrency = "TRY"
	PaymentCurrencyTtd PaymentCurrency = "TTD"
	PaymentCurrencyTwd PaymentCurrency = "TWD"
	PaymentCurrencyTzs PaymentCurrency = "TZS"
	PaymentCurrencyUah PaymentCurrency = "UAH"
	PaymentCurrencyUgx PaymentCurrency = "UGX"
	PaymentCurrencyUsd PaymentCurrency = "USD"
	PaymentCurrencyUyu PaymentCurrency = "UYU"
	PaymentCurrencyUzs PaymentCurrency = "UZS"
	PaymentCurrencyVes PaymentCurrency = "VES"
	PaymentCurrencyVnd PaymentCurrency = "VND"
	PaymentCurrencyVuv PaymentCurrency = "VUV"
	PaymentCurrencyWst PaymentCurrency = "WST"
	PaymentCurrencyXaf PaymentCurrency = "XAF"
	PaymentCurrencyXcd PaymentCurrency = "XCD"
	PaymentCurrencyXof PaymentCurrency = "XOF"
	PaymentCurrencyXpf PaymentCurrency = "XPF"
	PaymentCurrencyYer PaymentCurrency = "YER"
	PaymentCurrencyZar PaymentCurrency = "ZAR"
	PaymentCurrencyZmw PaymentCurrency = "ZMW"
)

func (PaymentCurrency) IsKnown

func (r PaymentCurrency) IsKnown() bool

type PaymentCustomer

type PaymentCustomer struct {
	// Unique identifier for the customer
	CustomerID string `json:"customer_id,required"`
	// Email address of the customer
	Email string `json:"email,required"`
	// Full name of the customer
	Name string              `json:"name,required"`
	JSON paymentCustomerJSON `json:"-"`
}

func (*PaymentCustomer) UnmarshalJSON

func (r *PaymentCustomer) UnmarshalJSON(data []byte) (err error)

type PaymentListParams

type PaymentListParams struct {
	// Get events after this created time
	CreatedAtGte param.Field[time.Time] `query:"created_at_gte" format:"date-time"`
	// Get events created before this time
	CreatedAtLte param.Field[time.Time] `query:"created_at_lte" format:"date-time"`
	// Filter by customer id
	CustomerID param.Field[string] `query:"customer_id"`
	// Page number default is 0
	PageNumber param.Field[int64] `query:"page_number"`
	// Page size default is 10 max is 100
	PageSize param.Field[int64] `query:"page_size"`
	// Filter by status
	Status param.Field[PaymentListParamsStatus] `query:"status"`
}

func (PaymentListParams) URLQuery

func (r PaymentListParams) URLQuery() (v url.Values)

URLQuery serializes PaymentListParams's query parameters as `url.Values`.

type PaymentListParamsStatus added in v0.17.0

type PaymentListParamsStatus string

Filter by status

const (
	PaymentListParamsStatusSucceeded                      PaymentListParamsStatus = "succeeded"
	PaymentListParamsStatusFailed                         PaymentListParamsStatus = "failed"
	PaymentListParamsStatusCancelled                      PaymentListParamsStatus = "cancelled"
	PaymentListParamsStatusProcessing                     PaymentListParamsStatus = "processing"
	PaymentListParamsStatusRequiresCustomerAction         PaymentListParamsStatus = "requires_customer_action"
	PaymentListParamsStatusRequiresMerchantAction         PaymentListParamsStatus = "requires_merchant_action"
	PaymentListParamsStatusRequiresPaymentMethod          PaymentListParamsStatus = "requires_payment_method"
	PaymentListParamsStatusRequiresConfirmation           PaymentListParamsStatus = "requires_confirmation"
	PaymentListParamsStatusRequiresCapture                PaymentListParamsStatus = "requires_capture"
	PaymentListParamsStatusPartiallyCaptured              PaymentListParamsStatus = "partially_captured"
	PaymentListParamsStatusPartiallyCapturedAndCapturable PaymentListParamsStatus = "partially_captured_and_capturable"
)

func (PaymentListParamsStatus) IsKnown added in v0.17.0

func (r PaymentListParamsStatus) IsKnown() bool

type PaymentListResponse

type PaymentListResponse struct {
	CreatedAt         time.Time                   `json:"created_at,required" format:"date-time"`
	Currency          PaymentListResponseCurrency `json:"currency,required"`
	Customer          PaymentListResponseCustomer `json:"customer,required"`
	Metadata          map[string]string           `json:"metadata,required"`
	PaymentID         string                      `json:"payment_id,required"`
	TotalAmount       int64                       `json:"total_amount,required"`
	PaymentMethod     string                      `json:"payment_method,nullable"`
	PaymentMethodType string                      `json:"payment_method_type,nullable"`
	Status            PaymentListResponseStatus   `json:"status,nullable"`
	SubscriptionID    string                      `json:"subscription_id,nullable"`
	JSON              paymentListResponseJSON     `json:"-"`
}

func (*PaymentListResponse) UnmarshalJSON

func (r *PaymentListResponse) UnmarshalJSON(data []byte) (err error)

type PaymentListResponseCurrency

type PaymentListResponseCurrency string
const (
	PaymentListResponseCurrencyAed PaymentListResponseCurrency = "AED"
	PaymentListResponseCurrencyAll PaymentListResponseCurrency = "ALL"
	PaymentListResponseCurrencyAmd PaymentListResponseCurrency = "AMD"
	PaymentListResponseCurrencyAng PaymentListResponseCurrency = "ANG"
	PaymentListResponseCurrencyAoa PaymentListResponseCurrency = "AOA"
	PaymentListResponseCurrencyArs PaymentListResponseCurrency = "ARS"
	PaymentListResponseCurrencyAud PaymentListResponseCurrency = "AUD"
	PaymentListResponseCurrencyAwg PaymentListResponseCurrency = "AWG"
	PaymentListResponseCurrencyAzn PaymentListResponseCurrency = "AZN"
	PaymentListResponseCurrencyBam PaymentListResponseCurrency = "BAM"
	PaymentListResponseCurrencyBbd PaymentListResponseCurrency = "BBD"
	PaymentListResponseCurrencyBdt PaymentListResponseCurrency = "BDT"
	PaymentListResponseCurrencyBgn PaymentListResponseCurrency = "BGN"
	PaymentListResponseCurrencyBhd PaymentListResponseCurrency = "BHD"
	PaymentListResponseCurrencyBif PaymentListResponseCurrency = "BIF"
	PaymentListResponseCurrencyBmd PaymentListResponseCurrency = "BMD"
	PaymentListResponseCurrencyBnd PaymentListResponseCurrency = "BND"
	PaymentListResponseCurrencyBob PaymentListResponseCurrency = "BOB"
	PaymentListResponseCurrencyBrl PaymentListResponseCurrency = "BRL"
	PaymentListResponseCurrencyBsd PaymentListResponseCurrency = "BSD"
	PaymentListResponseCurrencyBwp PaymentListResponseCurrency = "BWP"
	PaymentListResponseCurrencyByn PaymentListResponseCurrency = "BYN"
	PaymentListResponseCurrencyBzd PaymentListResponseCurrency = "BZD"
	PaymentListResponseCurrencyCad PaymentListResponseCurrency = "CAD"
	PaymentListResponseCurrencyChf PaymentListResponseCurrency = "CHF"
	PaymentListResponseCurrencyClp PaymentListResponseCurrency = "CLP"
	PaymentListResponseCurrencyCny PaymentListResponseCurrency = "CNY"
	PaymentListResponseCurrencyCop PaymentListResponseCurrency = "COP"
	PaymentListResponseCurrencyCrc PaymentListResponseCurrency = "CRC"
	PaymentListResponseCurrencyCup PaymentListResponseCurrency = "CUP"
	PaymentListResponseCurrencyCve PaymentListResponseCurrency = "CVE"
	PaymentListResponseCurrencyCzk PaymentListResponseCurrency = "CZK"
	PaymentListResponseCurrencyDjf PaymentListResponseCurrency = "DJF"
	PaymentListResponseCurrencyDkk PaymentListResponseCurrency = "DKK"
	PaymentListResponseCurrencyDop PaymentListResponseCurrency = "DOP"
	PaymentListResponseCurrencyDzd PaymentListResponseCurrency = "DZD"
	PaymentListResponseCurrencyEgp PaymentListResponseCurrency = "EGP"
	PaymentListResponseCurrencyEtb PaymentListResponseCurrency = "ETB"
	PaymentListResponseCurrencyEur PaymentListResponseCurrency = "EUR"
	PaymentListResponseCurrencyFjd PaymentListResponseCurrency = "FJD"
	PaymentListResponseCurrencyFkp PaymentListResponseCurrency = "FKP"
	PaymentListResponseCurrencyGbp PaymentListResponseCurrency = "GBP"
	PaymentListResponseCurrencyGel PaymentListResponseCurrency = "GEL"
	PaymentListResponseCurrencyGhs PaymentListResponseCurrency = "GHS"
	PaymentListResponseCurrencyGip PaymentListResponseCurrency = "GIP"
	PaymentListResponseCurrencyGmd PaymentListResponseCurrency = "GMD"
	PaymentListResponseCurrencyGnf PaymentListResponseCurrency = "GNF"
	PaymentListResponseCurrencyGtq PaymentListResponseCurrency = "GTQ"
	PaymentListResponseCurrencyGyd PaymentListResponseCurrency = "GYD"
	PaymentListResponseCurrencyHkd PaymentListResponseCurrency = "HKD"
	PaymentListResponseCurrencyHnl PaymentListResponseCurrency = "HNL"
	PaymentListResponseCurrencyHrk PaymentListResponseCurrency = "HRK"
	PaymentListResponseCurrencyHtg PaymentListResponseCurrency = "HTG"
	PaymentListResponseCurrencyHuf PaymentListResponseCurrency = "HUF"
	PaymentListResponseCurrencyIdr PaymentListResponseCurrency = "IDR"
	PaymentListResponseCurrencyIls PaymentListResponseCurrency = "ILS"
	PaymentListResponseCurrencyInr PaymentListResponseCurrency = "INR"
	PaymentListResponseCurrencyIqd PaymentListResponseCurrency = "IQD"
	PaymentListResponseCurrencyJmd PaymentListResponseCurrency = "JMD"
	PaymentListResponseCurrencyJod PaymentListResponseCurrency = "JOD"
	PaymentListResponseCurrencyJpy PaymentListResponseCurrency = "JPY"
	PaymentListResponseCurrencyKes PaymentListResponseCurrency = "KES"
	PaymentListResponseCurrencyKgs PaymentListResponseCurrency = "KGS"
	PaymentListResponseCurrencyKhr PaymentListResponseCurrency = "KHR"
	PaymentListResponseCurrencyKmf PaymentListResponseCurrency = "KMF"
	PaymentListResponseCurrencyKrw PaymentListResponseCurrency = "KRW"
	PaymentListResponseCurrencyKwd PaymentListResponseCurrency = "KWD"
	PaymentListResponseCurrencyKyd PaymentListResponseCurrency = "KYD"
	PaymentListResponseCurrencyKzt PaymentListResponseCurrency = "KZT"
	PaymentListResponseCurrencyLak PaymentListResponseCurrency = "LAK"
	PaymentListResponseCurrencyLbp PaymentListResponseCurrency = "LBP"
	PaymentListResponseCurrencyLkr PaymentListResponseCurrency = "LKR"
	PaymentListResponseCurrencyLrd PaymentListResponseCurrency = "LRD"
	PaymentListResponseCurrencyLsl PaymentListResponseCurrency = "LSL"
	PaymentListResponseCurrencyLyd PaymentListResponseCurrency = "LYD"
	PaymentListResponseCurrencyMad PaymentListResponseCurrency = "MAD"
	PaymentListResponseCurrencyMdl PaymentListResponseCurrency = "MDL"
	PaymentListResponseCurrencyMga PaymentListResponseCurrency = "MGA"
	PaymentListResponseCurrencyMkd PaymentListResponseCurrency = "MKD"
	PaymentListResponseCurrencyMmk PaymentListResponseCurrency = "MMK"
	PaymentListResponseCurrencyMnt PaymentListResponseCurrency = "MNT"
	PaymentListResponseCurrencyMop PaymentListResponseCurrency = "MOP"
	PaymentListResponseCurrencyMru PaymentListResponseCurrency = "MRU"
	PaymentListResponseCurrencyMur PaymentListResponseCurrency = "MUR"
	PaymentListResponseCurrencyMvr PaymentListResponseCurrency = "MVR"
	PaymentListResponseCurrencyMwk PaymentListResponseCurrency = "MWK"
	PaymentListResponseCurrencyMxn PaymentListResponseCurrency = "MXN"
	PaymentListResponseCurrencyMyr PaymentListResponseCurrency = "MYR"
	PaymentListResponseCurrencyMzn PaymentListResponseCurrency = "MZN"
	PaymentListResponseCurrencyNad PaymentListResponseCurrency = "NAD"
	PaymentListResponseCurrencyNgn PaymentListResponseCurrency = "NGN"
	PaymentListResponseCurrencyNio PaymentListResponseCurrency = "NIO"
	PaymentListResponseCurrencyNok PaymentListResponseCurrency = "NOK"
	PaymentListResponseCurrencyNpr PaymentListResponseCurrency = "NPR"
	PaymentListResponseCurrencyNzd PaymentListResponseCurrency = "NZD"
	PaymentListResponseCurrencyOmr PaymentListResponseCurrency = "OMR"
	PaymentListResponseCurrencyPab PaymentListResponseCurrency = "PAB"
	PaymentListResponseCurrencyPen PaymentListResponseCurrency = "PEN"
	PaymentListResponseCurrencyPgk PaymentListResponseCurrency = "PGK"
	PaymentListResponseCurrencyPhp PaymentListResponseCurrency = "PHP"
	PaymentListResponseCurrencyPkr PaymentListResponseCurrency = "PKR"
	PaymentListResponseCurrencyPln PaymentListResponseCurrency = "PLN"
	PaymentListResponseCurrencyPyg PaymentListResponseCurrency = "PYG"
	PaymentListResponseCurrencyQar PaymentListResponseCurrency = "QAR"
	PaymentListResponseCurrencyRon PaymentListResponseCurrency = "RON"
	PaymentListResponseCurrencyRsd PaymentListResponseCurrency = "RSD"
	PaymentListResponseCurrencyRub PaymentListResponseCurrency = "RUB"
	PaymentListResponseCurrencyRwf PaymentListResponseCurrency = "RWF"
	PaymentListResponseCurrencySar PaymentListResponseCurrency = "SAR"
	PaymentListResponseCurrencySbd PaymentListResponseCurrency = "SBD"
	PaymentListResponseCurrencyScr PaymentListResponseCurrency = "SCR"
	PaymentListResponseCurrencySek PaymentListResponseCurrency = "SEK"
	PaymentListResponseCurrencySgd PaymentListResponseCurrency = "SGD"
	PaymentListResponseCurrencyShp PaymentListResponseCurrency = "SHP"
	PaymentListResponseCurrencySle PaymentListResponseCurrency = "SLE"
	PaymentListResponseCurrencySll PaymentListResponseCurrency = "SLL"
	PaymentListResponseCurrencySos PaymentListResponseCurrency = "SOS"
	PaymentListResponseCurrencySrd PaymentListResponseCurrency = "SRD"
	PaymentListResponseCurrencySsp PaymentListResponseCurrency = "SSP"
	PaymentListResponseCurrencyStn PaymentListResponseCurrency = "STN"
	PaymentListResponseCurrencySvc PaymentListResponseCurrency = "SVC"
	PaymentListResponseCurrencySzl PaymentListResponseCurrency = "SZL"
	PaymentListResponseCurrencyThb PaymentListResponseCurrency = "THB"
	PaymentListResponseCurrencyTnd PaymentListResponseCurrency = "TND"
	PaymentListResponseCurrencyTop PaymentListResponseCurrency = "TOP"
	PaymentListResponseCurrencyTry PaymentListResponseCurrency = "TRY"
	PaymentListResponseCurrencyTtd PaymentListResponseCurrency = "TTD"
	PaymentListResponseCurrencyTwd PaymentListResponseCurrency = "TWD"
	PaymentListResponseCurrencyTzs PaymentListResponseCurrency = "TZS"
	PaymentListResponseCurrencyUah PaymentListResponseCurrency = "UAH"
	PaymentListResponseCurrencyUgx PaymentListResponseCurrency = "UGX"
	PaymentListResponseCurrencyUsd PaymentListResponseCurrency = "USD"
	PaymentListResponseCurrencyUyu PaymentListResponseCurrency = "UYU"
	PaymentListResponseCurrencyUzs PaymentListResponseCurrency = "UZS"
	PaymentListResponseCurrencyVes PaymentListResponseCurrency = "VES"
	PaymentListResponseCurrencyVnd PaymentListResponseCurrency = "VND"
	PaymentListResponseCurrencyVuv PaymentListResponseCurrency = "VUV"
	PaymentListResponseCurrencyWst PaymentListResponseCurrency = "WST"
	PaymentListResponseCurrencyXaf PaymentListResponseCurrency = "XAF"
	PaymentListResponseCurrencyXcd PaymentListResponseCurrency = "XCD"
	PaymentListResponseCurrencyXof PaymentListResponseCurrency = "XOF"
	PaymentListResponseCurrencyXpf PaymentListResponseCurrency = "XPF"
	PaymentListResponseCurrencyYer PaymentListResponseCurrency = "YER"
	PaymentListResponseCurrencyZar PaymentListResponseCurrency = "ZAR"
	PaymentListResponseCurrencyZmw PaymentListResponseCurrency = "ZMW"
)

func (PaymentListResponseCurrency) IsKnown

func (r PaymentListResponseCurrency) IsKnown() bool

type PaymentListResponseCustomer

type PaymentListResponseCustomer struct {
	// Unique identifier for the customer
	CustomerID string `json:"customer_id,required"`
	// Email address of the customer
	Email string `json:"email,required"`
	// Full name of the customer
	Name string                          `json:"name,required"`
	JSON paymentListResponseCustomerJSON `json:"-"`
}

func (*PaymentListResponseCustomer) UnmarshalJSON

func (r *PaymentListResponseCustomer) UnmarshalJSON(data []byte) (err error)

type PaymentListResponseStatus

type PaymentListResponseStatus string
const (
	PaymentListResponseStatusSucceeded                      PaymentListResponseStatus = "succeeded"
	PaymentListResponseStatusFailed                         PaymentListResponseStatus = "failed"
	PaymentListResponseStatusCancelled                      PaymentListResponseStatus = "cancelled"
	PaymentListResponseStatusProcessing                     PaymentListResponseStatus = "processing"
	PaymentListResponseStatusRequiresCustomerAction         PaymentListResponseStatus = "requires_customer_action"
	PaymentListResponseStatusRequiresMerchantAction         PaymentListResponseStatus = "requires_merchant_action"
	PaymentListResponseStatusRequiresPaymentMethod          PaymentListResponseStatus = "requires_payment_method"
	PaymentListResponseStatusRequiresConfirmation           PaymentListResponseStatus = "requires_confirmation"
	PaymentListResponseStatusRequiresCapture                PaymentListResponseStatus = "requires_capture"
	PaymentListResponseStatusPartiallyCaptured              PaymentListResponseStatus = "partially_captured"
	PaymentListResponseStatusPartiallyCapturedAndCapturable PaymentListResponseStatus = "partially_captured_and_capturable"
)

func (PaymentListResponseStatus) IsKnown

func (r PaymentListResponseStatus) IsKnown() bool

type PaymentNewParams

type PaymentNewParams struct {
	Billing  param.Field[PaymentNewParamsBilling]       `json:"billing,required"`
	Customer param.Field[PaymentNewParamsCustomerUnion] `json:"customer,required"`
	// List of products in the cart. Must contain at least 1 and at most 100 items.
	ProductCart param.Field[[]PaymentNewParamsProductCart] `json:"product_cart,required"`
	Metadata    param.Field[map[string]string]             `json:"metadata"`
	// Whether to generate a payment link. Defaults to false if not specified.
	PaymentLink param.Field[bool] `json:"payment_link"`
	// Optional URL to redirect the customer after payment. Must be a valid URL if
	// provided.
	ReturnURL param.Field[string] `json:"return_url"`
}

func (PaymentNewParams) MarshalJSON

func (r PaymentNewParams) MarshalJSON() (data []byte, err error)

type PaymentNewParamsBilling

type PaymentNewParamsBilling struct {
	// City name
	City param.Field[string] `json:"city,required"`
	// ISO country code alpha2 variant
	Country param.Field[CountryCode] `json:"country,required"`
	// State or province name
	State param.Field[string] `json:"state,required"`
	// Street address including house number and unit/apartment if applicable
	Street param.Field[string] `json:"street,required"`
	// Postal code or ZIP code
	Zipcode param.Field[string] `json:"zipcode,required"`
}

func (PaymentNewParamsBilling) MarshalJSON

func (r PaymentNewParamsBilling) MarshalJSON() (data []byte, err error)

type PaymentNewParamsCustomer

type PaymentNewParamsCustomer struct {
	// When false, the most recently created customer object with the given email is
	// used if exists. When true, a new customer object is always created False by
	// default
	CreateNewCustomer param.Field[bool]   `json:"create_new_customer"`
	CustomerID        param.Field[string] `json:"customer_id"`
	Email             param.Field[string] `json:"email"`
	Name              param.Field[string] `json:"name"`
	PhoneNumber       param.Field[string] `json:"phone_number"`
}

func (PaymentNewParamsCustomer) MarshalJSON

func (r PaymentNewParamsCustomer) MarshalJSON() (data []byte, err error)

type PaymentNewParamsCustomerAttachExistingCustomer added in v0.12.0

type PaymentNewParamsCustomerAttachExistingCustomer struct {
	CustomerID param.Field[string] `json:"customer_id,required"`
}

func (PaymentNewParamsCustomerAttachExistingCustomer) MarshalJSON added in v0.12.0

func (r PaymentNewParamsCustomerAttachExistingCustomer) MarshalJSON() (data []byte, err error)

type PaymentNewParamsCustomerCreateNewCustomer added in v0.12.0

type PaymentNewParamsCustomerCreateNewCustomer struct {
	Email param.Field[string] `json:"email,required"`
	Name  param.Field[string] `json:"name,required"`
	// When false, the most recently created customer object with the given email is
	// used if exists. When true, a new customer object is always created False by
	// default
	CreateNewCustomer param.Field[bool]   `json:"create_new_customer"`
	PhoneNumber       param.Field[string] `json:"phone_number"`
}

func (PaymentNewParamsCustomerCreateNewCustomer) MarshalJSON added in v0.12.0

func (r PaymentNewParamsCustomerCreateNewCustomer) MarshalJSON() (data []byte, err error)

type PaymentNewParamsCustomerUnion added in v0.12.0

type PaymentNewParamsCustomerUnion interface {
	// contains filtered or unexported methods
}

Satisfied by PaymentNewParamsCustomerAttachExistingCustomer, PaymentNewParamsCustomerCreateNewCustomer, PaymentNewParamsCustomer.

type PaymentNewParamsProductCart

type PaymentNewParamsProductCart struct {
	ProductID param.Field[string] `json:"product_id,required"`
	Quantity  param.Field[int64]  `json:"quantity,required"`
	// Amount the customer pays if pay_what_you_want is enabled. If disabled then
	// amount will be ignored
	Amount param.Field[int64] `json:"amount"`
}

func (PaymentNewParamsProductCart) MarshalJSON

func (r PaymentNewParamsProductCart) MarshalJSON() (data []byte, err error)

type PaymentNewResponse

type PaymentNewResponse struct {
	// Client secret used to load Dodo checkout SDK NOTE : Dodo checkout SDK will be
	// coming soon
	ClientSecret string                     `json:"client_secret,required"`
	Customer     PaymentNewResponseCustomer `json:"customer,required"`
	Metadata     map[string]string          `json:"metadata,required"`
	// Unique identifier for the payment
	PaymentID string `json:"payment_id,required"`
	// Total amount of the payment in smallest currency unit (e.g. cents)
	TotalAmount int64 `json:"total_amount,required"`
	// Optional URL to a hosted payment page
	PaymentLink string `json:"payment_link,nullable"`
	// Optional list of products included in the payment
	ProductCart []PaymentNewResponseProductCart `json:"product_cart,nullable"`
	JSON        paymentNewResponseJSON          `json:"-"`
}

func (*PaymentNewResponse) UnmarshalJSON

func (r *PaymentNewResponse) UnmarshalJSON(data []byte) (err error)

type PaymentNewResponseCustomer

type PaymentNewResponseCustomer struct {
	// Unique identifier for the customer
	CustomerID string `json:"customer_id,required"`
	// Email address of the customer
	Email string `json:"email,required"`
	// Full name of the customer
	Name string                         `json:"name,required"`
	JSON paymentNewResponseCustomerJSON `json:"-"`
}

func (*PaymentNewResponseCustomer) UnmarshalJSON

func (r *PaymentNewResponseCustomer) UnmarshalJSON(data []byte) (err error)

type PaymentNewResponseProductCart

type PaymentNewResponseProductCart struct {
	ProductID string `json:"product_id,required"`
	Quantity  int64  `json:"quantity,required"`
	// Amount the customer pays if pay_what_you_want is enabled. If disabled then
	// amount will be ignored
	Amount int64                             `json:"amount,nullable"`
	JSON   paymentNewResponseProductCartJSON `json:"-"`
}

func (*PaymentNewResponseProductCart) UnmarshalJSON

func (r *PaymentNewResponseProductCart) UnmarshalJSON(data []byte) (err error)

type PaymentProductCart

type PaymentProductCart struct {
	ProductID string                 `json:"product_id,required"`
	Quantity  int64                  `json:"quantity,required"`
	JSON      paymentProductCartJSON `json:"-"`
}

func (*PaymentProductCart) UnmarshalJSON

func (r *PaymentProductCart) UnmarshalJSON(data []byte) (err error)

type PaymentService

type PaymentService struct {
	Options []option.RequestOption
}

PaymentService contains methods and other services that help with interacting with the Dodo Payments API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPaymentService method instead.

func NewPaymentService

func NewPaymentService(opts ...option.RequestOption) (r *PaymentService)

NewPaymentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*PaymentService) Get

func (r *PaymentService) Get(ctx context.Context, paymentID string, opts ...option.RequestOption) (res *Payment, err error)

func (*PaymentService) New

type PaymentStatus

type PaymentStatus string
const (
	PaymentStatusSucceeded                      PaymentStatus = "succeeded"
	PaymentStatusFailed                         PaymentStatus = "failed"
	PaymentStatusCancelled                      PaymentStatus = "cancelled"
	PaymentStatusProcessing                     PaymentStatus = "processing"
	PaymentStatusRequiresCustomerAction         PaymentStatus = "requires_customer_action"
	PaymentStatusRequiresMerchantAction         PaymentStatus = "requires_merchant_action"
	PaymentStatusRequiresPaymentMethod          PaymentStatus = "requires_payment_method"
	PaymentStatusRequiresConfirmation           PaymentStatus = "requires_confirmation"
	PaymentStatusRequiresCapture                PaymentStatus = "requires_capture"
	PaymentStatusPartiallyCaptured              PaymentStatus = "partially_captured"
	PaymentStatusPartiallyCapturedAndCapturable PaymentStatus = "partially_captured_and_capturable"
)

func (PaymentStatus) IsKnown

func (r PaymentStatus) IsKnown() bool

type PayoutListParams

type PayoutListParams struct {
	// Page number default is 0
	PageNumber param.Field[int64] `query:"page_number"`
	// Page size default is 10 max is 100
	PageSize param.Field[int64] `query:"page_size"`
}

func (PayoutListParams) URLQuery

func (r PayoutListParams) URLQuery() (v url.Values)

URLQuery serializes PayoutListParams's query parameters as `url.Values`.

type PayoutListResponse

type PayoutListResponse struct {
	// The total amount of the payout.
	Amount int64 `json:"amount,required"`
	// The unique identifier of the business associated with the payout.
	BusinessID string `json:"business_id,required"`
	// The total value of chargebacks associated with the payout.
	Chargebacks int64 `json:"chargebacks,required"`
	// The timestamp when the payout was created, in UTC.
	CreatedAt time.Time                  `json:"created_at,required" format:"date-time"`
	Currency  PayoutListResponseCurrency `json:"currency,required"`
	// The fee charged for processing the payout.
	Fee int64 `json:"fee,required"`
	// The payment method used for the payout (e.g., bank transfer, card, etc.).
	PaymentMethod string `json:"payment_method,required"`
	// The unique identifier of the payout.
	PayoutID string `json:"payout_id,required"`
	// The total value of refunds associated with the payout.
	Refunds int64                    `json:"refunds,required"`
	Status  PayoutListResponseStatus `json:"status,required"`
	// The tax applied to the payout.
	Tax int64 `json:"tax,required"`
	// The timestamp when the payout was last updated, in UTC.
	UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
	// The name of the payout recipient or purpose.
	Name string `json:"name,nullable"`
	// The URL of the document associated with the payout.
	PayoutDocumentURL string `json:"payout_document_url,nullable"`
	// Any additional remarks or notes associated with the payout.
	Remarks string                 `json:"remarks,nullable"`
	JSON    payoutListResponseJSON `json:"-"`
}

func (*PayoutListResponse) UnmarshalJSON

func (r *PayoutListResponse) UnmarshalJSON(data []byte) (err error)

type PayoutListResponseCurrency

type PayoutListResponseCurrency string
const (
	PayoutListResponseCurrencyAed PayoutListResponseCurrency = "AED"
	PayoutListResponseCurrencyAll PayoutListResponseCurrency = "ALL"
	PayoutListResponseCurrencyAmd PayoutListResponseCurrency = "AMD"
	PayoutListResponseCurrencyAng PayoutListResponseCurrency = "ANG"
	PayoutListResponseCurrencyAoa PayoutListResponseCurrency = "AOA"
	PayoutListResponseCurrencyArs PayoutListResponseCurrency = "ARS"
	PayoutListResponseCurrencyAud PayoutListResponseCurrency = "AUD"
	PayoutListResponseCurrencyAwg PayoutListResponseCurrency = "AWG"
	PayoutListResponseCurrencyAzn PayoutListResponseCurrency = "AZN"
	PayoutListResponseCurrencyBam PayoutListResponseCurrency = "BAM"
	PayoutListResponseCurrencyBbd PayoutListResponseCurrency = "BBD"
	PayoutListResponseCurrencyBdt PayoutListResponseCurrency = "BDT"
	PayoutListResponseCurrencyBgn PayoutListResponseCurrency = "BGN"
	PayoutListResponseCurrencyBhd PayoutListResponseCurrency = "BHD"
	PayoutListResponseCurrencyBif PayoutListResponseCurrency = "BIF"
	PayoutListResponseCurrencyBmd PayoutListResponseCurrency = "BMD"
	PayoutListResponseCurrencyBnd PayoutListResponseCurrency = "BND"
	PayoutListResponseCurrencyBob PayoutListResponseCurrency = "BOB"
	PayoutListResponseCurrencyBrl PayoutListResponseCurrency = "BRL"
	PayoutListResponseCurrencyBsd PayoutListResponseCurrency = "BSD"
	PayoutListResponseCurrencyBwp PayoutListResponseCurrency = "BWP"
	PayoutListResponseCurrencyByn PayoutListResponseCurrency = "BYN"
	PayoutListResponseCurrencyBzd PayoutListResponseCurrency = "BZD"
	PayoutListResponseCurrencyCad PayoutListResponseCurrency = "CAD"
	PayoutListResponseCurrencyChf PayoutListResponseCurrency = "CHF"
	PayoutListResponseCurrencyClp PayoutListResponseCurrency = "CLP"
	PayoutListResponseCurrencyCny PayoutListResponseCurrency = "CNY"
	PayoutListResponseCurrencyCop PayoutListResponseCurrency = "COP"
	PayoutListResponseCurrencyCrc PayoutListResponseCurrency = "CRC"
	PayoutListResponseCurrencyCup PayoutListResponseCurrency = "CUP"
	PayoutListResponseCurrencyCve PayoutListResponseCurrency = "CVE"
	PayoutListResponseCurrencyCzk PayoutListResponseCurrency = "CZK"
	PayoutListResponseCurrencyDjf PayoutListResponseCurrency = "DJF"
	PayoutListResponseCurrencyDkk PayoutListResponseCurrency = "DKK"
	PayoutListResponseCurrencyDop PayoutListResponseCurrency = "DOP"
	PayoutListResponseCurrencyDzd PayoutListResponseCurrency = "DZD"
	PayoutListResponseCurrencyEgp PayoutListResponseCurrency = "EGP"
	PayoutListResponseCurrencyEtb PayoutListResponseCurrency = "ETB"
	PayoutListResponseCurrencyEur PayoutListResponseCurrency = "EUR"
	PayoutListResponseCurrencyFjd PayoutListResponseCurrency = "FJD"
	PayoutListResponseCurrencyFkp PayoutListResponseCurrency = "FKP"
	PayoutListResponseCurrencyGbp PayoutListResponseCurrency = "GBP"
	PayoutListResponseCurrencyGel PayoutListResponseCurrency = "GEL"
	PayoutListResponseCurrencyGhs PayoutListResponseCurrency = "GHS"
	PayoutListResponseCurrencyGip PayoutListResponseCurrency = "GIP"
	PayoutListResponseCurrencyGmd PayoutListResponseCurrency = "GMD"
	PayoutListResponseCurrencyGnf PayoutListResponseCurrency = "GNF"
	PayoutListResponseCurrencyGtq PayoutListResponseCurrency = "GTQ"
	PayoutListResponseCurrencyGyd PayoutListResponseCurrency = "GYD"
	PayoutListResponseCurrencyHkd PayoutListResponseCurrency = "HKD"
	PayoutListResponseCurrencyHnl PayoutListResponseCurrency = "HNL"
	PayoutListResponseCurrencyHrk PayoutListResponseCurrency = "HRK"
	PayoutListResponseCurrencyHtg PayoutListResponseCurrency = "HTG"
	PayoutListResponseCurrencyHuf PayoutListResponseCurrency = "HUF"
	PayoutListResponseCurrencyIdr PayoutListResponseCurrency = "IDR"
	PayoutListResponseCurrencyIls PayoutListResponseCurrency = "ILS"
	PayoutListResponseCurrencyInr PayoutListResponseCurrency = "INR"
	PayoutListResponseCurrencyIqd PayoutListResponseCurrency = "IQD"
	PayoutListResponseCurrencyJmd PayoutListResponseCurrency = "JMD"
	PayoutListResponseCurrencyJod PayoutListResponseCurrency = "JOD"
	PayoutListResponseCurrencyJpy PayoutListResponseCurrency = "JPY"
	PayoutListResponseCurrencyKes PayoutListResponseCurrency = "KES"
	PayoutListResponseCurrencyKgs PayoutListResponseCurrency = "KGS"
	PayoutListResponseCurrencyKhr PayoutListResponseCurrency = "KHR"
	PayoutListResponseCurrencyKmf PayoutListResponseCurrency = "KMF"
	PayoutListResponseCurrencyKrw PayoutListResponseCurrency = "KRW"
	PayoutListResponseCurrencyKwd PayoutListResponseCurrency = "KWD"
	PayoutListResponseCurrencyKyd PayoutListResponseCurrency = "KYD"
	PayoutListResponseCurrencyKzt PayoutListResponseCurrency = "KZT"
	PayoutListResponseCurrencyLak PayoutListResponseCurrency = "LAK"
	PayoutListResponseCurrencyLbp PayoutListResponseCurrency = "LBP"
	PayoutListResponseCurrencyLkr PayoutListResponseCurrency = "LKR"
	PayoutListResponseCurrencyLrd PayoutListResponseCurrency = "LRD"
	PayoutListResponseCurrencyLsl PayoutListResponseCurrency = "LSL"
	PayoutListResponseCurrencyLyd PayoutListResponseCurrency = "LYD"
	PayoutListResponseCurrencyMad PayoutListResponseCurrency = "MAD"
	PayoutListResponseCurrencyMdl PayoutListResponseCurrency = "MDL"
	PayoutListResponseCurrencyMga PayoutListResponseCurrency = "MGA"
	PayoutListResponseCurrencyMkd PayoutListResponseCurrency = "MKD"
	PayoutListResponseCurrencyMmk PayoutListResponseCurrency = "MMK"
	PayoutListResponseCurrencyMnt PayoutListResponseCurrency = "MNT"
	PayoutListResponseCurrencyMop PayoutListResponseCurrency = "MOP"
	PayoutListResponseCurrencyMru PayoutListResponseCurrency = "MRU"
	PayoutListResponseCurrencyMur PayoutListResponseCurrency = "MUR"
	PayoutListResponseCurrencyMvr PayoutListResponseCurrency = "MVR"
	PayoutListResponseCurrencyMwk PayoutListResponseCurrency = "MWK"
	PayoutListResponseCurrencyMxn PayoutListResponseCurrency = "MXN"
	PayoutListResponseCurrencyMyr PayoutListResponseCurrency = "MYR"
	PayoutListResponseCurrencyMzn PayoutListResponseCurrency = "MZN"
	PayoutListResponseCurrencyNad PayoutListResponseCurrency = "NAD"
	PayoutListResponseCurrencyNgn PayoutListResponseCurrency = "NGN"
	PayoutListResponseCurrencyNio PayoutListResponseCurrency = "NIO"
	PayoutListResponseCurrencyNok PayoutListResponseCurrency = "NOK"
	PayoutListResponseCurrencyNpr PayoutListResponseCurrency = "NPR"
	PayoutListResponseCurrencyNzd PayoutListResponseCurrency = "NZD"
	PayoutListResponseCurrencyOmr PayoutListResponseCurrency = "OMR"
	PayoutListResponseCurrencyPab PayoutListResponseCurrency = "PAB"
	PayoutListResponseCurrencyPen PayoutListResponseCurrency = "PEN"
	PayoutListResponseCurrencyPgk PayoutListResponseCurrency = "PGK"
	PayoutListResponseCurrencyPhp PayoutListResponseCurrency = "PHP"
	PayoutListResponseCurrencyPkr PayoutListResponseCurrency = "PKR"
	PayoutListResponseCurrencyPln PayoutListResponseCurrency = "PLN"
	PayoutListResponseCurrencyPyg PayoutListResponseCurrency = "PYG"
	PayoutListResponseCurrencyQar PayoutListResponseCurrency = "QAR"
	PayoutListResponseCurrencyRon PayoutListResponseCurrency = "RON"
	PayoutListResponseCurrencyRsd PayoutListResponseCurrency = "RSD"
	PayoutListResponseCurrencyRub PayoutListResponseCurrency = "RUB"
	PayoutListResponseCurrencyRwf PayoutListResponseCurrency = "RWF"
	PayoutListResponseCurrencySar PayoutListResponseCurrency = "SAR"
	PayoutListResponseCurrencySbd PayoutListResponseCurrency = "SBD"
	PayoutListResponseCurrencyScr PayoutListResponseCurrency = "SCR"
	PayoutListResponseCurrencySek PayoutListResponseCurrency = "SEK"
	PayoutListResponseCurrencySgd PayoutListResponseCurrency = "SGD"
	PayoutListResponseCurrencyShp PayoutListResponseCurrency = "SHP"
	PayoutListResponseCurrencySle PayoutListResponseCurrency = "SLE"
	PayoutListResponseCurrencySll PayoutListResponseCurrency = "SLL"
	PayoutListResponseCurrencySos PayoutListResponseCurrency = "SOS"
	PayoutListResponseCurrencySrd PayoutListResponseCurrency = "SRD"
	PayoutListResponseCurrencySsp PayoutListResponseCurrency = "SSP"
	PayoutListResponseCurrencyStn PayoutListResponseCurrency = "STN"
	PayoutListResponseCurrencySvc PayoutListResponseCurrency = "SVC"
	PayoutListResponseCurrencySzl PayoutListResponseCurrency = "SZL"
	PayoutListResponseCurrencyThb PayoutListResponseCurrency = "THB"
	PayoutListResponseCurrencyTnd PayoutListResponseCurrency = "TND"
	PayoutListResponseCurrencyTop PayoutListResponseCurrency = "TOP"
	PayoutListResponseCurrencyTry PayoutListResponseCurrency = "TRY"
	PayoutListResponseCurrencyTtd PayoutListResponseCurrency = "TTD"
	PayoutListResponseCurrencyTwd PayoutListResponseCurrency = "TWD"
	PayoutListResponseCurrencyTzs PayoutListResponseCurrency = "TZS"
	PayoutListResponseCurrencyUah PayoutListResponseCurrency = "UAH"
	PayoutListResponseCurrencyUgx PayoutListResponseCurrency = "UGX"
	PayoutListResponseCurrencyUsd PayoutListResponseCurrency = "USD"
	PayoutListResponseCurrencyUyu PayoutListResponseCurrency = "UYU"
	PayoutListResponseCurrencyUzs PayoutListResponseCurrency = "UZS"
	PayoutListResponseCurrencyVes PayoutListResponseCurrency = "VES"
	PayoutListResponseCurrencyVnd PayoutListResponseCurrency = "VND"
	PayoutListResponseCurrencyVuv PayoutListResponseCurrency = "VUV"
	PayoutListResponseCurrencyWst PayoutListResponseCurrency = "WST"
	PayoutListResponseCurrencyXaf PayoutListResponseCurrency = "XAF"
	PayoutListResponseCurrencyXcd PayoutListResponseCurrency = "XCD"
	PayoutListResponseCurrencyXof PayoutListResponseCurrency = "XOF"
	PayoutListResponseCurrencyXpf PayoutListResponseCurrency = "XPF"
	PayoutListResponseCurrencyYer PayoutListResponseCurrency = "YER"
	PayoutListResponseCurrencyZar PayoutListResponseCurrency = "ZAR"
	PayoutListResponseCurrencyZmw PayoutListResponseCurrency = "ZMW"
)

func (PayoutListResponseCurrency) IsKnown

func (r PayoutListResponseCurrency) IsKnown() bool

type PayoutListResponseStatus

type PayoutListResponseStatus string
const (
	PayoutListResponseStatusInProgress PayoutListResponseStatus = "in_progress"
	PayoutListResponseStatusFailed     PayoutListResponseStatus = "failed"
	PayoutListResponseStatusSuccess    PayoutListResponseStatus = "success"
)

func (PayoutListResponseStatus) IsKnown

func (r PayoutListResponseStatus) IsKnown() bool

type PayoutService

type PayoutService struct {
	Options []option.RequestOption
}

PayoutService contains methods and other services that help with interacting with the Dodo Payments API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPayoutService method instead.

func NewPayoutService

func NewPayoutService(opts ...option.RequestOption) (r *PayoutService)

NewPayoutService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type Product

type Product struct {
	// Unique identifier for the business to which the product belongs.
	BusinessID string `json:"business_id,required"`
	// Timestamp when the product was created.
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Indicates if the product is recurring (e.g., subscriptions).
	IsRecurring bool `json:"is_recurring,required"`
	// Indicates whether the product requires a license key.
	LicenseKeyEnabled bool         `json:"license_key_enabled,required"`
	Price             ProductPrice `json:"price,required"`
	// Unique identifier for the product.
	ProductID string `json:"product_id,required"`
	// Represents the different categories of taxation applicable to various products
	// and services.
	TaxCategory ProductTaxCategory `json:"tax_category,required"`
	// Timestamp when the product was last updated.
	UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
	// Description of the product, optional.
	Description string `json:"description,nullable"`
	// URL of the product image, optional.
	Image string `json:"image,nullable"`
	// Message sent upon license key activation, if applicable.
	LicenseKeyActivationMessage string `json:"license_key_activation_message,nullable"`
	// Limit on the number of activations for the license key, if enabled.
	LicenseKeyActivationsLimit int64                     `json:"license_key_activations_limit,nullable"`
	LicenseKeyDuration         ProductLicenseKeyDuration `json:"license_key_duration,nullable"`
	// Name of the product, optional.
	Name string      `json:"name,nullable"`
	JSON productJSON `json:"-"`
}

func (*Product) UnmarshalJSON

func (r *Product) UnmarshalJSON(data []byte) (err error)

type ProductImageService

type ProductImageService struct {
	Options []option.RequestOption
}

ProductImageService contains methods and other services that help with interacting with the Dodo Payments API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewProductImageService method instead.

func NewProductImageService

func NewProductImageService(opts ...option.RequestOption) (r *ProductImageService)

NewProductImageService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ProductImageService) Update

type ProductImageUpdateResponse

type ProductImageUpdateResponse struct {
	URL  string                         `json:"url,required"`
	JSON productImageUpdateResponseJSON `json:"-"`
}

func (*ProductImageUpdateResponse) UnmarshalJSON

func (r *ProductImageUpdateResponse) UnmarshalJSON(data []byte) (err error)

type ProductLicenseKeyDuration added in v0.14.0

type ProductLicenseKeyDuration struct {
	Count    int64                             `json:"count,required"`
	Interval ProductLicenseKeyDurationInterval `json:"interval,required"`
	JSON     productLicenseKeyDurationJSON     `json:"-"`
}

func (*ProductLicenseKeyDuration) UnmarshalJSON added in v0.14.0

func (r *ProductLicenseKeyDuration) UnmarshalJSON(data []byte) (err error)

type ProductLicenseKeyDurationInterval added in v0.14.0

type ProductLicenseKeyDurationInterval string
const (
	ProductLicenseKeyDurationIntervalDay   ProductLicenseKeyDurationInterval = "Day"
	ProductLicenseKeyDurationIntervalWeek  ProductLicenseKeyDurationInterval = "Week"
	ProductLicenseKeyDurationIntervalMonth ProductLicenseKeyDurationInterval = "Month"
	ProductLicenseKeyDurationIntervalYear  ProductLicenseKeyDurationInterval = "Year"
)

func (ProductLicenseKeyDurationInterval) IsKnown added in v0.14.0

type ProductListParams

type ProductListParams struct {
	// List archived products
	Archived param.Field[bool] `query:"archived"`
	// Page number default is 0
	PageNumber param.Field[int64] `query:"page_number"`
	// Page size default is 10 max is 100
	PageSize param.Field[int64] `query:"page_size"`
}

func (ProductListParams) URLQuery

func (r ProductListParams) URLQuery() (v url.Values)

URLQuery serializes ProductListParams's query parameters as `url.Values`.

type ProductListResponse

type ProductListResponse struct {
	// Unique identifier for the business to which the product belongs.
	BusinessID string `json:"business_id,required"`
	// Timestamp when the product was created.
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Indicates if the product is recurring (e.g., subscriptions).
	IsRecurring bool `json:"is_recurring,required"`
	// Unique identifier for the product.
	ProductID string `json:"product_id,required"`
	// Represents the different categories of taxation applicable to various products
	// and services.
	TaxCategory ProductListResponseTaxCategory `json:"tax_category,required"`
	// Timestamp when the product was last updated.
	UpdatedAt time.Time                   `json:"updated_at,required" format:"date-time"`
	Currency  ProductListResponseCurrency `json:"currency,nullable"`
	// Description of the product, optional.
	Description string `json:"description,nullable"`
	// URL of the product image, optional.
	Image string `json:"image,nullable"`
	// Name of the product, optional.
	Name string `json:"name,nullable"`
	// Price of the product, optional.
	//
	// The price is represented in the lowest denomination of the currency. For
	// example:
	//
	// - In USD, a price of `$12.34` would be represented as `1234` (cents).
	// - In JPY, a price of `¥1500` would be represented as `1500` (yen).
	// - In INR, a price of `₹1234.56` would be represented as `123456` (paise).
	//
	// This ensures precision and avoids floating-point rounding errors.
	Price       int64                          `json:"price,nullable"`
	PriceDetail ProductListResponsePriceDetail `json:"price_detail,nullable"`
	// Indicates if the price is tax inclusive
	TaxInclusive bool                    `json:"tax_inclusive,nullable"`
	JSON         productListResponseJSON `json:"-"`
}

func (*ProductListResponse) UnmarshalJSON

func (r *ProductListResponse) UnmarshalJSON(data []byte) (err error)

type ProductListResponseCurrency added in v0.18.0

type ProductListResponseCurrency string
const (
	ProductListResponseCurrencyAed ProductListResponseCurrency = "AED"
	ProductListResponseCurrencyAll ProductListResponseCurrency = "ALL"
	ProductListResponseCurrencyAmd ProductListResponseCurrency = "AMD"
	ProductListResponseCurrencyAng ProductListResponseCurrency = "ANG"
	ProductListResponseCurrencyAoa ProductListResponseCurrency = "AOA"
	ProductListResponseCurrencyArs ProductListResponseCurrency = "ARS"
	ProductListResponseCurrencyAud ProductListResponseCurrency = "AUD"
	ProductListResponseCurrencyAwg ProductListResponseCurrency = "AWG"
	ProductListResponseCurrencyAzn ProductListResponseCurrency = "AZN"
	ProductListResponseCurrencyBam ProductListResponseCurrency = "BAM"
	ProductListResponseCurrencyBbd ProductListResponseCurrency = "BBD"
	ProductListResponseCurrencyBdt ProductListResponseCurrency = "BDT"
	ProductListResponseCurrencyBgn ProductListResponseCurrency = "BGN"
	ProductListResponseCurrencyBhd ProductListResponseCurrency = "BHD"
	ProductListResponseCurrencyBif ProductListResponseCurrency = "BIF"
	ProductListResponseCurrencyBmd ProductListResponseCurrency = "BMD"
	ProductListResponseCurrencyBnd ProductListResponseCurrency = "BND"
	ProductListResponseCurrencyBob ProductListResponseCurrency = "BOB"
	ProductListResponseCurrencyBrl ProductListResponseCurrency = "BRL"
	ProductListResponseCurrencyBsd ProductListResponseCurrency = "BSD"
	ProductListResponseCurrencyBwp ProductListResponseCurrency = "BWP"
	ProductListResponseCurrencyByn ProductListResponseCurrency = "BYN"
	ProductListResponseCurrencyBzd ProductListResponseCurrency = "BZD"
	ProductListResponseCurrencyCad ProductListResponseCurrency = "CAD"
	ProductListResponseCurrencyChf ProductListResponseCurrency = "CHF"
	ProductListResponseCurrencyClp ProductListResponseCurrency = "CLP"
	ProductListResponseCurrencyCny ProductListResponseCurrency = "CNY"
	ProductListResponseCurrencyCop ProductListResponseCurrency = "COP"
	ProductListResponseCurrencyCrc ProductListResponseCurrency = "CRC"
	ProductListResponseCurrencyCup ProductListResponseCurrency = "CUP"
	ProductListResponseCurrencyCve ProductListResponseCurrency = "CVE"
	ProductListResponseCurrencyCzk ProductListResponseCurrency = "CZK"
	ProductListResponseCurrencyDjf ProductListResponseCurrency = "DJF"
	ProductListResponseCurrencyDkk ProductListResponseCurrency = "DKK"
	ProductListResponseCurrencyDop ProductListResponseCurrency = "DOP"
	ProductListResponseCurrencyDzd ProductListResponseCurrency = "DZD"
	ProductListResponseCurrencyEgp ProductListResponseCurrency = "EGP"
	ProductListResponseCurrencyEtb ProductListResponseCurrency = "ETB"
	ProductListResponseCurrencyEur ProductListResponseCurrency = "EUR"
	ProductListResponseCurrencyFjd ProductListResponseCurrency = "FJD"
	ProductListResponseCurrencyFkp ProductListResponseCurrency = "FKP"
	ProductListResponseCurrencyGbp ProductListResponseCurrency = "GBP"
	ProductListResponseCurrencyGel ProductListResponseCurrency = "GEL"
	ProductListResponseCurrencyGhs ProductListResponseCurrency = "GHS"
	ProductListResponseCurrencyGip ProductListResponseCurrency = "GIP"
	ProductListResponseCurrencyGmd ProductListResponseCurrency = "GMD"
	ProductListResponseCurrencyGnf ProductListResponseCurrency = "GNF"
	ProductListResponseCurrencyGtq ProductListResponseCurrency = "GTQ"
	ProductListResponseCurrencyGyd ProductListResponseCurrency = "GYD"
	ProductListResponseCurrencyHkd ProductListResponseCurrency = "HKD"
	ProductListResponseCurrencyHnl ProductListResponseCurrency = "HNL"
	ProductListResponseCurrencyHrk ProductListResponseCurrency = "HRK"
	ProductListResponseCurrencyHtg ProductListResponseCurrency = "HTG"
	ProductListResponseCurrencyHuf ProductListResponseCurrency = "HUF"
	ProductListResponseCurrencyIdr ProductListResponseCurrency = "IDR"
	ProductListResponseCurrencyIls ProductListResponseCurrency = "ILS"
	ProductListResponseCurrencyInr ProductListResponseCurrency = "INR"
	ProductListResponseCurrencyIqd ProductListResponseCurrency = "IQD"
	ProductListResponseCurrencyJmd ProductListResponseCurrency = "JMD"
	ProductListResponseCurrencyJod ProductListResponseCurrency = "JOD"
	ProductListResponseCurrencyJpy ProductListResponseCurrency = "JPY"
	ProductListResponseCurrencyKes ProductListResponseCurrency = "KES"
	ProductListResponseCurrencyKgs ProductListResponseCurrency = "KGS"
	ProductListResponseCurrencyKhr ProductListResponseCurrency = "KHR"
	ProductListResponseCurrencyKmf ProductListResponseCurrency = "KMF"
	ProductListResponseCurrencyKrw ProductListResponseCurrency = "KRW"
	ProductListResponseCurrencyKwd ProductListResponseCurrency = "KWD"
	ProductListResponseCurrencyKyd ProductListResponseCurrency = "KYD"
	ProductListResponseCurrencyKzt ProductListResponseCurrency = "KZT"
	ProductListResponseCurrencyLak ProductListResponseCurrency = "LAK"
	ProductListResponseCurrencyLbp ProductListResponseCurrency = "LBP"
	ProductListResponseCurrencyLkr ProductListResponseCurrency = "LKR"
	ProductListResponseCurrencyLrd ProductListResponseCurrency = "LRD"
	ProductListResponseCurrencyLsl ProductListResponseCurrency = "LSL"
	ProductListResponseCurrencyLyd ProductListResponseCurrency = "LYD"
	ProductListResponseCurrencyMad ProductListResponseCurrency = "MAD"
	ProductListResponseCurrencyMdl ProductListResponseCurrency = "MDL"
	ProductListResponseCurrencyMga ProductListResponseCurrency = "MGA"
	ProductListResponseCurrencyMkd ProductListResponseCurrency = "MKD"
	ProductListResponseCurrencyMmk ProductListResponseCurrency = "MMK"
	ProductListResponseCurrencyMnt ProductListResponseCurrency = "MNT"
	ProductListResponseCurrencyMop ProductListResponseCurrency = "MOP"
	ProductListResponseCurrencyMru ProductListResponseCurrency = "MRU"
	ProductListResponseCurrencyMur ProductListResponseCurrency = "MUR"
	ProductListResponseCurrencyMvr ProductListResponseCurrency = "MVR"
	ProductListResponseCurrencyMwk ProductListResponseCurrency = "MWK"
	ProductListResponseCurrencyMxn ProductListResponseCurrency = "MXN"
	ProductListResponseCurrencyMyr ProductListResponseCurrency = "MYR"
	ProductListResponseCurrencyMzn ProductListResponseCurrency = "MZN"
	ProductListResponseCurrencyNad ProductListResponseCurrency = "NAD"
	ProductListResponseCurrencyNgn ProductListResponseCurrency = "NGN"
	ProductListResponseCurrencyNio ProductListResponseCurrency = "NIO"
	ProductListResponseCurrencyNok ProductListResponseCurrency = "NOK"
	ProductListResponseCurrencyNpr ProductListResponseCurrency = "NPR"
	ProductListResponseCurrencyNzd ProductListResponseCurrency = "NZD"
	ProductListResponseCurrencyOmr ProductListResponseCurrency = "OMR"
	ProductListResponseCurrencyPab ProductListResponseCurrency = "PAB"
	ProductListResponseCurrencyPen ProductListResponseCurrency = "PEN"
	ProductListResponseCurrencyPgk ProductListResponseCurrency = "PGK"
	ProductListResponseCurrencyPhp ProductListResponseCurrency = "PHP"
	ProductListResponseCurrencyPkr ProductListResponseCurrency = "PKR"
	ProductListResponseCurrencyPln ProductListResponseCurrency = "PLN"
	ProductListResponseCurrencyPyg ProductListResponseCurrency = "PYG"
	ProductListResponseCurrencyQar ProductListResponseCurrency = "QAR"
	ProductListResponseCurrencyRon ProductListResponseCurrency = "RON"
	ProductListResponseCurrencyRsd ProductListResponseCurrency = "RSD"
	ProductListResponseCurrencyRub ProductListResponseCurrency = "RUB"
	ProductListResponseCurrencyRwf ProductListResponseCurrency = "RWF"
	ProductListResponseCurrencySar ProductListResponseCurrency = "SAR"
	ProductListResponseCurrencySbd ProductListResponseCurrency = "SBD"
	ProductListResponseCurrencyScr ProductListResponseCurrency = "SCR"
	ProductListResponseCurrencySek ProductListResponseCurrency = "SEK"
	ProductListResponseCurrencySgd ProductListResponseCurrency = "SGD"
	ProductListResponseCurrencyShp ProductListResponseCurrency = "SHP"
	ProductListResponseCurrencySle ProductListResponseCurrency = "SLE"
	ProductListResponseCurrencySll ProductListResponseCurrency = "SLL"
	ProductListResponseCurrencySos ProductListResponseCurrency = "SOS"
	ProductListResponseCurrencySrd ProductListResponseCurrency = "SRD"
	ProductListResponseCurrencySsp ProductListResponseCurrency = "SSP"
	ProductListResponseCurrencyStn ProductListResponseCurrency = "STN"
	ProductListResponseCurrencySvc ProductListResponseCurrency = "SVC"
	ProductListResponseCurrencySzl ProductListResponseCurrency = "SZL"
	ProductListResponseCurrencyThb ProductListResponseCurrency = "THB"
	ProductListResponseCurrencyTnd ProductListResponseCurrency = "TND"
	ProductListResponseCurrencyTop ProductListResponseCurrency = "TOP"
	ProductListResponseCurrencyTry ProductListResponseCurrency = "TRY"
	ProductListResponseCurrencyTtd ProductListResponseCurrency = "TTD"
	ProductListResponseCurrencyTwd ProductListResponseCurrency = "TWD"
	ProductListResponseCurrencyTzs ProductListResponseCurrency = "TZS"
	ProductListResponseCurrencyUah ProductListResponseCurrency = "UAH"
	ProductListResponseCurrencyUgx ProductListResponseCurrency = "UGX"
	ProductListResponseCurrencyUsd ProductListResponseCurrency = "USD"
	ProductListResponseCurrencyUyu ProductListResponseCurrency = "UYU"
	ProductListResponseCurrencyUzs ProductListResponseCurrency = "UZS"
	ProductListResponseCurrencyVes ProductListResponseCurrency = "VES"
	ProductListResponseCurrencyVnd ProductListResponseCurrency = "VND"
	ProductListResponseCurrencyVuv ProductListResponseCurrency = "VUV"
	ProductListResponseCurrencyWst ProductListResponseCurrency = "WST"
	ProductListResponseCurrencyXaf ProductListResponseCurrency = "XAF"
	ProductListResponseCurrencyXcd ProductListResponseCurrency = "XCD"
	ProductListResponseCurrencyXof ProductListResponseCurrency = "XOF"
	ProductListResponseCurrencyXpf ProductListResponseCurrency = "XPF"
	ProductListResponseCurrencyYer ProductListResponseCurrency = "YER"
	ProductListResponseCurrencyZar ProductListResponseCurrency = "ZAR"
	ProductListResponseCurrencyZmw ProductListResponseCurrency = "ZMW"
)

func (ProductListResponseCurrency) IsKnown added in v0.18.0

func (r ProductListResponseCurrency) IsKnown() bool

type ProductListResponsePriceDetail added in v0.19.0

type ProductListResponsePriceDetail struct {
	Currency ProductListResponsePriceDetailCurrency `json:"currency,required"`
	// Discount applied to the price, represented as a percentage (0 to 100).
	Discount float64 `json:"discount,required"`
	// The payment amount, in the smallest denomination of the currency (e.g., cents
	// for USD). For example, to charge $1.00, pass `100`.
	//
	// If [`pay_what_you_want`](Self::pay_what_you_want) is set to `true`, this field
	// represents the **minimum** amount the customer must pay.
	Price int64 `json:"price,required"`
	// Indicates if purchasing power parity adjustments are applied to the price.
	// Purchasing power parity feature is not available as of now.
	PurchasingPowerParity bool                               `json:"purchasing_power_parity,required"`
	Type                  ProductListResponsePriceDetailType `json:"type,required"`
	// Indicates whether the customer can pay any amount they choose. If set to `true`,
	// the [`price`](Self::price) field is the minimum amount.
	PayWhatYouWant bool `json:"pay_what_you_want"`
	// Number of units for the payment frequency. For example, a value of `1` with a
	// `payment_frequency_interval` of `month` represents monthly payments.
	PaymentFrequencyCount    int64                                                  `json:"payment_frequency_count"`
	PaymentFrequencyInterval ProductListResponsePriceDetailPaymentFrequencyInterval `json:"payment_frequency_interval"`
	// Number of units for the subscription period. For example, a value of `12` with a
	// `subscription_period_interval` of `month` represents a one-year subscription.
	SubscriptionPeriodCount    int64                                                    `json:"subscription_period_count"`
	SubscriptionPeriodInterval ProductListResponsePriceDetailSubscriptionPeriodInterval `json:"subscription_period_interval"`
	// A suggested price for the user to pay. This value is only considered if
	// [`pay_what_you_want`](Self::pay_what_you_want) is `true`. Otherwise, it is
	// ignored.
	SuggestedPrice int64 `json:"suggested_price,nullable"`
	// Indicates if the price is tax inclusive.
	TaxInclusive bool `json:"tax_inclusive,nullable"`
	// Number of days for the trial period. A value of `0` indicates no trial period.
	TrialPeriodDays int64                              `json:"trial_period_days"`
	JSON            productListResponsePriceDetailJSON `json:"-"`
	// contains filtered or unexported fields
}

func (ProductListResponsePriceDetail) AsUnion added in v0.19.0

AsUnion returns a ProductListResponsePriceDetailUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are ProductListResponsePriceDetailOneTimePrice, ProductListResponsePriceDetailRecurringPrice.

func (*ProductListResponsePriceDetail) UnmarshalJSON added in v0.19.0

func (r *ProductListResponsePriceDetail) UnmarshalJSON(data []byte) (err error)

type ProductListResponsePriceDetailCurrency added in v0.19.0

type ProductListResponsePriceDetailCurrency string
const (
	ProductListResponsePriceDetailCurrencyAed ProductListResponsePriceDetailCurrency = "AED"
	ProductListResponsePriceDetailCurrencyAll ProductListResponsePriceDetailCurrency = "ALL"
	ProductListResponsePriceDetailCurrencyAmd ProductListResponsePriceDetailCurrency = "AMD"
	ProductListResponsePriceDetailCurrencyAng ProductListResponsePriceDetailCurrency = "ANG"
	ProductListResponsePriceDetailCurrencyAoa ProductListResponsePriceDetailCurrency = "AOA"
	ProductListResponsePriceDetailCurrencyArs ProductListResponsePriceDetailCurrency = "ARS"
	ProductListResponsePriceDetailCurrencyAud ProductListResponsePriceDetailCurrency = "AUD"
	ProductListResponsePriceDetailCurrencyAwg ProductListResponsePriceDetailCurrency = "AWG"
	ProductListResponsePriceDetailCurrencyAzn ProductListResponsePriceDetailCurrency = "AZN"
	ProductListResponsePriceDetailCurrencyBam ProductListResponsePriceDetailCurrency = "BAM"
	ProductListResponsePriceDetailCurrencyBbd ProductListResponsePriceDetailCurrency = "BBD"
	ProductListResponsePriceDetailCurrencyBdt ProductListResponsePriceDetailCurrency = "BDT"
	ProductListResponsePriceDetailCurrencyBgn ProductListResponsePriceDetailCurrency = "BGN"
	ProductListResponsePriceDetailCurrencyBhd ProductListResponsePriceDetailCurrency = "BHD"
	ProductListResponsePriceDetailCurrencyBif ProductListResponsePriceDetailCurrency = "BIF"
	ProductListResponsePriceDetailCurrencyBmd ProductListResponsePriceDetailCurrency = "BMD"
	ProductListResponsePriceDetailCurrencyBnd ProductListResponsePriceDetailCurrency = "BND"
	ProductListResponsePriceDetailCurrencyBob ProductListResponsePriceDetailCurrency = "BOB"
	ProductListResponsePriceDetailCurrencyBrl ProductListResponsePriceDetailCurrency = "BRL"
	ProductListResponsePriceDetailCurrencyBsd ProductListResponsePriceDetailCurrency = "BSD"
	ProductListResponsePriceDetailCurrencyBwp ProductListResponsePriceDetailCurrency = "BWP"
	ProductListResponsePriceDetailCurrencyByn ProductListResponsePriceDetailCurrency = "BYN"
	ProductListResponsePriceDetailCurrencyBzd ProductListResponsePriceDetailCurrency = "BZD"
	ProductListResponsePriceDetailCurrencyCad ProductListResponsePriceDetailCurrency = "CAD"
	ProductListResponsePriceDetailCurrencyChf ProductListResponsePriceDetailCurrency = "CHF"
	ProductListResponsePriceDetailCurrencyClp ProductListResponsePriceDetailCurrency = "CLP"
	ProductListResponsePriceDetailCurrencyCny ProductListResponsePriceDetailCurrency = "CNY"
	ProductListResponsePriceDetailCurrencyCop ProductListResponsePriceDetailCurrency = "COP"
	ProductListResponsePriceDetailCurrencyCrc ProductListResponsePriceDetailCurrency = "CRC"
	ProductListResponsePriceDetailCurrencyCup ProductListResponsePriceDetailCurrency = "CUP"
	ProductListResponsePriceDetailCurrencyCve ProductListResponsePriceDetailCurrency = "CVE"
	ProductListResponsePriceDetailCurrencyCzk ProductListResponsePriceDetailCurrency = "CZK"
	ProductListResponsePriceDetailCurrencyDjf ProductListResponsePriceDetailCurrency = "DJF"
	ProductListResponsePriceDetailCurrencyDkk ProductListResponsePriceDetailCurrency = "DKK"
	ProductListResponsePriceDetailCurrencyDop ProductListResponsePriceDetailCurrency = "DOP"
	ProductListResponsePriceDetailCurrencyDzd ProductListResponsePriceDetailCurrency = "DZD"
	ProductListResponsePriceDetailCurrencyEgp ProductListResponsePriceDetailCurrency = "EGP"
	ProductListResponsePriceDetailCurrencyEtb ProductListResponsePriceDetailCurrency = "ETB"
	ProductListResponsePriceDetailCurrencyEur ProductListResponsePriceDetailCurrency = "EUR"
	ProductListResponsePriceDetailCurrencyFjd ProductListResponsePriceDetailCurrency = "FJD"
	ProductListResponsePriceDetailCurrencyFkp ProductListResponsePriceDetailCurrency = "FKP"
	ProductListResponsePriceDetailCurrencyGbp ProductListResponsePriceDetailCurrency = "GBP"
	ProductListResponsePriceDetailCurrencyGel ProductListResponsePriceDetailCurrency = "GEL"
	ProductListResponsePriceDetailCurrencyGhs ProductListResponsePriceDetailCurrency = "GHS"
	ProductListResponsePriceDetailCurrencyGip ProductListResponsePriceDetailCurrency = "GIP"
	ProductListResponsePriceDetailCurrencyGmd ProductListResponsePriceDetailCurrency = "GMD"
	ProductListResponsePriceDetailCurrencyGnf ProductListResponsePriceDetailCurrency = "GNF"
	ProductListResponsePriceDetailCurrencyGtq ProductListResponsePriceDetailCurrency = "GTQ"
	ProductListResponsePriceDetailCurrencyGyd ProductListResponsePriceDetailCurrency = "GYD"
	ProductListResponsePriceDetailCurrencyHkd ProductListResponsePriceDetailCurrency = "HKD"
	ProductListResponsePriceDetailCurrencyHnl ProductListResponsePriceDetailCurrency = "HNL"
	ProductListResponsePriceDetailCurrencyHrk ProductListResponsePriceDetailCurrency = "HRK"
	ProductListResponsePriceDetailCurrencyHtg ProductListResponsePriceDetailCurrency = "HTG"
	ProductListResponsePriceDetailCurrencyHuf ProductListResponsePriceDetailCurrency = "HUF"
	ProductListResponsePriceDetailCurrencyIdr ProductListResponsePriceDetailCurrency = "IDR"
	ProductListResponsePriceDetailCurrencyIls ProductListResponsePriceDetailCurrency = "ILS"
	ProductListResponsePriceDetailCurrencyInr ProductListResponsePriceDetailCurrency = "INR"
	ProductListResponsePriceDetailCurrencyIqd ProductListResponsePriceDetailCurrency = "IQD"
	ProductListResponsePriceDetailCurrencyJmd ProductListResponsePriceDetailCurrency = "JMD"
	ProductListResponsePriceDetailCurrencyJod ProductListResponsePriceDetailCurrency = "JOD"
	ProductListResponsePriceDetailCurrencyJpy ProductListResponsePriceDetailCurrency = "JPY"
	ProductListResponsePriceDetailCurrencyKes ProductListResponsePriceDetailCurrency = "KES"
	ProductListResponsePriceDetailCurrencyKgs ProductListResponsePriceDetailCurrency = "KGS"
	ProductListResponsePriceDetailCurrencyKhr ProductListResponsePriceDetailCurrency = "KHR"
	ProductListResponsePriceDetailCurrencyKmf ProductListResponsePriceDetailCurrency = "KMF"
	ProductListResponsePriceDetailCurrencyKrw ProductListResponsePriceDetailCurrency = "KRW"
	ProductListResponsePriceDetailCurrencyKwd ProductListResponsePriceDetailCurrency = "KWD"
	ProductListResponsePriceDetailCurrencyKyd ProductListResponsePriceDetailCurrency = "KYD"
	ProductListResponsePriceDetailCurrencyKzt ProductListResponsePriceDetailCurrency = "KZT"
	ProductListResponsePriceDetailCurrencyLak ProductListResponsePriceDetailCurrency = "LAK"
	ProductListResponsePriceDetailCurrencyLbp ProductListResponsePriceDetailCurrency = "LBP"
	ProductListResponsePriceDetailCurrencyLkr ProductListResponsePriceDetailCurrency = "LKR"
	ProductListResponsePriceDetailCurrencyLrd ProductListResponsePriceDetailCurrency = "LRD"
	ProductListResponsePriceDetailCurrencyLsl ProductListResponsePriceDetailCurrency = "LSL"
	ProductListResponsePriceDetailCurrencyLyd ProductListResponsePriceDetailCurrency = "LYD"
	ProductListResponsePriceDetailCurrencyMad ProductListResponsePriceDetailCurrency = "MAD"
	ProductListResponsePriceDetailCurrencyMdl ProductListResponsePriceDetailCurrency = "MDL"
	ProductListResponsePriceDetailCurrencyMga ProductListResponsePriceDetailCurrency = "MGA"
	ProductListResponsePriceDetailCurrencyMkd ProductListResponsePriceDetailCurrency = "MKD"
	ProductListResponsePriceDetailCurrencyMmk ProductListResponsePriceDetailCurrency = "MMK"
	ProductListResponsePriceDetailCurrencyMnt ProductListResponsePriceDetailCurrency = "MNT"
	ProductListResponsePriceDetailCurrencyMop ProductListResponsePriceDetailCurrency = "MOP"
	ProductListResponsePriceDetailCurrencyMru ProductListResponsePriceDetailCurrency = "MRU"
	ProductListResponsePriceDetailCurrencyMur ProductListResponsePriceDetailCurrency = "MUR"
	ProductListResponsePriceDetailCurrencyMvr ProductListResponsePriceDetailCurrency = "MVR"
	ProductListResponsePriceDetailCurrencyMwk ProductListResponsePriceDetailCurrency = "MWK"
	ProductListResponsePriceDetailCurrencyMxn ProductListResponsePriceDetailCurrency = "MXN"
	ProductListResponsePriceDetailCurrencyMyr ProductListResponsePriceDetailCurrency = "MYR"
	ProductListResponsePriceDetailCurrencyMzn ProductListResponsePriceDetailCurrency = "MZN"
	ProductListResponsePriceDetailCurrencyNad ProductListResponsePriceDetailCurrency = "NAD"
	ProductListResponsePriceDetailCurrencyNgn ProductListResponsePriceDetailCurrency = "NGN"
	ProductListResponsePriceDetailCurrencyNio ProductListResponsePriceDetailCurrency = "NIO"
	ProductListResponsePriceDetailCurrencyNok ProductListResponsePriceDetailCurrency = "NOK"
	ProductListResponsePriceDetailCurrencyNpr ProductListResponsePriceDetailCurrency = "NPR"
	ProductListResponsePriceDetailCurrencyNzd ProductListResponsePriceDetailCurrency = "NZD"
	ProductListResponsePriceDetailCurrencyOmr ProductListResponsePriceDetailCurrency = "OMR"
	ProductListResponsePriceDetailCurrencyPab ProductListResponsePriceDetailCurrency = "PAB"
	ProductListResponsePriceDetailCurrencyPen ProductListResponsePriceDetailCurrency = "PEN"
	ProductListResponsePriceDetailCurrencyPgk ProductListResponsePriceDetailCurrency = "PGK"
	ProductListResponsePriceDetailCurrencyPhp ProductListResponsePriceDetailCurrency = "PHP"
	ProductListResponsePriceDetailCurrencyPkr ProductListResponsePriceDetailCurrency = "PKR"
	ProductListResponsePriceDetailCurrencyPln ProductListResponsePriceDetailCurrency = "PLN"
	ProductListResponsePriceDetailCurrencyPyg ProductListResponsePriceDetailCurrency = "PYG"
	ProductListResponsePriceDetailCurrencyQar ProductListResponsePriceDetailCurrency = "QAR"
	ProductListResponsePriceDetailCurrencyRon ProductListResponsePriceDetailCurrency = "RON"
	ProductListResponsePriceDetailCurrencyRsd ProductListResponsePriceDetailCurrency = "RSD"
	ProductListResponsePriceDetailCurrencyRub ProductListResponsePriceDetailCurrency = "RUB"
	ProductListResponsePriceDetailCurrencyRwf ProductListResponsePriceDetailCurrency = "RWF"
	ProductListResponsePriceDetailCurrencySar ProductListResponsePriceDetailCurrency = "SAR"
	ProductListResponsePriceDetailCurrencySbd ProductListResponsePriceDetailCurrency = "SBD"
	ProductListResponsePriceDetailCurrencyScr ProductListResponsePriceDetailCurrency = "SCR"
	ProductListResponsePriceDetailCurrencySek ProductListResponsePriceDetailCurrency = "SEK"
	ProductListResponsePriceDetailCurrencySgd ProductListResponsePriceDetailCurrency = "SGD"
	ProductListResponsePriceDetailCurrencyShp ProductListResponsePriceDetailCurrency = "SHP"
	ProductListResponsePriceDetailCurrencySle ProductListResponsePriceDetailCurrency = "SLE"
	ProductListResponsePriceDetailCurrencySll ProductListResponsePriceDetailCurrency = "SLL"
	ProductListResponsePriceDetailCurrencySos ProductListResponsePriceDetailCurrency = "SOS"
	ProductListResponsePriceDetailCurrencySrd ProductListResponsePriceDetailCurrency = "SRD"
	ProductListResponsePriceDetailCurrencySsp ProductListResponsePriceDetailCurrency = "SSP"
	ProductListResponsePriceDetailCurrencyStn ProductListResponsePriceDetailCurrency = "STN"
	ProductListResponsePriceDetailCurrencySvc ProductListResponsePriceDetailCurrency = "SVC"
	ProductListResponsePriceDetailCurrencySzl ProductListResponsePriceDetailCurrency = "SZL"
	ProductListResponsePriceDetailCurrencyThb ProductListResponsePriceDetailCurrency = "THB"
	ProductListResponsePriceDetailCurrencyTnd ProductListResponsePriceDetailCurrency = "TND"
	ProductListResponsePriceDetailCurrencyTop ProductListResponsePriceDetailCurrency = "TOP"
	ProductListResponsePriceDetailCurrencyTry ProductListResponsePriceDetailCurrency = "TRY"
	ProductListResponsePriceDetailCurrencyTtd ProductListResponsePriceDetailCurrency = "TTD"
	ProductListResponsePriceDetailCurrencyTwd ProductListResponsePriceDetailCurrency = "TWD"
	ProductListResponsePriceDetailCurrencyTzs ProductListResponsePriceDetailCurrency = "TZS"
	ProductListResponsePriceDetailCurrencyUah ProductListResponsePriceDetailCurrency = "UAH"
	ProductListResponsePriceDetailCurrencyUgx ProductListResponsePriceDetailCurrency = "UGX"
	ProductListResponsePriceDetailCurrencyUsd ProductListResponsePriceDetailCurrency = "USD"
	ProductListResponsePriceDetailCurrencyUyu ProductListResponsePriceDetailCurrency = "UYU"
	ProductListResponsePriceDetailCurrencyUzs ProductListResponsePriceDetailCurrency = "UZS"
	ProductListResponsePriceDetailCurrencyVes ProductListResponsePriceDetailCurrency = "VES"
	ProductListResponsePriceDetailCurrencyVnd ProductListResponsePriceDetailCurrency = "VND"
	ProductListResponsePriceDetailCurrencyVuv ProductListResponsePriceDetailCurrency = "VUV"
	ProductListResponsePriceDetailCurrencyWst ProductListResponsePriceDetailCurrency = "WST"
	ProductListResponsePriceDetailCurrencyXaf ProductListResponsePriceDetailCurrency = "XAF"
	ProductListResponsePriceDetailCurrencyXcd ProductListResponsePriceDetailCurrency = "XCD"
	ProductListResponsePriceDetailCurrencyXof ProductListResponsePriceDetailCurrency = "XOF"
	ProductListResponsePriceDetailCurrencyXpf ProductListResponsePriceDetailCurrency = "XPF"
	ProductListResponsePriceDetailCurrencyYer ProductListResponsePriceDetailCurrency = "YER"
	ProductListResponsePriceDetailCurrencyZar ProductListResponsePriceDetailCurrency = "ZAR"
	ProductListResponsePriceDetailCurrencyZmw ProductListResponsePriceDetailCurrency = "ZMW"
)

func (ProductListResponsePriceDetailCurrency) IsKnown added in v0.19.0

type ProductListResponsePriceDetailOneTimePrice added in v0.19.0

type ProductListResponsePriceDetailOneTimePrice struct {
	Currency ProductListResponsePriceDetailOneTimePriceCurrency `json:"currency,required"`
	// Discount applied to the price, represented as a percentage (0 to 100).
	Discount float64 `json:"discount,required"`
	// The payment amount, in the smallest denomination of the currency (e.g., cents
	// for USD). For example, to charge $1.00, pass `100`.
	//
	// If [`pay_what_you_want`](Self::pay_what_you_want) is set to `true`, this field
	// represents the **minimum** amount the customer must pay.
	Price int64 `json:"price,required"`
	// Indicates if purchasing power parity adjustments are applied to the price.
	// Purchasing power parity feature is not available as of now.
	PurchasingPowerParity bool                                           `json:"purchasing_power_parity,required"`
	Type                  ProductListResponsePriceDetailOneTimePriceType `json:"type,required"`
	// Indicates whether the customer can pay any amount they choose. If set to `true`,
	// the [`price`](Self::price) field is the minimum amount.
	PayWhatYouWant bool `json:"pay_what_you_want"`
	// A suggested price for the user to pay. This value is only considered if
	// [`pay_what_you_want`](Self::pay_what_you_want) is `true`. Otherwise, it is
	// ignored.
	SuggestedPrice int64 `json:"suggested_price,nullable"`
	// Indicates if the price is tax inclusive.
	TaxInclusive bool                                           `json:"tax_inclusive,nullable"`
	JSON         productListResponsePriceDetailOneTimePriceJSON `json:"-"`
}

func (*ProductListResponsePriceDetailOneTimePrice) UnmarshalJSON added in v0.19.0

func (r *ProductListResponsePriceDetailOneTimePrice) UnmarshalJSON(data []byte) (err error)

type ProductListResponsePriceDetailOneTimePriceCurrency added in v0.19.0

type ProductListResponsePriceDetailOneTimePriceCurrency string
const (
	ProductListResponsePriceDetailOneTimePriceCurrencyAed ProductListResponsePriceDetailOneTimePriceCurrency = "AED"
	ProductListResponsePriceDetailOneTimePriceCurrencyAll ProductListResponsePriceDetailOneTimePriceCurrency = "ALL"
	ProductListResponsePriceDetailOneTimePriceCurrencyAmd ProductListResponsePriceDetailOneTimePriceCurrency = "AMD"
	ProductListResponsePriceDetailOneTimePriceCurrencyAng ProductListResponsePriceDetailOneTimePriceCurrency = "ANG"
	ProductListResponsePriceDetailOneTimePriceCurrencyAoa ProductListResponsePriceDetailOneTimePriceCurrency = "AOA"
	ProductListResponsePriceDetailOneTimePriceCurrencyArs ProductListResponsePriceDetailOneTimePriceCurrency = "ARS"
	ProductListResponsePriceDetailOneTimePriceCurrencyAud ProductListResponsePriceDetailOneTimePriceCurrency = "AUD"
	ProductListResponsePriceDetailOneTimePriceCurrencyAwg ProductListResponsePriceDetailOneTimePriceCurrency = "AWG"
	ProductListResponsePriceDetailOneTimePriceCurrencyAzn ProductListResponsePriceDetailOneTimePriceCurrency = "AZN"
	ProductListResponsePriceDetailOneTimePriceCurrencyBam ProductListResponsePriceDetailOneTimePriceCurrency = "BAM"
	ProductListResponsePriceDetailOneTimePriceCurrencyBbd ProductListResponsePriceDetailOneTimePriceCurrency = "BBD"
	ProductListResponsePriceDetailOneTimePriceCurrencyBdt ProductListResponsePriceDetailOneTimePriceCurrency = "BDT"
	ProductListResponsePriceDetailOneTimePriceCurrencyBgn ProductListResponsePriceDetailOneTimePriceCurrency = "BGN"
	ProductListResponsePriceDetailOneTimePriceCurrencyBhd ProductListResponsePriceDetailOneTimePriceCurrency = "BHD"
	ProductListResponsePriceDetailOneTimePriceCurrencyBif ProductListResponsePriceDetailOneTimePriceCurrency = "BIF"
	ProductListResponsePriceDetailOneTimePriceCurrencyBmd ProductListResponsePriceDetailOneTimePriceCurrency = "BMD"
	ProductListResponsePriceDetailOneTimePriceCurrencyBnd ProductListResponsePriceDetailOneTimePriceCurrency = "BND"
	ProductListResponsePriceDetailOneTimePriceCurrencyBob ProductListResponsePriceDetailOneTimePriceCurrency = "BOB"
	ProductListResponsePriceDetailOneTimePriceCurrencyBrl ProductListResponsePriceDetailOneTimePriceCurrency = "BRL"
	ProductListResponsePriceDetailOneTimePriceCurrencyBsd ProductListResponsePriceDetailOneTimePriceCurrency = "BSD"
	ProductListResponsePriceDetailOneTimePriceCurrencyBwp ProductListResponsePriceDetailOneTimePriceCurrency = "BWP"
	ProductListResponsePriceDetailOneTimePriceCurrencyByn ProductListResponsePriceDetailOneTimePriceCurrency = "BYN"
	ProductListResponsePriceDetailOneTimePriceCurrencyBzd ProductListResponsePriceDetailOneTimePriceCurrency = "BZD"
	ProductListResponsePriceDetailOneTimePriceCurrencyCad ProductListResponsePriceDetailOneTimePriceCurrency = "CAD"
	ProductListResponsePriceDetailOneTimePriceCurrencyChf ProductListResponsePriceDetailOneTimePriceCurrency = "CHF"
	ProductListResponsePriceDetailOneTimePriceCurrencyClp ProductListResponsePriceDetailOneTimePriceCurrency = "CLP"
	ProductListResponsePriceDetailOneTimePriceCurrencyCny ProductListResponsePriceDetailOneTimePriceCurrency = "CNY"
	ProductListResponsePriceDetailOneTimePriceCurrencyCop ProductListResponsePriceDetailOneTimePriceCurrency = "COP"
	ProductListResponsePriceDetailOneTimePriceCurrencyCrc ProductListResponsePriceDetailOneTimePriceCurrency = "CRC"
	ProductListResponsePriceDetailOneTimePriceCurrencyCup ProductListResponsePriceDetailOneTimePriceCurrency = "CUP"
	ProductListResponsePriceDetailOneTimePriceCurrencyCve ProductListResponsePriceDetailOneTimePriceCurrency = "CVE"
	ProductListResponsePriceDetailOneTimePriceCurrencyCzk ProductListResponsePriceDetailOneTimePriceCurrency = "CZK"
	ProductListResponsePriceDetailOneTimePriceCurrencyDjf ProductListResponsePriceDetailOneTimePriceCurrency = "DJF"
	ProductListResponsePriceDetailOneTimePriceCurrencyDkk ProductListResponsePriceDetailOneTimePriceCurrency = "DKK"
	ProductListResponsePriceDetailOneTimePriceCurrencyDop ProductListResponsePriceDetailOneTimePriceCurrency = "DOP"
	ProductListResponsePriceDetailOneTimePriceCurrencyDzd ProductListResponsePriceDetailOneTimePriceCurrency = "DZD"
	ProductListResponsePriceDetailOneTimePriceCurrencyEgp ProductListResponsePriceDetailOneTimePriceCurrency = "EGP"
	ProductListResponsePriceDetailOneTimePriceCurrencyEtb ProductListResponsePriceDetailOneTimePriceCurrency = "ETB"
	ProductListResponsePriceDetailOneTimePriceCurrencyEur ProductListResponsePriceDetailOneTimePriceCurrency = "EUR"
	ProductListResponsePriceDetailOneTimePriceCurrencyFjd ProductListResponsePriceDetailOneTimePriceCurrency = "FJD"
	ProductListResponsePriceDetailOneTimePriceCurrencyFkp ProductListResponsePriceDetailOneTimePriceCurrency = "FKP"
	ProductListResponsePriceDetailOneTimePriceCurrencyGbp ProductListResponsePriceDetailOneTimePriceCurrency = "GBP"
	ProductListResponsePriceDetailOneTimePriceCurrencyGel ProductListResponsePriceDetailOneTimePriceCurrency = "GEL"
	ProductListResponsePriceDetailOneTimePriceCurrencyGhs ProductListResponsePriceDetailOneTimePriceCurrency = "GHS"
	ProductListResponsePriceDetailOneTimePriceCurrencyGip ProductListResponsePriceDetailOneTimePriceCurrency = "GIP"
	ProductListResponsePriceDetailOneTimePriceCurrencyGmd ProductListResponsePriceDetailOneTimePriceCurrency = "GMD"
	ProductListResponsePriceDetailOneTimePriceCurrencyGnf ProductListResponsePriceDetailOneTimePriceCurrency = "GNF"
	ProductListResponsePriceDetailOneTimePriceCurrencyGtq ProductListResponsePriceDetailOneTimePriceCurrency = "GTQ"
	ProductListResponsePriceDetailOneTimePriceCurrencyGyd ProductListResponsePriceDetailOneTimePriceCurrency = "GYD"
	ProductListResponsePriceDetailOneTimePriceCurrencyHkd ProductListResponsePriceDetailOneTimePriceCurrency = "HKD"
	ProductListResponsePriceDetailOneTimePriceCurrencyHnl ProductListResponsePriceDetailOneTimePriceCurrency = "HNL"
	ProductListResponsePriceDetailOneTimePriceCurrencyHrk ProductListResponsePriceDetailOneTimePriceCurrency = "HRK"
	ProductListResponsePriceDetailOneTimePriceCurrencyHtg ProductListResponsePriceDetailOneTimePriceCurrency = "HTG"
	ProductListResponsePriceDetailOneTimePriceCurrencyHuf ProductListResponsePriceDetailOneTimePriceCurrency = "HUF"
	ProductListResponsePriceDetailOneTimePriceCurrencyIdr ProductListResponsePriceDetailOneTimePriceCurrency = "IDR"
	ProductListResponsePriceDetailOneTimePriceCurrencyIls ProductListResponsePriceDetailOneTimePriceCurrency = "ILS"
	ProductListResponsePriceDetailOneTimePriceCurrencyInr ProductListResponsePriceDetailOneTimePriceCurrency = "INR"
	ProductListResponsePriceDetailOneTimePriceCurrencyIqd ProductListResponsePriceDetailOneTimePriceCurrency = "IQD"
	ProductListResponsePriceDetailOneTimePriceCurrencyJmd ProductListResponsePriceDetailOneTimePriceCurrency = "JMD"
	ProductListResponsePriceDetailOneTimePriceCurrencyJod ProductListResponsePriceDetailOneTimePriceCurrency = "JOD"
	ProductListResponsePriceDetailOneTimePriceCurrencyJpy ProductListResponsePriceDetailOneTimePriceCurrency = "JPY"
	ProductListResponsePriceDetailOneTimePriceCurrencyKes ProductListResponsePriceDetailOneTimePriceCurrency = "KES"
	ProductListResponsePriceDetailOneTimePriceCurrencyKgs ProductListResponsePriceDetailOneTimePriceCurrency = "KGS"
	ProductListResponsePriceDetailOneTimePriceCurrencyKhr ProductListResponsePriceDetailOneTimePriceCurrency = "KHR"
	ProductListResponsePriceDetailOneTimePriceCurrencyKmf ProductListResponsePriceDetailOneTimePriceCurrency = "KMF"
	ProductListResponsePriceDetailOneTimePriceCurrencyKrw ProductListResponsePriceDetailOneTimePriceCurrency = "KRW"
	ProductListResponsePriceDetailOneTimePriceCurrencyKwd ProductListResponsePriceDetailOneTimePriceCurrency = "KWD"
	ProductListResponsePriceDetailOneTimePriceCurrencyKyd ProductListResponsePriceDetailOneTimePriceCurrency = "KYD"
	ProductListResponsePriceDetailOneTimePriceCurrencyKzt ProductListResponsePriceDetailOneTimePriceCurrency = "KZT"
	ProductListResponsePriceDetailOneTimePriceCurrencyLak ProductListResponsePriceDetailOneTimePriceCurrency = "LAK"
	ProductListResponsePriceDetailOneTimePriceCurrencyLbp ProductListResponsePriceDetailOneTimePriceCurrency = "LBP"
	ProductListResponsePriceDetailOneTimePriceCurrencyLkr ProductListResponsePriceDetailOneTimePriceCurrency = "LKR"
	ProductListResponsePriceDetailOneTimePriceCurrencyLrd ProductListResponsePriceDetailOneTimePriceCurrency = "LRD"
	ProductListResponsePriceDetailOneTimePriceCurrencyLsl ProductListResponsePriceDetailOneTimePriceCurrency = "LSL"
	ProductListResponsePriceDetailOneTimePriceCurrencyLyd ProductListResponsePriceDetailOneTimePriceCurrency = "LYD"
	ProductListResponsePriceDetailOneTimePriceCurrencyMad ProductListResponsePriceDetailOneTimePriceCurrency = "MAD"
	ProductListResponsePriceDetailOneTimePriceCurrencyMdl ProductListResponsePriceDetailOneTimePriceCurrency = "MDL"
	ProductListResponsePriceDetailOneTimePriceCurrencyMga ProductListResponsePriceDetailOneTimePriceCurrency = "MGA"
	ProductListResponsePriceDetailOneTimePriceCurrencyMkd ProductListResponsePriceDetailOneTimePriceCurrency = "MKD"
	ProductListResponsePriceDetailOneTimePriceCurrencyMmk ProductListResponsePriceDetailOneTimePriceCurrency = "MMK"
	ProductListResponsePriceDetailOneTimePriceCurrencyMnt ProductListResponsePriceDetailOneTimePriceCurrency = "MNT"
	ProductListResponsePriceDetailOneTimePriceCurrencyMop ProductListResponsePriceDetailOneTimePriceCurrency = "MOP"
	ProductListResponsePriceDetailOneTimePriceCurrencyMru ProductListResponsePriceDetailOneTimePriceCurrency = "MRU"
	ProductListResponsePriceDetailOneTimePriceCurrencyMur ProductListResponsePriceDetailOneTimePriceCurrency = "MUR"
	ProductListResponsePriceDetailOneTimePriceCurrencyMvr ProductListResponsePriceDetailOneTimePriceCurrency = "MVR"
	ProductListResponsePriceDetailOneTimePriceCurrencyMwk ProductListResponsePriceDetailOneTimePriceCurrency = "MWK"
	ProductListResponsePriceDetailOneTimePriceCurrencyMxn ProductListResponsePriceDetailOneTimePriceCurrency = "MXN"
	ProductListResponsePriceDetailOneTimePriceCurrencyMyr ProductListResponsePriceDetailOneTimePriceCurrency = "MYR"
	ProductListResponsePriceDetailOneTimePriceCurrencyMzn ProductListResponsePriceDetailOneTimePriceCurrency = "MZN"
	ProductListResponsePriceDetailOneTimePriceCurrencyNad ProductListResponsePriceDetailOneTimePriceCurrency = "NAD"
	ProductListResponsePriceDetailOneTimePriceCurrencyNgn ProductListResponsePriceDetailOneTimePriceCurrency = "NGN"
	ProductListResponsePriceDetailOneTimePriceCurrencyNio ProductListResponsePriceDetailOneTimePriceCurrency = "NIO"
	ProductListResponsePriceDetailOneTimePriceCurrencyNok ProductListResponsePriceDetailOneTimePriceCurrency = "NOK"
	ProductListResponsePriceDetailOneTimePriceCurrencyNpr ProductListResponsePriceDetailOneTimePriceCurrency = "NPR"
	ProductListResponsePriceDetailOneTimePriceCurrencyNzd ProductListResponsePriceDetailOneTimePriceCurrency = "NZD"
	ProductListResponsePriceDetailOneTimePriceCurrencyOmr ProductListResponsePriceDetailOneTimePriceCurrency = "OMR"
	ProductListResponsePriceDetailOneTimePriceCurrencyPab ProductListResponsePriceDetailOneTimePriceCurrency = "PAB"
	ProductListResponsePriceDetailOneTimePriceCurrencyPen ProductListResponsePriceDetailOneTimePriceCurrency = "PEN"
	ProductListResponsePriceDetailOneTimePriceCurrencyPgk ProductListResponsePriceDetailOneTimePriceCurrency = "PGK"
	ProductListResponsePriceDetailOneTimePriceCurrencyPhp ProductListResponsePriceDetailOneTimePriceCurrency = "PHP"
	ProductListResponsePriceDetailOneTimePriceCurrencyPkr ProductListResponsePriceDetailOneTimePriceCurrency = "PKR"
	ProductListResponsePriceDetailOneTimePriceCurrencyPln ProductListResponsePriceDetailOneTimePriceCurrency = "PLN"
	ProductListResponsePriceDetailOneTimePriceCurrencyPyg ProductListResponsePriceDetailOneTimePriceCurrency = "PYG"
	ProductListResponsePriceDetailOneTimePriceCurrencyQar ProductListResponsePriceDetailOneTimePriceCurrency = "QAR"
	ProductListResponsePriceDetailOneTimePriceCurrencyRon ProductListResponsePriceDetailOneTimePriceCurrency = "RON"
	ProductListResponsePriceDetailOneTimePriceCurrencyRsd ProductListResponsePriceDetailOneTimePriceCurrency = "RSD"
	ProductListResponsePriceDetailOneTimePriceCurrencyRub ProductListResponsePriceDetailOneTimePriceCurrency = "RUB"
	ProductListResponsePriceDetailOneTimePriceCurrencyRwf ProductListResponsePriceDetailOneTimePriceCurrency = "RWF"
	ProductListResponsePriceDetailOneTimePriceCurrencySar ProductListResponsePriceDetailOneTimePriceCurrency = "SAR"
	ProductListResponsePriceDetailOneTimePriceCurrencySbd ProductListResponsePriceDetailOneTimePriceCurrency = "SBD"
	ProductListResponsePriceDetailOneTimePriceCurrencyScr ProductListResponsePriceDetailOneTimePriceCurrency = "SCR"
	ProductListResponsePriceDetailOneTimePriceCurrencySek ProductListResponsePriceDetailOneTimePriceCurrency = "SEK"
	ProductListResponsePriceDetailOneTimePriceCurrencySgd ProductListResponsePriceDetailOneTimePriceCurrency = "SGD"
	ProductListResponsePriceDetailOneTimePriceCurrencyShp ProductListResponsePriceDetailOneTimePriceCurrency = "SHP"
	ProductListResponsePriceDetailOneTimePriceCurrencySle ProductListResponsePriceDetailOneTimePriceCurrency = "SLE"
	ProductListResponsePriceDetailOneTimePriceCurrencySll ProductListResponsePriceDetailOneTimePriceCurrency = "SLL"
	ProductListResponsePriceDetailOneTimePriceCurrencySos ProductListResponsePriceDetailOneTimePriceCurrency = "SOS"
	ProductListResponsePriceDetailOneTimePriceCurrencySrd ProductListResponsePriceDetailOneTimePriceCurrency = "SRD"
	ProductListResponsePriceDetailOneTimePriceCurrencySsp ProductListResponsePriceDetailOneTimePriceCurrency = "SSP"
	ProductListResponsePriceDetailOneTimePriceCurrencyStn ProductListResponsePriceDetailOneTimePriceCurrency = "STN"
	ProductListResponsePriceDetailOneTimePriceCurrencySvc ProductListResponsePriceDetailOneTimePriceCurrency = "SVC"
	ProductListResponsePriceDetailOneTimePriceCurrencySzl ProductListResponsePriceDetailOneTimePriceCurrency = "SZL"
	ProductListResponsePriceDetailOneTimePriceCurrencyThb ProductListResponsePriceDetailOneTimePriceCurrency = "THB"
	ProductListResponsePriceDetailOneTimePriceCurrencyTnd ProductListResponsePriceDetailOneTimePriceCurrency = "TND"
	ProductListResponsePriceDetailOneTimePriceCurrencyTop ProductListResponsePriceDetailOneTimePriceCurrency = "TOP"
	ProductListResponsePriceDetailOneTimePriceCurrencyTry ProductListResponsePriceDetailOneTimePriceCurrency = "TRY"
	ProductListResponsePriceDetailOneTimePriceCurrencyTtd ProductListResponsePriceDetailOneTimePriceCurrency = "TTD"
	ProductListResponsePriceDetailOneTimePriceCurrencyTwd ProductListResponsePriceDetailOneTimePriceCurrency = "TWD"
	ProductListResponsePriceDetailOneTimePriceCurrencyTzs ProductListResponsePriceDetailOneTimePriceCurrency = "TZS"
	ProductListResponsePriceDetailOneTimePriceCurrencyUah ProductListResponsePriceDetailOneTimePriceCurrency = "UAH"
	ProductListResponsePriceDetailOneTimePriceCurrencyUgx ProductListResponsePriceDetailOneTimePriceCurrency = "UGX"
	ProductListResponsePriceDetailOneTimePriceCurrencyUsd ProductListResponsePriceDetailOneTimePriceCurrency = "USD"
	ProductListResponsePriceDetailOneTimePriceCurrencyUyu ProductListResponsePriceDetailOneTimePriceCurrency = "UYU"
	ProductListResponsePriceDetailOneTimePriceCurrencyUzs ProductListResponsePriceDetailOneTimePriceCurrency = "UZS"
	ProductListResponsePriceDetailOneTimePriceCurrencyVes ProductListResponsePriceDetailOneTimePriceCurrency = "VES"
	ProductListResponsePriceDetailOneTimePriceCurrencyVnd ProductListResponsePriceDetailOneTimePriceCurrency = "VND"
	ProductListResponsePriceDetailOneTimePriceCurrencyVuv ProductListResponsePriceDetailOneTimePriceCurrency = "VUV"
	ProductListResponsePriceDetailOneTimePriceCurrencyWst ProductListResponsePriceDetailOneTimePriceCurrency = "WST"
	ProductListResponsePriceDetailOneTimePriceCurrencyXaf ProductListResponsePriceDetailOneTimePriceCurrency = "XAF"
	ProductListResponsePriceDetailOneTimePriceCurrencyXcd ProductListResponsePriceDetailOneTimePriceCurrency = "XCD"
	ProductListResponsePriceDetailOneTimePriceCurrencyXof ProductListResponsePriceDetailOneTimePriceCurrency = "XOF"
	ProductListResponsePriceDetailOneTimePriceCurrencyXpf ProductListResponsePriceDetailOneTimePriceCurrency = "XPF"
	ProductListResponsePriceDetailOneTimePriceCurrencyYer ProductListResponsePriceDetailOneTimePriceCurrency = "YER"
	ProductListResponsePriceDetailOneTimePriceCurrencyZar ProductListResponsePriceDetailOneTimePriceCurrency = "ZAR"
	ProductListResponsePriceDetailOneTimePriceCurrencyZmw ProductListResponsePriceDetailOneTimePriceCurrency = "ZMW"
)

func (ProductListResponsePriceDetailOneTimePriceCurrency) IsKnown added in v0.19.0

type ProductListResponsePriceDetailOneTimePriceType added in v0.19.0

type ProductListResponsePriceDetailOneTimePriceType string
const (
	ProductListResponsePriceDetailOneTimePriceTypeOneTimePrice ProductListResponsePriceDetailOneTimePriceType = "one_time_price"
)

func (ProductListResponsePriceDetailOneTimePriceType) IsKnown added in v0.19.0

type ProductListResponsePriceDetailPaymentFrequencyInterval added in v0.19.0

type ProductListResponsePriceDetailPaymentFrequencyInterval string
const (
	ProductListResponsePriceDetailPaymentFrequencyIntervalDay   ProductListResponsePriceDetailPaymentFrequencyInterval = "Day"
	ProductListResponsePriceDetailPaymentFrequencyIntervalWeek  ProductListResponsePriceDetailPaymentFrequencyInterval = "Week"
	ProductListResponsePriceDetailPaymentFrequencyIntervalMonth ProductListResponsePriceDetailPaymentFrequencyInterval = "Month"
	ProductListResponsePriceDetailPaymentFrequencyIntervalYear  ProductListResponsePriceDetailPaymentFrequencyInterval = "Year"
)

func (ProductListResponsePriceDetailPaymentFrequencyInterval) IsKnown added in v0.19.0

type ProductListResponsePriceDetailRecurringPrice added in v0.19.0

type ProductListResponsePriceDetailRecurringPrice struct {
	Currency ProductListResponsePriceDetailRecurringPriceCurrency `json:"currency,required"`
	// Discount applied to the price, represented as a percentage (0 to 100).
	Discount float64 `json:"discount,required"`
	// Number of units for the payment frequency. For example, a value of `1` with a
	// `payment_frequency_interval` of `month` represents monthly payments.
	PaymentFrequencyCount    int64                                                                `json:"payment_frequency_count,required"`
	PaymentFrequencyInterval ProductListResponsePriceDetailRecurringPricePaymentFrequencyInterval `json:"payment_frequency_interval,required"`
	// The payment amount. Represented in the lowest denomination of the currency
	// (e.g., cents for USD). For example, to charge $1.00, pass `100`.
	Price int64 `json:"price,required"`
	// Indicates if purchasing power parity adjustments are applied to the price.
	// Purchasing power parity feature is not available as of now
	PurchasingPowerParity bool `json:"purchasing_power_parity,required"`
	// Number of units for the subscription period. For example, a value of `12` with a
	// `subscription_period_interval` of `month` represents a one-year subscription.
	SubscriptionPeriodCount    int64                                                                  `json:"subscription_period_count,required"`
	SubscriptionPeriodInterval ProductListResponsePriceDetailRecurringPriceSubscriptionPeriodInterval `json:"subscription_period_interval,required"`
	Type                       ProductListResponsePriceDetailRecurringPriceType                       `json:"type,required"`
	// Indicates if the price is tax inclusive
	TaxInclusive bool `json:"tax_inclusive,nullable"`
	// Number of days for the trial period. A value of `0` indicates no trial period.
	TrialPeriodDays int64                                            `json:"trial_period_days"`
	JSON            productListResponsePriceDetailRecurringPriceJSON `json:"-"`
}

func (*ProductListResponsePriceDetailRecurringPrice) UnmarshalJSON added in v0.19.0

func (r *ProductListResponsePriceDetailRecurringPrice) UnmarshalJSON(data []byte) (err error)

type ProductListResponsePriceDetailRecurringPriceCurrency added in v0.19.0

type ProductListResponsePriceDetailRecurringPriceCurrency string
const (
	ProductListResponsePriceDetailRecurringPriceCurrencyAed ProductListResponsePriceDetailRecurringPriceCurrency = "AED"
	ProductListResponsePriceDetailRecurringPriceCurrencyAll ProductListResponsePriceDetailRecurringPriceCurrency = "ALL"
	ProductListResponsePriceDetailRecurringPriceCurrencyAmd ProductListResponsePriceDetailRecurringPriceCurrency = "AMD"
	ProductListResponsePriceDetailRecurringPriceCurrencyAng ProductListResponsePriceDetailRecurringPriceCurrency = "ANG"
	ProductListResponsePriceDetailRecurringPriceCurrencyAoa ProductListResponsePriceDetailRecurringPriceCurrency = "AOA"
	ProductListResponsePriceDetailRecurringPriceCurrencyArs ProductListResponsePriceDetailRecurringPriceCurrency = "ARS"
	ProductListResponsePriceDetailRecurringPriceCurrencyAud ProductListResponsePriceDetailRecurringPriceCurrency = "AUD"
	ProductListResponsePriceDetailRecurringPriceCurrencyAwg ProductListResponsePriceDetailRecurringPriceCurrency = "AWG"
	ProductListResponsePriceDetailRecurringPriceCurrencyAzn ProductListResponsePriceDetailRecurringPriceCurrency = "AZN"
	ProductListResponsePriceDetailRecurringPriceCurrencyBam ProductListResponsePriceDetailRecurringPriceCurrency = "BAM"
	ProductListResponsePriceDetailRecurringPriceCurrencyBbd ProductListResponsePriceDetailRecurringPriceCurrency = "BBD"
	ProductListResponsePriceDetailRecurringPriceCurrencyBdt ProductListResponsePriceDetailRecurringPriceCurrency = "BDT"
	ProductListResponsePriceDetailRecurringPriceCurrencyBgn ProductListResponsePriceDetailRecurringPriceCurrency = "BGN"
	ProductListResponsePriceDetailRecurringPriceCurrencyBhd ProductListResponsePriceDetailRecurringPriceCurrency = "BHD"
	ProductListResponsePriceDetailRecurringPriceCurrencyBif ProductListResponsePriceDetailRecurringPriceCurrency = "BIF"
	ProductListResponsePriceDetailRecurringPriceCurrencyBmd ProductListResponsePriceDetailRecurringPriceCurrency = "BMD"
	ProductListResponsePriceDetailRecurringPriceCurrencyBnd ProductListResponsePriceDetailRecurringPriceCurrency = "BND"
	ProductListResponsePriceDetailRecurringPriceCurrencyBob ProductListResponsePriceDetailRecurringPriceCurrency = "BOB"
	ProductListResponsePriceDetailRecurringPriceCurrencyBrl ProductListResponsePriceDetailRecurringPriceCurrency = "BRL"
	ProductListResponsePriceDetailRecurringPriceCurrencyBsd ProductListResponsePriceDetailRecurringPriceCurrency = "BSD"
	ProductListResponsePriceDetailRecurringPriceCurrencyBwp ProductListResponsePriceDetailRecurringPriceCurrency = "BWP"
	ProductListResponsePriceDetailRecurringPriceCurrencyByn ProductListResponsePriceDetailRecurringPriceCurrency = "BYN"
	ProductListResponsePriceDetailRecurringPriceCurrencyBzd ProductListResponsePriceDetailRecurringPriceCurrency = "BZD"
	ProductListResponsePriceDetailRecurringPriceCurrencyCad ProductListResponsePriceDetailRecurringPriceCurrency = "CAD"
	ProductListResponsePriceDetailRecurringPriceCurrencyChf ProductListResponsePriceDetailRecurringPriceCurrency = "CHF"
	ProductListResponsePriceDetailRecurringPriceCurrencyClp ProductListResponsePriceDetailRecurringPriceCurrency = "CLP"
	ProductListResponsePriceDetailRecurringPriceCurrencyCny ProductListResponsePriceDetailRecurringPriceCurrency = "CNY"
	ProductListResponsePriceDetailRecurringPriceCurrencyCop ProductListResponsePriceDetailRecurringPriceCurrency = "COP"
	ProductListResponsePriceDetailRecurringPriceCurrencyCrc ProductListResponsePriceDetailRecurringPriceCurrency = "CRC"
	ProductListResponsePriceDetailRecurringPriceCurrencyCup ProductListResponsePriceDetailRecurringPriceCurrency = "CUP"
	ProductListResponsePriceDetailRecurringPriceCurrencyCve ProductListResponsePriceDetailRecurringPriceCurrency = "CVE"
	ProductListResponsePriceDetailRecurringPriceCurrencyCzk ProductListResponsePriceDetailRecurringPriceCurrency = "CZK"
	ProductListResponsePriceDetailRecurringPriceCurrencyDjf ProductListResponsePriceDetailRecurringPriceCurrency = "DJF"
	ProductListResponsePriceDetailRecurringPriceCurrencyDkk ProductListResponsePriceDetailRecurringPriceCurrency = "DKK"
	ProductListResponsePriceDetailRecurringPriceCurrencyDop ProductListResponsePriceDetailRecurringPriceCurrency = "DOP"
	ProductListResponsePriceDetailRecurringPriceCurrencyDzd ProductListResponsePriceDetailRecurringPriceCurrency = "DZD"
	ProductListResponsePriceDetailRecurringPriceCurrencyEgp ProductListResponsePriceDetailRecurringPriceCurrency = "EGP"
	ProductListResponsePriceDetailRecurringPriceCurrencyEtb ProductListResponsePriceDetailRecurringPriceCurrency = "ETB"
	ProductListResponsePriceDetailRecurringPriceCurrencyEur ProductListResponsePriceDetailRecurringPriceCurrency = "EUR"
	ProductListResponsePriceDetailRecurringPriceCurrencyFjd ProductListResponsePriceDetailRecurringPriceCurrency = "FJD"
	ProductListResponsePriceDetailRecurringPriceCurrencyFkp ProductListResponsePriceDetailRecurringPriceCurrency = "FKP"
	ProductListResponsePriceDetailRecurringPriceCurrencyGbp ProductListResponsePriceDetailRecurringPriceCurrency = "GBP"
	ProductListResponsePriceDetailRecurringPriceCurrencyGel ProductListResponsePriceDetailRecurringPriceCurrency = "GEL"
	ProductListResponsePriceDetailRecurringPriceCurrencyGhs ProductListResponsePriceDetailRecurringPriceCurrency = "GHS"
	ProductListResponsePriceDetailRecurringPriceCurrencyGip ProductListResponsePriceDetailRecurringPriceCurrency = "GIP"
	ProductListResponsePriceDetailRecurringPriceCurrencyGmd ProductListResponsePriceDetailRecurringPriceCurrency = "GMD"
	ProductListResponsePriceDetailRecurringPriceCurrencyGnf ProductListResponsePriceDetailRecurringPriceCurrency = "GNF"
	ProductListResponsePriceDetailRecurringPriceCurrencyGtq ProductListResponsePriceDetailRecurringPriceCurrency = "GTQ"
	ProductListResponsePriceDetailRecurringPriceCurrencyGyd ProductListResponsePriceDetailRecurringPriceCurrency = "GYD"
	ProductListResponsePriceDetailRecurringPriceCurrencyHkd ProductListResponsePriceDetailRecurringPriceCurrency = "HKD"
	ProductListResponsePriceDetailRecurringPriceCurrencyHnl ProductListResponsePriceDetailRecurringPriceCurrency = "HNL"
	ProductListResponsePriceDetailRecurringPriceCurrencyHrk ProductListResponsePriceDetailRecurringPriceCurrency = "HRK"
	ProductListResponsePriceDetailRecurringPriceCurrencyHtg ProductListResponsePriceDetailRecurringPriceCurrency = "HTG"
	ProductListResponsePriceDetailRecurringPriceCurrencyHuf ProductListResponsePriceDetailRecurringPriceCurrency = "HUF"
	ProductListResponsePriceDetailRecurringPriceCurrencyIdr ProductListResponsePriceDetailRecurringPriceCurrency = "IDR"
	ProductListResponsePriceDetailRecurringPriceCurrencyIls ProductListResponsePriceDetailRecurringPriceCurrency = "ILS"
	ProductListResponsePriceDetailRecurringPriceCurrencyInr ProductListResponsePriceDetailRecurringPriceCurrency = "INR"
	ProductListResponsePriceDetailRecurringPriceCurrencyIqd ProductListResponsePriceDetailRecurringPriceCurrency = "IQD"
	ProductListResponsePriceDetailRecurringPriceCurrencyJmd ProductListResponsePriceDetailRecurringPriceCurrency = "JMD"
	ProductListResponsePriceDetailRecurringPriceCurrencyJod ProductListResponsePriceDetailRecurringPriceCurrency = "JOD"
	ProductListResponsePriceDetailRecurringPriceCurrencyJpy ProductListResponsePriceDetailRecurringPriceCurrency = "JPY"
	ProductListResponsePriceDetailRecurringPriceCurrencyKes ProductListResponsePriceDetailRecurringPriceCurrency = "KES"
	ProductListResponsePriceDetailRecurringPriceCurrencyKgs ProductListResponsePriceDetailRecurringPriceCurrency = "KGS"
	ProductListResponsePriceDetailRecurringPriceCurrencyKhr ProductListResponsePriceDetailRecurringPriceCurrency = "KHR"
	ProductListResponsePriceDetailRecurringPriceCurrencyKmf ProductListResponsePriceDetailRecurringPriceCurrency = "KMF"
	ProductListResponsePriceDetailRecurringPriceCurrencyKrw ProductListResponsePriceDetailRecurringPriceCurrency = "KRW"
	ProductListResponsePriceDetailRecurringPriceCurrencyKwd ProductListResponsePriceDetailRecurringPriceCurrency = "KWD"
	ProductListResponsePriceDetailRecurringPriceCurrencyKyd ProductListResponsePriceDetailRecurringPriceCurrency = "KYD"
	ProductListResponsePriceDetailRecurringPriceCurrencyKzt ProductListResponsePriceDetailRecurringPriceCurrency = "KZT"
	ProductListResponsePriceDetailRecurringPriceCurrencyLak ProductListResponsePriceDetailRecurringPriceCurrency = "LAK"
	ProductListResponsePriceDetailRecurringPriceCurrencyLbp ProductListResponsePriceDetailRecurringPriceCurrency = "LBP"
	ProductListResponsePriceDetailRecurringPriceCurrencyLkr ProductListResponsePriceDetailRecurringPriceCurrency = "LKR"
	ProductListResponsePriceDetailRecurringPriceCurrencyLrd ProductListResponsePriceDetailRecurringPriceCurrency = "LRD"
	ProductListResponsePriceDetailRecurringPriceCurrencyLsl ProductListResponsePriceDetailRecurringPriceCurrency = "LSL"
	ProductListResponsePriceDetailRecurringPriceCurrencyLyd ProductListResponsePriceDetailRecurringPriceCurrency = "LYD"
	ProductListResponsePriceDetailRecurringPriceCurrencyMad ProductListResponsePriceDetailRecurringPriceCurrency = "MAD"
	ProductListResponsePriceDetailRecurringPriceCurrencyMdl ProductListResponsePriceDetailRecurringPriceCurrency = "MDL"
	ProductListResponsePriceDetailRecurringPriceCurrencyMga ProductListResponsePriceDetailRecurringPriceCurrency = "MGA"
	ProductListResponsePriceDetailRecurringPriceCurrencyMkd ProductListResponsePriceDetailRecurringPriceCurrency = "MKD"
	ProductListResponsePriceDetailRecurringPriceCurrencyMmk ProductListResponsePriceDetailRecurringPriceCurrency = "MMK"
	ProductListResponsePriceDetailRecurringPriceCurrencyMnt ProductListResponsePriceDetailRecurringPriceCurrency = "MNT"
	ProductListResponsePriceDetailRecurringPriceCurrencyMop ProductListResponsePriceDetailRecurringPriceCurrency = "MOP"
	ProductListResponsePriceDetailRecurringPriceCurrencyMru ProductListResponsePriceDetailRecurringPriceCurrency = "MRU"
	ProductListResponsePriceDetailRecurringPriceCurrencyMur ProductListResponsePriceDetailRecurringPriceCurrency = "MUR"
	ProductListResponsePriceDetailRecurringPriceCurrencyMvr ProductListResponsePriceDetailRecurringPriceCurrency = "MVR"
	ProductListResponsePriceDetailRecurringPriceCurrencyMwk ProductListResponsePriceDetailRecurringPriceCurrency = "MWK"
	ProductListResponsePriceDetailRecurringPriceCurrencyMxn ProductListResponsePriceDetailRecurringPriceCurrency = "MXN"
	ProductListResponsePriceDetailRecurringPriceCurrencyMyr ProductListResponsePriceDetailRecurringPriceCurrency = "MYR"
	ProductListResponsePriceDetailRecurringPriceCurrencyMzn ProductListResponsePriceDetailRecurringPriceCurrency = "MZN"
	ProductListResponsePriceDetailRecurringPriceCurrencyNad ProductListResponsePriceDetailRecurringPriceCurrency = "NAD"
	ProductListResponsePriceDetailRecurringPriceCurrencyNgn ProductListResponsePriceDetailRecurringPriceCurrency = "NGN"
	ProductListResponsePriceDetailRecurringPriceCurrencyNio ProductListResponsePriceDetailRecurringPriceCurrency = "NIO"
	ProductListResponsePriceDetailRecurringPriceCurrencyNok ProductListResponsePriceDetailRecurringPriceCurrency = "NOK"
	ProductListResponsePriceDetailRecurringPriceCurrencyNpr ProductListResponsePriceDetailRecurringPriceCurrency = "NPR"
	ProductListResponsePriceDetailRecurringPriceCurrencyNzd ProductListResponsePriceDetailRecurringPriceCurrency = "NZD"
	ProductListResponsePriceDetailRecurringPriceCurrencyOmr ProductListResponsePriceDetailRecurringPriceCurrency = "OMR"
	ProductListResponsePriceDetailRecurringPriceCurrencyPab ProductListResponsePriceDetailRecurringPriceCurrency = "PAB"
	ProductListResponsePriceDetailRecurringPriceCurrencyPen ProductListResponsePriceDetailRecurringPriceCurrency = "PEN"
	ProductListResponsePriceDetailRecurringPriceCurrencyPgk ProductListResponsePriceDetailRecurringPriceCurrency = "PGK"
	ProductListResponsePriceDetailRecurringPriceCurrencyPhp ProductListResponsePriceDetailRecurringPriceCurrency = "PHP"
	ProductListResponsePriceDetailRecurringPriceCurrencyPkr ProductListResponsePriceDetailRecurringPriceCurrency = "PKR"
	ProductListResponsePriceDetailRecurringPriceCurrencyPln ProductListResponsePriceDetailRecurringPriceCurrency = "PLN"
	ProductListResponsePriceDetailRecurringPriceCurrencyPyg ProductListResponsePriceDetailRecurringPriceCurrency = "PYG"
	ProductListResponsePriceDetailRecurringPriceCurrencyQar ProductListResponsePriceDetailRecurringPriceCurrency = "QAR"
	ProductListResponsePriceDetailRecurringPriceCurrencyRon ProductListResponsePriceDetailRecurringPriceCurrency = "RON"
	ProductListResponsePriceDetailRecurringPriceCurrencyRsd ProductListResponsePriceDetailRecurringPriceCurrency = "RSD"
	ProductListResponsePriceDetailRecurringPriceCurrencyRub ProductListResponsePriceDetailRecurringPriceCurrency = "RUB"
	ProductListResponsePriceDetailRecurringPriceCurrencyRwf ProductListResponsePriceDetailRecurringPriceCurrency = "RWF"
	ProductListResponsePriceDetailRecurringPriceCurrencySar ProductListResponsePriceDetailRecurringPriceCurrency = "SAR"
	ProductListResponsePriceDetailRecurringPriceCurrencySbd ProductListResponsePriceDetailRecurringPriceCurrency = "SBD"
	ProductListResponsePriceDetailRecurringPriceCurrencyScr ProductListResponsePriceDetailRecurringPriceCurrency = "SCR"
	ProductListResponsePriceDetailRecurringPriceCurrencySek ProductListResponsePriceDetailRecurringPriceCurrency = "SEK"
	ProductListResponsePriceDetailRecurringPriceCurrencySgd ProductListResponsePriceDetailRecurringPriceCurrency = "SGD"
	ProductListResponsePriceDetailRecurringPriceCurrencyShp ProductListResponsePriceDetailRecurringPriceCurrency = "SHP"
	ProductListResponsePriceDetailRecurringPriceCurrencySle ProductListResponsePriceDetailRecurringPriceCurrency = "SLE"
	ProductListResponsePriceDetailRecurringPriceCurrencySll ProductListResponsePriceDetailRecurringPriceCurrency = "SLL"
	ProductListResponsePriceDetailRecurringPriceCurrencySos ProductListResponsePriceDetailRecurringPriceCurrency = "SOS"
	ProductListResponsePriceDetailRecurringPriceCurrencySrd ProductListResponsePriceDetailRecurringPriceCurrency = "SRD"
	ProductListResponsePriceDetailRecurringPriceCurrencySsp ProductListResponsePriceDetailRecurringPriceCurrency = "SSP"
	ProductListResponsePriceDetailRecurringPriceCurrencyStn ProductListResponsePriceDetailRecurringPriceCurrency = "STN"
	ProductListResponsePriceDetailRecurringPriceCurrencySvc ProductListResponsePriceDetailRecurringPriceCurrency = "SVC"
	ProductListResponsePriceDetailRecurringPriceCurrencySzl ProductListResponsePriceDetailRecurringPriceCurrency = "SZL"
	ProductListResponsePriceDetailRecurringPriceCurrencyThb ProductListResponsePriceDetailRecurringPriceCurrency = "THB"
	ProductListResponsePriceDetailRecurringPriceCurrencyTnd ProductListResponsePriceDetailRecurringPriceCurrency = "TND"
	ProductListResponsePriceDetailRecurringPriceCurrencyTop ProductListResponsePriceDetailRecurringPriceCurrency = "TOP"
	ProductListResponsePriceDetailRecurringPriceCurrencyTry ProductListResponsePriceDetailRecurringPriceCurrency = "TRY"
	ProductListResponsePriceDetailRecurringPriceCurrencyTtd ProductListResponsePriceDetailRecurringPriceCurrency = "TTD"
	ProductListResponsePriceDetailRecurringPriceCurrencyTwd ProductListResponsePriceDetailRecurringPriceCurrency = "TWD"
	ProductListResponsePriceDetailRecurringPriceCurrencyTzs ProductListResponsePriceDetailRecurringPriceCurrency = "TZS"
	ProductListResponsePriceDetailRecurringPriceCurrencyUah ProductListResponsePriceDetailRecurringPriceCurrency = "UAH"
	ProductListResponsePriceDetailRecurringPriceCurrencyUgx ProductListResponsePriceDetailRecurringPriceCurrency = "UGX"
	ProductListResponsePriceDetailRecurringPriceCurrencyUsd ProductListResponsePriceDetailRecurringPriceCurrency = "USD"
	ProductListResponsePriceDetailRecurringPriceCurrencyUyu ProductListResponsePriceDetailRecurringPriceCurrency = "UYU"
	ProductListResponsePriceDetailRecurringPriceCurrencyUzs ProductListResponsePriceDetailRecurringPriceCurrency = "UZS"
	ProductListResponsePriceDetailRecurringPriceCurrencyVes ProductListResponsePriceDetailRecurringPriceCurrency = "VES"
	ProductListResponsePriceDetailRecurringPriceCurrencyVnd ProductListResponsePriceDetailRecurringPriceCurrency = "VND"
	ProductListResponsePriceDetailRecurringPriceCurrencyVuv ProductListResponsePriceDetailRecurringPriceCurrency = "VUV"
	ProductListResponsePriceDetailRecurringPriceCurrencyWst ProductListResponsePriceDetailRecurringPriceCurrency = "WST"
	ProductListResponsePriceDetailRecurringPriceCurrencyXaf ProductListResponsePriceDetailRecurringPriceCurrency = "XAF"
	ProductListResponsePriceDetailRecurringPriceCurrencyXcd ProductListResponsePriceDetailRecurringPriceCurrency = "XCD"
	ProductListResponsePriceDetailRecurringPriceCurrencyXof ProductListResponsePriceDetailRecurringPriceCurrency = "XOF"
	ProductListResponsePriceDetailRecurringPriceCurrencyXpf ProductListResponsePriceDetailRecurringPriceCurrency = "XPF"
	ProductListResponsePriceDetailRecurringPriceCurrencyYer ProductListResponsePriceDetailRecurringPriceCurrency = "YER"
	ProductListResponsePriceDetailRecurringPriceCurrencyZar ProductListResponsePriceDetailRecurringPriceCurrency = "ZAR"
	ProductListResponsePriceDetailRecurringPriceCurrencyZmw ProductListResponsePriceDetailRecurringPriceCurrency = "ZMW"
)

func (ProductListResponsePriceDetailRecurringPriceCurrency) IsKnown added in v0.19.0

type ProductListResponsePriceDetailRecurringPricePaymentFrequencyInterval added in v0.19.0

type ProductListResponsePriceDetailRecurringPricePaymentFrequencyInterval string
const (
	ProductListResponsePriceDetailRecurringPricePaymentFrequencyIntervalDay   ProductListResponsePriceDetailRecurringPricePaymentFrequencyInterval = "Day"
	ProductListResponsePriceDetailRecurringPricePaymentFrequencyIntervalWeek  ProductListResponsePriceDetailRecurringPricePaymentFrequencyInterval = "Week"
	ProductListResponsePriceDetailRecurringPricePaymentFrequencyIntervalMonth ProductListResponsePriceDetailRecurringPricePaymentFrequencyInterval = "Month"
	ProductListResponsePriceDetailRecurringPricePaymentFrequencyIntervalYear  ProductListResponsePriceDetailRecurringPricePaymentFrequencyInterval = "Year"
)

func (ProductListResponsePriceDetailRecurringPricePaymentFrequencyInterval) IsKnown added in v0.19.0

type ProductListResponsePriceDetailRecurringPriceSubscriptionPeriodInterval added in v0.19.0

type ProductListResponsePriceDetailRecurringPriceSubscriptionPeriodInterval string
const (
	ProductListResponsePriceDetailRecurringPriceSubscriptionPeriodIntervalDay   ProductListResponsePriceDetailRecurringPriceSubscriptionPeriodInterval = "Day"
	ProductListResponsePriceDetailRecurringPriceSubscriptionPeriodIntervalWeek  ProductListResponsePriceDetailRecurringPriceSubscriptionPeriodInterval = "Week"
	ProductListResponsePriceDetailRecurringPriceSubscriptionPeriodIntervalMonth ProductListResponsePriceDetailRecurringPriceSubscriptionPeriodInterval = "Month"
	ProductListResponsePriceDetailRecurringPriceSubscriptionPeriodIntervalYear  ProductListResponsePriceDetailRecurringPriceSubscriptionPeriodInterval = "Year"
)

func (ProductListResponsePriceDetailRecurringPriceSubscriptionPeriodInterval) IsKnown added in v0.19.0

type ProductListResponsePriceDetailRecurringPriceType added in v0.19.0

type ProductListResponsePriceDetailRecurringPriceType string
const (
	ProductListResponsePriceDetailRecurringPriceTypeRecurringPrice ProductListResponsePriceDetailRecurringPriceType = "recurring_price"
)

func (ProductListResponsePriceDetailRecurringPriceType) IsKnown added in v0.19.0

type ProductListResponsePriceDetailSubscriptionPeriodInterval added in v0.19.0

type ProductListResponsePriceDetailSubscriptionPeriodInterval string
const (
	ProductListResponsePriceDetailSubscriptionPeriodIntervalDay   ProductListResponsePriceDetailSubscriptionPeriodInterval = "Day"
	ProductListResponsePriceDetailSubscriptionPeriodIntervalWeek  ProductListResponsePriceDetailSubscriptionPeriodInterval = "Week"
	ProductListResponsePriceDetailSubscriptionPeriodIntervalMonth ProductListResponsePriceDetailSubscriptionPeriodInterval = "Month"
	ProductListResponsePriceDetailSubscriptionPeriodIntervalYear  ProductListResponsePriceDetailSubscriptionPeriodInterval = "Year"
)

func (ProductListResponsePriceDetailSubscriptionPeriodInterval) IsKnown added in v0.19.0

type ProductListResponsePriceDetailType added in v0.19.0

type ProductListResponsePriceDetailType string
const (
	ProductListResponsePriceDetailTypeOneTimePrice   ProductListResponsePriceDetailType = "one_time_price"
	ProductListResponsePriceDetailTypeRecurringPrice ProductListResponsePriceDetailType = "recurring_price"
)

func (ProductListResponsePriceDetailType) IsKnown added in v0.19.0

type ProductListResponsePriceDetailUnion added in v0.19.0

type ProductListResponsePriceDetailUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by ProductListResponsePriceDetailOneTimePrice or ProductListResponsePriceDetailRecurringPrice.

type ProductListResponseTaxCategory

type ProductListResponseTaxCategory string

Represents the different categories of taxation applicable to various products and services.

const (
	ProductListResponseTaxCategoryDigitalProducts ProductListResponseTaxCategory = "digital_products"
	ProductListResponseTaxCategorySaas            ProductListResponseTaxCategory = "saas"
	ProductListResponseTaxCategoryEBook           ProductListResponseTaxCategory = "e_book"
)

func (ProductListResponseTaxCategory) IsKnown

type ProductNewParams

type ProductNewParams struct {
	Price param.Field[ProductNewParamsPriceUnion] `json:"price,required"`
	// Represents the different categories of taxation applicable to various products
	// and services.
	TaxCategory param.Field[ProductNewParamsTaxCategory] `json:"tax_category,required"`
	// Optional description of the product
	Description param.Field[string] `json:"description"`
	// Optional message displayed during license key activation
	LicenseKeyActivationMessage param.Field[string] `json:"license_key_activation_message"`
	// The number of times the license key can be activated. Must be 0 or greater
	LicenseKeyActivationsLimit param.Field[int64]                              `json:"license_key_activations_limit"`
	LicenseKeyDuration         param.Field[ProductNewParamsLicenseKeyDuration] `json:"license_key_duration"`
	// When true, generates and sends a license key to your customer. Defaults to false
	LicenseKeyEnabled param.Field[bool] `json:"license_key_enabled"`
	// Optional name of the product
	Name param.Field[string] `json:"name"`
}

func (ProductNewParams) MarshalJSON

func (r ProductNewParams) MarshalJSON() (data []byte, err error)

type ProductNewParamsLicenseKeyDuration added in v0.14.0

type ProductNewParamsLicenseKeyDuration struct {
	Count    param.Field[int64]                                      `json:"count,required"`
	Interval param.Field[ProductNewParamsLicenseKeyDurationInterval] `json:"interval,required"`
}

func (ProductNewParamsLicenseKeyDuration) MarshalJSON added in v0.14.0

func (r ProductNewParamsLicenseKeyDuration) MarshalJSON() (data []byte, err error)

type ProductNewParamsLicenseKeyDurationInterval added in v0.14.0

type ProductNewParamsLicenseKeyDurationInterval string
const (
	ProductNewParamsLicenseKeyDurationIntervalDay   ProductNewParamsLicenseKeyDurationInterval = "Day"
	ProductNewParamsLicenseKeyDurationIntervalWeek  ProductNewParamsLicenseKeyDurationInterval = "Week"
	ProductNewParamsLicenseKeyDurationIntervalMonth ProductNewParamsLicenseKeyDurationInterval = "Month"
	ProductNewParamsLicenseKeyDurationIntervalYear  ProductNewParamsLicenseKeyDurationInterval = "Year"
)

func (ProductNewParamsLicenseKeyDurationInterval) IsKnown added in v0.14.0

type ProductNewParamsPrice

type ProductNewParamsPrice struct {
	Currency param.Field[ProductNewParamsPriceCurrency] `json:"currency,required"`
	// Discount applied to the price, represented as a percentage (0 to 100).
	Discount param.Field[float64] `json:"discount,required"`
	// The payment amount, in the smallest denomination of the currency (e.g., cents
	// for USD). For example, to charge $1.00, pass `100`.
	//
	// If [`pay_what_you_want`](Self::pay_what_you_want) is set to `true`, this field
	// represents the **minimum** amount the customer must pay.
	Price param.Field[int64] `json:"price,required"`
	// Indicates if purchasing power parity adjustments are applied to the price.
	// Purchasing power parity feature is not available as of now.
	PurchasingPowerParity param.Field[bool]                      `json:"purchasing_power_parity,required"`
	Type                  param.Field[ProductNewParamsPriceType] `json:"type,required"`
	// Indicates whether the customer can pay any amount they choose. If set to `true`,
	// the [`price`](Self::price) field is the minimum amount.
	PayWhatYouWant param.Field[bool] `json:"pay_what_you_want"`
	// Number of units for the payment frequency. For example, a value of `1` with a
	// `payment_frequency_interval` of `month` represents monthly payments.
	PaymentFrequencyCount    param.Field[int64]                                         `json:"payment_frequency_count"`
	PaymentFrequencyInterval param.Field[ProductNewParamsPricePaymentFrequencyInterval] `json:"payment_frequency_interval"`
	// Number of units for the subscription period. For example, a value of `12` with a
	// `subscription_period_interval` of `month` represents a one-year subscription.
	SubscriptionPeriodCount    param.Field[int64]                                           `json:"subscription_period_count"`
	SubscriptionPeriodInterval param.Field[ProductNewParamsPriceSubscriptionPeriodInterval] `json:"subscription_period_interval"`
	// A suggested price for the user to pay. This value is only considered if
	// [`pay_what_you_want`](Self::pay_what_you_want) is `true`. Otherwise, it is
	// ignored.
	SuggestedPrice param.Field[int64] `json:"suggested_price"`
	// Indicates if the price is tax inclusive.
	TaxInclusive param.Field[bool] `json:"tax_inclusive"`
	// Number of days for the trial period. A value of `0` indicates no trial period.
	TrialPeriodDays param.Field[int64] `json:"trial_period_days"`
}

func (ProductNewParamsPrice) MarshalJSON

func (r ProductNewParamsPrice) MarshalJSON() (data []byte, err error)

type ProductNewParamsPriceCurrency

type ProductNewParamsPriceCurrency string
const (
	ProductNewParamsPriceCurrencyAed ProductNewParamsPriceCurrency = "AED"
	ProductNewParamsPriceCurrencyAll ProductNewParamsPriceCurrency = "ALL"
	ProductNewParamsPriceCurrencyAmd ProductNewParamsPriceCurrency = "AMD"
	ProductNewParamsPriceCurrencyAng ProductNewParamsPriceCurrency = "ANG"
	ProductNewParamsPriceCurrencyAoa ProductNewParamsPriceCurrency = "AOA"
	ProductNewParamsPriceCurrencyArs ProductNewParamsPriceCurrency = "ARS"
	ProductNewParamsPriceCurrencyAud ProductNewParamsPriceCurrency = "AUD"
	ProductNewParamsPriceCurrencyAwg ProductNewParamsPriceCurrency = "AWG"
	ProductNewParamsPriceCurrencyAzn ProductNewParamsPriceCurrency = "AZN"
	ProductNewParamsPriceCurrencyBam ProductNewParamsPriceCurrency = "BAM"
	ProductNewParamsPriceCurrencyBbd ProductNewParamsPriceCurrency = "BBD"
	ProductNewParamsPriceCurrencyBdt ProductNewParamsPriceCurrency = "BDT"
	ProductNewParamsPriceCurrencyBgn ProductNewParamsPriceCurrency = "BGN"
	ProductNewParamsPriceCurrencyBhd ProductNewParamsPriceCurrency = "BHD"
	ProductNewParamsPriceCurrencyBif ProductNewParamsPriceCurrency = "BIF"
	ProductNewParamsPriceCurrencyBmd ProductNewParamsPriceCurrency = "BMD"
	ProductNewParamsPriceCurrencyBnd ProductNewParamsPriceCurrency = "BND"
	ProductNewParamsPriceCurrencyBob ProductNewParamsPriceCurrency = "BOB"
	ProductNewParamsPriceCurrencyBrl ProductNewParamsPriceCurrency = "BRL"
	ProductNewParamsPriceCurrencyBsd ProductNewParamsPriceCurrency = "BSD"
	ProductNewParamsPriceCurrencyBwp ProductNewParamsPriceCurrency = "BWP"
	ProductNewParamsPriceCurrencyByn ProductNewParamsPriceCurrency = "BYN"
	ProductNewParamsPriceCurrencyBzd ProductNewParamsPriceCurrency = "BZD"
	ProductNewParamsPriceCurrencyCad ProductNewParamsPriceCurrency = "CAD"
	ProductNewParamsPriceCurrencyChf ProductNewParamsPriceCurrency = "CHF"
	ProductNewParamsPriceCurrencyClp ProductNewParamsPriceCurrency = "CLP"
	ProductNewParamsPriceCurrencyCny ProductNewParamsPriceCurrency = "CNY"
	ProductNewParamsPriceCurrencyCop ProductNewParamsPriceCurrency = "COP"
	ProductNewParamsPriceCurrencyCrc ProductNewParamsPriceCurrency = "CRC"
	ProductNewParamsPriceCurrencyCup ProductNewParamsPriceCurrency = "CUP"
	ProductNewParamsPriceCurrencyCve ProductNewParamsPriceCurrency = "CVE"
	ProductNewParamsPriceCurrencyCzk ProductNewParamsPriceCurrency = "CZK"
	ProductNewParamsPriceCurrencyDjf ProductNewParamsPriceCurrency = "DJF"
	ProductNewParamsPriceCurrencyDkk ProductNewParamsPriceCurrency = "DKK"
	ProductNewParamsPriceCurrencyDop ProductNewParamsPriceCurrency = "DOP"
	ProductNewParamsPriceCurrencyDzd ProductNewParamsPriceCurrency = "DZD"
	ProductNewParamsPriceCurrencyEgp ProductNewParamsPriceCurrency = "EGP"
	ProductNewParamsPriceCurrencyEtb ProductNewParamsPriceCurrency = "ETB"
	ProductNewParamsPriceCurrencyEur ProductNewParamsPriceCurrency = "EUR"
	ProductNewParamsPriceCurrencyFjd ProductNewParamsPriceCurrency = "FJD"
	ProductNewParamsPriceCurrencyFkp ProductNewParamsPriceCurrency = "FKP"
	ProductNewParamsPriceCurrencyGbp ProductNewParamsPriceCurrency = "GBP"
	ProductNewParamsPriceCurrencyGel ProductNewParamsPriceCurrency = "GEL"
	ProductNewParamsPriceCurrencyGhs ProductNewParamsPriceCurrency = "GHS"
	ProductNewParamsPriceCurrencyGip ProductNewParamsPriceCurrency = "GIP"
	ProductNewParamsPriceCurrencyGmd ProductNewParamsPriceCurrency = "GMD"
	ProductNewParamsPriceCurrencyGnf ProductNewParamsPriceCurrency = "GNF"
	ProductNewParamsPriceCurrencyGtq ProductNewParamsPriceCurrency = "GTQ"
	ProductNewParamsPriceCurrencyGyd ProductNewParamsPriceCurrency = "GYD"
	ProductNewParamsPriceCurrencyHkd ProductNewParamsPriceCurrency = "HKD"
	ProductNewParamsPriceCurrencyHnl ProductNewParamsPriceCurrency = "HNL"
	ProductNewParamsPriceCurrencyHrk ProductNewParamsPriceCurrency = "HRK"
	ProductNewParamsPriceCurrencyHtg ProductNewParamsPriceCurrency = "HTG"
	ProductNewParamsPriceCurrencyHuf ProductNewParamsPriceCurrency = "HUF"
	ProductNewParamsPriceCurrencyIdr ProductNewParamsPriceCurrency = "IDR"
	ProductNewParamsPriceCurrencyIls ProductNewParamsPriceCurrency = "ILS"
	ProductNewParamsPriceCurrencyInr ProductNewParamsPriceCurrency = "INR"
	ProductNewParamsPriceCurrencyIqd ProductNewParamsPriceCurrency = "IQD"
	ProductNewParamsPriceCurrencyJmd ProductNewParamsPriceCurrency = "JMD"
	ProductNewParamsPriceCurrencyJod ProductNewParamsPriceCurrency = "JOD"
	ProductNewParamsPriceCurrencyJpy ProductNewParamsPriceCurrency = "JPY"
	ProductNewParamsPriceCurrencyKes ProductNewParamsPriceCurrency = "KES"
	ProductNewParamsPriceCurrencyKgs ProductNewParamsPriceCurrency = "KGS"
	ProductNewParamsPriceCurrencyKhr ProductNewParamsPriceCurrency = "KHR"
	ProductNewParamsPriceCurrencyKmf ProductNewParamsPriceCurrency = "KMF"
	ProductNewParamsPriceCurrencyKrw ProductNewParamsPriceCurrency = "KRW"
	ProductNewParamsPriceCurrencyKwd ProductNewParamsPriceCurrency = "KWD"
	ProductNewParamsPriceCurrencyKyd ProductNewParamsPriceCurrency = "KYD"
	ProductNewParamsPriceCurrencyKzt ProductNewParamsPriceCurrency = "KZT"
	ProductNewParamsPriceCurrencyLak ProductNewParamsPriceCurrency = "LAK"
	ProductNewParamsPriceCurrencyLbp ProductNewParamsPriceCurrency = "LBP"
	ProductNewParamsPriceCurrencyLkr ProductNewParamsPriceCurrency = "LKR"
	ProductNewParamsPriceCurrencyLrd ProductNewParamsPriceCurrency = "LRD"
	ProductNewParamsPriceCurrencyLsl ProductNewParamsPriceCurrency = "LSL"
	ProductNewParamsPriceCurrencyLyd ProductNewParamsPriceCurrency = "LYD"
	ProductNewParamsPriceCurrencyMad ProductNewParamsPriceCurrency = "MAD"
	ProductNewParamsPriceCurrencyMdl ProductNewParamsPriceCurrency = "MDL"
	ProductNewParamsPriceCurrencyMga ProductNewParamsPriceCurrency = "MGA"
	ProductNewParamsPriceCurrencyMkd ProductNewParamsPriceCurrency = "MKD"
	ProductNewParamsPriceCurrencyMmk ProductNewParamsPriceCurrency = "MMK"
	ProductNewParamsPriceCurrencyMnt ProductNewParamsPriceCurrency = "MNT"
	ProductNewParamsPriceCurrencyMop ProductNewParamsPriceCurrency = "MOP"
	ProductNewParamsPriceCurrencyMru ProductNewParamsPriceCurrency = "MRU"
	ProductNewParamsPriceCurrencyMur ProductNewParamsPriceCurrency = "MUR"
	ProductNewParamsPriceCurrencyMvr ProductNewParamsPriceCurrency = "MVR"
	ProductNewParamsPriceCurrencyMwk ProductNewParamsPriceCurrency = "MWK"
	ProductNewParamsPriceCurrencyMxn ProductNewParamsPriceCurrency = "MXN"
	ProductNewParamsPriceCurrencyMyr ProductNewParamsPriceCurrency = "MYR"
	ProductNewParamsPriceCurrencyMzn ProductNewParamsPriceCurrency = "MZN"
	ProductNewParamsPriceCurrencyNad ProductNewParamsPriceCurrency = "NAD"
	ProductNewParamsPriceCurrencyNgn ProductNewParamsPriceCurrency = "NGN"
	ProductNewParamsPriceCurrencyNio ProductNewParamsPriceCurrency = "NIO"
	ProductNewParamsPriceCurrencyNok ProductNewParamsPriceCurrency = "NOK"
	ProductNewParamsPriceCurrencyNpr ProductNewParamsPriceCurrency = "NPR"
	ProductNewParamsPriceCurrencyNzd ProductNewParamsPriceCurrency = "NZD"
	ProductNewParamsPriceCurrencyOmr ProductNewParamsPriceCurrency = "OMR"
	ProductNewParamsPriceCurrencyPab ProductNewParamsPriceCurrency = "PAB"
	ProductNewParamsPriceCurrencyPen ProductNewParamsPriceCurrency = "PEN"
	ProductNewParamsPriceCurrencyPgk ProductNewParamsPriceCurrency = "PGK"
	ProductNewParamsPriceCurrencyPhp ProductNewParamsPriceCurrency = "PHP"
	ProductNewParamsPriceCurrencyPkr ProductNewParamsPriceCurrency = "PKR"
	ProductNewParamsPriceCurrencyPln ProductNewParamsPriceCurrency = "PLN"
	ProductNewParamsPriceCurrencyPyg ProductNewParamsPriceCurrency = "PYG"
	ProductNewParamsPriceCurrencyQar ProductNewParamsPriceCurrency = "QAR"
	ProductNewParamsPriceCurrencyRon ProductNewParamsPriceCurrency = "RON"
	ProductNewParamsPriceCurrencyRsd ProductNewParamsPriceCurrency = "RSD"
	ProductNewParamsPriceCurrencyRub ProductNewParamsPriceCurrency = "RUB"
	ProductNewParamsPriceCurrencyRwf ProductNewParamsPriceCurrency = "RWF"
	ProductNewParamsPriceCurrencySar ProductNewParamsPriceCurrency = "SAR"
	ProductNewParamsPriceCurrencySbd ProductNewParamsPriceCurrency = "SBD"
	ProductNewParamsPriceCurrencyScr ProductNewParamsPriceCurrency = "SCR"
	ProductNewParamsPriceCurrencySek ProductNewParamsPriceCurrency = "SEK"
	ProductNewParamsPriceCurrencySgd ProductNewParamsPriceCurrency = "SGD"
	ProductNewParamsPriceCurrencyShp ProductNewParamsPriceCurrency = "SHP"
	ProductNewParamsPriceCurrencySle ProductNewParamsPriceCurrency = "SLE"
	ProductNewParamsPriceCurrencySll ProductNewParamsPriceCurrency = "SLL"
	ProductNewParamsPriceCurrencySos ProductNewParamsPriceCurrency = "SOS"
	ProductNewParamsPriceCurrencySrd ProductNewParamsPriceCurrency = "SRD"
	ProductNewParamsPriceCurrencySsp ProductNewParamsPriceCurrency = "SSP"
	ProductNewParamsPriceCurrencyStn ProductNewParamsPriceCurrency = "STN"
	ProductNewParamsPriceCurrencySvc ProductNewParamsPriceCurrency = "SVC"
	ProductNewParamsPriceCurrencySzl ProductNewParamsPriceCurrency = "SZL"
	ProductNewParamsPriceCurrencyThb ProductNewParamsPriceCurrency = "THB"
	ProductNewParamsPriceCurrencyTnd ProductNewParamsPriceCurrency = "TND"
	ProductNewParamsPriceCurrencyTop ProductNewParamsPriceCurrency = "TOP"
	ProductNewParamsPriceCurrencyTry ProductNewParamsPriceCurrency = "TRY"
	ProductNewParamsPriceCurrencyTtd ProductNewParamsPriceCurrency = "TTD"
	ProductNewParamsPriceCurrencyTwd ProductNewParamsPriceCurrency = "TWD"
	ProductNewParamsPriceCurrencyTzs ProductNewParamsPriceCurrency = "TZS"
	ProductNewParamsPriceCurrencyUah ProductNewParamsPriceCurrency = "UAH"
	ProductNewParamsPriceCurrencyUgx ProductNewParamsPriceCurrency = "UGX"
	ProductNewParamsPriceCurrencyUsd ProductNewParamsPriceCurrency = "USD"
	ProductNewParamsPriceCurrencyUyu ProductNewParamsPriceCurrency = "UYU"
	ProductNewParamsPriceCurrencyUzs ProductNewParamsPriceCurrency = "UZS"
	ProductNewParamsPriceCurrencyVes ProductNewParamsPriceCurrency = "VES"
	ProductNewParamsPriceCurrencyVnd ProductNewParamsPriceCurrency = "VND"
	ProductNewParamsPriceCurrencyVuv ProductNewParamsPriceCurrency = "VUV"
	ProductNewParamsPriceCurrencyWst ProductNewParamsPriceCurrency = "WST"
	ProductNewParamsPriceCurrencyXaf ProductNewParamsPriceCurrency = "XAF"
	ProductNewParamsPriceCurrencyXcd ProductNewParamsPriceCurrency = "XCD"
	ProductNewParamsPriceCurrencyXof ProductNewParamsPriceCurrency = "XOF"
	ProductNewParamsPriceCurrencyXpf ProductNewParamsPriceCurrency = "XPF"
	ProductNewParamsPriceCurrencyYer ProductNewParamsPriceCurrency = "YER"
	ProductNewParamsPriceCurrencyZar ProductNewParamsPriceCurrency = "ZAR"
	ProductNewParamsPriceCurrencyZmw ProductNewParamsPriceCurrency = "ZMW"
)

func (ProductNewParamsPriceCurrency) IsKnown

func (r ProductNewParamsPriceCurrency) IsKnown() bool

type ProductNewParamsPriceOneTimePrice

type ProductNewParamsPriceOneTimePrice struct {
	Currency param.Field[ProductNewParamsPriceOneTimePriceCurrency] `json:"currency,required"`
	// Discount applied to the price, represented as a percentage (0 to 100).
	Discount param.Field[float64] `json:"discount,required"`
	// The payment amount, in the smallest denomination of the currency (e.g., cents
	// for USD). For example, to charge $1.00, pass `100`.
	//
	// If [`pay_what_you_want`](Self::pay_what_you_want) is set to `true`, this field
	// represents the **minimum** amount the customer must pay.
	Price param.Field[int64] `json:"price,required"`
	// Indicates if purchasing power parity adjustments are applied to the price.
	// Purchasing power parity feature is not available as of now.
	PurchasingPowerParity param.Field[bool]                                  `json:"purchasing_power_parity,required"`
	Type                  param.Field[ProductNewParamsPriceOneTimePriceType] `json:"type,required"`
	// Indicates whether the customer can pay any amount they choose. If set to `true`,
	// the [`price`](Self::price) field is the minimum amount.
	PayWhatYouWant param.Field[bool] `json:"pay_what_you_want"`
	// A suggested price for the user to pay. This value is only considered if
	// [`pay_what_you_want`](Self::pay_what_you_want) is `true`. Otherwise, it is
	// ignored.
	SuggestedPrice param.Field[int64] `json:"suggested_price"`
	// Indicates if the price is tax inclusive.
	TaxInclusive param.Field[bool] `json:"tax_inclusive"`
}

func (ProductNewParamsPriceOneTimePrice) MarshalJSON

func (r ProductNewParamsPriceOneTimePrice) MarshalJSON() (data []byte, err error)

type ProductNewParamsPriceOneTimePriceCurrency

type ProductNewParamsPriceOneTimePriceCurrency string
const (
	ProductNewParamsPriceOneTimePriceCurrencyAed ProductNewParamsPriceOneTimePriceCurrency = "AED"
	ProductNewParamsPriceOneTimePriceCurrencyAll ProductNewParamsPriceOneTimePriceCurrency = "ALL"
	ProductNewParamsPriceOneTimePriceCurrencyAmd ProductNewParamsPriceOneTimePriceCurrency = "AMD"
	ProductNewParamsPriceOneTimePriceCurrencyAng ProductNewParamsPriceOneTimePriceCurrency = "ANG"
	ProductNewParamsPriceOneTimePriceCurrencyAoa ProductNewParamsPriceOneTimePriceCurrency = "AOA"
	ProductNewParamsPriceOneTimePriceCurrencyArs ProductNewParamsPriceOneTimePriceCurrency = "ARS"
	ProductNewParamsPriceOneTimePriceCurrencyAud ProductNewParamsPriceOneTimePriceCurrency = "AUD"
	ProductNewParamsPriceOneTimePriceCurrencyAwg ProductNewParamsPriceOneTimePriceCurrency = "AWG"
	ProductNewParamsPriceOneTimePriceCurrencyAzn ProductNewParamsPriceOneTimePriceCurrency = "AZN"
	ProductNewParamsPriceOneTimePriceCurrencyBam ProductNewParamsPriceOneTimePriceCurrency = "BAM"
	ProductNewParamsPriceOneTimePriceCurrencyBbd ProductNewParamsPriceOneTimePriceCurrency = "BBD"
	ProductNewParamsPriceOneTimePriceCurrencyBdt ProductNewParamsPriceOneTimePriceCurrency = "BDT"
	ProductNewParamsPriceOneTimePriceCurrencyBgn ProductNewParamsPriceOneTimePriceCurrency = "BGN"
	ProductNewParamsPriceOneTimePriceCurrencyBhd ProductNewParamsPriceOneTimePriceCurrency = "BHD"
	ProductNewParamsPriceOneTimePriceCurrencyBif ProductNewParamsPriceOneTimePriceCurrency = "BIF"
	ProductNewParamsPriceOneTimePriceCurrencyBmd ProductNewParamsPriceOneTimePriceCurrency = "BMD"
	ProductNewParamsPriceOneTimePriceCurrencyBnd ProductNewParamsPriceOneTimePriceCurrency = "BND"
	ProductNewParamsPriceOneTimePriceCurrencyBob ProductNewParamsPriceOneTimePriceCurrency = "BOB"
	ProductNewParamsPriceOneTimePriceCurrencyBrl ProductNewParamsPriceOneTimePriceCurrency = "BRL"
	ProductNewParamsPriceOneTimePriceCurrencyBsd ProductNewParamsPriceOneTimePriceCurrency = "BSD"
	ProductNewParamsPriceOneTimePriceCurrencyBwp ProductNewParamsPriceOneTimePriceCurrency = "BWP"
	ProductNewParamsPriceOneTimePriceCurrencyByn ProductNewParamsPriceOneTimePriceCurrency = "BYN"
	ProductNewParamsPriceOneTimePriceCurrencyBzd ProductNewParamsPriceOneTimePriceCurrency = "BZD"
	ProductNewParamsPriceOneTimePriceCurrencyCad ProductNewParamsPriceOneTimePriceCurrency = "CAD"
	ProductNewParamsPriceOneTimePriceCurrencyChf ProductNewParamsPriceOneTimePriceCurrency = "CHF"
	ProductNewParamsPriceOneTimePriceCurrencyClp ProductNewParamsPriceOneTimePriceCurrency = "CLP"
	ProductNewParamsPriceOneTimePriceCurrencyCny ProductNewParamsPriceOneTimePriceCurrency = "CNY"
	ProductNewParamsPriceOneTimePriceCurrencyCop ProductNewParamsPriceOneTimePriceCurrency = "COP"
	ProductNewParamsPriceOneTimePriceCurrencyCrc ProductNewParamsPriceOneTimePriceCurrency = "CRC"
	ProductNewParamsPriceOneTimePriceCurrencyCup ProductNewParamsPriceOneTimePriceCurrency = "CUP"
	ProductNewParamsPriceOneTimePriceCurrencyCve ProductNewParamsPriceOneTimePriceCurrency = "CVE"
	ProductNewParamsPriceOneTimePriceCurrencyCzk ProductNewParamsPriceOneTimePriceCurrency = "CZK"
	ProductNewParamsPriceOneTimePriceCurrencyDjf ProductNewParamsPriceOneTimePriceCurrency = "DJF"
	ProductNewParamsPriceOneTimePriceCurrencyDkk ProductNewParamsPriceOneTimePriceCurrency = "DKK"
	ProductNewParamsPriceOneTimePriceCurrencyDop ProductNewParamsPriceOneTimePriceCurrency = "DOP"
	ProductNewParamsPriceOneTimePriceCurrencyDzd ProductNewParamsPriceOneTimePriceCurrency = "DZD"
	ProductNewParamsPriceOneTimePriceCurrencyEgp ProductNewParamsPriceOneTimePriceCurrency = "EGP"
	ProductNewParamsPriceOneTimePriceCurrencyEtb ProductNewParamsPriceOneTimePriceCurrency = "ETB"
	ProductNewParamsPriceOneTimePriceCurrencyEur ProductNewParamsPriceOneTimePriceCurrency = "EUR"
	ProductNewParamsPriceOneTimePriceCurrencyFjd ProductNewParamsPriceOneTimePriceCurrency = "FJD"
	ProductNewParamsPriceOneTimePriceCurrencyFkp ProductNewParamsPriceOneTimePriceCurrency = "FKP"
	ProductNewParamsPriceOneTimePriceCurrencyGbp ProductNewParamsPriceOneTimePriceCurrency = "GBP"
	ProductNewParamsPriceOneTimePriceCurrencyGel ProductNewParamsPriceOneTimePriceCurrency = "GEL"
	ProductNewParamsPriceOneTimePriceCurrencyGhs ProductNewParamsPriceOneTimePriceCurrency = "GHS"
	ProductNewParamsPriceOneTimePriceCurrencyGip ProductNewParamsPriceOneTimePriceCurrency = "GIP"
	ProductNewParamsPriceOneTimePriceCurrencyGmd ProductNewParamsPriceOneTimePriceCurrency = "GMD"
	ProductNewParamsPriceOneTimePriceCurrencyGnf ProductNewParamsPriceOneTimePriceCurrency = "GNF"
	ProductNewParamsPriceOneTimePriceCurrencyGtq ProductNewParamsPriceOneTimePriceCurrency = "GTQ"
	ProductNewParamsPriceOneTimePriceCurrencyGyd ProductNewParamsPriceOneTimePriceCurrency = "GYD"
	ProductNewParamsPriceOneTimePriceCurrencyHkd ProductNewParamsPriceOneTimePriceCurrency = "HKD"
	ProductNewParamsPriceOneTimePriceCurrencyHnl ProductNewParamsPriceOneTimePriceCurrency = "HNL"
	ProductNewParamsPriceOneTimePriceCurrencyHrk ProductNewParamsPriceOneTimePriceCurrency = "HRK"
	ProductNewParamsPriceOneTimePriceCurrencyHtg ProductNewParamsPriceOneTimePriceCurrency = "HTG"
	ProductNewParamsPriceOneTimePriceCurrencyHuf ProductNewParamsPriceOneTimePriceCurrency = "HUF"
	ProductNewParamsPriceOneTimePriceCurrencyIdr ProductNewParamsPriceOneTimePriceCurrency = "IDR"
	ProductNewParamsPriceOneTimePriceCurrencyIls ProductNewParamsPriceOneTimePriceCurrency = "ILS"
	ProductNewParamsPriceOneTimePriceCurrencyInr ProductNewParamsPriceOneTimePriceCurrency = "INR"
	ProductNewParamsPriceOneTimePriceCurrencyIqd ProductNewParamsPriceOneTimePriceCurrency = "IQD"
	ProductNewParamsPriceOneTimePriceCurrencyJmd ProductNewParamsPriceOneTimePriceCurrency = "JMD"
	ProductNewParamsPriceOneTimePriceCurrencyJod ProductNewParamsPriceOneTimePriceCurrency = "JOD"
	ProductNewParamsPriceOneTimePriceCurrencyJpy ProductNewParamsPriceOneTimePriceCurrency = "JPY"
	ProductNewParamsPriceOneTimePriceCurrencyKes ProductNewParamsPriceOneTimePriceCurrency = "KES"
	ProductNewParamsPriceOneTimePriceCurrencyKgs ProductNewParamsPriceOneTimePriceCurrency = "KGS"
	ProductNewParamsPriceOneTimePriceCurrencyKhr ProductNewParamsPriceOneTimePriceCurrency = "KHR"
	ProductNewParamsPriceOneTimePriceCurrencyKmf ProductNewParamsPriceOneTimePriceCurrency = "KMF"
	ProductNewParamsPriceOneTimePriceCurrencyKrw ProductNewParamsPriceOneTimePriceCurrency = "KRW"
	ProductNewParamsPriceOneTimePriceCurrencyKwd ProductNewParamsPriceOneTimePriceCurrency = "KWD"
	ProductNewParamsPriceOneTimePriceCurrencyKyd ProductNewParamsPriceOneTimePriceCurrency = "KYD"
	ProductNewParamsPriceOneTimePriceCurrencyKzt ProductNewParamsPriceOneTimePriceCurrency = "KZT"
	ProductNewParamsPriceOneTimePriceCurrencyLak ProductNewParamsPriceOneTimePriceCurrency = "LAK"
	ProductNewParamsPriceOneTimePriceCurrencyLbp ProductNewParamsPriceOneTimePriceCurrency = "LBP"
	ProductNewParamsPriceOneTimePriceCurrencyLkr ProductNewParamsPriceOneTimePriceCurrency = "LKR"
	ProductNewParamsPriceOneTimePriceCurrencyLrd ProductNewParamsPriceOneTimePriceCurrency = "LRD"
	ProductNewParamsPriceOneTimePriceCurrencyLsl ProductNewParamsPriceOneTimePriceCurrency = "LSL"
	ProductNewParamsPriceOneTimePriceCurrencyLyd ProductNewParamsPriceOneTimePriceCurrency = "LYD"
	ProductNewParamsPriceOneTimePriceCurrencyMad ProductNewParamsPriceOneTimePriceCurrency = "MAD"
	ProductNewParamsPriceOneTimePriceCurrencyMdl ProductNewParamsPriceOneTimePriceCurrency = "MDL"
	ProductNewParamsPriceOneTimePriceCurrencyMga ProductNewParamsPriceOneTimePriceCurrency = "MGA"
	ProductNewParamsPriceOneTimePriceCurrencyMkd ProductNewParamsPriceOneTimePriceCurrency = "MKD"
	ProductNewParamsPriceOneTimePriceCurrencyMmk ProductNewParamsPriceOneTimePriceCurrency = "MMK"
	ProductNewParamsPriceOneTimePriceCurrencyMnt ProductNewParamsPriceOneTimePriceCurrency = "MNT"
	ProductNewParamsPriceOneTimePriceCurrencyMop ProductNewParamsPriceOneTimePriceCurrency = "MOP"
	ProductNewParamsPriceOneTimePriceCurrencyMru ProductNewParamsPriceOneTimePriceCurrency = "MRU"
	ProductNewParamsPriceOneTimePriceCurrencyMur ProductNewParamsPriceOneTimePriceCurrency = "MUR"
	ProductNewParamsPriceOneTimePriceCurrencyMvr ProductNewParamsPriceOneTimePriceCurrency = "MVR"
	ProductNewParamsPriceOneTimePriceCurrencyMwk ProductNewParamsPriceOneTimePriceCurrency = "MWK"
	ProductNewParamsPriceOneTimePriceCurrencyMxn ProductNewParamsPriceOneTimePriceCurrency = "MXN"
	ProductNewParamsPriceOneTimePriceCurrencyMyr ProductNewParamsPriceOneTimePriceCurrency = "MYR"
	ProductNewParamsPriceOneTimePriceCurrencyMzn ProductNewParamsPriceOneTimePriceCurrency = "MZN"
	ProductNewParamsPriceOneTimePriceCurrencyNad ProductNewParamsPriceOneTimePriceCurrency = "NAD"
	ProductNewParamsPriceOneTimePriceCurrencyNgn ProductNewParamsPriceOneTimePriceCurrency = "NGN"
	ProductNewParamsPriceOneTimePriceCurrencyNio ProductNewParamsPriceOneTimePriceCurrency = "NIO"
	ProductNewParamsPriceOneTimePriceCurrencyNok ProductNewParamsPriceOneTimePriceCurrency = "NOK"
	ProductNewParamsPriceOneTimePriceCurrencyNpr ProductNewParamsPriceOneTimePriceCurrency = "NPR"
	ProductNewParamsPriceOneTimePriceCurrencyNzd ProductNewParamsPriceOneTimePriceCurrency = "NZD"
	ProductNewParamsPriceOneTimePriceCurrencyOmr ProductNewParamsPriceOneTimePriceCurrency = "OMR"
	ProductNewParamsPriceOneTimePriceCurrencyPab ProductNewParamsPriceOneTimePriceCurrency = "PAB"
	ProductNewParamsPriceOneTimePriceCurrencyPen ProductNewParamsPriceOneTimePriceCurrency = "PEN"
	ProductNewParamsPriceOneTimePriceCurrencyPgk ProductNewParamsPriceOneTimePriceCurrency = "PGK"
	ProductNewParamsPriceOneTimePriceCurrencyPhp ProductNewParamsPriceOneTimePriceCurrency = "PHP"
	ProductNewParamsPriceOneTimePriceCurrencyPkr ProductNewParamsPriceOneTimePriceCurrency = "PKR"
	ProductNewParamsPriceOneTimePriceCurrencyPln ProductNewParamsPriceOneTimePriceCurrency = "PLN"
	ProductNewParamsPriceOneTimePriceCurrencyPyg ProductNewParamsPriceOneTimePriceCurrency = "PYG"
	ProductNewParamsPriceOneTimePriceCurrencyQar ProductNewParamsPriceOneTimePriceCurrency = "QAR"
	ProductNewParamsPriceOneTimePriceCurrencyRon ProductNewParamsPriceOneTimePriceCurrency = "RON"
	ProductNewParamsPriceOneTimePriceCurrencyRsd ProductNewParamsPriceOneTimePriceCurrency = "RSD"
	ProductNewParamsPriceOneTimePriceCurrencyRub ProductNewParamsPriceOneTimePriceCurrency = "RUB"
	ProductNewParamsPriceOneTimePriceCurrencyRwf ProductNewParamsPriceOneTimePriceCurrency = "RWF"
	ProductNewParamsPriceOneTimePriceCurrencySar ProductNewParamsPriceOneTimePriceCurrency = "SAR"
	ProductNewParamsPriceOneTimePriceCurrencySbd ProductNewParamsPriceOneTimePriceCurrency = "SBD"
	ProductNewParamsPriceOneTimePriceCurrencyScr ProductNewParamsPriceOneTimePriceCurrency = "SCR"
	ProductNewParamsPriceOneTimePriceCurrencySek ProductNewParamsPriceOneTimePriceCurrency = "SEK"
	ProductNewParamsPriceOneTimePriceCurrencySgd ProductNewParamsPriceOneTimePriceCurrency = "SGD"
	ProductNewParamsPriceOneTimePriceCurrencyShp ProductNewParamsPriceOneTimePriceCurrency = "SHP"
	ProductNewParamsPriceOneTimePriceCurrencySle ProductNewParamsPriceOneTimePriceCurrency = "SLE"
	ProductNewParamsPriceOneTimePriceCurrencySll ProductNewParamsPriceOneTimePriceCurrency = "SLL"
	ProductNewParamsPriceOneTimePriceCurrencySos ProductNewParamsPriceOneTimePriceCurrency = "SOS"
	ProductNewParamsPriceOneTimePriceCurrencySrd ProductNewParamsPriceOneTimePriceCurrency = "SRD"
	ProductNewParamsPriceOneTimePriceCurrencySsp ProductNewParamsPriceOneTimePriceCurrency = "SSP"
	ProductNewParamsPriceOneTimePriceCurrencyStn ProductNewParamsPriceOneTimePriceCurrency = "STN"
	ProductNewParamsPriceOneTimePriceCurrencySvc ProductNewParamsPriceOneTimePriceCurrency = "SVC"
	ProductNewParamsPriceOneTimePriceCurrencySzl ProductNewParamsPriceOneTimePriceCurrency = "SZL"
	ProductNewParamsPriceOneTimePriceCurrencyThb ProductNewParamsPriceOneTimePriceCurrency = "THB"
	ProductNewParamsPriceOneTimePriceCurrencyTnd ProductNewParamsPriceOneTimePriceCurrency = "TND"
	ProductNewParamsPriceOneTimePriceCurrencyTop ProductNewParamsPriceOneTimePriceCurrency = "TOP"
	ProductNewParamsPriceOneTimePriceCurrencyTry ProductNewParamsPriceOneTimePriceCurrency = "TRY"
	ProductNewParamsPriceOneTimePriceCurrencyTtd ProductNewParamsPriceOneTimePriceCurrency = "TTD"
	ProductNewParamsPriceOneTimePriceCurrencyTwd ProductNewParamsPriceOneTimePriceCurrency = "TWD"
	ProductNewParamsPriceOneTimePriceCurrencyTzs ProductNewParamsPriceOneTimePriceCurrency = "TZS"
	ProductNewParamsPriceOneTimePriceCurrencyUah ProductNewParamsPriceOneTimePriceCurrency = "UAH"
	ProductNewParamsPriceOneTimePriceCurrencyUgx ProductNewParamsPriceOneTimePriceCurrency = "UGX"
	ProductNewParamsPriceOneTimePriceCurrencyUsd ProductNewParamsPriceOneTimePriceCurrency = "USD"
	ProductNewParamsPriceOneTimePriceCurrencyUyu ProductNewParamsPriceOneTimePriceCurrency = "UYU"
	ProductNewParamsPriceOneTimePriceCurrencyUzs ProductNewParamsPriceOneTimePriceCurrency = "UZS"
	ProductNewParamsPriceOneTimePriceCurrencyVes ProductNewParamsPriceOneTimePriceCurrency = "VES"
	ProductNewParamsPriceOneTimePriceCurrencyVnd ProductNewParamsPriceOneTimePriceCurrency = "VND"
	ProductNewParamsPriceOneTimePriceCurrencyVuv ProductNewParamsPriceOneTimePriceCurrency = "VUV"
	ProductNewParamsPriceOneTimePriceCurrencyWst ProductNewParamsPriceOneTimePriceCurrency = "WST"
	ProductNewParamsPriceOneTimePriceCurrencyXaf ProductNewParamsPriceOneTimePriceCurrency = "XAF"
	ProductNewParamsPriceOneTimePriceCurrencyXcd ProductNewParamsPriceOneTimePriceCurrency = "XCD"
	ProductNewParamsPriceOneTimePriceCurrencyXof ProductNewParamsPriceOneTimePriceCurrency = "XOF"
	ProductNewParamsPriceOneTimePriceCurrencyXpf ProductNewParamsPriceOneTimePriceCurrency = "XPF"
	ProductNewParamsPriceOneTimePriceCurrencyYer ProductNewParamsPriceOneTimePriceCurrency = "YER"
	ProductNewParamsPriceOneTimePriceCurrencyZar ProductNewParamsPriceOneTimePriceCurrency = "ZAR"
	ProductNewParamsPriceOneTimePriceCurrencyZmw ProductNewParamsPriceOneTimePriceCurrency = "ZMW"
)

func (ProductNewParamsPriceOneTimePriceCurrency) IsKnown

type ProductNewParamsPriceOneTimePriceType

type ProductNewParamsPriceOneTimePriceType string
const (
	ProductNewParamsPriceOneTimePriceTypeOneTimePrice ProductNewParamsPriceOneTimePriceType = "one_time_price"
)

func (ProductNewParamsPriceOneTimePriceType) IsKnown

type ProductNewParamsPricePaymentFrequencyInterval

type ProductNewParamsPricePaymentFrequencyInterval string
const (
	ProductNewParamsPricePaymentFrequencyIntervalDay   ProductNewParamsPricePaymentFrequencyInterval = "Day"
	ProductNewParamsPricePaymentFrequencyIntervalWeek  ProductNewParamsPricePaymentFrequencyInterval = "Week"
	ProductNewParamsPricePaymentFrequencyIntervalMonth ProductNewParamsPricePaymentFrequencyInterval = "Month"
	ProductNewParamsPricePaymentFrequencyIntervalYear  ProductNewParamsPricePaymentFrequencyInterval = "Year"
)

func (ProductNewParamsPricePaymentFrequencyInterval) IsKnown

type ProductNewParamsPriceRecurringPrice

type ProductNewParamsPriceRecurringPrice struct {
	Currency param.Field[ProductNewParamsPriceRecurringPriceCurrency] `json:"currency,required"`
	// Discount applied to the price, represented as a percentage (0 to 100).
	Discount param.Field[float64] `json:"discount,required"`
	// Number of units for the payment frequency. For example, a value of `1` with a
	// `payment_frequency_interval` of `month` represents monthly payments.
	PaymentFrequencyCount    param.Field[int64]                                                       `json:"payment_frequency_count,required"`
	PaymentFrequencyInterval param.Field[ProductNewParamsPriceRecurringPricePaymentFrequencyInterval] `json:"payment_frequency_interval,required"`
	// The payment amount. Represented in the lowest denomination of the currency
	// (e.g., cents for USD). For example, to charge $1.00, pass `100`.
	Price param.Field[int64] `json:"price,required"`
	// Indicates if purchasing power parity adjustments are applied to the price.
	// Purchasing power parity feature is not available as of now
	PurchasingPowerParity param.Field[bool] `json:"purchasing_power_parity,required"`
	// Number of units for the subscription period. For example, a value of `12` with a
	// `subscription_period_interval` of `month` represents a one-year subscription.
	SubscriptionPeriodCount    param.Field[int64]                                                         `json:"subscription_period_count,required"`
	SubscriptionPeriodInterval param.Field[ProductNewParamsPriceRecurringPriceSubscriptionPeriodInterval] `json:"subscription_period_interval,required"`
	Type                       param.Field[ProductNewParamsPriceRecurringPriceType]                       `json:"type,required"`
	// Indicates if the price is tax inclusive
	TaxInclusive param.Field[bool] `json:"tax_inclusive"`
	// Number of days for the trial period. A value of `0` indicates no trial period.
	TrialPeriodDays param.Field[int64] `json:"trial_period_days"`
}

func (ProductNewParamsPriceRecurringPrice) MarshalJSON

func (r ProductNewParamsPriceRecurringPrice) MarshalJSON() (data []byte, err error)

type ProductNewParamsPriceRecurringPriceCurrency

type ProductNewParamsPriceRecurringPriceCurrency string
const (
	ProductNewParamsPriceRecurringPriceCurrencyAed ProductNewParamsPriceRecurringPriceCurrency = "AED"
	ProductNewParamsPriceRecurringPriceCurrencyAll ProductNewParamsPriceRecurringPriceCurrency = "ALL"
	ProductNewParamsPriceRecurringPriceCurrencyAmd ProductNewParamsPriceRecurringPriceCurrency = "AMD"
	ProductNewParamsPriceRecurringPriceCurrencyAng ProductNewParamsPriceRecurringPriceCurrency = "ANG"
	ProductNewParamsPriceRecurringPriceCurrencyAoa ProductNewParamsPriceRecurringPriceCurrency = "AOA"
	ProductNewParamsPriceRecurringPriceCurrencyArs ProductNewParamsPriceRecurringPriceCurrency = "ARS"
	ProductNewParamsPriceRecurringPriceCurrencyAud ProductNewParamsPriceRecurringPriceCurrency = "AUD"
	ProductNewParamsPriceRecurringPriceCurrencyAwg ProductNewParamsPriceRecurringPriceCurrency = "AWG"
	ProductNewParamsPriceRecurringPriceCurrencyAzn ProductNewParamsPriceRecurringPriceCurrency = "AZN"
	ProductNewParamsPriceRecurringPriceCurrencyBam ProductNewParamsPriceRecurringPriceCurrency = "BAM"
	ProductNewParamsPriceRecurringPriceCurrencyBbd ProductNewParamsPriceRecurringPriceCurrency = "BBD"
	ProductNewParamsPriceRecurringPriceCurrencyBdt ProductNewParamsPriceRecurringPriceCurrency = "BDT"
	ProductNewParamsPriceRecurringPriceCurrencyBgn ProductNewParamsPriceRecurringPriceCurrency = "BGN"
	ProductNewParamsPriceRecurringPriceCurrencyBhd ProductNewParamsPriceRecurringPriceCurrency = "BHD"
	ProductNewParamsPriceRecurringPriceCurrencyBif ProductNewParamsPriceRecurringPriceCurrency = "BIF"
	ProductNewParamsPriceRecurringPriceCurrencyBmd ProductNewParamsPriceRecurringPriceCurrency = "BMD"
	ProductNewParamsPriceRecurringPriceCurrencyBnd ProductNewParamsPriceRecurringPriceCurrency = "BND"
	ProductNewParamsPriceRecurringPriceCurrencyBob ProductNewParamsPriceRecurringPriceCurrency = "BOB"
	ProductNewParamsPriceRecurringPriceCurrencyBrl ProductNewParamsPriceRecurringPriceCurrency = "BRL"
	ProductNewParamsPriceRecurringPriceCurrencyBsd ProductNewParamsPriceRecurringPriceCurrency = "BSD"
	ProductNewParamsPriceRecurringPriceCurrencyBwp ProductNewParamsPriceRecurringPriceCurrency = "BWP"
	ProductNewParamsPriceRecurringPriceCurrencyByn ProductNewParamsPriceRecurringPriceCurrency = "BYN"
	ProductNewParamsPriceRecurringPriceCurrencyBzd ProductNewParamsPriceRecurringPriceCurrency = "BZD"
	ProductNewParamsPriceRecurringPriceCurrencyCad ProductNewParamsPriceRecurringPriceCurrency = "CAD"
	ProductNewParamsPriceRecurringPriceCurrencyChf ProductNewParamsPriceRecurringPriceCurrency = "CHF"
	ProductNewParamsPriceRecurringPriceCurrencyClp ProductNewParamsPriceRecurringPriceCurrency = "CLP"
	ProductNewParamsPriceRecurringPriceCurrencyCny ProductNewParamsPriceRecurringPriceCurrency = "CNY"
	ProductNewParamsPriceRecurringPriceCurrencyCop ProductNewParamsPriceRecurringPriceCurrency = "COP"
	ProductNewParamsPriceRecurringPriceCurrencyCrc ProductNewParamsPriceRecurringPriceCurrency = "CRC"
	ProductNewParamsPriceRecurringPriceCurrencyCup ProductNewParamsPriceRecurringPriceCurrency = "CUP"
	ProductNewParamsPriceRecurringPriceCurrencyCve ProductNewParamsPriceRecurringPriceCurrency = "CVE"
	ProductNewParamsPriceRecurringPriceCurrencyCzk ProductNewParamsPriceRecurringPriceCurrency = "CZK"
	ProductNewParamsPriceRecurringPriceCurrencyDjf ProductNewParamsPriceRecurringPriceCurrency = "DJF"
	ProductNewParamsPriceRecurringPriceCurrencyDkk ProductNewParamsPriceRecurringPriceCurrency = "DKK"
	ProductNewParamsPriceRecurringPriceCurrencyDop ProductNewParamsPriceRecurringPriceCurrency = "DOP"
	ProductNewParamsPriceRecurringPriceCurrencyDzd ProductNewParamsPriceRecurringPriceCurrency = "DZD"
	ProductNewParamsPriceRecurringPriceCurrencyEgp ProductNewParamsPriceRecurringPriceCurrency = "EGP"
	ProductNewParamsPriceRecurringPriceCurrencyEtb ProductNewParamsPriceRecurringPriceCurrency = "ETB"
	ProductNewParamsPriceRecurringPriceCurrencyEur ProductNewParamsPriceRecurringPriceCurrency = "EUR"
	ProductNewParamsPriceRecurringPriceCurrencyFjd ProductNewParamsPriceRecurringPriceCurrency = "FJD"
	ProductNewParamsPriceRecurringPriceCurrencyFkp ProductNewParamsPriceRecurringPriceCurrency = "FKP"
	ProductNewParamsPriceRecurringPriceCurrencyGbp ProductNewParamsPriceRecurringPriceCurrency = "GBP"
	ProductNewParamsPriceRecurringPriceCurrencyGel ProductNewParamsPriceRecurringPriceCurrency = "GEL"
	ProductNewParamsPriceRecurringPriceCurrencyGhs ProductNewParamsPriceRecurringPriceCurrency = "GHS"
	ProductNewParamsPriceRecurringPriceCurrencyGip ProductNewParamsPriceRecurringPriceCurrency = "GIP"
	ProductNewParamsPriceRecurringPriceCurrencyGmd ProductNewParamsPriceRecurringPriceCurrency = "GMD"
	ProductNewParamsPriceRecurringPriceCurrencyGnf ProductNewParamsPriceRecurringPriceCurrency = "GNF"
	ProductNewParamsPriceRecurringPriceCurrencyGtq ProductNewParamsPriceRecurringPriceCurrency = "GTQ"
	ProductNewParamsPriceRecurringPriceCurrencyGyd ProductNewParamsPriceRecurringPriceCurrency = "GYD"
	ProductNewParamsPriceRecurringPriceCurrencyHkd ProductNewParamsPriceRecurringPriceCurrency = "HKD"
	ProductNewParamsPriceRecurringPriceCurrencyHnl ProductNewParamsPriceRecurringPriceCurrency = "HNL"
	ProductNewParamsPriceRecurringPriceCurrencyHrk ProductNewParamsPriceRecurringPriceCurrency = "HRK"
	ProductNewParamsPriceRecurringPriceCurrencyHtg ProductNewParamsPriceRecurringPriceCurrency = "HTG"
	ProductNewParamsPriceRecurringPriceCurrencyHuf ProductNewParamsPriceRecurringPriceCurrency = "HUF"
	ProductNewParamsPriceRecurringPriceCurrencyIdr ProductNewParamsPriceRecurringPriceCurrency = "IDR"
	ProductNewParamsPriceRecurringPriceCurrencyIls ProductNewParamsPriceRecurringPriceCurrency = "ILS"
	ProductNewParamsPriceRecurringPriceCurrencyInr ProductNewParamsPriceRecurringPriceCurrency = "INR"
	ProductNewParamsPriceRecurringPriceCurrencyIqd ProductNewParamsPriceRecurringPriceCurrency = "IQD"
	ProductNewParamsPriceRecurringPriceCurrencyJmd ProductNewParamsPriceRecurringPriceCurrency = "JMD"
	ProductNewParamsPriceRecurringPriceCurrencyJod ProductNewParamsPriceRecurringPriceCurrency = "JOD"
	ProductNewParamsPriceRecurringPriceCurrencyJpy ProductNewParamsPriceRecurringPriceCurrency = "JPY"
	ProductNewParamsPriceRecurringPriceCurrencyKes ProductNewParamsPriceRecurringPriceCurrency = "KES"
	ProductNewParamsPriceRecurringPriceCurrencyKgs ProductNewParamsPriceRecurringPriceCurrency = "KGS"
	ProductNewParamsPriceRecurringPriceCurrencyKhr ProductNewParamsPriceRecurringPriceCurrency = "KHR"
	ProductNewParamsPriceRecurringPriceCurrencyKmf ProductNewParamsPriceRecurringPriceCurrency = "KMF"
	ProductNewParamsPriceRecurringPriceCurrencyKrw ProductNewParamsPriceRecurringPriceCurrency = "KRW"
	ProductNewParamsPriceRecurringPriceCurrencyKwd ProductNewParamsPriceRecurringPriceCurrency = "KWD"
	ProductNewParamsPriceRecurringPriceCurrencyKyd ProductNewParamsPriceRecurringPriceCurrency = "KYD"
	ProductNewParamsPriceRecurringPriceCurrencyKzt ProductNewParamsPriceRecurringPriceCurrency = "KZT"
	ProductNewParamsPriceRecurringPriceCurrencyLak ProductNewParamsPriceRecurringPriceCurrency = "LAK"
	ProductNewParamsPriceRecurringPriceCurrencyLbp ProductNewParamsPriceRecurringPriceCurrency = "LBP"
	ProductNewParamsPriceRecurringPriceCurrencyLkr ProductNewParamsPriceRecurringPriceCurrency = "LKR"
	ProductNewParamsPriceRecurringPriceCurrencyLrd ProductNewParamsPriceRecurringPriceCurrency = "LRD"
	ProductNewParamsPriceRecurringPriceCurrencyLsl ProductNewParamsPriceRecurringPriceCurrency = "LSL"
	ProductNewParamsPriceRecurringPriceCurrencyLyd ProductNewParamsPriceRecurringPriceCurrency = "LYD"
	ProductNewParamsPriceRecurringPriceCurrencyMad ProductNewParamsPriceRecurringPriceCurrency = "MAD"
	ProductNewParamsPriceRecurringPriceCurrencyMdl ProductNewParamsPriceRecurringPriceCurrency = "MDL"
	ProductNewParamsPriceRecurringPriceCurrencyMga ProductNewParamsPriceRecurringPriceCurrency = "MGA"
	ProductNewParamsPriceRecurringPriceCurrencyMkd ProductNewParamsPriceRecurringPriceCurrency = "MKD"
	ProductNewParamsPriceRecurringPriceCurrencyMmk ProductNewParamsPriceRecurringPriceCurrency = "MMK"
	ProductNewParamsPriceRecurringPriceCurrencyMnt ProductNewParamsPriceRecurringPriceCurrency = "MNT"
	ProductNewParamsPriceRecurringPriceCurrencyMop ProductNewParamsPriceRecurringPriceCurrency = "MOP"
	ProductNewParamsPriceRecurringPriceCurrencyMru ProductNewParamsPriceRecurringPriceCurrency = "MRU"
	ProductNewParamsPriceRecurringPriceCurrencyMur ProductNewParamsPriceRecurringPriceCurrency = "MUR"
	ProductNewParamsPriceRecurringPriceCurrencyMvr ProductNewParamsPriceRecurringPriceCurrency = "MVR"
	ProductNewParamsPriceRecurringPriceCurrencyMwk ProductNewParamsPriceRecurringPriceCurrency = "MWK"
	ProductNewParamsPriceRecurringPriceCurrencyMxn ProductNewParamsPriceRecurringPriceCurrency = "MXN"
	ProductNewParamsPriceRecurringPriceCurrencyMyr ProductNewParamsPriceRecurringPriceCurrency = "MYR"
	ProductNewParamsPriceRecurringPriceCurrencyMzn ProductNewParamsPriceRecurringPriceCurrency = "MZN"
	ProductNewParamsPriceRecurringPriceCurrencyNad ProductNewParamsPriceRecurringPriceCurrency = "NAD"
	ProductNewParamsPriceRecurringPriceCurrencyNgn ProductNewParamsPriceRecurringPriceCurrency = "NGN"
	ProductNewParamsPriceRecurringPriceCurrencyNio ProductNewParamsPriceRecurringPriceCurrency = "NIO"
	ProductNewParamsPriceRecurringPriceCurrencyNok ProductNewParamsPriceRecurringPriceCurrency = "NOK"
	ProductNewParamsPriceRecurringPriceCurrencyNpr ProductNewParamsPriceRecurringPriceCurrency = "NPR"
	ProductNewParamsPriceRecurringPriceCurrencyNzd ProductNewParamsPriceRecurringPriceCurrency = "NZD"
	ProductNewParamsPriceRecurringPriceCurrencyOmr ProductNewParamsPriceRecurringPriceCurrency = "OMR"
	ProductNewParamsPriceRecurringPriceCurrencyPab ProductNewParamsPriceRecurringPriceCurrency = "PAB"
	ProductNewParamsPriceRecurringPriceCurrencyPen ProductNewParamsPriceRecurringPriceCurrency = "PEN"
	ProductNewParamsPriceRecurringPriceCurrencyPgk ProductNewParamsPriceRecurringPriceCurrency = "PGK"
	ProductNewParamsPriceRecurringPriceCurrencyPhp ProductNewParamsPriceRecurringPriceCurrency = "PHP"
	ProductNewParamsPriceRecurringPriceCurrencyPkr ProductNewParamsPriceRecurringPriceCurrency = "PKR"
	ProductNewParamsPriceRecurringPriceCurrencyPln ProductNewParamsPriceRecurringPriceCurrency = "PLN"
	ProductNewParamsPriceRecurringPriceCurrencyPyg ProductNewParamsPriceRecurringPriceCurrency = "PYG"
	ProductNewParamsPriceRecurringPriceCurrencyQar ProductNewParamsPriceRecurringPriceCurrency = "QAR"
	ProductNewParamsPriceRecurringPriceCurrencyRon ProductNewParamsPriceRecurringPriceCurrency = "RON"
	ProductNewParamsPriceRecurringPriceCurrencyRsd ProductNewParamsPriceRecurringPriceCurrency = "RSD"
	ProductNewParamsPriceRecurringPriceCurrencyRub ProductNewParamsPriceRecurringPriceCurrency = "RUB"
	ProductNewParamsPriceRecurringPriceCurrencyRwf ProductNewParamsPriceRecurringPriceCurrency = "RWF"
	ProductNewParamsPriceRecurringPriceCurrencySar ProductNewParamsPriceRecurringPriceCurrency = "SAR"
	ProductNewParamsPriceRecurringPriceCurrencySbd ProductNewParamsPriceRecurringPriceCurrency = "SBD"
	ProductNewParamsPriceRecurringPriceCurrencyScr ProductNewParamsPriceRecurringPriceCurrency = "SCR"
	ProductNewParamsPriceRecurringPriceCurrencySek ProductNewParamsPriceRecurringPriceCurrency = "SEK"
	ProductNewParamsPriceRecurringPriceCurrencySgd ProductNewParamsPriceRecurringPriceCurrency = "SGD"
	ProductNewParamsPriceRecurringPriceCurrencyShp ProductNewParamsPriceRecurringPriceCurrency = "SHP"
	ProductNewParamsPriceRecurringPriceCurrencySle ProductNewParamsPriceRecurringPriceCurrency = "SLE"
	ProductNewParamsPriceRecurringPriceCurrencySll ProductNewParamsPriceRecurringPriceCurrency = "SLL"
	ProductNewParamsPriceRecurringPriceCurrencySos ProductNewParamsPriceRecurringPriceCurrency = "SOS"
	ProductNewParamsPriceRecurringPriceCurrencySrd ProductNewParamsPriceRecurringPriceCurrency = "SRD"
	ProductNewParamsPriceRecurringPriceCurrencySsp ProductNewParamsPriceRecurringPriceCurrency = "SSP"
	ProductNewParamsPriceRecurringPriceCurrencyStn ProductNewParamsPriceRecurringPriceCurrency = "STN"
	ProductNewParamsPriceRecurringPriceCurrencySvc ProductNewParamsPriceRecurringPriceCurrency = "SVC"
	ProductNewParamsPriceRecurringPriceCurrencySzl ProductNewParamsPriceRecurringPriceCurrency = "SZL"
	ProductNewParamsPriceRecurringPriceCurrencyThb ProductNewParamsPriceRecurringPriceCurrency = "THB"
	ProductNewParamsPriceRecurringPriceCurrencyTnd ProductNewParamsPriceRecurringPriceCurrency = "TND"
	ProductNewParamsPriceRecurringPriceCurrencyTop ProductNewParamsPriceRecurringPriceCurrency = "TOP"
	ProductNewParamsPriceRecurringPriceCurrencyTry ProductNewParamsPriceRecurringPriceCurrency = "TRY"
	ProductNewParamsPriceRecurringPriceCurrencyTtd ProductNewParamsPriceRecurringPriceCurrency = "TTD"
	ProductNewParamsPriceRecurringPriceCurrencyTwd ProductNewParamsPriceRecurringPriceCurrency = "TWD"
	ProductNewParamsPriceRecurringPriceCurrencyTzs ProductNewParamsPriceRecurringPriceCurrency = "TZS"
	ProductNewParamsPriceRecurringPriceCurrencyUah ProductNewParamsPriceRecurringPriceCurrency = "UAH"
	ProductNewParamsPriceRecurringPriceCurrencyUgx ProductNewParamsPriceRecurringPriceCurrency = "UGX"
	ProductNewParamsPriceRecurringPriceCurrencyUsd ProductNewParamsPriceRecurringPriceCurrency = "USD"
	ProductNewParamsPriceRecurringPriceCurrencyUyu ProductNewParamsPriceRecurringPriceCurrency = "UYU"
	ProductNewParamsPriceRecurringPriceCurrencyUzs ProductNewParamsPriceRecurringPriceCurrency = "UZS"
	ProductNewParamsPriceRecurringPriceCurrencyVes ProductNewParamsPriceRecurringPriceCurrency = "VES"
	ProductNewParamsPriceRecurringPriceCurrencyVnd ProductNewParamsPriceRecurringPriceCurrency = "VND"
	ProductNewParamsPriceRecurringPriceCurrencyVuv ProductNewParamsPriceRecurringPriceCurrency = "VUV"
	ProductNewParamsPriceRecurringPriceCurrencyWst ProductNewParamsPriceRecurringPriceCurrency = "WST"
	ProductNewParamsPriceRecurringPriceCurrencyXaf ProductNewParamsPriceRecurringPriceCurrency = "XAF"
	ProductNewParamsPriceRecurringPriceCurrencyXcd ProductNewParamsPriceRecurringPriceCurrency = "XCD"
	ProductNewParamsPriceRecurringPriceCurrencyXof ProductNewParamsPriceRecurringPriceCurrency = "XOF"
	ProductNewParamsPriceRecurringPriceCurrencyXpf ProductNewParamsPriceRecurringPriceCurrency = "XPF"
	ProductNewParamsPriceRecurringPriceCurrencyYer ProductNewParamsPriceRecurringPriceCurrency = "YER"
	ProductNewParamsPriceRecurringPriceCurrencyZar ProductNewParamsPriceRecurringPriceCurrency = "ZAR"
	ProductNewParamsPriceRecurringPriceCurrencyZmw ProductNewParamsPriceRecurringPriceCurrency = "ZMW"
)

func (ProductNewParamsPriceRecurringPriceCurrency) IsKnown

type ProductNewParamsPriceRecurringPricePaymentFrequencyInterval

type ProductNewParamsPriceRecurringPricePaymentFrequencyInterval string
const (
	ProductNewParamsPriceRecurringPricePaymentFrequencyIntervalDay   ProductNewParamsPriceRecurringPricePaymentFrequencyInterval = "Day"
	ProductNewParamsPriceRecurringPricePaymentFrequencyIntervalWeek  ProductNewParamsPriceRecurringPricePaymentFrequencyInterval = "Week"
	ProductNewParamsPriceRecurringPricePaymentFrequencyIntervalMonth ProductNewParamsPriceRecurringPricePaymentFrequencyInterval = "Month"
	ProductNewParamsPriceRecurringPricePaymentFrequencyIntervalYear  ProductNewParamsPriceRecurringPricePaymentFrequencyInterval = "Year"
)

func (ProductNewParamsPriceRecurringPricePaymentFrequencyInterval) IsKnown

type ProductNewParamsPriceRecurringPriceSubscriptionPeriodInterval

type ProductNewParamsPriceRecurringPriceSubscriptionPeriodInterval string
const (
	ProductNewParamsPriceRecurringPriceSubscriptionPeriodIntervalDay   ProductNewParamsPriceRecurringPriceSubscriptionPeriodInterval = "Day"
	ProductNewParamsPriceRecurringPriceSubscriptionPeriodIntervalWeek  ProductNewParamsPriceRecurringPriceSubscriptionPeriodInterval = "Week"
	ProductNewParamsPriceRecurringPriceSubscriptionPeriodIntervalMonth ProductNewParamsPriceRecurringPriceSubscriptionPeriodInterval = "Month"
	ProductNewParamsPriceRecurringPriceSubscriptionPeriodIntervalYear  ProductNewParamsPriceRecurringPriceSubscriptionPeriodInterval = "Year"
)

func (ProductNewParamsPriceRecurringPriceSubscriptionPeriodInterval) IsKnown

type ProductNewParamsPriceRecurringPriceType

type ProductNewParamsPriceRecurringPriceType string
const (
	ProductNewParamsPriceRecurringPriceTypeRecurringPrice ProductNewParamsPriceRecurringPriceType = "recurring_price"
)

func (ProductNewParamsPriceRecurringPriceType) IsKnown

type ProductNewParamsPriceSubscriptionPeriodInterval

type ProductNewParamsPriceSubscriptionPeriodInterval string
const (
	ProductNewParamsPriceSubscriptionPeriodIntervalDay   ProductNewParamsPriceSubscriptionPeriodInterval = "Day"
	ProductNewParamsPriceSubscriptionPeriodIntervalWeek  ProductNewParamsPriceSubscriptionPeriodInterval = "Week"
	ProductNewParamsPriceSubscriptionPeriodIntervalMonth ProductNewParamsPriceSubscriptionPeriodInterval = "Month"
	ProductNewParamsPriceSubscriptionPeriodIntervalYear  ProductNewParamsPriceSubscriptionPeriodInterval = "Year"
)

func (ProductNewParamsPriceSubscriptionPeriodInterval) IsKnown

type ProductNewParamsPriceType

type ProductNewParamsPriceType string
const (
	ProductNewParamsPriceTypeOneTimePrice   ProductNewParamsPriceType = "one_time_price"
	ProductNewParamsPriceTypeRecurringPrice ProductNewParamsPriceType = "recurring_price"
)

func (ProductNewParamsPriceType) IsKnown

func (r ProductNewParamsPriceType) IsKnown() bool

type ProductNewParamsPriceUnion

type ProductNewParamsPriceUnion interface {
	// contains filtered or unexported methods
}

Satisfied by ProductNewParamsPriceOneTimePrice, ProductNewParamsPriceRecurringPrice, ProductNewParamsPrice.

type ProductNewParamsTaxCategory

type ProductNewParamsTaxCategory string

Represents the different categories of taxation applicable to various products and services.

const (
	ProductNewParamsTaxCategoryDigitalProducts ProductNewParamsTaxCategory = "digital_products"
	ProductNewParamsTaxCategorySaas            ProductNewParamsTaxCategory = "saas"
	ProductNewParamsTaxCategoryEBook           ProductNewParamsTaxCategory = "e_book"
)

func (ProductNewParamsTaxCategory) IsKnown

func (r ProductNewParamsTaxCategory) IsKnown() bool

type ProductPrice

type ProductPrice struct {
	Currency ProductPriceCurrency `json:"currency,required"`
	// Discount applied to the price, represented as a percentage (0 to 100).
	Discount float64 `json:"discount,required"`
	// The payment amount, in the smallest denomination of the currency (e.g., cents
	// for USD). For example, to charge $1.00, pass `100`.
	//
	// If [`pay_what_you_want`](Self::pay_what_you_want) is set to `true`, this field
	// represents the **minimum** amount the customer must pay.
	Price int64 `json:"price,required"`
	// Indicates if purchasing power parity adjustments are applied to the price.
	// Purchasing power parity feature is not available as of now.
	PurchasingPowerParity bool             `json:"purchasing_power_parity,required"`
	Type                  ProductPriceType `json:"type,required"`
	// Indicates whether the customer can pay any amount they choose. If set to `true`,
	// the [`price`](Self::price) field is the minimum amount.
	PayWhatYouWant bool `json:"pay_what_you_want"`
	// Number of units for the payment frequency. For example, a value of `1` with a
	// `payment_frequency_interval` of `month` represents monthly payments.
	PaymentFrequencyCount    int64                                `json:"payment_frequency_count"`
	PaymentFrequencyInterval ProductPricePaymentFrequencyInterval `json:"payment_frequency_interval"`
	// Number of units for the subscription period. For example, a value of `12` with a
	// `subscription_period_interval` of `month` represents a one-year subscription.
	SubscriptionPeriodCount    int64                                  `json:"subscription_period_count"`
	SubscriptionPeriodInterval ProductPriceSubscriptionPeriodInterval `json:"subscription_period_interval"`
	// A suggested price for the user to pay. This value is only considered if
	// [`pay_what_you_want`](Self::pay_what_you_want) is `true`. Otherwise, it is
	// ignored.
	SuggestedPrice int64 `json:"suggested_price,nullable"`
	// Indicates if the price is tax inclusive.
	TaxInclusive bool `json:"tax_inclusive,nullable"`
	// Number of days for the trial period. A value of `0` indicates no trial period.
	TrialPeriodDays int64            `json:"trial_period_days"`
	JSON            productPriceJSON `json:"-"`
	// contains filtered or unexported fields
}

func (ProductPrice) AsUnion

func (r ProductPrice) AsUnion() ProductPriceUnion

AsUnion returns a ProductPriceUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are ProductPriceOneTimePrice, ProductPriceRecurringPrice.

func (*ProductPrice) UnmarshalJSON

func (r *ProductPrice) UnmarshalJSON(data []byte) (err error)

type ProductPriceCurrency

type ProductPriceCurrency string
const (
	ProductPriceCurrencyAed ProductPriceCurrency = "AED"
	ProductPriceCurrencyAll ProductPriceCurrency = "ALL"
	ProductPriceCurrencyAmd ProductPriceCurrency = "AMD"
	ProductPriceCurrencyAng ProductPriceCurrency = "ANG"
	ProductPriceCurrencyAoa ProductPriceCurrency = "AOA"
	ProductPriceCurrencyArs ProductPriceCurrency = "ARS"
	ProductPriceCurrencyAud ProductPriceCurrency = "AUD"
	ProductPriceCurrencyAwg ProductPriceCurrency = "AWG"
	ProductPriceCurrencyAzn ProductPriceCurrency = "AZN"
	ProductPriceCurrencyBam ProductPriceCurrency = "BAM"
	ProductPriceCurrencyBbd ProductPriceCurrency = "BBD"
	ProductPriceCurrencyBdt ProductPriceCurrency = "BDT"
	ProductPriceCurrencyBgn ProductPriceCurrency = "BGN"
	ProductPriceCurrencyBhd ProductPriceCurrency = "BHD"
	ProductPriceCurrencyBif ProductPriceCurrency = "BIF"
	ProductPriceCurrencyBmd ProductPriceCurrency = "BMD"
	ProductPriceCurrencyBnd ProductPriceCurrency = "BND"
	ProductPriceCurrencyBob ProductPriceCurrency = "BOB"
	ProductPriceCurrencyBrl ProductPriceCurrency = "BRL"
	ProductPriceCurrencyBsd ProductPriceCurrency = "BSD"
	ProductPriceCurrencyBwp ProductPriceCurrency = "BWP"
	ProductPriceCurrencyByn ProductPriceCurrency = "BYN"
	ProductPriceCurrencyBzd ProductPriceCurrency = "BZD"
	ProductPriceCurrencyCad ProductPriceCurrency = "CAD"
	ProductPriceCurrencyChf ProductPriceCurrency = "CHF"
	ProductPriceCurrencyClp ProductPriceCurrency = "CLP"
	ProductPriceCurrencyCny ProductPriceCurrency = "CNY"
	ProductPriceCurrencyCop ProductPriceCurrency = "COP"
	ProductPriceCurrencyCrc ProductPriceCurrency = "CRC"
	ProductPriceCurrencyCup ProductPriceCurrency = "CUP"
	ProductPriceCurrencyCve ProductPriceCurrency = "CVE"
	ProductPriceCurrencyCzk ProductPriceCurrency = "CZK"
	ProductPriceCurrencyDjf ProductPriceCurrency = "DJF"
	ProductPriceCurrencyDkk ProductPriceCurrency = "DKK"
	ProductPriceCurrencyDop ProductPriceCurrency = "DOP"
	ProductPriceCurrencyDzd ProductPriceCurrency = "DZD"
	ProductPriceCurrencyEgp ProductPriceCurrency = "EGP"
	ProductPriceCurrencyEtb ProductPriceCurrency = "ETB"
	ProductPriceCurrencyEur ProductPriceCurrency = "EUR"
	ProductPriceCurrencyFjd ProductPriceCurrency = "FJD"
	ProductPriceCurrencyFkp ProductPriceCurrency = "FKP"
	ProductPriceCurrencyGbp ProductPriceCurrency = "GBP"
	ProductPriceCurrencyGel ProductPriceCurrency = "GEL"
	ProductPriceCurrencyGhs ProductPriceCurrency = "GHS"
	ProductPriceCurrencyGip ProductPriceCurrency = "GIP"
	ProductPriceCurrencyGmd ProductPriceCurrency = "GMD"
	ProductPriceCurrencyGnf ProductPriceCurrency = "GNF"
	ProductPriceCurrencyGtq ProductPriceCurrency = "GTQ"
	ProductPriceCurrencyGyd ProductPriceCurrency = "GYD"
	ProductPriceCurrencyHkd ProductPriceCurrency = "HKD"
	ProductPriceCurrencyHnl ProductPriceCurrency = "HNL"
	ProductPriceCurrencyHrk ProductPriceCurrency = "HRK"
	ProductPriceCurrencyHtg ProductPriceCurrency = "HTG"
	ProductPriceCurrencyHuf ProductPriceCurrency = "HUF"
	ProductPriceCurrencyIdr ProductPriceCurrency = "IDR"
	ProductPriceCurrencyIls ProductPriceCurrency = "ILS"
	ProductPriceCurrencyInr ProductPriceCurrency = "INR"
	ProductPriceCurrencyIqd ProductPriceCurrency = "IQD"
	ProductPriceCurrencyJmd ProductPriceCurrency = "JMD"
	ProductPriceCurrencyJod ProductPriceCurrency = "JOD"
	ProductPriceCurrencyJpy ProductPriceCurrency = "JPY"
	ProductPriceCurrencyKes ProductPriceCurrency = "KES"
	ProductPriceCurrencyKgs ProductPriceCurrency = "KGS"
	ProductPriceCurrencyKhr ProductPriceCurrency = "KHR"
	ProductPriceCurrencyKmf ProductPriceCurrency = "KMF"
	ProductPriceCurrencyKrw ProductPriceCurrency = "KRW"
	ProductPriceCurrencyKwd ProductPriceCurrency = "KWD"
	ProductPriceCurrencyKyd ProductPriceCurrency = "KYD"
	ProductPriceCurrencyKzt ProductPriceCurrency = "KZT"
	ProductPriceCurrencyLak ProductPriceCurrency = "LAK"
	ProductPriceCurrencyLbp ProductPriceCurrency = "LBP"
	ProductPriceCurrencyLkr ProductPriceCurrency = "LKR"
	ProductPriceCurrencyLrd ProductPriceCurrency = "LRD"
	ProductPriceCurrencyLsl ProductPriceCurrency = "LSL"
	ProductPriceCurrencyLyd ProductPriceCurrency = "LYD"
	ProductPriceCurrencyMad ProductPriceCurrency = "MAD"
	ProductPriceCurrencyMdl ProductPriceCurrency = "MDL"
	ProductPriceCurrencyMga ProductPriceCurrency = "MGA"
	ProductPriceCurrencyMkd ProductPriceCurrency = "MKD"
	ProductPriceCurrencyMmk ProductPriceCurrency = "MMK"
	ProductPriceCurrencyMnt ProductPriceCurrency = "MNT"
	ProductPriceCurrencyMop ProductPriceCurrency = "MOP"
	ProductPriceCurrencyMru ProductPriceCurrency = "MRU"
	ProductPriceCurrencyMur ProductPriceCurrency = "MUR"
	ProductPriceCurrencyMvr ProductPriceCurrency = "MVR"
	ProductPriceCurrencyMwk ProductPriceCurrency = "MWK"
	ProductPriceCurrencyMxn ProductPriceCurrency = "MXN"
	ProductPriceCurrencyMyr ProductPriceCurrency = "MYR"
	ProductPriceCurrencyMzn ProductPriceCurrency = "MZN"
	ProductPriceCurrencyNad ProductPriceCurrency = "NAD"
	ProductPriceCurrencyNgn ProductPriceCurrency = "NGN"
	ProductPriceCurrencyNio ProductPriceCurrency = "NIO"
	ProductPriceCurrencyNok ProductPriceCurrency = "NOK"
	ProductPriceCurrencyNpr ProductPriceCurrency = "NPR"
	ProductPriceCurrencyNzd ProductPriceCurrency = "NZD"
	ProductPriceCurrencyOmr ProductPriceCurrency = "OMR"
	ProductPriceCurrencyPab ProductPriceCurrency = "PAB"
	ProductPriceCurrencyPen ProductPriceCurrency = "PEN"
	ProductPriceCurrencyPgk ProductPriceCurrency = "PGK"
	ProductPriceCurrencyPhp ProductPriceCurrency = "PHP"
	ProductPriceCurrencyPkr ProductPriceCurrency = "PKR"
	ProductPriceCurrencyPln ProductPriceCurrency = "PLN"
	ProductPriceCurrencyPyg ProductPriceCurrency = "PYG"
	ProductPriceCurrencyQar ProductPriceCurrency = "QAR"
	ProductPriceCurrencyRon ProductPriceCurrency = "RON"
	ProductPriceCurrencyRsd ProductPriceCurrency = "RSD"
	ProductPriceCurrencyRub ProductPriceCurrency = "RUB"
	ProductPriceCurrencyRwf ProductPriceCurrency = "RWF"
	ProductPriceCurrencySar ProductPriceCurrency = "SAR"
	ProductPriceCurrencySbd ProductPriceCurrency = "SBD"
	ProductPriceCurrencyScr ProductPriceCurrency = "SCR"
	ProductPriceCurrencySek ProductPriceCurrency = "SEK"
	ProductPriceCurrencySgd ProductPriceCurrency = "SGD"
	ProductPriceCurrencyShp ProductPriceCurrency = "SHP"
	ProductPriceCurrencySle ProductPriceCurrency = "SLE"
	ProductPriceCurrencySll ProductPriceCurrency = "SLL"
	ProductPriceCurrencySos ProductPriceCurrency = "SOS"
	ProductPriceCurrencySrd ProductPriceCurrency = "SRD"
	ProductPriceCurrencySsp ProductPriceCurrency = "SSP"
	ProductPriceCurrencyStn ProductPriceCurrency = "STN"
	ProductPriceCurrencySvc ProductPriceCurrency = "SVC"
	ProductPriceCurrencySzl ProductPriceCurrency = "SZL"
	ProductPriceCurrencyThb ProductPriceCurrency = "THB"
	ProductPriceCurrencyTnd ProductPriceCurrency = "TND"
	ProductPriceCurrencyTop ProductPriceCurrency = "TOP"
	ProductPriceCurrencyTry ProductPriceCurrency = "TRY"
	ProductPriceCurrencyTtd ProductPriceCurrency = "TTD"
	ProductPriceCurrencyTwd ProductPriceCurrency = "TWD"
	ProductPriceCurrencyTzs ProductPriceCurrency = "TZS"
	ProductPriceCurrencyUah ProductPriceCurrency = "UAH"
	ProductPriceCurrencyUgx ProductPriceCurrency = "UGX"
	ProductPriceCurrencyUsd ProductPriceCurrency = "USD"
	ProductPriceCurrencyUyu ProductPriceCurrency = "UYU"
	ProductPriceCurrencyUzs ProductPriceCurrency = "UZS"
	ProductPriceCurrencyVes ProductPriceCurrency = "VES"
	ProductPriceCurrencyVnd ProductPriceCurrency = "VND"
	ProductPriceCurrencyVuv ProductPriceCurrency = "VUV"
	ProductPriceCurrencyWst ProductPriceCurrency = "WST"
	ProductPriceCurrencyXaf ProductPriceCurrency = "XAF"
	ProductPriceCurrencyXcd ProductPriceCurrency = "XCD"
	ProductPriceCurrencyXof ProductPriceCurrency = "XOF"
	ProductPriceCurrencyXpf ProductPriceCurrency = "XPF"
	ProductPriceCurrencyYer ProductPriceCurrency = "YER"
	ProductPriceCurrencyZar ProductPriceCurrency = "ZAR"
	ProductPriceCurrencyZmw ProductPriceCurrency = "ZMW"
)

func (ProductPriceCurrency) IsKnown

func (r ProductPriceCurrency) IsKnown() bool

type ProductPriceOneTimePrice

type ProductPriceOneTimePrice struct {
	Currency ProductPriceOneTimePriceCurrency `json:"currency,required"`
	// Discount applied to the price, represented as a percentage (0 to 100).
	Discount float64 `json:"discount,required"`
	// The payment amount, in the smallest denomination of the currency (e.g., cents
	// for USD). For example, to charge $1.00, pass `100`.
	//
	// If [`pay_what_you_want`](Self::pay_what_you_want) is set to `true`, this field
	// represents the **minimum** amount the customer must pay.
	Price int64 `json:"price,required"`
	// Indicates if purchasing power parity adjustments are applied to the price.
	// Purchasing power parity feature is not available as of now.
	PurchasingPowerParity bool                         `json:"purchasing_power_parity,required"`
	Type                  ProductPriceOneTimePriceType `json:"type,required"`
	// Indicates whether the customer can pay any amount they choose. If set to `true`,
	// the [`price`](Self::price) field is the minimum amount.
	PayWhatYouWant bool `json:"pay_what_you_want"`
	// A suggested price for the user to pay. This value is only considered if
	// [`pay_what_you_want`](Self::pay_what_you_want) is `true`. Otherwise, it is
	// ignored.
	SuggestedPrice int64 `json:"suggested_price,nullable"`
	// Indicates if the price is tax inclusive.
	TaxInclusive bool                         `json:"tax_inclusive,nullable"`
	JSON         productPriceOneTimePriceJSON `json:"-"`
}

func (*ProductPriceOneTimePrice) UnmarshalJSON

func (r *ProductPriceOneTimePrice) UnmarshalJSON(data []byte) (err error)

type ProductPriceOneTimePriceCurrency

type ProductPriceOneTimePriceCurrency string
const (
	ProductPriceOneTimePriceCurrencyAed ProductPriceOneTimePriceCurrency = "AED"
	ProductPriceOneTimePriceCurrencyAll ProductPriceOneTimePriceCurrency = "ALL"
	ProductPriceOneTimePriceCurrencyAmd ProductPriceOneTimePriceCurrency = "AMD"
	ProductPriceOneTimePriceCurrencyAng ProductPriceOneTimePriceCurrency = "ANG"
	ProductPriceOneTimePriceCurrencyAoa ProductPriceOneTimePriceCurrency = "AOA"
	ProductPriceOneTimePriceCurrencyArs ProductPriceOneTimePriceCurrency = "ARS"
	ProductPriceOneTimePriceCurrencyAud ProductPriceOneTimePriceCurrency = "AUD"
	ProductPriceOneTimePriceCurrencyAwg ProductPriceOneTimePriceCurrency = "AWG"
	ProductPriceOneTimePriceCurrencyAzn ProductPriceOneTimePriceCurrency = "AZN"
	ProductPriceOneTimePriceCurrencyBam ProductPriceOneTimePriceCurrency = "BAM"
	ProductPriceOneTimePriceCurrencyBbd ProductPriceOneTimePriceCurrency = "BBD"
	ProductPriceOneTimePriceCurrencyBdt ProductPriceOneTimePriceCurrency = "BDT"
	ProductPriceOneTimePriceCurrencyBgn ProductPriceOneTimePriceCurrency = "BGN"
	ProductPriceOneTimePriceCurrencyBhd ProductPriceOneTimePriceCurrency = "BHD"
	ProductPriceOneTimePriceCurrencyBif ProductPriceOneTimePriceCurrency = "BIF"
	ProductPriceOneTimePriceCurrencyBmd ProductPriceOneTimePriceCurrency = "BMD"
	ProductPriceOneTimePriceCurrencyBnd ProductPriceOneTimePriceCurrency = "BND"
	ProductPriceOneTimePriceCurrencyBob ProductPriceOneTimePriceCurrency = "BOB"
	ProductPriceOneTimePriceCurrencyBrl ProductPriceOneTimePriceCurrency = "BRL"
	ProductPriceOneTimePriceCurrencyBsd ProductPriceOneTimePriceCurrency = "BSD"
	ProductPriceOneTimePriceCurrencyBwp ProductPriceOneTimePriceCurrency = "BWP"
	ProductPriceOneTimePriceCurrencyByn ProductPriceOneTimePriceCurrency = "BYN"
	ProductPriceOneTimePriceCurrencyBzd ProductPriceOneTimePriceCurrency = "BZD"
	ProductPriceOneTimePriceCurrencyCad ProductPriceOneTimePriceCurrency = "CAD"
	ProductPriceOneTimePriceCurrencyChf ProductPriceOneTimePriceCurrency = "CHF"
	ProductPriceOneTimePriceCurrencyClp ProductPriceOneTimePriceCurrency = "CLP"
	ProductPriceOneTimePriceCurrencyCny ProductPriceOneTimePriceCurrency = "CNY"
	ProductPriceOneTimePriceCurrencyCop ProductPriceOneTimePriceCurrency = "COP"
	ProductPriceOneTimePriceCurrencyCrc ProductPriceOneTimePriceCurrency = "CRC"
	ProductPriceOneTimePriceCurrencyCup ProductPriceOneTimePriceCurrency = "CUP"
	ProductPriceOneTimePriceCurrencyCve ProductPriceOneTimePriceCurrency = "CVE"
	ProductPriceOneTimePriceCurrencyCzk ProductPriceOneTimePriceCurrency = "CZK"
	ProductPriceOneTimePriceCurrencyDjf ProductPriceOneTimePriceCurrency = "DJF"
	ProductPriceOneTimePriceCurrencyDkk ProductPriceOneTimePriceCurrency = "DKK"
	ProductPriceOneTimePriceCurrencyDop ProductPriceOneTimePriceCurrency = "DOP"
	ProductPriceOneTimePriceCurrencyDzd ProductPriceOneTimePriceCurrency = "DZD"
	ProductPriceOneTimePriceCurrencyEgp ProductPriceOneTimePriceCurrency = "EGP"
	ProductPriceOneTimePriceCurrencyEtb ProductPriceOneTimePriceCurrency = "ETB"
	ProductPriceOneTimePriceCurrencyEur ProductPriceOneTimePriceCurrency = "EUR"
	ProductPriceOneTimePriceCurrencyFjd ProductPriceOneTimePriceCurrency = "FJD"
	ProductPriceOneTimePriceCurrencyFkp ProductPriceOneTimePriceCurrency = "FKP"
	ProductPriceOneTimePriceCurrencyGbp ProductPriceOneTimePriceCurrency = "GBP"
	ProductPriceOneTimePriceCurrencyGel ProductPriceOneTimePriceCurrency = "GEL"
	ProductPriceOneTimePriceCurrencyGhs ProductPriceOneTimePriceCurrency = "GHS"
	ProductPriceOneTimePriceCurrencyGip ProductPriceOneTimePriceCurrency = "GIP"
	ProductPriceOneTimePriceCurrencyGmd ProductPriceOneTimePriceCurrency = "GMD"
	ProductPriceOneTimePriceCurrencyGnf ProductPriceOneTimePriceCurrency = "GNF"
	ProductPriceOneTimePriceCurrencyGtq ProductPriceOneTimePriceCurrency = "GTQ"
	ProductPriceOneTimePriceCurrencyGyd ProductPriceOneTimePriceCurrency = "GYD"
	ProductPriceOneTimePriceCurrencyHkd ProductPriceOneTimePriceCurrency = "HKD"
	ProductPriceOneTimePriceCurrencyHnl ProductPriceOneTimePriceCurrency = "HNL"
	ProductPriceOneTimePriceCurrencyHrk ProductPriceOneTimePriceCurrency = "HRK"
	ProductPriceOneTimePriceCurrencyHtg ProductPriceOneTimePriceCurrency = "HTG"
	ProductPriceOneTimePriceCurrencyHuf ProductPriceOneTimePriceCurrency = "HUF"
	ProductPriceOneTimePriceCurrencyIdr ProductPriceOneTimePriceCurrency = "IDR"
	ProductPriceOneTimePriceCurrencyIls ProductPriceOneTimePriceCurrency = "ILS"
	ProductPriceOneTimePriceCurrencyInr ProductPriceOneTimePriceCurrency = "INR"
	ProductPriceOneTimePriceCurrencyIqd ProductPriceOneTimePriceCurrency = "IQD"
	ProductPriceOneTimePriceCurrencyJmd ProductPriceOneTimePriceCurrency = "JMD"
	ProductPriceOneTimePriceCurrencyJod ProductPriceOneTimePriceCurrency = "JOD"
	ProductPriceOneTimePriceCurrencyJpy ProductPriceOneTimePriceCurrency = "JPY"
	ProductPriceOneTimePriceCurrencyKes ProductPriceOneTimePriceCurrency = "KES"
	ProductPriceOneTimePriceCurrencyKgs ProductPriceOneTimePriceCurrency = "KGS"
	ProductPriceOneTimePriceCurrencyKhr ProductPriceOneTimePriceCurrency = "KHR"
	ProductPriceOneTimePriceCurrencyKmf ProductPriceOneTimePriceCurrency = "KMF"
	ProductPriceOneTimePriceCurrencyKrw ProductPriceOneTimePriceCurrency = "KRW"
	ProductPriceOneTimePriceCurrencyKwd ProductPriceOneTimePriceCurrency = "KWD"
	ProductPriceOneTimePriceCurrencyKyd ProductPriceOneTimePriceCurrency = "KYD"
	ProductPriceOneTimePriceCurrencyKzt ProductPriceOneTimePriceCurrency = "KZT"
	ProductPriceOneTimePriceCurrencyLak ProductPriceOneTimePriceCurrency = "LAK"
	ProductPriceOneTimePriceCurrencyLbp ProductPriceOneTimePriceCurrency = "LBP"
	ProductPriceOneTimePriceCurrencyLkr ProductPriceOneTimePriceCurrency = "LKR"
	ProductPriceOneTimePriceCurrencyLrd ProductPriceOneTimePriceCurrency = "LRD"
	ProductPriceOneTimePriceCurrencyLsl ProductPriceOneTimePriceCurrency = "LSL"
	ProductPriceOneTimePriceCurrencyLyd ProductPriceOneTimePriceCurrency = "LYD"
	ProductPriceOneTimePriceCurrencyMad ProductPriceOneTimePriceCurrency = "MAD"
	ProductPriceOneTimePriceCurrencyMdl ProductPriceOneTimePriceCurrency = "MDL"
	ProductPriceOneTimePriceCurrencyMga ProductPriceOneTimePriceCurrency = "MGA"
	ProductPriceOneTimePriceCurrencyMkd ProductPriceOneTimePriceCurrency = "MKD"
	ProductPriceOneTimePriceCurrencyMmk ProductPriceOneTimePriceCurrency = "MMK"
	ProductPriceOneTimePriceCurrencyMnt ProductPriceOneTimePriceCurrency = "MNT"
	ProductPriceOneTimePriceCurrencyMop ProductPriceOneTimePriceCurrency = "MOP"
	ProductPriceOneTimePriceCurrencyMru ProductPriceOneTimePriceCurrency = "MRU"
	ProductPriceOneTimePriceCurrencyMur ProductPriceOneTimePriceCurrency = "MUR"
	ProductPriceOneTimePriceCurrencyMvr ProductPriceOneTimePriceCurrency = "MVR"
	ProductPriceOneTimePriceCurrencyMwk ProductPriceOneTimePriceCurrency = "MWK"
	ProductPriceOneTimePriceCurrencyMxn ProductPriceOneTimePriceCurrency = "MXN"
	ProductPriceOneTimePriceCurrencyMyr ProductPriceOneTimePriceCurrency = "MYR"
	ProductPriceOneTimePriceCurrencyMzn ProductPriceOneTimePriceCurrency = "MZN"
	ProductPriceOneTimePriceCurrencyNad ProductPriceOneTimePriceCurrency = "NAD"
	ProductPriceOneTimePriceCurrencyNgn ProductPriceOneTimePriceCurrency = "NGN"
	ProductPriceOneTimePriceCurrencyNio ProductPriceOneTimePriceCurrency = "NIO"
	ProductPriceOneTimePriceCurrencyNok ProductPriceOneTimePriceCurrency = "NOK"
	ProductPriceOneTimePriceCurrencyNpr ProductPriceOneTimePriceCurrency = "NPR"
	ProductPriceOneTimePriceCurrencyNzd ProductPriceOneTimePriceCurrency = "NZD"
	ProductPriceOneTimePriceCurrencyOmr ProductPriceOneTimePriceCurrency = "OMR"
	ProductPriceOneTimePriceCurrencyPab ProductPriceOneTimePriceCurrency = "PAB"
	ProductPriceOneTimePriceCurrencyPen ProductPriceOneTimePriceCurrency = "PEN"
	ProductPriceOneTimePriceCurrencyPgk ProductPriceOneTimePriceCurrency = "PGK"
	ProductPriceOneTimePriceCurrencyPhp ProductPriceOneTimePriceCurrency = "PHP"
	ProductPriceOneTimePriceCurrencyPkr ProductPriceOneTimePriceCurrency = "PKR"
	ProductPriceOneTimePriceCurrencyPln ProductPriceOneTimePriceCurrency = "PLN"
	ProductPriceOneTimePriceCurrencyPyg ProductPriceOneTimePriceCurrency = "PYG"
	ProductPriceOneTimePriceCurrencyQar ProductPriceOneTimePriceCurrency = "QAR"
	ProductPriceOneTimePriceCurrencyRon ProductPriceOneTimePriceCurrency = "RON"
	ProductPriceOneTimePriceCurrencyRsd ProductPriceOneTimePriceCurrency = "RSD"
	ProductPriceOneTimePriceCurrencyRub ProductPriceOneTimePriceCurrency = "RUB"
	ProductPriceOneTimePriceCurrencyRwf ProductPriceOneTimePriceCurrency = "RWF"
	ProductPriceOneTimePriceCurrencySar ProductPriceOneTimePriceCurrency = "SAR"
	ProductPriceOneTimePriceCurrencySbd ProductPriceOneTimePriceCurrency = "SBD"
	ProductPriceOneTimePriceCurrencyScr ProductPriceOneTimePriceCurrency = "SCR"
	ProductPriceOneTimePriceCurrencySek ProductPriceOneTimePriceCurrency = "SEK"
	ProductPriceOneTimePriceCurrencySgd ProductPriceOneTimePriceCurrency = "SGD"
	ProductPriceOneTimePriceCurrencyShp ProductPriceOneTimePriceCurrency = "SHP"
	ProductPriceOneTimePriceCurrencySle ProductPriceOneTimePriceCurrency = "SLE"
	ProductPriceOneTimePriceCurrencySll ProductPriceOneTimePriceCurrency = "SLL"
	ProductPriceOneTimePriceCurrencySos ProductPriceOneTimePriceCurrency = "SOS"
	ProductPriceOneTimePriceCurrencySrd ProductPriceOneTimePriceCurrency = "SRD"
	ProductPriceOneTimePriceCurrencySsp ProductPriceOneTimePriceCurrency = "SSP"
	ProductPriceOneTimePriceCurrencyStn ProductPriceOneTimePriceCurrency = "STN"
	ProductPriceOneTimePriceCurrencySvc ProductPriceOneTimePriceCurrency = "SVC"
	ProductPriceOneTimePriceCurrencySzl ProductPriceOneTimePriceCurrency = "SZL"
	ProductPriceOneTimePriceCurrencyThb ProductPriceOneTimePriceCurrency = "THB"
	ProductPriceOneTimePriceCurrencyTnd ProductPriceOneTimePriceCurrency = "TND"
	ProductPriceOneTimePriceCurrencyTop ProductPriceOneTimePriceCurrency = "TOP"
	ProductPriceOneTimePriceCurrencyTry ProductPriceOneTimePriceCurrency = "TRY"
	ProductPriceOneTimePriceCurrencyTtd ProductPriceOneTimePriceCurrency = "TTD"
	ProductPriceOneTimePriceCurrencyTwd ProductPriceOneTimePriceCurrency = "TWD"
	ProductPriceOneTimePriceCurrencyTzs ProductPriceOneTimePriceCurrency = "TZS"
	ProductPriceOneTimePriceCurrencyUah ProductPriceOneTimePriceCurrency = "UAH"
	ProductPriceOneTimePriceCurrencyUgx ProductPriceOneTimePriceCurrency = "UGX"
	ProductPriceOneTimePriceCurrencyUsd ProductPriceOneTimePriceCurrency = "USD"
	ProductPriceOneTimePriceCurrencyUyu ProductPriceOneTimePriceCurrency = "UYU"
	ProductPriceOneTimePriceCurrencyUzs ProductPriceOneTimePriceCurrency = "UZS"
	ProductPriceOneTimePriceCurrencyVes ProductPriceOneTimePriceCurrency = "VES"
	ProductPriceOneTimePriceCurrencyVnd ProductPriceOneTimePriceCurrency = "VND"
	ProductPriceOneTimePriceCurrencyVuv ProductPriceOneTimePriceCurrency = "VUV"
	ProductPriceOneTimePriceCurrencyWst ProductPriceOneTimePriceCurrency = "WST"
	ProductPriceOneTimePriceCurrencyXaf ProductPriceOneTimePriceCurrency = "XAF"
	ProductPriceOneTimePriceCurrencyXcd ProductPriceOneTimePriceCurrency = "XCD"
	ProductPriceOneTimePriceCurrencyXof ProductPriceOneTimePriceCurrency = "XOF"
	ProductPriceOneTimePriceCurrencyXpf ProductPriceOneTimePriceCurrency = "XPF"
	ProductPriceOneTimePriceCurrencyYer ProductPriceOneTimePriceCurrency = "YER"
	ProductPriceOneTimePriceCurrencyZar ProductPriceOneTimePriceCurrency = "ZAR"
	ProductPriceOneTimePriceCurrencyZmw ProductPriceOneTimePriceCurrency = "ZMW"
)

func (ProductPriceOneTimePriceCurrency) IsKnown

type ProductPriceOneTimePriceType

type ProductPriceOneTimePriceType string
const (
	ProductPriceOneTimePriceTypeOneTimePrice ProductPriceOneTimePriceType = "one_time_price"
)

func (ProductPriceOneTimePriceType) IsKnown

func (r ProductPriceOneTimePriceType) IsKnown() bool

type ProductPricePaymentFrequencyInterval

type ProductPricePaymentFrequencyInterval string
const (
	ProductPricePaymentFrequencyIntervalDay   ProductPricePaymentFrequencyInterval = "Day"
	ProductPricePaymentFrequencyIntervalWeek  ProductPricePaymentFrequencyInterval = "Week"
	ProductPricePaymentFrequencyIntervalMonth ProductPricePaymentFrequencyInterval = "Month"
	ProductPricePaymentFrequencyIntervalYear  ProductPricePaymentFrequencyInterval = "Year"
)

func (ProductPricePaymentFrequencyInterval) IsKnown

type ProductPriceRecurringPrice

type ProductPriceRecurringPrice struct {
	Currency ProductPriceRecurringPriceCurrency `json:"currency,required"`
	// Discount applied to the price, represented as a percentage (0 to 100).
	Discount float64 `json:"discount,required"`
	// Number of units for the payment frequency. For example, a value of `1` with a
	// `payment_frequency_interval` of `month` represents monthly payments.
	PaymentFrequencyCount    int64                                              `json:"payment_frequency_count,required"`
	PaymentFrequencyInterval ProductPriceRecurringPricePaymentFrequencyInterval `json:"payment_frequency_interval,required"`
	// The payment amount. Represented in the lowest denomination of the currency
	// (e.g., cents for USD). For example, to charge $1.00, pass `100`.
	Price int64 `json:"price,required"`
	// Indicates if purchasing power parity adjustments are applied to the price.
	// Purchasing power parity feature is not available as of now
	PurchasingPowerParity bool `json:"purchasing_power_parity,required"`
	// Number of units for the subscription period. For example, a value of `12` with a
	// `subscription_period_interval` of `month` represents a one-year subscription.
	SubscriptionPeriodCount    int64                                                `json:"subscription_period_count,required"`
	SubscriptionPeriodInterval ProductPriceRecurringPriceSubscriptionPeriodInterval `json:"subscription_period_interval,required"`
	Type                       ProductPriceRecurringPriceType                       `json:"type,required"`
	// Indicates if the price is tax inclusive
	TaxInclusive bool `json:"tax_inclusive,nullable"`
	// Number of days for the trial period. A value of `0` indicates no trial period.
	TrialPeriodDays int64                          `json:"trial_period_days"`
	JSON            productPriceRecurringPriceJSON `json:"-"`
}

func (*ProductPriceRecurringPrice) UnmarshalJSON

func (r *ProductPriceRecurringPrice) UnmarshalJSON(data []byte) (err error)

type ProductPriceRecurringPriceCurrency

type ProductPriceRecurringPriceCurrency string
const (
	ProductPriceRecurringPriceCurrencyAed ProductPriceRecurringPriceCurrency = "AED"
	ProductPriceRecurringPriceCurrencyAll ProductPriceRecurringPriceCurrency = "ALL"
	ProductPriceRecurringPriceCurrencyAmd ProductPriceRecurringPriceCurrency = "AMD"
	ProductPriceRecurringPriceCurrencyAng ProductPriceRecurringPriceCurrency = "ANG"
	ProductPriceRecurringPriceCurrencyAoa ProductPriceRecurringPriceCurrency = "AOA"
	ProductPriceRecurringPriceCurrencyArs ProductPriceRecurringPriceCurrency = "ARS"
	ProductPriceRecurringPriceCurrencyAud ProductPriceRecurringPriceCurrency = "AUD"
	ProductPriceRecurringPriceCurrencyAwg ProductPriceRecurringPriceCurrency = "AWG"
	ProductPriceRecurringPriceCurrencyAzn ProductPriceRecurringPriceCurrency = "AZN"
	ProductPriceRecurringPriceCurrencyBam ProductPriceRecurringPriceCurrency = "BAM"
	ProductPriceRecurringPriceCurrencyBbd ProductPriceRecurringPriceCurrency = "BBD"
	ProductPriceRecurringPriceCurrencyBdt ProductPriceRecurringPriceCurrency = "BDT"
	ProductPriceRecurringPriceCurrencyBgn ProductPriceRecurringPriceCurrency = "BGN"
	ProductPriceRecurringPriceCurrencyBhd ProductPriceRecurringPriceCurrency = "BHD"
	ProductPriceRecurringPriceCurrencyBif ProductPriceRecurringPriceCurrency = "BIF"
	ProductPriceRecurringPriceCurrencyBmd ProductPriceRecurringPriceCurrency = "BMD"
	ProductPriceRecurringPriceCurrencyBnd ProductPriceRecurringPriceCurrency = "BND"
	ProductPriceRecurringPriceCurrencyBob ProductPriceRecurringPriceCurrency = "BOB"
	ProductPriceRecurringPriceCurrencyBrl ProductPriceRecurringPriceCurrency = "BRL"
	ProductPriceRecurringPriceCurrencyBsd ProductPriceRecurringPriceCurrency = "BSD"
	ProductPriceRecurringPriceCurrencyBwp ProductPriceRecurringPriceCurrency = "BWP"
	ProductPriceRecurringPriceCurrencyByn ProductPriceRecurringPriceCurrency = "BYN"
	ProductPriceRecurringPriceCurrencyBzd ProductPriceRecurringPriceCurrency = "BZD"
	ProductPriceRecurringPriceCurrencyCad ProductPriceRecurringPriceCurrency = "CAD"
	ProductPriceRecurringPriceCurrencyChf ProductPriceRecurringPriceCurrency = "CHF"
	ProductPriceRecurringPriceCurrencyClp ProductPriceRecurringPriceCurrency = "CLP"
	ProductPriceRecurringPriceCurrencyCny ProductPriceRecurringPriceCurrency = "CNY"
	ProductPriceRecurringPriceCurrencyCop ProductPriceRecurringPriceCurrency = "COP"
	ProductPriceRecurringPriceCurrencyCrc ProductPriceRecurringPriceCurrency = "CRC"
	ProductPriceRecurringPriceCurrencyCup ProductPriceRecurringPriceCurrency = "CUP"
	ProductPriceRecurringPriceCurrencyCve ProductPriceRecurringPriceCurrency = "CVE"
	ProductPriceRecurringPriceCurrencyCzk ProductPriceRecurringPriceCurrency = "CZK"
	ProductPriceRecurringPriceCurrencyDjf ProductPriceRecurringPriceCurrency = "DJF"
	ProductPriceRecurringPriceCurrencyDkk ProductPriceRecurringPriceCurrency = "DKK"
	ProductPriceRecurringPriceCurrencyDop ProductPriceRecurringPriceCurrency = "DOP"
	ProductPriceRecurringPriceCurrencyDzd ProductPriceRecurringPriceCurrency = "DZD"
	ProductPriceRecurringPriceCurrencyEgp ProductPriceRecurringPriceCurrency = "EGP"
	ProductPriceRecurringPriceCurrencyEtb ProductPriceRecurringPriceCurrency = "ETB"
	ProductPriceRecurringPriceCurrencyEur ProductPriceRecurringPriceCurrency = "EUR"
	ProductPriceRecurringPriceCurrencyFjd ProductPriceRecurringPriceCurrency = "FJD"
	ProductPriceRecurringPriceCurrencyFkp ProductPriceRecurringPriceCurrency = "FKP"
	ProductPriceRecurringPriceCurrencyGbp ProductPriceRecurringPriceCurrency = "GBP"
	ProductPriceRecurringPriceCurrencyGel ProductPriceRecurringPriceCurrency = "GEL"
	ProductPriceRecurringPriceCurrencyGhs ProductPriceRecurringPriceCurrency = "GHS"
	ProductPriceRecurringPriceCurrencyGip ProductPriceRecurringPriceCurrency = "GIP"
	ProductPriceRecurringPriceCurrencyGmd ProductPriceRecurringPriceCurrency = "GMD"
	ProductPriceRecurringPriceCurrencyGnf ProductPriceRecurringPriceCurrency = "GNF"
	ProductPriceRecurringPriceCurrencyGtq ProductPriceRecurringPriceCurrency = "GTQ"
	ProductPriceRecurringPriceCurrencyGyd ProductPriceRecurringPriceCurrency = "GYD"
	ProductPriceRecurringPriceCurrencyHkd ProductPriceRecurringPriceCurrency = "HKD"
	ProductPriceRecurringPriceCurrencyHnl ProductPriceRecurringPriceCurrency = "HNL"
	ProductPriceRecurringPriceCurrencyHrk ProductPriceRecurringPriceCurrency = "HRK"
	ProductPriceRecurringPriceCurrencyHtg ProductPriceRecurringPriceCurrency = "HTG"
	ProductPriceRecurringPriceCurrencyHuf ProductPriceRecurringPriceCurrency = "HUF"
	ProductPriceRecurringPriceCurrencyIdr ProductPriceRecurringPriceCurrency = "IDR"
	ProductPriceRecurringPriceCurrencyIls ProductPriceRecurringPriceCurrency = "ILS"
	ProductPriceRecurringPriceCurrencyInr ProductPriceRecurringPriceCurrency = "INR"
	ProductPriceRecurringPriceCurrencyIqd ProductPriceRecurringPriceCurrency = "IQD"
	ProductPriceRecurringPriceCurrencyJmd ProductPriceRecurringPriceCurrency = "JMD"
	ProductPriceRecurringPriceCurrencyJod ProductPriceRecurringPriceCurrency = "JOD"
	ProductPriceRecurringPriceCurrencyJpy ProductPriceRecurringPriceCurrency = "JPY"
	ProductPriceRecurringPriceCurrencyKes ProductPriceRecurringPriceCurrency = "KES"
	ProductPriceRecurringPriceCurrencyKgs ProductPriceRecurringPriceCurrency = "KGS"
	ProductPriceRecurringPriceCurrencyKhr ProductPriceRecurringPriceCurrency = "KHR"
	ProductPriceRecurringPriceCurrencyKmf ProductPriceRecurringPriceCurrency = "KMF"
	ProductPriceRecurringPriceCurrencyKrw ProductPriceRecurringPriceCurrency = "KRW"
	ProductPriceRecurringPriceCurrencyKwd ProductPriceRecurringPriceCurrency = "KWD"
	ProductPriceRecurringPriceCurrencyKyd ProductPriceRecurringPriceCurrency = "KYD"
	ProductPriceRecurringPriceCurrencyKzt ProductPriceRecurringPriceCurrency = "KZT"
	ProductPriceRecurringPriceCurrencyLak ProductPriceRecurringPriceCurrency = "LAK"
	ProductPriceRecurringPriceCurrencyLbp ProductPriceRecurringPriceCurrency = "LBP"
	ProductPriceRecurringPriceCurrencyLkr ProductPriceRecurringPriceCurrency = "LKR"
	ProductPriceRecurringPriceCurrencyLrd ProductPriceRecurringPriceCurrency = "LRD"
	ProductPriceRecurringPriceCurrencyLsl ProductPriceRecurringPriceCurrency = "LSL"
	ProductPriceRecurringPriceCurrencyLyd ProductPriceRecurringPriceCurrency = "LYD"
	ProductPriceRecurringPriceCurrencyMad ProductPriceRecurringPriceCurrency = "MAD"
	ProductPriceRecurringPriceCurrencyMdl ProductPriceRecurringPriceCurrency = "MDL"
	ProductPriceRecurringPriceCurrencyMga ProductPriceRecurringPriceCurrency = "MGA"
	ProductPriceRecurringPriceCurrencyMkd ProductPriceRecurringPriceCurrency = "MKD"
	ProductPriceRecurringPriceCurrencyMmk ProductPriceRecurringPriceCurrency = "MMK"
	ProductPriceRecurringPriceCurrencyMnt ProductPriceRecurringPriceCurrency = "MNT"
	ProductPriceRecurringPriceCurrencyMop ProductPriceRecurringPriceCurrency = "MOP"
	ProductPriceRecurringPriceCurrencyMru ProductPriceRecurringPriceCurrency = "MRU"
	ProductPriceRecurringPriceCurrencyMur ProductPriceRecurringPriceCurrency = "MUR"
	ProductPriceRecurringPriceCurrencyMvr ProductPriceRecurringPriceCurrency = "MVR"
	ProductPriceRecurringPriceCurrencyMwk ProductPriceRecurringPriceCurrency = "MWK"
	ProductPriceRecurringPriceCurrencyMxn ProductPriceRecurringPriceCurrency = "MXN"
	ProductPriceRecurringPriceCurrencyMyr ProductPriceRecurringPriceCurrency = "MYR"
	ProductPriceRecurringPriceCurrencyMzn ProductPriceRecurringPriceCurrency = "MZN"
	ProductPriceRecurringPriceCurrencyNad ProductPriceRecurringPriceCurrency = "NAD"
	ProductPriceRecurringPriceCurrencyNgn ProductPriceRecurringPriceCurrency = "NGN"
	ProductPriceRecurringPriceCurrencyNio ProductPriceRecurringPriceCurrency = "NIO"
	ProductPriceRecurringPriceCurrencyNok ProductPriceRecurringPriceCurrency = "NOK"
	ProductPriceRecurringPriceCurrencyNpr ProductPriceRecurringPriceCurrency = "NPR"
	ProductPriceRecurringPriceCurrencyNzd ProductPriceRecurringPriceCurrency = "NZD"
	ProductPriceRecurringPriceCurrencyOmr ProductPriceRecurringPriceCurrency = "OMR"
	ProductPriceRecurringPriceCurrencyPab ProductPriceRecurringPriceCurrency = "PAB"
	ProductPriceRecurringPriceCurrencyPen ProductPriceRecurringPriceCurrency = "PEN"
	ProductPriceRecurringPriceCurrencyPgk ProductPriceRecurringPriceCurrency = "PGK"
	ProductPriceRecurringPriceCurrencyPhp ProductPriceRecurringPriceCurrency = "PHP"
	ProductPriceRecurringPriceCurrencyPkr ProductPriceRecurringPriceCurrency = "PKR"
	ProductPriceRecurringPriceCurrencyPln ProductPriceRecurringPriceCurrency = "PLN"
	ProductPriceRecurringPriceCurrencyPyg ProductPriceRecurringPriceCurrency = "PYG"
	ProductPriceRecurringPriceCurrencyQar ProductPriceRecurringPriceCurrency = "QAR"
	ProductPriceRecurringPriceCurrencyRon ProductPriceRecurringPriceCurrency = "RON"
	ProductPriceRecurringPriceCurrencyRsd ProductPriceRecurringPriceCurrency = "RSD"
	ProductPriceRecurringPriceCurrencyRub ProductPriceRecurringPriceCurrency = "RUB"
	ProductPriceRecurringPriceCurrencyRwf ProductPriceRecurringPriceCurrency = "RWF"
	ProductPriceRecurringPriceCurrencySar ProductPriceRecurringPriceCurrency = "SAR"
	ProductPriceRecurringPriceCurrencySbd ProductPriceRecurringPriceCurrency = "SBD"
	ProductPriceRecurringPriceCurrencyScr ProductPriceRecurringPriceCurrency = "SCR"
	ProductPriceRecurringPriceCurrencySek ProductPriceRecurringPriceCurrency = "SEK"
	ProductPriceRecurringPriceCurrencySgd ProductPriceRecurringPriceCurrency = "SGD"
	ProductPriceRecurringPriceCurrencyShp ProductPriceRecurringPriceCurrency = "SHP"
	ProductPriceRecurringPriceCurrencySle ProductPriceRecurringPriceCurrency = "SLE"
	ProductPriceRecurringPriceCurrencySll ProductPriceRecurringPriceCurrency = "SLL"
	ProductPriceRecurringPriceCurrencySos ProductPriceRecurringPriceCurrency = "SOS"
	ProductPriceRecurringPriceCurrencySrd ProductPriceRecurringPriceCurrency = "SRD"
	ProductPriceRecurringPriceCurrencySsp ProductPriceRecurringPriceCurrency = "SSP"
	ProductPriceRecurringPriceCurrencyStn ProductPriceRecurringPriceCurrency = "STN"
	ProductPriceRecurringPriceCurrencySvc ProductPriceRecurringPriceCurrency = "SVC"
	ProductPriceRecurringPriceCurrencySzl ProductPriceRecurringPriceCurrency = "SZL"
	ProductPriceRecurringPriceCurrencyThb ProductPriceRecurringPriceCurrency = "THB"
	ProductPriceRecurringPriceCurrencyTnd ProductPriceRecurringPriceCurrency = "TND"
	ProductPriceRecurringPriceCurrencyTop ProductPriceRecurringPriceCurrency = "TOP"
	ProductPriceRecurringPriceCurrencyTry ProductPriceRecurringPriceCurrency = "TRY"
	ProductPriceRecurringPriceCurrencyTtd ProductPriceRecurringPriceCurrency = "TTD"
	ProductPriceRecurringPriceCurrencyTwd ProductPriceRecurringPriceCurrency = "TWD"
	ProductPriceRecurringPriceCurrencyTzs ProductPriceRecurringPriceCurrency = "TZS"
	ProductPriceRecurringPriceCurrencyUah ProductPriceRecurringPriceCurrency = "UAH"
	ProductPriceRecurringPriceCurrencyUgx ProductPriceRecurringPriceCurrency = "UGX"
	ProductPriceRecurringPriceCurrencyUsd ProductPriceRecurringPriceCurrency = "USD"
	ProductPriceRecurringPriceCurrencyUyu ProductPriceRecurringPriceCurrency = "UYU"
	ProductPriceRecurringPriceCurrencyUzs ProductPriceRecurringPriceCurrency = "UZS"
	ProductPriceRecurringPriceCurrencyVes ProductPriceRecurringPriceCurrency = "VES"
	ProductPriceRecurringPriceCurrencyVnd ProductPriceRecurringPriceCurrency = "VND"
	ProductPriceRecurringPriceCurrencyVuv ProductPriceRecurringPriceCurrency = "VUV"
	ProductPriceRecurringPriceCurrencyWst ProductPriceRecurringPriceCurrency = "WST"
	ProductPriceRecurringPriceCurrencyXaf ProductPriceRecurringPriceCurrency = "XAF"
	ProductPriceRecurringPriceCurrencyXcd ProductPriceRecurringPriceCurrency = "XCD"
	ProductPriceRecurringPriceCurrencyXof ProductPriceRecurringPriceCurrency = "XOF"
	ProductPriceRecurringPriceCurrencyXpf ProductPriceRecurringPriceCurrency = "XPF"
	ProductPriceRecurringPriceCurrencyYer ProductPriceRecurringPriceCurrency = "YER"
	ProductPriceRecurringPriceCurrencyZar ProductPriceRecurringPriceCurrency = "ZAR"
	ProductPriceRecurringPriceCurrencyZmw ProductPriceRecurringPriceCurrency = "ZMW"
)

func (ProductPriceRecurringPriceCurrency) IsKnown

type ProductPriceRecurringPricePaymentFrequencyInterval

type ProductPriceRecurringPricePaymentFrequencyInterval string
const (
	ProductPriceRecurringPricePaymentFrequencyIntervalDay   ProductPriceRecurringPricePaymentFrequencyInterval = "Day"
	ProductPriceRecurringPricePaymentFrequencyIntervalWeek  ProductPriceRecurringPricePaymentFrequencyInterval = "Week"
	ProductPriceRecurringPricePaymentFrequencyIntervalMonth ProductPriceRecurringPricePaymentFrequencyInterval = "Month"
	ProductPriceRecurringPricePaymentFrequencyIntervalYear  ProductPriceRecurringPricePaymentFrequencyInterval = "Year"
)

func (ProductPriceRecurringPricePaymentFrequencyInterval) IsKnown

type ProductPriceRecurringPriceSubscriptionPeriodInterval

type ProductPriceRecurringPriceSubscriptionPeriodInterval string
const (
	ProductPriceRecurringPriceSubscriptionPeriodIntervalDay   ProductPriceRecurringPriceSubscriptionPeriodInterval = "Day"
	ProductPriceRecurringPriceSubscriptionPeriodIntervalWeek  ProductPriceRecurringPriceSubscriptionPeriodInterval = "Week"
	ProductPriceRecurringPriceSubscriptionPeriodIntervalMonth ProductPriceRecurringPriceSubscriptionPeriodInterval = "Month"
	ProductPriceRecurringPriceSubscriptionPeriodIntervalYear  ProductPriceRecurringPriceSubscriptionPeriodInterval = "Year"
)

func (ProductPriceRecurringPriceSubscriptionPeriodInterval) IsKnown

type ProductPriceRecurringPriceType

type ProductPriceRecurringPriceType string
const (
	ProductPriceRecurringPriceTypeRecurringPrice ProductPriceRecurringPriceType = "recurring_price"
)

func (ProductPriceRecurringPriceType) IsKnown

type ProductPriceSubscriptionPeriodInterval

type ProductPriceSubscriptionPeriodInterval string
const (
	ProductPriceSubscriptionPeriodIntervalDay   ProductPriceSubscriptionPeriodInterval = "Day"
	ProductPriceSubscriptionPeriodIntervalWeek  ProductPriceSubscriptionPeriodInterval = "Week"
	ProductPriceSubscriptionPeriodIntervalMonth ProductPriceSubscriptionPeriodInterval = "Month"
	ProductPriceSubscriptionPeriodIntervalYear  ProductPriceSubscriptionPeriodInterval = "Year"
)

func (ProductPriceSubscriptionPeriodInterval) IsKnown

type ProductPriceType

type ProductPriceType string
const (
	ProductPriceTypeOneTimePrice   ProductPriceType = "one_time_price"
	ProductPriceTypeRecurringPrice ProductPriceType = "recurring_price"
)

func (ProductPriceType) IsKnown

func (r ProductPriceType) IsKnown() bool

type ProductPriceUnion

type ProductPriceUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by ProductPriceOneTimePrice or ProductPriceRecurringPrice.

type ProductService

type ProductService struct {
	Options []option.RequestOption
	Images  *ProductImageService
}

ProductService contains methods and other services that help with interacting with the Dodo Payments API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewProductService method instead.

func NewProductService

func NewProductService(opts ...option.RequestOption) (r *ProductService)

NewProductService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ProductService) Delete added in v0.19.0

func (r *ProductService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)

func (*ProductService) Get

func (r *ProductService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *Product, err error)

func (*ProductService) New

func (r *ProductService) New(ctx context.Context, body ProductNewParams, opts ...option.RequestOption) (res *Product, err error)

func (*ProductService) Unarchive added in v0.19.0

func (r *ProductService) Unarchive(ctx context.Context, id string, opts ...option.RequestOption) (err error)

func (*ProductService) Update

func (r *ProductService) Update(ctx context.Context, id string, body ProductUpdateParams, opts ...option.RequestOption) (err error)

type ProductTaxCategory

type ProductTaxCategory string

Represents the different categories of taxation applicable to various products and services.

const (
	ProductTaxCategoryDigitalProducts ProductTaxCategory = "digital_products"
	ProductTaxCategorySaas            ProductTaxCategory = "saas"
	ProductTaxCategoryEBook           ProductTaxCategory = "e_book"
)

func (ProductTaxCategory) IsKnown

func (r ProductTaxCategory) IsKnown() bool

type ProductUpdateParams

type ProductUpdateParams struct {
	// Description of the product, optional and must be at most 1000 characters.
	Description param.Field[string] `json:"description"`
	// Message sent to the customer upon license key activation.
	//
	// Only applicable if `license_key_enabled` is `true`. This message contains
	// instructions for activating the license key.
	LicenseKeyActivationMessage param.Field[string] `json:"license_key_activation_message"`
	// Limit for the number of activations for the license key.
	//
	// Only applicable if `license_key_enabled` is `true`. Represents the maximum
	// number of times the license key can be activated.
	LicenseKeyActivationsLimit param.Field[int64]                                 `json:"license_key_activations_limit"`
	LicenseKeyDuration         param.Field[ProductUpdateParamsLicenseKeyDuration] `json:"license_key_duration"`
	// Whether the product requires a license key.
	//
	// If `true`, additional fields related to license key (duration, activations
	// limit, activation message) become applicable.
	LicenseKeyEnabled param.Field[bool] `json:"license_key_enabled"`
	// Name of the product, optional and must be at most 100 characters.
	Name  param.Field[string]                        `json:"name"`
	Price param.Field[ProductUpdateParamsPriceUnion] `json:"price"`
	// Represents the different categories of taxation applicable to various products
	// and services.
	TaxCategory param.Field[ProductUpdateParamsTaxCategory] `json:"tax_category"`
}

func (ProductUpdateParams) MarshalJSON

func (r ProductUpdateParams) MarshalJSON() (data []byte, err error)

type ProductUpdateParamsLicenseKeyDuration added in v0.14.0

type ProductUpdateParamsLicenseKeyDuration struct {
	Count    param.Field[int64]                                         `json:"count,required"`
	Interval param.Field[ProductUpdateParamsLicenseKeyDurationInterval] `json:"interval,required"`
}

func (ProductUpdateParamsLicenseKeyDuration) MarshalJSON added in v0.14.0

func (r ProductUpdateParamsLicenseKeyDuration) MarshalJSON() (data []byte, err error)

type ProductUpdateParamsLicenseKeyDurationInterval added in v0.14.0

type ProductUpdateParamsLicenseKeyDurationInterval string
const (
	ProductUpdateParamsLicenseKeyDurationIntervalDay   ProductUpdateParamsLicenseKeyDurationInterval = "Day"
	ProductUpdateParamsLicenseKeyDurationIntervalWeek  ProductUpdateParamsLicenseKeyDurationInterval = "Week"
	ProductUpdateParamsLicenseKeyDurationIntervalMonth ProductUpdateParamsLicenseKeyDurationInterval = "Month"
	ProductUpdateParamsLicenseKeyDurationIntervalYear  ProductUpdateParamsLicenseKeyDurationInterval = "Year"
)

func (ProductUpdateParamsLicenseKeyDurationInterval) IsKnown added in v0.14.0

type ProductUpdateParamsPrice

type ProductUpdateParamsPrice struct {
	Currency param.Field[ProductUpdateParamsPriceCurrency] `json:"currency,required"`
	// Discount applied to the price, represented as a percentage (0 to 100).
	Discount param.Field[float64] `json:"discount,required"`
	// The payment amount, in the smallest denomination of the currency (e.g., cents
	// for USD). For example, to charge $1.00, pass `100`.
	//
	// If [`pay_what_you_want`](Self::pay_what_you_want) is set to `true`, this field
	// represents the **minimum** amount the customer must pay.
	Price param.Field[int64] `json:"price,required"`
	// Indicates if purchasing power parity adjustments are applied to the price.
	// Purchasing power parity feature is not available as of now.
	PurchasingPowerParity param.Field[bool]                         `json:"purchasing_power_parity,required"`
	Type                  param.Field[ProductUpdateParamsPriceType] `json:"type,required"`
	// Indicates whether the customer can pay any amount they choose. If set to `true`,
	// the [`price`](Self::price) field is the minimum amount.
	PayWhatYouWant param.Field[bool] `json:"pay_what_you_want"`
	// Number of units for the payment frequency. For example, a value of `1` with a
	// `payment_frequency_interval` of `month` represents monthly payments.
	PaymentFrequencyCount    param.Field[int64]                                            `json:"payment_frequency_count"`
	PaymentFrequencyInterval param.Field[ProductUpdateParamsPricePaymentFrequencyInterval] `json:"payment_frequency_interval"`
	// Number of units for the subscription period. For example, a value of `12` with a
	// `subscription_period_interval` of `month` represents a one-year subscription.
	SubscriptionPeriodCount    param.Field[int64]                                              `json:"subscription_period_count"`
	SubscriptionPeriodInterval param.Field[ProductUpdateParamsPriceSubscriptionPeriodInterval] `json:"subscription_period_interval"`
	// A suggested price for the user to pay. This value is only considered if
	// [`pay_what_you_want`](Self::pay_what_you_want) is `true`. Otherwise, it is
	// ignored.
	SuggestedPrice param.Field[int64] `json:"suggested_price"`
	// Indicates if the price is tax inclusive.
	TaxInclusive param.Field[bool] `json:"tax_inclusive"`
	// Number of days for the trial period. A value of `0` indicates no trial period.
	TrialPeriodDays param.Field[int64] `json:"trial_period_days"`
}

func (ProductUpdateParamsPrice) MarshalJSON

func (r ProductUpdateParamsPrice) MarshalJSON() (data []byte, err error)

type ProductUpdateParamsPriceCurrency

type ProductUpdateParamsPriceCurrency string
const (
	ProductUpdateParamsPriceCurrencyAed ProductUpdateParamsPriceCurrency = "AED"
	ProductUpdateParamsPriceCurrencyAll ProductUpdateParamsPriceCurrency = "ALL"
	ProductUpdateParamsPriceCurrencyAmd ProductUpdateParamsPriceCurrency = "AMD"
	ProductUpdateParamsPriceCurrencyAng ProductUpdateParamsPriceCurrency = "ANG"
	ProductUpdateParamsPriceCurrencyAoa ProductUpdateParamsPriceCurrency = "AOA"
	ProductUpdateParamsPriceCurrencyArs ProductUpdateParamsPriceCurrency = "ARS"
	ProductUpdateParamsPriceCurrencyAud ProductUpdateParamsPriceCurrency = "AUD"
	ProductUpdateParamsPriceCurrencyAwg ProductUpdateParamsPriceCurrency = "AWG"
	ProductUpdateParamsPriceCurrencyAzn ProductUpdateParamsPriceCurrency = "AZN"
	ProductUpdateParamsPriceCurrencyBam ProductUpdateParamsPriceCurrency = "BAM"
	ProductUpdateParamsPriceCurrencyBbd ProductUpdateParamsPriceCurrency = "BBD"
	ProductUpdateParamsPriceCurrencyBdt ProductUpdateParamsPriceCurrency = "BDT"
	ProductUpdateParamsPriceCurrencyBgn ProductUpdateParamsPriceCurrency = "BGN"
	ProductUpdateParamsPriceCurrencyBhd ProductUpdateParamsPriceCurrency = "BHD"
	ProductUpdateParamsPriceCurrencyBif ProductUpdateParamsPriceCurrency = "BIF"
	ProductUpdateParamsPriceCurrencyBmd ProductUpdateParamsPriceCurrency = "BMD"
	ProductUpdateParamsPriceCurrencyBnd ProductUpdateParamsPriceCurrency = "BND"
	ProductUpdateParamsPriceCurrencyBob ProductUpdateParamsPriceCurrency = "BOB"
	ProductUpdateParamsPriceCurrencyBrl ProductUpdateParamsPriceCurrency = "BRL"
	ProductUpdateParamsPriceCurrencyBsd ProductUpdateParamsPriceCurrency = "BSD"
	ProductUpdateParamsPriceCurrencyBwp ProductUpdateParamsPriceCurrency = "BWP"
	ProductUpdateParamsPriceCurrencyByn ProductUpdateParamsPriceCurrency = "BYN"
	ProductUpdateParamsPriceCurrencyBzd ProductUpdateParamsPriceCurrency = "BZD"
	ProductUpdateParamsPriceCurrencyCad ProductUpdateParamsPriceCurrency = "CAD"
	ProductUpdateParamsPriceCurrencyChf ProductUpdateParamsPriceCurrency = "CHF"
	ProductUpdateParamsPriceCurrencyClp ProductUpdateParamsPriceCurrency = "CLP"
	ProductUpdateParamsPriceCurrencyCny ProductUpdateParamsPriceCurrency = "CNY"
	ProductUpdateParamsPriceCurrencyCop ProductUpdateParamsPriceCurrency = "COP"
	ProductUpdateParamsPriceCurrencyCrc ProductUpdateParamsPriceCurrency = "CRC"
	ProductUpdateParamsPriceCurrencyCup ProductUpdateParamsPriceCurrency = "CUP"
	ProductUpdateParamsPriceCurrencyCve ProductUpdateParamsPriceCurrency = "CVE"
	ProductUpdateParamsPriceCurrencyCzk ProductUpdateParamsPriceCurrency = "CZK"
	ProductUpdateParamsPriceCurrencyDjf ProductUpdateParamsPriceCurrency = "DJF"
	ProductUpdateParamsPriceCurrencyDkk ProductUpdateParamsPriceCurrency = "DKK"
	ProductUpdateParamsPriceCurrencyDop ProductUpdateParamsPriceCurrency = "DOP"
	ProductUpdateParamsPriceCurrencyDzd ProductUpdateParamsPriceCurrency = "DZD"
	ProductUpdateParamsPriceCurrencyEgp ProductUpdateParamsPriceCurrency = "EGP"
	ProductUpdateParamsPriceCurrencyEtb ProductUpdateParamsPriceCurrency = "ETB"
	ProductUpdateParamsPriceCurrencyEur ProductUpdateParamsPriceCurrency = "EUR"
	ProductUpdateParamsPriceCurrencyFjd ProductUpdateParamsPriceCurrency = "FJD"
	ProductUpdateParamsPriceCurrencyFkp ProductUpdateParamsPriceCurrency = "FKP"
	ProductUpdateParamsPriceCurrencyGbp ProductUpdateParamsPriceCurrency = "GBP"
	ProductUpdateParamsPriceCurrencyGel ProductUpdateParamsPriceCurrency = "GEL"
	ProductUpdateParamsPriceCurrencyGhs ProductUpdateParamsPriceCurrency = "GHS"
	ProductUpdateParamsPriceCurrencyGip ProductUpdateParamsPriceCurrency = "GIP"
	ProductUpdateParamsPriceCurrencyGmd ProductUpdateParamsPriceCurrency = "GMD"
	ProductUpdateParamsPriceCurrencyGnf ProductUpdateParamsPriceCurrency = "GNF"
	ProductUpdateParamsPriceCurrencyGtq ProductUpdateParamsPriceCurrency = "GTQ"
	ProductUpdateParamsPriceCurrencyGyd ProductUpdateParamsPriceCurrency = "GYD"
	ProductUpdateParamsPriceCurrencyHkd ProductUpdateParamsPriceCurrency = "HKD"
	ProductUpdateParamsPriceCurrencyHnl ProductUpdateParamsPriceCurrency = "HNL"
	ProductUpdateParamsPriceCurrencyHrk ProductUpdateParamsPriceCurrency = "HRK"
	ProductUpdateParamsPriceCurrencyHtg ProductUpdateParamsPriceCurrency = "HTG"
	ProductUpdateParamsPriceCurrencyHuf ProductUpdateParamsPriceCurrency = "HUF"
	ProductUpdateParamsPriceCurrencyIdr ProductUpdateParamsPriceCurrency = "IDR"
	ProductUpdateParamsPriceCurrencyIls ProductUpdateParamsPriceCurrency = "ILS"
	ProductUpdateParamsPriceCurrencyInr ProductUpdateParamsPriceCurrency = "INR"
	ProductUpdateParamsPriceCurrencyIqd ProductUpdateParamsPriceCurrency = "IQD"
	ProductUpdateParamsPriceCurrencyJmd ProductUpdateParamsPriceCurrency = "JMD"
	ProductUpdateParamsPriceCurrencyJod ProductUpdateParamsPriceCurrency = "JOD"
	ProductUpdateParamsPriceCurrencyJpy ProductUpdateParamsPriceCurrency = "JPY"
	ProductUpdateParamsPriceCurrencyKes ProductUpdateParamsPriceCurrency = "KES"
	ProductUpdateParamsPriceCurrencyKgs ProductUpdateParamsPriceCurrency = "KGS"
	ProductUpdateParamsPriceCurrencyKhr ProductUpdateParamsPriceCurrency = "KHR"
	ProductUpdateParamsPriceCurrencyKmf ProductUpdateParamsPriceCurrency = "KMF"
	ProductUpdateParamsPriceCurrencyKrw ProductUpdateParamsPriceCurrency = "KRW"
	ProductUpdateParamsPriceCurrencyKwd ProductUpdateParamsPriceCurrency = "KWD"
	ProductUpdateParamsPriceCurrencyKyd ProductUpdateParamsPriceCurrency = "KYD"
	ProductUpdateParamsPriceCurrencyKzt ProductUpdateParamsPriceCurrency = "KZT"
	ProductUpdateParamsPriceCurrencyLak ProductUpdateParamsPriceCurrency = "LAK"
	ProductUpdateParamsPriceCurrencyLbp ProductUpdateParamsPriceCurrency = "LBP"
	ProductUpdateParamsPriceCurrencyLkr ProductUpdateParamsPriceCurrency = "LKR"
	ProductUpdateParamsPriceCurrencyLrd ProductUpdateParamsPriceCurrency = "LRD"
	ProductUpdateParamsPriceCurrencyLsl ProductUpdateParamsPriceCurrency = "LSL"
	ProductUpdateParamsPriceCurrencyLyd ProductUpdateParamsPriceCurrency = "LYD"
	ProductUpdateParamsPriceCurrencyMad ProductUpdateParamsPriceCurrency = "MAD"
	ProductUpdateParamsPriceCurrencyMdl ProductUpdateParamsPriceCurrency = "MDL"
	ProductUpdateParamsPriceCurrencyMga ProductUpdateParamsPriceCurrency = "MGA"
	ProductUpdateParamsPriceCurrencyMkd ProductUpdateParamsPriceCurrency = "MKD"
	ProductUpdateParamsPriceCurrencyMmk ProductUpdateParamsPriceCurrency = "MMK"
	ProductUpdateParamsPriceCurrencyMnt ProductUpdateParamsPriceCurrency = "MNT"
	ProductUpdateParamsPriceCurrencyMop ProductUpdateParamsPriceCurrency = "MOP"
	ProductUpdateParamsPriceCurrencyMru ProductUpdateParamsPriceCurrency = "MRU"
	ProductUpdateParamsPriceCurrencyMur ProductUpdateParamsPriceCurrency = "MUR"
	ProductUpdateParamsPriceCurrencyMvr ProductUpdateParamsPriceCurrency = "MVR"
	ProductUpdateParamsPriceCurrencyMwk ProductUpdateParamsPriceCurrency = "MWK"
	ProductUpdateParamsPriceCurrencyMxn ProductUpdateParamsPriceCurrency = "MXN"
	ProductUpdateParamsPriceCurrencyMyr ProductUpdateParamsPriceCurrency = "MYR"
	ProductUpdateParamsPriceCurrencyMzn ProductUpdateParamsPriceCurrency = "MZN"
	ProductUpdateParamsPriceCurrencyNad ProductUpdateParamsPriceCurrency = "NAD"
	ProductUpdateParamsPriceCurrencyNgn ProductUpdateParamsPriceCurrency = "NGN"
	ProductUpdateParamsPriceCurrencyNio ProductUpdateParamsPriceCurrency = "NIO"
	ProductUpdateParamsPriceCurrencyNok ProductUpdateParamsPriceCurrency = "NOK"
	ProductUpdateParamsPriceCurrencyNpr ProductUpdateParamsPriceCurrency = "NPR"
	ProductUpdateParamsPriceCurrencyNzd ProductUpdateParamsPriceCurrency = "NZD"
	ProductUpdateParamsPriceCurrencyOmr ProductUpdateParamsPriceCurrency = "OMR"
	ProductUpdateParamsPriceCurrencyPab ProductUpdateParamsPriceCurrency = "PAB"
	ProductUpdateParamsPriceCurrencyPen ProductUpdateParamsPriceCurrency = "PEN"
	ProductUpdateParamsPriceCurrencyPgk ProductUpdateParamsPriceCurrency = "PGK"
	ProductUpdateParamsPriceCurrencyPhp ProductUpdateParamsPriceCurrency = "PHP"
	ProductUpdateParamsPriceCurrencyPkr ProductUpdateParamsPriceCurrency = "PKR"
	ProductUpdateParamsPriceCurrencyPln ProductUpdateParamsPriceCurrency = "PLN"
	ProductUpdateParamsPriceCurrencyPyg ProductUpdateParamsPriceCurrency = "PYG"
	ProductUpdateParamsPriceCurrencyQar ProductUpdateParamsPriceCurrency = "QAR"
	ProductUpdateParamsPriceCurrencyRon ProductUpdateParamsPriceCurrency = "RON"
	ProductUpdateParamsPriceCurrencyRsd ProductUpdateParamsPriceCurrency = "RSD"
	ProductUpdateParamsPriceCurrencyRub ProductUpdateParamsPriceCurrency = "RUB"
	ProductUpdateParamsPriceCurrencyRwf ProductUpdateParamsPriceCurrency = "RWF"
	ProductUpdateParamsPriceCurrencySar ProductUpdateParamsPriceCurrency = "SAR"
	ProductUpdateParamsPriceCurrencySbd ProductUpdateParamsPriceCurrency = "SBD"
	ProductUpdateParamsPriceCurrencyScr ProductUpdateParamsPriceCurrency = "SCR"
	ProductUpdateParamsPriceCurrencySek ProductUpdateParamsPriceCurrency = "SEK"
	ProductUpdateParamsPriceCurrencySgd ProductUpdateParamsPriceCurrency = "SGD"
	ProductUpdateParamsPriceCurrencyShp ProductUpdateParamsPriceCurrency = "SHP"
	ProductUpdateParamsPriceCurrencySle ProductUpdateParamsPriceCurrency = "SLE"
	ProductUpdateParamsPriceCurrencySll ProductUpdateParamsPriceCurrency = "SLL"
	ProductUpdateParamsPriceCurrencySos ProductUpdateParamsPriceCurrency = "SOS"
	ProductUpdateParamsPriceCurrencySrd ProductUpdateParamsPriceCurrency = "SRD"
	ProductUpdateParamsPriceCurrencySsp ProductUpdateParamsPriceCurrency = "SSP"
	ProductUpdateParamsPriceCurrencyStn ProductUpdateParamsPriceCurrency = "STN"
	ProductUpdateParamsPriceCurrencySvc ProductUpdateParamsPriceCurrency = "SVC"
	ProductUpdateParamsPriceCurrencySzl ProductUpdateParamsPriceCurrency = "SZL"
	ProductUpdateParamsPriceCurrencyThb ProductUpdateParamsPriceCurrency = "THB"
	ProductUpdateParamsPriceCurrencyTnd ProductUpdateParamsPriceCurrency = "TND"
	ProductUpdateParamsPriceCurrencyTop ProductUpdateParamsPriceCurrency = "TOP"
	ProductUpdateParamsPriceCurrencyTry ProductUpdateParamsPriceCurrency = "TRY"
	ProductUpdateParamsPriceCurrencyTtd ProductUpdateParamsPriceCurrency = "TTD"
	ProductUpdateParamsPriceCurrencyTwd ProductUpdateParamsPriceCurrency = "TWD"
	ProductUpdateParamsPriceCurrencyTzs ProductUpdateParamsPriceCurrency = "TZS"
	ProductUpdateParamsPriceCurrencyUah ProductUpdateParamsPriceCurrency = "UAH"
	ProductUpdateParamsPriceCurrencyUgx ProductUpdateParamsPriceCurrency = "UGX"
	ProductUpdateParamsPriceCurrencyUsd ProductUpdateParamsPriceCurrency = "USD"
	ProductUpdateParamsPriceCurrencyUyu ProductUpdateParamsPriceCurrency = "UYU"
	ProductUpdateParamsPriceCurrencyUzs ProductUpdateParamsPriceCurrency = "UZS"
	ProductUpdateParamsPriceCurrencyVes ProductUpdateParamsPriceCurrency = "VES"
	ProductUpdateParamsPriceCurrencyVnd ProductUpdateParamsPriceCurrency = "VND"
	ProductUpdateParamsPriceCurrencyVuv ProductUpdateParamsPriceCurrency = "VUV"
	ProductUpdateParamsPriceCurrencyWst ProductUpdateParamsPriceCurrency = "WST"
	ProductUpdateParamsPriceCurrencyXaf ProductUpdateParamsPriceCurrency = "XAF"
	ProductUpdateParamsPriceCurrencyXcd ProductUpdateParamsPriceCurrency = "XCD"
	ProductUpdateParamsPriceCurrencyXof ProductUpdateParamsPriceCurrency = "XOF"
	ProductUpdateParamsPriceCurrencyXpf ProductUpdateParamsPriceCurrency = "XPF"
	ProductUpdateParamsPriceCurrencyYer ProductUpdateParamsPriceCurrency = "YER"
	ProductUpdateParamsPriceCurrencyZar ProductUpdateParamsPriceCurrency = "ZAR"
	ProductUpdateParamsPriceCurrencyZmw ProductUpdateParamsPriceCurrency = "ZMW"
)

func (ProductUpdateParamsPriceCurrency) IsKnown

type ProductUpdateParamsPriceOneTimePrice

type ProductUpdateParamsPriceOneTimePrice struct {
	Currency param.Field[ProductUpdateParamsPriceOneTimePriceCurrency] `json:"currency,required"`
	// Discount applied to the price, represented as a percentage (0 to 100).
	Discount param.Field[float64] `json:"discount,required"`
	// The payment amount, in the smallest denomination of the currency (e.g., cents
	// for USD). For example, to charge $1.00, pass `100`.
	//
	// If [`pay_what_you_want`](Self::pay_what_you_want) is set to `true`, this field
	// represents the **minimum** amount the customer must pay.
	Price param.Field[int64] `json:"price,required"`
	// Indicates if purchasing power parity adjustments are applied to the price.
	// Purchasing power parity feature is not available as of now.
	PurchasingPowerParity param.Field[bool]                                     `json:"purchasing_power_parity,required"`
	Type                  param.Field[ProductUpdateParamsPriceOneTimePriceType] `json:"type,required"`
	// Indicates whether the customer can pay any amount they choose. If set to `true`,
	// the [`price`](Self::price) field is the minimum amount.
	PayWhatYouWant param.Field[bool] `json:"pay_what_you_want"`
	// A suggested price for the user to pay. This value is only considered if
	// [`pay_what_you_want`](Self::pay_what_you_want) is `true`. Otherwise, it is
	// ignored.
	SuggestedPrice param.Field[int64] `json:"suggested_price"`
	// Indicates if the price is tax inclusive.
	TaxInclusive param.Field[bool] `json:"tax_inclusive"`
}

func (ProductUpdateParamsPriceOneTimePrice) MarshalJSON

func (r ProductUpdateParamsPriceOneTimePrice) MarshalJSON() (data []byte, err error)

type ProductUpdateParamsPriceOneTimePriceCurrency

type ProductUpdateParamsPriceOneTimePriceCurrency string
const (
	ProductUpdateParamsPriceOneTimePriceCurrencyAed ProductUpdateParamsPriceOneTimePriceCurrency = "AED"
	ProductUpdateParamsPriceOneTimePriceCurrencyAll ProductUpdateParamsPriceOneTimePriceCurrency = "ALL"
	ProductUpdateParamsPriceOneTimePriceCurrencyAmd ProductUpdateParamsPriceOneTimePriceCurrency = "AMD"
	ProductUpdateParamsPriceOneTimePriceCurrencyAng ProductUpdateParamsPriceOneTimePriceCurrency = "ANG"
	ProductUpdateParamsPriceOneTimePriceCurrencyAoa ProductUpdateParamsPriceOneTimePriceCurrency = "AOA"
	ProductUpdateParamsPriceOneTimePriceCurrencyArs ProductUpdateParamsPriceOneTimePriceCurrency = "ARS"
	ProductUpdateParamsPriceOneTimePriceCurrencyAud ProductUpdateParamsPriceOneTimePriceCurrency = "AUD"
	ProductUpdateParamsPriceOneTimePriceCurrencyAwg ProductUpdateParamsPriceOneTimePriceCurrency = "AWG"
	ProductUpdateParamsPriceOneTimePriceCurrencyAzn ProductUpdateParamsPriceOneTimePriceCurrency = "AZN"
	ProductUpdateParamsPriceOneTimePriceCurrencyBam ProductUpdateParamsPriceOneTimePriceCurrency = "BAM"
	ProductUpdateParamsPriceOneTimePriceCurrencyBbd ProductUpdateParamsPriceOneTimePriceCurrency = "BBD"
	ProductUpdateParamsPriceOneTimePriceCurrencyBdt ProductUpdateParamsPriceOneTimePriceCurrency = "BDT"
	ProductUpdateParamsPriceOneTimePriceCurrencyBgn ProductUpdateParamsPriceOneTimePriceCurrency = "BGN"
	ProductUpdateParamsPriceOneTimePriceCurrencyBhd ProductUpdateParamsPriceOneTimePriceCurrency = "BHD"
	ProductUpdateParamsPriceOneTimePriceCurrencyBif ProductUpdateParamsPriceOneTimePriceCurrency = "BIF"
	ProductUpdateParamsPriceOneTimePriceCurrencyBmd ProductUpdateParamsPriceOneTimePriceCurrency = "BMD"
	ProductUpdateParamsPriceOneTimePriceCurrencyBnd ProductUpdateParamsPriceOneTimePriceCurrency = "BND"
	ProductUpdateParamsPriceOneTimePriceCurrencyBob ProductUpdateParamsPriceOneTimePriceCurrency = "BOB"
	ProductUpdateParamsPriceOneTimePriceCurrencyBrl ProductUpdateParamsPriceOneTimePriceCurrency = "BRL"
	ProductUpdateParamsPriceOneTimePriceCurrencyBsd ProductUpdateParamsPriceOneTimePriceCurrency = "BSD"
	ProductUpdateParamsPriceOneTimePriceCurrencyBwp ProductUpdateParamsPriceOneTimePriceCurrency = "BWP"
	ProductUpdateParamsPriceOneTimePriceCurrencyByn ProductUpdateParamsPriceOneTimePriceCurrency = "BYN"
	ProductUpdateParamsPriceOneTimePriceCurrencyBzd ProductUpdateParamsPriceOneTimePriceCurrency = "BZD"
	ProductUpdateParamsPriceOneTimePriceCurrencyCad ProductUpdateParamsPriceOneTimePriceCurrency = "CAD"
	ProductUpdateParamsPriceOneTimePriceCurrencyChf ProductUpdateParamsPriceOneTimePriceCurrency = "CHF"
	ProductUpdateParamsPriceOneTimePriceCurrencyClp ProductUpdateParamsPriceOneTimePriceCurrency = "CLP"
	ProductUpdateParamsPriceOneTimePriceCurrencyCny ProductUpdateParamsPriceOneTimePriceCurrency = "CNY"
	ProductUpdateParamsPriceOneTimePriceCurrencyCop ProductUpdateParamsPriceOneTimePriceCurrency = "COP"
	ProductUpdateParamsPriceOneTimePriceCurrencyCrc ProductUpdateParamsPriceOneTimePriceCurrency = "CRC"
	ProductUpdateParamsPriceOneTimePriceCurrencyCup ProductUpdateParamsPriceOneTimePriceCurrency = "CUP"
	ProductUpdateParamsPriceOneTimePriceCurrencyCve ProductUpdateParamsPriceOneTimePriceCurrency = "CVE"
	ProductUpdateParamsPriceOneTimePriceCurrencyCzk ProductUpdateParamsPriceOneTimePriceCurrency = "CZK"
	ProductUpdateParamsPriceOneTimePriceCurrencyDjf ProductUpdateParamsPriceOneTimePriceCurrency = "DJF"
	ProductUpdateParamsPriceOneTimePriceCurrencyDkk ProductUpdateParamsPriceOneTimePriceCurrency = "DKK"
	ProductUpdateParamsPriceOneTimePriceCurrencyDop ProductUpdateParamsPriceOneTimePriceCurrency = "DOP"
	ProductUpdateParamsPriceOneTimePriceCurrencyDzd ProductUpdateParamsPriceOneTimePriceCurrency = "DZD"
	ProductUpdateParamsPriceOneTimePriceCurrencyEgp ProductUpdateParamsPriceOneTimePriceCurrency = "EGP"
	ProductUpdateParamsPriceOneTimePriceCurrencyEtb ProductUpdateParamsPriceOneTimePriceCurrency = "ETB"
	ProductUpdateParamsPriceOneTimePriceCurrencyEur ProductUpdateParamsPriceOneTimePriceCurrency = "EUR"
	ProductUpdateParamsPriceOneTimePriceCurrencyFjd ProductUpdateParamsPriceOneTimePriceCurrency = "FJD"
	ProductUpdateParamsPriceOneTimePriceCurrencyFkp ProductUpdateParamsPriceOneTimePriceCurrency = "FKP"
	ProductUpdateParamsPriceOneTimePriceCurrencyGbp ProductUpdateParamsPriceOneTimePriceCurrency = "GBP"
	ProductUpdateParamsPriceOneTimePriceCurrencyGel ProductUpdateParamsPriceOneTimePriceCurrency = "GEL"
	ProductUpdateParamsPriceOneTimePriceCurrencyGhs ProductUpdateParamsPriceOneTimePriceCurrency = "GHS"
	ProductUpdateParamsPriceOneTimePriceCurrencyGip ProductUpdateParamsPriceOneTimePriceCurrency = "GIP"
	ProductUpdateParamsPriceOneTimePriceCurrencyGmd ProductUpdateParamsPriceOneTimePriceCurrency = "GMD"
	ProductUpdateParamsPriceOneTimePriceCurrencyGnf ProductUpdateParamsPriceOneTimePriceCurrency = "GNF"
	ProductUpdateParamsPriceOneTimePriceCurrencyGtq ProductUpdateParamsPriceOneTimePriceCurrency = "GTQ"
	ProductUpdateParamsPriceOneTimePriceCurrencyGyd ProductUpdateParamsPriceOneTimePriceCurrency = "GYD"
	ProductUpdateParamsPriceOneTimePriceCurrencyHkd ProductUpdateParamsPriceOneTimePriceCurrency = "HKD"
	ProductUpdateParamsPriceOneTimePriceCurrencyHnl ProductUpdateParamsPriceOneTimePriceCurrency = "HNL"
	ProductUpdateParamsPriceOneTimePriceCurrencyHrk ProductUpdateParamsPriceOneTimePriceCurrency = "HRK"
	ProductUpdateParamsPriceOneTimePriceCurrencyHtg ProductUpdateParamsPriceOneTimePriceCurrency = "HTG"
	ProductUpdateParamsPriceOneTimePriceCurrencyHuf ProductUpdateParamsPriceOneTimePriceCurrency = "HUF"
	ProductUpdateParamsPriceOneTimePriceCurrencyIdr ProductUpdateParamsPriceOneTimePriceCurrency = "IDR"
	ProductUpdateParamsPriceOneTimePriceCurrencyIls ProductUpdateParamsPriceOneTimePriceCurrency = "ILS"
	ProductUpdateParamsPriceOneTimePriceCurrencyInr ProductUpdateParamsPriceOneTimePriceCurrency = "INR"
	ProductUpdateParamsPriceOneTimePriceCurrencyIqd ProductUpdateParamsPriceOneTimePriceCurrency = "IQD"
	ProductUpdateParamsPriceOneTimePriceCurrencyJmd ProductUpdateParamsPriceOneTimePriceCurrency = "JMD"
	ProductUpdateParamsPriceOneTimePriceCurrencyJod ProductUpdateParamsPriceOneTimePriceCurrency = "JOD"
	ProductUpdateParamsPriceOneTimePriceCurrencyJpy ProductUpdateParamsPriceOneTimePriceCurrency = "JPY"
	ProductUpdateParamsPriceOneTimePriceCurrencyKes ProductUpdateParamsPriceOneTimePriceCurrency = "KES"
	ProductUpdateParamsPriceOneTimePriceCurrencyKgs ProductUpdateParamsPriceOneTimePriceCurrency = "KGS"
	ProductUpdateParamsPriceOneTimePriceCurrencyKhr ProductUpdateParamsPriceOneTimePriceCurrency = "KHR"
	ProductUpdateParamsPriceOneTimePriceCurrencyKmf ProductUpdateParamsPriceOneTimePriceCurrency = "KMF"
	ProductUpdateParamsPriceOneTimePriceCurrencyKrw ProductUpdateParamsPriceOneTimePriceCurrency = "KRW"
	ProductUpdateParamsPriceOneTimePriceCurrencyKwd ProductUpdateParamsPriceOneTimePriceCurrency = "KWD"
	ProductUpdateParamsPriceOneTimePriceCurrencyKyd ProductUpdateParamsPriceOneTimePriceCurrency = "KYD"
	ProductUpdateParamsPriceOneTimePriceCurrencyKzt ProductUpdateParamsPriceOneTimePriceCurrency = "KZT"
	ProductUpdateParamsPriceOneTimePriceCurrencyLak ProductUpdateParamsPriceOneTimePriceCurrency = "LAK"
	ProductUpdateParamsPriceOneTimePriceCurrencyLbp ProductUpdateParamsPriceOneTimePriceCurrency = "LBP"
	ProductUpdateParamsPriceOneTimePriceCurrencyLkr ProductUpdateParamsPriceOneTimePriceCurrency = "LKR"
	ProductUpdateParamsPriceOneTimePriceCurrencyLrd ProductUpdateParamsPriceOneTimePriceCurrency = "LRD"
	ProductUpdateParamsPriceOneTimePriceCurrencyLsl ProductUpdateParamsPriceOneTimePriceCurrency = "LSL"
	ProductUpdateParamsPriceOneTimePriceCurrencyLyd ProductUpdateParamsPriceOneTimePriceCurrency = "LYD"
	ProductUpdateParamsPriceOneTimePriceCurrencyMad ProductUpdateParamsPriceOneTimePriceCurrency = "MAD"
	ProductUpdateParamsPriceOneTimePriceCurrencyMdl ProductUpdateParamsPriceOneTimePriceCurrency = "MDL"
	ProductUpdateParamsPriceOneTimePriceCurrencyMga ProductUpdateParamsPriceOneTimePriceCurrency = "MGA"
	ProductUpdateParamsPriceOneTimePriceCurrencyMkd ProductUpdateParamsPriceOneTimePriceCurrency = "MKD"
	ProductUpdateParamsPriceOneTimePriceCurrencyMmk ProductUpdateParamsPriceOneTimePriceCurrency = "MMK"
	ProductUpdateParamsPriceOneTimePriceCurrencyMnt ProductUpdateParamsPriceOneTimePriceCurrency = "MNT"
	ProductUpdateParamsPriceOneTimePriceCurrencyMop ProductUpdateParamsPriceOneTimePriceCurrency = "MOP"
	ProductUpdateParamsPriceOneTimePriceCurrencyMru ProductUpdateParamsPriceOneTimePriceCurrency = "MRU"
	ProductUpdateParamsPriceOneTimePriceCurrencyMur ProductUpdateParamsPriceOneTimePriceCurrency = "MUR"
	ProductUpdateParamsPriceOneTimePriceCurrencyMvr ProductUpdateParamsPriceOneTimePriceCurrency = "MVR"
	ProductUpdateParamsPriceOneTimePriceCurrencyMwk ProductUpdateParamsPriceOneTimePriceCurrency = "MWK"
	ProductUpdateParamsPriceOneTimePriceCurrencyMxn ProductUpdateParamsPriceOneTimePriceCurrency = "MXN"
	ProductUpdateParamsPriceOneTimePriceCurrencyMyr ProductUpdateParamsPriceOneTimePriceCurrency = "MYR"
	ProductUpdateParamsPriceOneTimePriceCurrencyMzn ProductUpdateParamsPriceOneTimePriceCurrency = "MZN"
	ProductUpdateParamsPriceOneTimePriceCurrencyNad ProductUpdateParamsPriceOneTimePriceCurrency = "NAD"
	ProductUpdateParamsPriceOneTimePriceCurrencyNgn ProductUpdateParamsPriceOneTimePriceCurrency = "NGN"
	ProductUpdateParamsPriceOneTimePriceCurrencyNio ProductUpdateParamsPriceOneTimePriceCurrency = "NIO"
	ProductUpdateParamsPriceOneTimePriceCurrencyNok ProductUpdateParamsPriceOneTimePriceCurrency = "NOK"
	ProductUpdateParamsPriceOneTimePriceCurrencyNpr ProductUpdateParamsPriceOneTimePriceCurrency = "NPR"
	ProductUpdateParamsPriceOneTimePriceCurrencyNzd ProductUpdateParamsPriceOneTimePriceCurrency = "NZD"
	ProductUpdateParamsPriceOneTimePriceCurrencyOmr ProductUpdateParamsPriceOneTimePriceCurrency = "OMR"
	ProductUpdateParamsPriceOneTimePriceCurrencyPab ProductUpdateParamsPriceOneTimePriceCurrency = "PAB"
	ProductUpdateParamsPriceOneTimePriceCurrencyPen ProductUpdateParamsPriceOneTimePriceCurrency = "PEN"
	ProductUpdateParamsPriceOneTimePriceCurrencyPgk ProductUpdateParamsPriceOneTimePriceCurrency = "PGK"
	ProductUpdateParamsPriceOneTimePriceCurrencyPhp ProductUpdateParamsPriceOneTimePriceCurrency = "PHP"
	ProductUpdateParamsPriceOneTimePriceCurrencyPkr ProductUpdateParamsPriceOneTimePriceCurrency = "PKR"
	ProductUpdateParamsPriceOneTimePriceCurrencyPln ProductUpdateParamsPriceOneTimePriceCurrency = "PLN"
	ProductUpdateParamsPriceOneTimePriceCurrencyPyg ProductUpdateParamsPriceOneTimePriceCurrency = "PYG"
	ProductUpdateParamsPriceOneTimePriceCurrencyQar ProductUpdateParamsPriceOneTimePriceCurrency = "QAR"
	ProductUpdateParamsPriceOneTimePriceCurrencyRon ProductUpdateParamsPriceOneTimePriceCurrency = "RON"
	ProductUpdateParamsPriceOneTimePriceCurrencyRsd ProductUpdateParamsPriceOneTimePriceCurrency = "RSD"
	ProductUpdateParamsPriceOneTimePriceCurrencyRub ProductUpdateParamsPriceOneTimePriceCurrency = "RUB"
	ProductUpdateParamsPriceOneTimePriceCurrencyRwf ProductUpdateParamsPriceOneTimePriceCurrency = "RWF"
	ProductUpdateParamsPriceOneTimePriceCurrencySar ProductUpdateParamsPriceOneTimePriceCurrency = "SAR"
	ProductUpdateParamsPriceOneTimePriceCurrencySbd ProductUpdateParamsPriceOneTimePriceCurrency = "SBD"
	ProductUpdateParamsPriceOneTimePriceCurrencyScr ProductUpdateParamsPriceOneTimePriceCurrency = "SCR"
	ProductUpdateParamsPriceOneTimePriceCurrencySek ProductUpdateParamsPriceOneTimePriceCurrency = "SEK"
	ProductUpdateParamsPriceOneTimePriceCurrencySgd ProductUpdateParamsPriceOneTimePriceCurrency = "SGD"
	ProductUpdateParamsPriceOneTimePriceCurrencyShp ProductUpdateParamsPriceOneTimePriceCurrency = "SHP"
	ProductUpdateParamsPriceOneTimePriceCurrencySle ProductUpdateParamsPriceOneTimePriceCurrency = "SLE"
	ProductUpdateParamsPriceOneTimePriceCurrencySll ProductUpdateParamsPriceOneTimePriceCurrency = "SLL"
	ProductUpdateParamsPriceOneTimePriceCurrencySos ProductUpdateParamsPriceOneTimePriceCurrency = "SOS"
	ProductUpdateParamsPriceOneTimePriceCurrencySrd ProductUpdateParamsPriceOneTimePriceCurrency = "SRD"
	ProductUpdateParamsPriceOneTimePriceCurrencySsp ProductUpdateParamsPriceOneTimePriceCurrency = "SSP"
	ProductUpdateParamsPriceOneTimePriceCurrencyStn ProductUpdateParamsPriceOneTimePriceCurrency = "STN"
	ProductUpdateParamsPriceOneTimePriceCurrencySvc ProductUpdateParamsPriceOneTimePriceCurrency = "SVC"
	ProductUpdateParamsPriceOneTimePriceCurrencySzl ProductUpdateParamsPriceOneTimePriceCurrency = "SZL"
	ProductUpdateParamsPriceOneTimePriceCurrencyThb ProductUpdateParamsPriceOneTimePriceCurrency = "THB"
	ProductUpdateParamsPriceOneTimePriceCurrencyTnd ProductUpdateParamsPriceOneTimePriceCurrency = "TND"
	ProductUpdateParamsPriceOneTimePriceCurrencyTop ProductUpdateParamsPriceOneTimePriceCurrency = "TOP"
	ProductUpdateParamsPriceOneTimePriceCurrencyTry ProductUpdateParamsPriceOneTimePriceCurrency = "TRY"
	ProductUpdateParamsPriceOneTimePriceCurrencyTtd ProductUpdateParamsPriceOneTimePriceCurrency = "TTD"
	ProductUpdateParamsPriceOneTimePriceCurrencyTwd ProductUpdateParamsPriceOneTimePriceCurrency = "TWD"
	ProductUpdateParamsPriceOneTimePriceCurrencyTzs ProductUpdateParamsPriceOneTimePriceCurrency = "TZS"
	ProductUpdateParamsPriceOneTimePriceCurrencyUah ProductUpdateParamsPriceOneTimePriceCurrency = "UAH"
	ProductUpdateParamsPriceOneTimePriceCurrencyUgx ProductUpdateParamsPriceOneTimePriceCurrency = "UGX"
	ProductUpdateParamsPriceOneTimePriceCurrencyUsd ProductUpdateParamsPriceOneTimePriceCurrency = "USD"
	ProductUpdateParamsPriceOneTimePriceCurrencyUyu ProductUpdateParamsPriceOneTimePriceCurrency = "UYU"
	ProductUpdateParamsPriceOneTimePriceCurrencyUzs ProductUpdateParamsPriceOneTimePriceCurrency = "UZS"
	ProductUpdateParamsPriceOneTimePriceCurrencyVes ProductUpdateParamsPriceOneTimePriceCurrency = "VES"
	ProductUpdateParamsPriceOneTimePriceCurrencyVnd ProductUpdateParamsPriceOneTimePriceCurrency = "VND"
	ProductUpdateParamsPriceOneTimePriceCurrencyVuv ProductUpdateParamsPriceOneTimePriceCurrency = "VUV"
	ProductUpdateParamsPriceOneTimePriceCurrencyWst ProductUpdateParamsPriceOneTimePriceCurrency = "WST"
	ProductUpdateParamsPriceOneTimePriceCurrencyXaf ProductUpdateParamsPriceOneTimePriceCurrency = "XAF"
	ProductUpdateParamsPriceOneTimePriceCurrencyXcd ProductUpdateParamsPriceOneTimePriceCurrency = "XCD"
	ProductUpdateParamsPriceOneTimePriceCurrencyXof ProductUpdateParamsPriceOneTimePriceCurrency = "XOF"
	ProductUpdateParamsPriceOneTimePriceCurrencyXpf ProductUpdateParamsPriceOneTimePriceCurrency = "XPF"
	ProductUpdateParamsPriceOneTimePriceCurrencyYer ProductUpdateParamsPriceOneTimePriceCurrency = "YER"
	ProductUpdateParamsPriceOneTimePriceCurrencyZar ProductUpdateParamsPriceOneTimePriceCurrency = "ZAR"
	ProductUpdateParamsPriceOneTimePriceCurrencyZmw ProductUpdateParamsPriceOneTimePriceCurrency = "ZMW"
)

func (ProductUpdateParamsPriceOneTimePriceCurrency) IsKnown

type ProductUpdateParamsPriceOneTimePriceType

type ProductUpdateParamsPriceOneTimePriceType string
const (
	ProductUpdateParamsPriceOneTimePriceTypeOneTimePrice ProductUpdateParamsPriceOneTimePriceType = "one_time_price"
)

func (ProductUpdateParamsPriceOneTimePriceType) IsKnown

type ProductUpdateParamsPricePaymentFrequencyInterval

type ProductUpdateParamsPricePaymentFrequencyInterval string
const (
	ProductUpdateParamsPricePaymentFrequencyIntervalDay   ProductUpdateParamsPricePaymentFrequencyInterval = "Day"
	ProductUpdateParamsPricePaymentFrequencyIntervalWeek  ProductUpdateParamsPricePaymentFrequencyInterval = "Week"
	ProductUpdateParamsPricePaymentFrequencyIntervalMonth ProductUpdateParamsPricePaymentFrequencyInterval = "Month"
	ProductUpdateParamsPricePaymentFrequencyIntervalYear  ProductUpdateParamsPricePaymentFrequencyInterval = "Year"
)

func (ProductUpdateParamsPricePaymentFrequencyInterval) IsKnown

type ProductUpdateParamsPriceRecurringPrice

type ProductUpdateParamsPriceRecurringPrice struct {
	Currency param.Field[ProductUpdateParamsPriceRecurringPriceCurrency] `json:"currency,required"`
	// Discount applied to the price, represented as a percentage (0 to 100).
	Discount param.Field[float64] `json:"discount,required"`
	// Number of units for the payment frequency. For example, a value of `1` with a
	// `payment_frequency_interval` of `month` represents monthly payments.
	PaymentFrequencyCount    param.Field[int64]                                                          `json:"payment_frequency_count,required"`
	PaymentFrequencyInterval param.Field[ProductUpdateParamsPriceRecurringPricePaymentFrequencyInterval] `json:"payment_frequency_interval,required"`
	// The payment amount. Represented in the lowest denomination of the currency
	// (e.g., cents for USD). For example, to charge $1.00, pass `100`.
	Price param.Field[int64] `json:"price,required"`
	// Indicates if purchasing power parity adjustments are applied to the price.
	// Purchasing power parity feature is not available as of now
	PurchasingPowerParity param.Field[bool] `json:"purchasing_power_parity,required"`
	// Number of units for the subscription period. For example, a value of `12` with a
	// `subscription_period_interval` of `month` represents a one-year subscription.
	SubscriptionPeriodCount    param.Field[int64]                                                            `json:"subscription_period_count,required"`
	SubscriptionPeriodInterval param.Field[ProductUpdateParamsPriceRecurringPriceSubscriptionPeriodInterval] `json:"subscription_period_interval,required"`
	Type                       param.Field[ProductUpdateParamsPriceRecurringPriceType]                       `json:"type,required"`
	// Indicates if the price is tax inclusive
	TaxInclusive param.Field[bool] `json:"tax_inclusive"`
	// Number of days for the trial period. A value of `0` indicates no trial period.
	TrialPeriodDays param.Field[int64] `json:"trial_period_days"`
}

func (ProductUpdateParamsPriceRecurringPrice) MarshalJSON

func (r ProductUpdateParamsPriceRecurringPrice) MarshalJSON() (data []byte, err error)

type ProductUpdateParamsPriceRecurringPriceCurrency

type ProductUpdateParamsPriceRecurringPriceCurrency string
const (
	ProductUpdateParamsPriceRecurringPriceCurrencyAed ProductUpdateParamsPriceRecurringPriceCurrency = "AED"
	ProductUpdateParamsPriceRecurringPriceCurrencyAll ProductUpdateParamsPriceRecurringPriceCurrency = "ALL"
	ProductUpdateParamsPriceRecurringPriceCurrencyAmd ProductUpdateParamsPriceRecurringPriceCurrency = "AMD"
	ProductUpdateParamsPriceRecurringPriceCurrencyAng ProductUpdateParamsPriceRecurringPriceCurrency = "ANG"
	ProductUpdateParamsPriceRecurringPriceCurrencyAoa ProductUpdateParamsPriceRecurringPriceCurrency = "AOA"
	ProductUpdateParamsPriceRecurringPriceCurrencyArs ProductUpdateParamsPriceRecurringPriceCurrency = "ARS"
	ProductUpdateParamsPriceRecurringPriceCurrencyAud ProductUpdateParamsPriceRecurringPriceCurrency = "AUD"
	ProductUpdateParamsPriceRecurringPriceCurrencyAwg ProductUpdateParamsPriceRecurringPriceCurrency = "AWG"
	ProductUpdateParamsPriceRecurringPriceCurrencyAzn ProductUpdateParamsPriceRecurringPriceCurrency = "AZN"
	ProductUpdateParamsPriceRecurringPriceCurrencyBam ProductUpdateParamsPriceRecurringPriceCurrency = "BAM"
	ProductUpdateParamsPriceRecurringPriceCurrencyBbd ProductUpdateParamsPriceRecurringPriceCurrency = "BBD"
	ProductUpdateParamsPriceRecurringPriceCurrencyBdt ProductUpdateParamsPriceRecurringPriceCurrency = "BDT"
	ProductUpdateParamsPriceRecurringPriceCurrencyBgn ProductUpdateParamsPriceRecurringPriceCurrency = "BGN"
	ProductUpdateParamsPriceRecurringPriceCurrencyBhd ProductUpdateParamsPriceRecurringPriceCurrency = "BHD"
	ProductUpdateParamsPriceRecurringPriceCurrencyBif ProductUpdateParamsPriceRecurringPriceCurrency = "BIF"
	ProductUpdateParamsPriceRecurringPriceCurrencyBmd ProductUpdateParamsPriceRecurringPriceCurrency = "BMD"
	ProductUpdateParamsPriceRecurringPriceCurrencyBnd ProductUpdateParamsPriceRecurringPriceCurrency = "BND"
	ProductUpdateParamsPriceRecurringPriceCurrencyBob ProductUpdateParamsPriceRecurringPriceCurrency = "BOB"
	ProductUpdateParamsPriceRecurringPriceCurrencyBrl ProductUpdateParamsPriceRecurringPriceCurrency = "BRL"
	ProductUpdateParamsPriceRecurringPriceCurrencyBsd ProductUpdateParamsPriceRecurringPriceCurrency = "BSD"
	ProductUpdateParamsPriceRecurringPriceCurrencyBwp ProductUpdateParamsPriceRecurringPriceCurrency = "BWP"
	ProductUpdateParamsPriceRecurringPriceCurrencyByn ProductUpdateParamsPriceRecurringPriceCurrency = "BYN"
	ProductUpdateParamsPriceRecurringPriceCurrencyBzd ProductUpdateParamsPriceRecurringPriceCurrency = "BZD"
	ProductUpdateParamsPriceRecurringPriceCurrencyCad ProductUpdateParamsPriceRecurringPriceCurrency = "CAD"
	ProductUpdateParamsPriceRecurringPriceCurrencyChf ProductUpdateParamsPriceRecurringPriceCurrency = "CHF"
	ProductUpdateParamsPriceRecurringPriceCurrencyClp ProductUpdateParamsPriceRecurringPriceCurrency = "CLP"
	ProductUpdateParamsPriceRecurringPriceCurrencyCny ProductUpdateParamsPriceRecurringPriceCurrency = "CNY"
	ProductUpdateParamsPriceRecurringPriceCurrencyCop ProductUpdateParamsPriceRecurringPriceCurrency = "COP"
	ProductUpdateParamsPriceRecurringPriceCurrencyCrc ProductUpdateParamsPriceRecurringPriceCurrency = "CRC"
	ProductUpdateParamsPriceRecurringPriceCurrencyCup ProductUpdateParamsPriceRecurringPriceCurrency = "CUP"
	ProductUpdateParamsPriceRecurringPriceCurrencyCve ProductUpdateParamsPriceRecurringPriceCurrency = "CVE"
	ProductUpdateParamsPriceRecurringPriceCurrencyCzk ProductUpdateParamsPriceRecurringPriceCurrency = "CZK"
	ProductUpdateParamsPriceRecurringPriceCurrencyDjf ProductUpdateParamsPriceRecurringPriceCurrency = "DJF"
	ProductUpdateParamsPriceRecurringPriceCurrencyDkk ProductUpdateParamsPriceRecurringPriceCurrency = "DKK"
	ProductUpdateParamsPriceRecurringPriceCurrencyDop ProductUpdateParamsPriceRecurringPriceCurrency = "DOP"
	ProductUpdateParamsPriceRecurringPriceCurrencyDzd ProductUpdateParamsPriceRecurringPriceCurrency = "DZD"
	ProductUpdateParamsPriceRecurringPriceCurrencyEgp ProductUpdateParamsPriceRecurringPriceCurrency = "EGP"
	ProductUpdateParamsPriceRecurringPriceCurrencyEtb ProductUpdateParamsPriceRecurringPriceCurrency = "ETB"
	ProductUpdateParamsPriceRecurringPriceCurrencyEur ProductUpdateParamsPriceRecurringPriceCurrency = "EUR"
	ProductUpdateParamsPriceRecurringPriceCurrencyFjd ProductUpdateParamsPriceRecurringPriceCurrency = "FJD"
	ProductUpdateParamsPriceRecurringPriceCurrencyFkp ProductUpdateParamsPriceRecurringPriceCurrency = "FKP"
	ProductUpdateParamsPriceRecurringPriceCurrencyGbp ProductUpdateParamsPriceRecurringPriceCurrency = "GBP"
	ProductUpdateParamsPriceRecurringPriceCurrencyGel ProductUpdateParamsPriceRecurringPriceCurrency = "GEL"
	ProductUpdateParamsPriceRecurringPriceCurrencyGhs ProductUpdateParamsPriceRecurringPriceCurrency = "GHS"
	ProductUpdateParamsPriceRecurringPriceCurrencyGip ProductUpdateParamsPriceRecurringPriceCurrency = "GIP"
	ProductUpdateParamsPriceRecurringPriceCurrencyGmd ProductUpdateParamsPriceRecurringPriceCurrency = "GMD"
	ProductUpdateParamsPriceRecurringPriceCurrencyGnf ProductUpdateParamsPriceRecurringPriceCurrency = "GNF"
	ProductUpdateParamsPriceRecurringPriceCurrencyGtq ProductUpdateParamsPriceRecurringPriceCurrency = "GTQ"
	ProductUpdateParamsPriceRecurringPriceCurrencyGyd ProductUpdateParamsPriceRecurringPriceCurrency = "GYD"
	ProductUpdateParamsPriceRecurringPriceCurrencyHkd ProductUpdateParamsPriceRecurringPriceCurrency = "HKD"
	ProductUpdateParamsPriceRecurringPriceCurrencyHnl ProductUpdateParamsPriceRecurringPriceCurrency = "HNL"
	ProductUpdateParamsPriceRecurringPriceCurrencyHrk ProductUpdateParamsPriceRecurringPriceCurrency = "HRK"
	ProductUpdateParamsPriceRecurringPriceCurrencyHtg ProductUpdateParamsPriceRecurringPriceCurrency = "HTG"
	ProductUpdateParamsPriceRecurringPriceCurrencyHuf ProductUpdateParamsPriceRecurringPriceCurrency = "HUF"
	ProductUpdateParamsPriceRecurringPriceCurrencyIdr ProductUpdateParamsPriceRecurringPriceCurrency = "IDR"
	ProductUpdateParamsPriceRecurringPriceCurrencyIls ProductUpdateParamsPriceRecurringPriceCurrency = "ILS"
	ProductUpdateParamsPriceRecurringPriceCurrencyInr ProductUpdateParamsPriceRecurringPriceCurrency = "INR"
	ProductUpdateParamsPriceRecurringPriceCurrencyIqd ProductUpdateParamsPriceRecurringPriceCurrency = "IQD"
	ProductUpdateParamsPriceRecurringPriceCurrencyJmd ProductUpdateParamsPriceRecurringPriceCurrency = "JMD"
	ProductUpdateParamsPriceRecurringPriceCurrencyJod ProductUpdateParamsPriceRecurringPriceCurrency = "JOD"
	ProductUpdateParamsPriceRecurringPriceCurrencyJpy ProductUpdateParamsPriceRecurringPriceCurrency = "JPY"
	ProductUpdateParamsPriceRecurringPriceCurrencyKes ProductUpdateParamsPriceRecurringPriceCurrency = "KES"
	ProductUpdateParamsPriceRecurringPriceCurrencyKgs ProductUpdateParamsPriceRecurringPriceCurrency = "KGS"
	ProductUpdateParamsPriceRecurringPriceCurrencyKhr ProductUpdateParamsPriceRecurringPriceCurrency = "KHR"
	ProductUpdateParamsPriceRecurringPriceCurrencyKmf ProductUpdateParamsPriceRecurringPriceCurrency = "KMF"
	ProductUpdateParamsPriceRecurringPriceCurrencyKrw ProductUpdateParamsPriceRecurringPriceCurrency = "KRW"
	ProductUpdateParamsPriceRecurringPriceCurrencyKwd ProductUpdateParamsPriceRecurringPriceCurrency = "KWD"
	ProductUpdateParamsPriceRecurringPriceCurrencyKyd ProductUpdateParamsPriceRecurringPriceCurrency = "KYD"
	ProductUpdateParamsPriceRecurringPriceCurrencyKzt ProductUpdateParamsPriceRecurringPriceCurrency = "KZT"
	ProductUpdateParamsPriceRecurringPriceCurrencyLak ProductUpdateParamsPriceRecurringPriceCurrency = "LAK"
	ProductUpdateParamsPriceRecurringPriceCurrencyLbp ProductUpdateParamsPriceRecurringPriceCurrency = "LBP"
	ProductUpdateParamsPriceRecurringPriceCurrencyLkr ProductUpdateParamsPriceRecurringPriceCurrency = "LKR"
	ProductUpdateParamsPriceRecurringPriceCurrencyLrd ProductUpdateParamsPriceRecurringPriceCurrency = "LRD"
	ProductUpdateParamsPriceRecurringPriceCurrencyLsl ProductUpdateParamsPriceRecurringPriceCurrency = "LSL"
	ProductUpdateParamsPriceRecurringPriceCurrencyLyd ProductUpdateParamsPriceRecurringPriceCurrency = "LYD"
	ProductUpdateParamsPriceRecurringPriceCurrencyMad ProductUpdateParamsPriceRecurringPriceCurrency = "MAD"
	ProductUpdateParamsPriceRecurringPriceCurrencyMdl ProductUpdateParamsPriceRecurringPriceCurrency = "MDL"
	ProductUpdateParamsPriceRecurringPriceCurrencyMga ProductUpdateParamsPriceRecurringPriceCurrency = "MGA"
	ProductUpdateParamsPriceRecurringPriceCurrencyMkd ProductUpdateParamsPriceRecurringPriceCurrency = "MKD"
	ProductUpdateParamsPriceRecurringPriceCurrencyMmk ProductUpdateParamsPriceRecurringPriceCurrency = "MMK"
	ProductUpdateParamsPriceRecurringPriceCurrencyMnt ProductUpdateParamsPriceRecurringPriceCurrency = "MNT"
	ProductUpdateParamsPriceRecurringPriceCurrencyMop ProductUpdateParamsPriceRecurringPriceCurrency = "MOP"
	ProductUpdateParamsPriceRecurringPriceCurrencyMru ProductUpdateParamsPriceRecurringPriceCurrency = "MRU"
	ProductUpdateParamsPriceRecurringPriceCurrencyMur ProductUpdateParamsPriceRecurringPriceCurrency = "MUR"
	ProductUpdateParamsPriceRecurringPriceCurrencyMvr ProductUpdateParamsPriceRecurringPriceCurrency = "MVR"
	ProductUpdateParamsPriceRecurringPriceCurrencyMwk ProductUpdateParamsPriceRecurringPriceCurrency = "MWK"
	ProductUpdateParamsPriceRecurringPriceCurrencyMxn ProductUpdateParamsPriceRecurringPriceCurrency = "MXN"
	ProductUpdateParamsPriceRecurringPriceCurrencyMyr ProductUpdateParamsPriceRecurringPriceCurrency = "MYR"
	ProductUpdateParamsPriceRecurringPriceCurrencyMzn ProductUpdateParamsPriceRecurringPriceCurrency = "MZN"
	ProductUpdateParamsPriceRecurringPriceCurrencyNad ProductUpdateParamsPriceRecurringPriceCurrency = "NAD"
	ProductUpdateParamsPriceRecurringPriceCurrencyNgn ProductUpdateParamsPriceRecurringPriceCurrency = "NGN"
	ProductUpdateParamsPriceRecurringPriceCurrencyNio ProductUpdateParamsPriceRecurringPriceCurrency = "NIO"
	ProductUpdateParamsPriceRecurringPriceCurrencyNok ProductUpdateParamsPriceRecurringPriceCurrency = "NOK"
	ProductUpdateParamsPriceRecurringPriceCurrencyNpr ProductUpdateParamsPriceRecurringPriceCurrency = "NPR"
	ProductUpdateParamsPriceRecurringPriceCurrencyNzd ProductUpdateParamsPriceRecurringPriceCurrency = "NZD"
	ProductUpdateParamsPriceRecurringPriceCurrencyOmr ProductUpdateParamsPriceRecurringPriceCurrency = "OMR"
	ProductUpdateParamsPriceRecurringPriceCurrencyPab ProductUpdateParamsPriceRecurringPriceCurrency = "PAB"
	ProductUpdateParamsPriceRecurringPriceCurrencyPen ProductUpdateParamsPriceRecurringPriceCurrency = "PEN"
	ProductUpdateParamsPriceRecurringPriceCurrencyPgk ProductUpdateParamsPriceRecurringPriceCurrency = "PGK"
	ProductUpdateParamsPriceRecurringPriceCurrencyPhp ProductUpdateParamsPriceRecurringPriceCurrency = "PHP"
	ProductUpdateParamsPriceRecurringPriceCurrencyPkr ProductUpdateParamsPriceRecurringPriceCurrency = "PKR"
	ProductUpdateParamsPriceRecurringPriceCurrencyPln ProductUpdateParamsPriceRecurringPriceCurrency = "PLN"
	ProductUpdateParamsPriceRecurringPriceCurrencyPyg ProductUpdateParamsPriceRecurringPriceCurrency = "PYG"
	ProductUpdateParamsPriceRecurringPriceCurrencyQar ProductUpdateParamsPriceRecurringPriceCurrency = "QAR"
	ProductUpdateParamsPriceRecurringPriceCurrencyRon ProductUpdateParamsPriceRecurringPriceCurrency = "RON"
	ProductUpdateParamsPriceRecurringPriceCurrencyRsd ProductUpdateParamsPriceRecurringPriceCurrency = "RSD"
	ProductUpdateParamsPriceRecurringPriceCurrencyRub ProductUpdateParamsPriceRecurringPriceCurrency = "RUB"
	ProductUpdateParamsPriceRecurringPriceCurrencyRwf ProductUpdateParamsPriceRecurringPriceCurrency = "RWF"
	ProductUpdateParamsPriceRecurringPriceCurrencySar ProductUpdateParamsPriceRecurringPriceCurrency = "SAR"
	ProductUpdateParamsPriceRecurringPriceCurrencySbd ProductUpdateParamsPriceRecurringPriceCurrency = "SBD"
	ProductUpdateParamsPriceRecurringPriceCurrencyScr ProductUpdateParamsPriceRecurringPriceCurrency = "SCR"
	ProductUpdateParamsPriceRecurringPriceCurrencySek ProductUpdateParamsPriceRecurringPriceCurrency = "SEK"
	ProductUpdateParamsPriceRecurringPriceCurrencySgd ProductUpdateParamsPriceRecurringPriceCurrency = "SGD"
	ProductUpdateParamsPriceRecurringPriceCurrencyShp ProductUpdateParamsPriceRecurringPriceCurrency = "SHP"
	ProductUpdateParamsPriceRecurringPriceCurrencySle ProductUpdateParamsPriceRecurringPriceCurrency = "SLE"
	ProductUpdateParamsPriceRecurringPriceCurrencySll ProductUpdateParamsPriceRecurringPriceCurrency = "SLL"
	ProductUpdateParamsPriceRecurringPriceCurrencySos ProductUpdateParamsPriceRecurringPriceCurrency = "SOS"
	ProductUpdateParamsPriceRecurringPriceCurrencySrd ProductUpdateParamsPriceRecurringPriceCurrency = "SRD"
	ProductUpdateParamsPriceRecurringPriceCurrencySsp ProductUpdateParamsPriceRecurringPriceCurrency = "SSP"
	ProductUpdateParamsPriceRecurringPriceCurrencyStn ProductUpdateParamsPriceRecurringPriceCurrency = "STN"
	ProductUpdateParamsPriceRecurringPriceCurrencySvc ProductUpdateParamsPriceRecurringPriceCurrency = "SVC"
	ProductUpdateParamsPriceRecurringPriceCurrencySzl ProductUpdateParamsPriceRecurringPriceCurrency = "SZL"
	ProductUpdateParamsPriceRecurringPriceCurrencyThb ProductUpdateParamsPriceRecurringPriceCurrency = "THB"
	ProductUpdateParamsPriceRecurringPriceCurrencyTnd ProductUpdateParamsPriceRecurringPriceCurrency = "TND"
	ProductUpdateParamsPriceRecurringPriceCurrencyTop ProductUpdateParamsPriceRecurringPriceCurrency = "TOP"
	ProductUpdateParamsPriceRecurringPriceCurrencyTry ProductUpdateParamsPriceRecurringPriceCurrency = "TRY"
	ProductUpdateParamsPriceRecurringPriceCurrencyTtd ProductUpdateParamsPriceRecurringPriceCurrency = "TTD"
	ProductUpdateParamsPriceRecurringPriceCurrencyTwd ProductUpdateParamsPriceRecurringPriceCurrency = "TWD"
	ProductUpdateParamsPriceRecurringPriceCurrencyTzs ProductUpdateParamsPriceRecurringPriceCurrency = "TZS"
	ProductUpdateParamsPriceRecurringPriceCurrencyUah ProductUpdateParamsPriceRecurringPriceCurrency = "UAH"
	ProductUpdateParamsPriceRecurringPriceCurrencyUgx ProductUpdateParamsPriceRecurringPriceCurrency = "UGX"
	ProductUpdateParamsPriceRecurringPriceCurrencyUsd ProductUpdateParamsPriceRecurringPriceCurrency = "USD"
	ProductUpdateParamsPriceRecurringPriceCurrencyUyu ProductUpdateParamsPriceRecurringPriceCurrency = "UYU"
	ProductUpdateParamsPriceRecurringPriceCurrencyUzs ProductUpdateParamsPriceRecurringPriceCurrency = "UZS"
	ProductUpdateParamsPriceRecurringPriceCurrencyVes ProductUpdateParamsPriceRecurringPriceCurrency = "VES"
	ProductUpdateParamsPriceRecurringPriceCurrencyVnd ProductUpdateParamsPriceRecurringPriceCurrency = "VND"
	ProductUpdateParamsPriceRecurringPriceCurrencyVuv ProductUpdateParamsPriceRecurringPriceCurrency = "VUV"
	ProductUpdateParamsPriceRecurringPriceCurrencyWst ProductUpdateParamsPriceRecurringPriceCurrency = "WST"
	ProductUpdateParamsPriceRecurringPriceCurrencyXaf ProductUpdateParamsPriceRecurringPriceCurrency = "XAF"
	ProductUpdateParamsPriceRecurringPriceCurrencyXcd ProductUpdateParamsPriceRecurringPriceCurrency = "XCD"
	ProductUpdateParamsPriceRecurringPriceCurrencyXof ProductUpdateParamsPriceRecurringPriceCurrency = "XOF"
	ProductUpdateParamsPriceRecurringPriceCurrencyXpf ProductUpdateParamsPriceRecurringPriceCurrency = "XPF"
	ProductUpdateParamsPriceRecurringPriceCurrencyYer ProductUpdateParamsPriceRecurringPriceCurrency = "YER"
	ProductUpdateParamsPriceRecurringPriceCurrencyZar ProductUpdateParamsPriceRecurringPriceCurrency = "ZAR"
	ProductUpdateParamsPriceRecurringPriceCurrencyZmw ProductUpdateParamsPriceRecurringPriceCurrency = "ZMW"
)

func (ProductUpdateParamsPriceRecurringPriceCurrency) IsKnown

type ProductUpdateParamsPriceRecurringPricePaymentFrequencyInterval

type ProductUpdateParamsPriceRecurringPricePaymentFrequencyInterval string
const (
	ProductUpdateParamsPriceRecurringPricePaymentFrequencyIntervalDay   ProductUpdateParamsPriceRecurringPricePaymentFrequencyInterval = "Day"
	ProductUpdateParamsPriceRecurringPricePaymentFrequencyIntervalWeek  ProductUpdateParamsPriceRecurringPricePaymentFrequencyInterval = "Week"
	ProductUpdateParamsPriceRecurringPricePaymentFrequencyIntervalMonth ProductUpdateParamsPriceRecurringPricePaymentFrequencyInterval = "Month"
	ProductUpdateParamsPriceRecurringPricePaymentFrequencyIntervalYear  ProductUpdateParamsPriceRecurringPricePaymentFrequencyInterval = "Year"
)

func (ProductUpdateParamsPriceRecurringPricePaymentFrequencyInterval) IsKnown

type ProductUpdateParamsPriceRecurringPriceSubscriptionPeriodInterval

type ProductUpdateParamsPriceRecurringPriceSubscriptionPeriodInterval string
const (
	ProductUpdateParamsPriceRecurringPriceSubscriptionPeriodIntervalDay   ProductUpdateParamsPriceRecurringPriceSubscriptionPeriodInterval = "Day"
	ProductUpdateParamsPriceRecurringPriceSubscriptionPeriodIntervalWeek  ProductUpdateParamsPriceRecurringPriceSubscriptionPeriodInterval = "Week"
	ProductUpdateParamsPriceRecurringPriceSubscriptionPeriodIntervalMonth ProductUpdateParamsPriceRecurringPriceSubscriptionPeriodInterval = "Month"
	ProductUpdateParamsPriceRecurringPriceSubscriptionPeriodIntervalYear  ProductUpdateParamsPriceRecurringPriceSubscriptionPeriodInterval = "Year"
)

func (ProductUpdateParamsPriceRecurringPriceSubscriptionPeriodInterval) IsKnown

type ProductUpdateParamsPriceRecurringPriceType

type ProductUpdateParamsPriceRecurringPriceType string
const (
	ProductUpdateParamsPriceRecurringPriceTypeRecurringPrice ProductUpdateParamsPriceRecurringPriceType = "recurring_price"
)

func (ProductUpdateParamsPriceRecurringPriceType) IsKnown

type ProductUpdateParamsPriceSubscriptionPeriodInterval

type ProductUpdateParamsPriceSubscriptionPeriodInterval string
const (
	ProductUpdateParamsPriceSubscriptionPeriodIntervalDay   ProductUpdateParamsPriceSubscriptionPeriodInterval = "Day"
	ProductUpdateParamsPriceSubscriptionPeriodIntervalWeek  ProductUpdateParamsPriceSubscriptionPeriodInterval = "Week"
	ProductUpdateParamsPriceSubscriptionPeriodIntervalMonth ProductUpdateParamsPriceSubscriptionPeriodInterval = "Month"
	ProductUpdateParamsPriceSubscriptionPeriodIntervalYear  ProductUpdateParamsPriceSubscriptionPeriodInterval = "Year"
)

func (ProductUpdateParamsPriceSubscriptionPeriodInterval) IsKnown

type ProductUpdateParamsPriceType

type ProductUpdateParamsPriceType string
const (
	ProductUpdateParamsPriceTypeOneTimePrice   ProductUpdateParamsPriceType = "one_time_price"
	ProductUpdateParamsPriceTypeRecurringPrice ProductUpdateParamsPriceType = "recurring_price"
)

func (ProductUpdateParamsPriceType) IsKnown

func (r ProductUpdateParamsPriceType) IsKnown() bool

type ProductUpdateParamsPriceUnion

type ProductUpdateParamsPriceUnion interface {
	// contains filtered or unexported methods
}

Satisfied by ProductUpdateParamsPriceOneTimePrice, ProductUpdateParamsPriceRecurringPrice, ProductUpdateParamsPrice.

type ProductUpdateParamsTaxCategory

type ProductUpdateParamsTaxCategory string

Represents the different categories of taxation applicable to various products and services.

const (
	ProductUpdateParamsTaxCategoryDigitalProducts ProductUpdateParamsTaxCategory = "digital_products"
	ProductUpdateParamsTaxCategorySaas            ProductUpdateParamsTaxCategory = "saas"
	ProductUpdateParamsTaxCategoryEBook           ProductUpdateParamsTaxCategory = "e_book"
)

func (ProductUpdateParamsTaxCategory) IsKnown

type Refund

type Refund struct {
	// The unique identifier of the business issuing the refund.
	BusinessID string `json:"business_id,required"`
	// The timestamp of when the refund was created in UTC.
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// The unique identifier of the payment associated with the refund.
	PaymentID string `json:"payment_id,required"`
	// The unique identifier of the refund.
	RefundID string       `json:"refund_id,required"`
	Status   RefundStatus `json:"status,required"`
	// The refunded amount.
	Amount   int64          `json:"amount,nullable"`
	Currency RefundCurrency `json:"currency,nullable"`
	// The reason provided for the refund, if any. Optional.
	Reason string     `json:"reason,nullable"`
	JSON   refundJSON `json:"-"`
}

func (*Refund) UnmarshalJSON

func (r *Refund) UnmarshalJSON(data []byte) (err error)

type RefundCurrency

type RefundCurrency string
const (
	RefundCurrencyAed RefundCurrency = "AED"
	RefundCurrencyAll RefundCurrency = "ALL"
	RefundCurrencyAmd RefundCurrency = "AMD"
	RefundCurrencyAng RefundCurrency = "ANG"
	RefundCurrencyAoa RefundCurrency = "AOA"
	RefundCurrencyArs RefundCurrency = "ARS"
	RefundCurrencyAud RefundCurrency = "AUD"
	RefundCurrencyAwg RefundCurrency = "AWG"
	RefundCurrencyAzn RefundCurrency = "AZN"
	RefundCurrencyBam RefundCurrency = "BAM"
	RefundCurrencyBbd RefundCurrency = "BBD"
	RefundCurrencyBdt RefundCurrency = "BDT"
	RefundCurrencyBgn RefundCurrency = "BGN"
	RefundCurrencyBhd RefundCurrency = "BHD"
	RefundCurrencyBif RefundCurrency = "BIF"
	RefundCurrencyBmd RefundCurrency = "BMD"
	RefundCurrencyBnd RefundCurrency = "BND"
	RefundCurrencyBob RefundCurrency = "BOB"
	RefundCurrencyBrl RefundCurrency = "BRL"
	RefundCurrencyBsd RefundCurrency = "BSD"
	RefundCurrencyBwp RefundCurrency = "BWP"
	RefundCurrencyByn RefundCurrency = "BYN"
	RefundCurrencyBzd RefundCurrency = "BZD"
	RefundCurrencyCad RefundCurrency = "CAD"
	RefundCurrencyChf RefundCurrency = "CHF"
	RefundCurrencyClp RefundCurrency = "CLP"
	RefundCurrencyCny RefundCurrency = "CNY"
	RefundCurrencyCop RefundCurrency = "COP"
	RefundCurrencyCrc RefundCurrency = "CRC"
	RefundCurrencyCup RefundCurrency = "CUP"
	RefundCurrencyCve RefundCurrency = "CVE"
	RefundCurrencyCzk RefundCurrency = "CZK"
	RefundCurrencyDjf RefundCurrency = "DJF"
	RefundCurrencyDkk RefundCurrency = "DKK"
	RefundCurrencyDop RefundCurrency = "DOP"
	RefundCurrencyDzd RefundCurrency = "DZD"
	RefundCurrencyEgp RefundCurrency = "EGP"
	RefundCurrencyEtb RefundCurrency = "ETB"
	RefundCurrencyEur RefundCurrency = "EUR"
	RefundCurrencyFjd RefundCurrency = "FJD"
	RefundCurrencyFkp RefundCurrency = "FKP"
	RefundCurrencyGbp RefundCurrency = "GBP"
	RefundCurrencyGel RefundCurrency = "GEL"
	RefundCurrencyGhs RefundCurrency = "GHS"
	RefundCurrencyGip RefundCurrency = "GIP"
	RefundCurrencyGmd RefundCurrency = "GMD"
	RefundCurrencyGnf RefundCurrency = "GNF"
	RefundCurrencyGtq RefundCurrency = "GTQ"
	RefundCurrencyGyd RefundCurrency = "GYD"
	RefundCurrencyHkd RefundCurrency = "HKD"
	RefundCurrencyHnl RefundCurrency = "HNL"
	RefundCurrencyHrk RefundCurrency = "HRK"
	RefundCurrencyHtg RefundCurrency = "HTG"
	RefundCurrencyHuf RefundCurrency = "HUF"
	RefundCurrencyIdr RefundCurrency = "IDR"
	RefundCurrencyIls RefundCurrency = "ILS"
	RefundCurrencyInr RefundCurrency = "INR"
	RefundCurrencyIqd RefundCurrency = "IQD"
	RefundCurrencyJmd RefundCurrency = "JMD"
	RefundCurrencyJod RefundCurrency = "JOD"
	RefundCurrencyJpy RefundCurrency = "JPY"
	RefundCurrencyKes RefundCurrency = "KES"
	RefundCurrencyKgs RefundCurrency = "KGS"
	RefundCurrencyKhr RefundCurrency = "KHR"
	RefundCurrencyKmf RefundCurrency = "KMF"
	RefundCurrencyKrw RefundCurrency = "KRW"
	RefundCurrencyKwd RefundCurrency = "KWD"
	RefundCurrencyKyd RefundCurrency = "KYD"
	RefundCurrencyKzt RefundCurrency = "KZT"
	RefundCurrencyLak RefundCurrency = "LAK"
	RefundCurrencyLbp RefundCurrency = "LBP"
	RefundCurrencyLkr RefundCurrency = "LKR"
	RefundCurrencyLrd RefundCurrency = "LRD"
	RefundCurrencyLsl RefundCurrency = "LSL"
	RefundCurrencyLyd RefundCurrency = "LYD"
	RefundCurrencyMad RefundCurrency = "MAD"
	RefundCurrencyMdl RefundCurrency = "MDL"
	RefundCurrencyMga RefundCurrency = "MGA"
	RefundCurrencyMkd RefundCurrency = "MKD"
	RefundCurrencyMmk RefundCurrency = "MMK"
	RefundCurrencyMnt RefundCurrency = "MNT"
	RefundCurrencyMop RefundCurrency = "MOP"
	RefundCurrencyMru RefundCurrency = "MRU"
	RefundCurrencyMur RefundCurrency = "MUR"
	RefundCurrencyMvr RefundCurrency = "MVR"
	RefundCurrencyMwk RefundCurrency = "MWK"
	RefundCurrencyMxn RefundCurrency = "MXN"
	RefundCurrencyMyr RefundCurrency = "MYR"
	RefundCurrencyMzn RefundCurrency = "MZN"
	RefundCurrencyNad RefundCurrency = "NAD"
	RefundCurrencyNgn RefundCurrency = "NGN"
	RefundCurrencyNio RefundCurrency = "NIO"
	RefundCurrencyNok RefundCurrency = "NOK"
	RefundCurrencyNpr RefundCurrency = "NPR"
	RefundCurrencyNzd RefundCurrency = "NZD"
	RefundCurrencyOmr RefundCurrency = "OMR"
	RefundCurrencyPab RefundCurrency = "PAB"
	RefundCurrencyPen RefundCurrency = "PEN"
	RefundCurrencyPgk RefundCurrency = "PGK"
	RefundCurrencyPhp RefundCurrency = "PHP"
	RefundCurrencyPkr RefundCurrency = "PKR"
	RefundCurrencyPln RefundCurrency = "PLN"
	RefundCurrencyPyg RefundCurrency = "PYG"
	RefundCurrencyQar RefundCurrency = "QAR"
	RefundCurrencyRon RefundCurrency = "RON"
	RefundCurrencyRsd RefundCurrency = "RSD"
	RefundCurrencyRub RefundCurrency = "RUB"
	RefundCurrencyRwf RefundCurrency = "RWF"
	RefundCurrencySar RefundCurrency = "SAR"
	RefundCurrencySbd RefundCurrency = "SBD"
	RefundCurrencyScr RefundCurrency = "SCR"
	RefundCurrencySek RefundCurrency = "SEK"
	RefundCurrencySgd RefundCurrency = "SGD"
	RefundCurrencyShp RefundCurrency = "SHP"
	RefundCurrencySle RefundCurrency = "SLE"
	RefundCurrencySll RefundCurrency = "SLL"
	RefundCurrencySos RefundCurrency = "SOS"
	RefundCurrencySrd RefundCurrency = "SRD"
	RefundCurrencySsp RefundCurrency = "SSP"
	RefundCurrencyStn RefundCurrency = "STN"
	RefundCurrencySvc RefundCurrency = "SVC"
	RefundCurrencySzl RefundCurrency = "SZL"
	RefundCurrencyThb RefundCurrency = "THB"
	RefundCurrencyTnd RefundCurrency = "TND"
	RefundCurrencyTop RefundCurrency = "TOP"
	RefundCurrencyTry RefundCurrency = "TRY"
	RefundCurrencyTtd RefundCurrency = "TTD"
	RefundCurrencyTwd RefundCurrency = "TWD"
	RefundCurrencyTzs RefundCurrency = "TZS"
	RefundCurrencyUah RefundCurrency = "UAH"
	RefundCurrencyUgx RefundCurrency = "UGX"
	RefundCurrencyUsd RefundCurrency = "USD"
	RefundCurrencyUyu RefundCurrency = "UYU"
	RefundCurrencyUzs RefundCurrency = "UZS"
	RefundCurrencyVes RefundCurrency = "VES"
	RefundCurrencyVnd RefundCurrency = "VND"
	RefundCurrencyVuv RefundCurrency = "VUV"
	RefundCurrencyWst RefundCurrency = "WST"
	RefundCurrencyXaf RefundCurrency = "XAF"
	RefundCurrencyXcd RefundCurrency = "XCD"
	RefundCurrencyXof RefundCurrency = "XOF"
	RefundCurrencyXpf RefundCurrency = "XPF"
	RefundCurrencyYer RefundCurrency = "YER"
	RefundCurrencyZar RefundCurrency = "ZAR"
	RefundCurrencyZmw RefundCurrency = "ZMW"
)

func (RefundCurrency) IsKnown

func (r RefundCurrency) IsKnown() bool

type RefundListParams

type RefundListParams struct {
	// Get events after this created time
	CreatedAtGte param.Field[time.Time] `query:"created_at_gte" format:"date-time"`
	// Get events created before this time
	CreatedAtLte param.Field[time.Time] `query:"created_at_lte" format:"date-time"`
	// Page number default is 0
	PageNumber param.Field[int64] `query:"page_number"`
	// Page size default is 10 max is 100
	PageSize param.Field[int64] `query:"page_size"`
	// Filter by status
	Status param.Field[RefundListParamsStatus] `query:"status"`
}

func (RefundListParams) URLQuery

func (r RefundListParams) URLQuery() (v url.Values)

URLQuery serializes RefundListParams's query parameters as `url.Values`.

type RefundListParamsStatus added in v0.17.0

type RefundListParamsStatus string

Filter by status

const (
	RefundListParamsStatusSucceeded RefundListParamsStatus = "succeeded"
	RefundListParamsStatusFailed    RefundListParamsStatus = "failed"
	RefundListParamsStatusPending   RefundListParamsStatus = "pending"
	RefundListParamsStatusReview    RefundListParamsStatus = "review"
)

func (RefundListParamsStatus) IsKnown added in v0.17.0

func (r RefundListParamsStatus) IsKnown() bool

type RefundNewParams

type RefundNewParams struct {
	// The unique identifier of the payment to be refunded.
	PaymentID param.Field[string] `json:"payment_id,required"`
	// The amount to be refunded. Must be non-negative. Optional. Partial refunds are
	// currently disabled.
	Amount param.Field[int64] `json:"amount"`
	// The reason for the refund, if any. Maximum length is 3000 characters. Optional.
	Reason param.Field[string] `json:"reason"`
}

func (RefundNewParams) MarshalJSON

func (r RefundNewParams) MarshalJSON() (data []byte, err error)

type RefundService

type RefundService struct {
	Options []option.RequestOption
}

RefundService contains methods and other services that help with interacting with the Dodo Payments API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRefundService method instead.

func NewRefundService

func NewRefundService(opts ...option.RequestOption) (r *RefundService)

NewRefundService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RefundService) Get

func (r *RefundService) Get(ctx context.Context, refundID string, opts ...option.RequestOption) (res *Refund, err error)

func (*RefundService) List

func (*RefundService) New

func (r *RefundService) New(ctx context.Context, body RefundNewParams, opts ...option.RequestOption) (res *Refund, err error)

type RefundStatus

type RefundStatus string
const (
	RefundStatusSucceeded RefundStatus = "succeeded"
	RefundStatusFailed    RefundStatus = "failed"
	RefundStatusPending   RefundStatus = "pending"
	RefundStatusReview    RefundStatus = "review"
)

func (RefundStatus) IsKnown

func (r RefundStatus) IsKnown() bool

type Subscription

type Subscription struct {
	// Timestamp when the subscription was created
	CreatedAt time.Time            `json:"created_at,required" format:"date-time"`
	Currency  SubscriptionCurrency `json:"currency,required"`
	Customer  SubscriptionCustomer `json:"customer,required"`
	Metadata  map[string]string    `json:"metadata,required"`
	// Timestamp of the next scheduled billing
	NextBillingDate time.Time `json:"next_billing_date,required" format:"date-time"`
	// Number of payment frequency intervals
	PaymentFrequencyCount    int64                                `json:"payment_frequency_count,required"`
	PaymentFrequencyInterval SubscriptionPaymentFrequencyInterval `json:"payment_frequency_interval,required"`
	// Identifier of the product associated with this subscription
	ProductID string `json:"product_id,required"`
	// Number of units/items included in the subscription
	Quantity int64 `json:"quantity,required"`
	// Amount charged before tax for each recurring payment in smallest currency unit
	// (e.g. cents)
	RecurringPreTaxAmount int64              `json:"recurring_pre_tax_amount,required"`
	Status                SubscriptionStatus `json:"status,required"`
	// Unique identifier for the subscription
	SubscriptionID string `json:"subscription_id,required"`
	// Number of subscription period intervals
	SubscriptionPeriodCount    int64                                  `json:"subscription_period_count,required"`
	SubscriptionPeriodInterval SubscriptionSubscriptionPeriodInterval `json:"subscription_period_interval,required"`
	// Indicates if the recurring_pre_tax_amount is tax inclusive
	TaxInclusive bool `json:"tax_inclusive,required"`
	// Number of days in the trial period (0 if no trial)
	TrialPeriodDays int64            `json:"trial_period_days,required"`
	JSON            subscriptionJSON `json:"-"`
}

Response struct representing subscription details

func (*Subscription) UnmarshalJSON

func (r *Subscription) UnmarshalJSON(data []byte) (err error)

type SubscriptionCurrency

type SubscriptionCurrency string
const (
	SubscriptionCurrencyAed SubscriptionCurrency = "AED"
	SubscriptionCurrencyAll SubscriptionCurrency = "ALL"
	SubscriptionCurrencyAmd SubscriptionCurrency = "AMD"
	SubscriptionCurrencyAng SubscriptionCurrency = "ANG"
	SubscriptionCurrencyAoa SubscriptionCurrency = "AOA"
	SubscriptionCurrencyArs SubscriptionCurrency = "ARS"
	SubscriptionCurrencyAud SubscriptionCurrency = "AUD"
	SubscriptionCurrencyAwg SubscriptionCurrency = "AWG"
	SubscriptionCurrencyAzn SubscriptionCurrency = "AZN"
	SubscriptionCurrencyBam SubscriptionCurrency = "BAM"
	SubscriptionCurrencyBbd SubscriptionCurrency = "BBD"
	SubscriptionCurrencyBdt SubscriptionCurrency = "BDT"
	SubscriptionCurrencyBgn SubscriptionCurrency = "BGN"
	SubscriptionCurrencyBhd SubscriptionCurrency = "BHD"
	SubscriptionCurrencyBif SubscriptionCurrency = "BIF"
	SubscriptionCurrencyBmd SubscriptionCurrency = "BMD"
	SubscriptionCurrencyBnd SubscriptionCurrency = "BND"
	SubscriptionCurrencyBob SubscriptionCurrency = "BOB"
	SubscriptionCurrencyBrl SubscriptionCurrency = "BRL"
	SubscriptionCurrencyBsd SubscriptionCurrency = "BSD"
	SubscriptionCurrencyBwp SubscriptionCurrency = "BWP"
	SubscriptionCurrencyByn SubscriptionCurrency = "BYN"
	SubscriptionCurrencyBzd SubscriptionCurrency = "BZD"
	SubscriptionCurrencyCad SubscriptionCurrency = "CAD"
	SubscriptionCurrencyChf SubscriptionCurrency = "CHF"
	SubscriptionCurrencyClp SubscriptionCurrency = "CLP"
	SubscriptionCurrencyCny SubscriptionCurrency = "CNY"
	SubscriptionCurrencyCop SubscriptionCurrency = "COP"
	SubscriptionCurrencyCrc SubscriptionCurrency = "CRC"
	SubscriptionCurrencyCup SubscriptionCurrency = "CUP"
	SubscriptionCurrencyCve SubscriptionCurrency = "CVE"
	SubscriptionCurrencyCzk SubscriptionCurrency = "CZK"
	SubscriptionCurrencyDjf SubscriptionCurrency = "DJF"
	SubscriptionCurrencyDkk SubscriptionCurrency = "DKK"
	SubscriptionCurrencyDop SubscriptionCurrency = "DOP"
	SubscriptionCurrencyDzd SubscriptionCurrency = "DZD"
	SubscriptionCurrencyEgp SubscriptionCurrency = "EGP"
	SubscriptionCurrencyEtb SubscriptionCurrency = "ETB"
	SubscriptionCurrencyEur SubscriptionCurrency = "EUR"
	SubscriptionCurrencyFjd SubscriptionCurrency = "FJD"
	SubscriptionCurrencyFkp SubscriptionCurrency = "FKP"
	SubscriptionCurrencyGbp SubscriptionCurrency = "GBP"
	SubscriptionCurrencyGel SubscriptionCurrency = "GEL"
	SubscriptionCurrencyGhs SubscriptionCurrency = "GHS"
	SubscriptionCurrencyGip SubscriptionCurrency = "GIP"
	SubscriptionCurrencyGmd SubscriptionCurrency = "GMD"
	SubscriptionCurrencyGnf SubscriptionCurrency = "GNF"
	SubscriptionCurrencyGtq SubscriptionCurrency = "GTQ"
	SubscriptionCurrencyGyd SubscriptionCurrency = "GYD"
	SubscriptionCurrencyHkd SubscriptionCurrency = "HKD"
	SubscriptionCurrencyHnl SubscriptionCurrency = "HNL"
	SubscriptionCurrencyHrk SubscriptionCurrency = "HRK"
	SubscriptionCurrencyHtg SubscriptionCurrency = "HTG"
	SubscriptionCurrencyHuf SubscriptionCurrency = "HUF"
	SubscriptionCurrencyIdr SubscriptionCurrency = "IDR"
	SubscriptionCurrencyIls SubscriptionCurrency = "ILS"
	SubscriptionCurrencyInr SubscriptionCurrency = "INR"
	SubscriptionCurrencyIqd SubscriptionCurrency = "IQD"
	SubscriptionCurrencyJmd SubscriptionCurrency = "JMD"
	SubscriptionCurrencyJod SubscriptionCurrency = "JOD"
	SubscriptionCurrencyJpy SubscriptionCurrency = "JPY"
	SubscriptionCurrencyKes SubscriptionCurrency = "KES"
	SubscriptionCurrencyKgs SubscriptionCurrency = "KGS"
	SubscriptionCurrencyKhr SubscriptionCurrency = "KHR"
	SubscriptionCurrencyKmf SubscriptionCurrency = "KMF"
	SubscriptionCurrencyKrw SubscriptionCurrency = "KRW"
	SubscriptionCurrencyKwd SubscriptionCurrency = "KWD"
	SubscriptionCurrencyKyd SubscriptionCurrency = "KYD"
	SubscriptionCurrencyKzt SubscriptionCurrency = "KZT"
	SubscriptionCurrencyLak SubscriptionCurrency = "LAK"
	SubscriptionCurrencyLbp SubscriptionCurrency = "LBP"
	SubscriptionCurrencyLkr SubscriptionCurrency = "LKR"
	SubscriptionCurrencyLrd SubscriptionCurrency = "LRD"
	SubscriptionCurrencyLsl SubscriptionCurrency = "LSL"
	SubscriptionCurrencyLyd SubscriptionCurrency = "LYD"
	SubscriptionCurrencyMad SubscriptionCurrency = "MAD"
	SubscriptionCurrencyMdl SubscriptionCurrency = "MDL"
	SubscriptionCurrencyMga SubscriptionCurrency = "MGA"
	SubscriptionCurrencyMkd SubscriptionCurrency = "MKD"
	SubscriptionCurrencyMmk SubscriptionCurrency = "MMK"
	SubscriptionCurrencyMnt SubscriptionCurrency = "MNT"
	SubscriptionCurrencyMop SubscriptionCurrency = "MOP"
	SubscriptionCurrencyMru SubscriptionCurrency = "MRU"
	SubscriptionCurrencyMur SubscriptionCurrency = "MUR"
	SubscriptionCurrencyMvr SubscriptionCurrency = "MVR"
	SubscriptionCurrencyMwk SubscriptionCurrency = "MWK"
	SubscriptionCurrencyMxn SubscriptionCurrency = "MXN"
	SubscriptionCurrencyMyr SubscriptionCurrency = "MYR"
	SubscriptionCurrencyMzn SubscriptionCurrency = "MZN"
	SubscriptionCurrencyNad SubscriptionCurrency = "NAD"
	SubscriptionCurrencyNgn SubscriptionCurrency = "NGN"
	SubscriptionCurrencyNio SubscriptionCurrency = "NIO"
	SubscriptionCurrencyNok SubscriptionCurrency = "NOK"
	SubscriptionCurrencyNpr SubscriptionCurrency = "NPR"
	SubscriptionCurrencyNzd SubscriptionCurrency = "NZD"
	SubscriptionCurrencyOmr SubscriptionCurrency = "OMR"
	SubscriptionCurrencyPab SubscriptionCurrency = "PAB"
	SubscriptionCurrencyPen SubscriptionCurrency = "PEN"
	SubscriptionCurrencyPgk SubscriptionCurrency = "PGK"
	SubscriptionCurrencyPhp SubscriptionCurrency = "PHP"
	SubscriptionCurrencyPkr SubscriptionCurrency = "PKR"
	SubscriptionCurrencyPln SubscriptionCurrency = "PLN"
	SubscriptionCurrencyPyg SubscriptionCurrency = "PYG"
	SubscriptionCurrencyQar SubscriptionCurrency = "QAR"
	SubscriptionCurrencyRon SubscriptionCurrency = "RON"
	SubscriptionCurrencyRsd SubscriptionCurrency = "RSD"
	SubscriptionCurrencyRub SubscriptionCurrency = "RUB"
	SubscriptionCurrencyRwf SubscriptionCurrency = "RWF"
	SubscriptionCurrencySar SubscriptionCurrency = "SAR"
	SubscriptionCurrencySbd SubscriptionCurrency = "SBD"
	SubscriptionCurrencyScr SubscriptionCurrency = "SCR"
	SubscriptionCurrencySek SubscriptionCurrency = "SEK"
	SubscriptionCurrencySgd SubscriptionCurrency = "SGD"
	SubscriptionCurrencyShp SubscriptionCurrency = "SHP"
	SubscriptionCurrencySle SubscriptionCurrency = "SLE"
	SubscriptionCurrencySll SubscriptionCurrency = "SLL"
	SubscriptionCurrencySos SubscriptionCurrency = "SOS"
	SubscriptionCurrencySrd SubscriptionCurrency = "SRD"
	SubscriptionCurrencySsp SubscriptionCurrency = "SSP"
	SubscriptionCurrencyStn SubscriptionCurrency = "STN"
	SubscriptionCurrencySvc SubscriptionCurrency = "SVC"
	SubscriptionCurrencySzl SubscriptionCurrency = "SZL"
	SubscriptionCurrencyThb SubscriptionCurrency = "THB"
	SubscriptionCurrencyTnd SubscriptionCurrency = "TND"
	SubscriptionCurrencyTop SubscriptionCurrency = "TOP"
	SubscriptionCurrencyTry SubscriptionCurrency = "TRY"
	SubscriptionCurrencyTtd SubscriptionCurrency = "TTD"
	SubscriptionCurrencyTwd SubscriptionCurrency = "TWD"
	SubscriptionCurrencyTzs SubscriptionCurrency = "TZS"
	SubscriptionCurrencyUah SubscriptionCurrency = "UAH"
	SubscriptionCurrencyUgx SubscriptionCurrency = "UGX"
	SubscriptionCurrencyUsd SubscriptionCurrency = "USD"
	SubscriptionCurrencyUyu SubscriptionCurrency = "UYU"
	SubscriptionCurrencyUzs SubscriptionCurrency = "UZS"
	SubscriptionCurrencyVes SubscriptionCurrency = "VES"
	SubscriptionCurrencyVnd SubscriptionCurrency = "VND"
	SubscriptionCurrencyVuv SubscriptionCurrency = "VUV"
	SubscriptionCurrencyWst SubscriptionCurrency = "WST"
	SubscriptionCurrencyXaf SubscriptionCurrency = "XAF"
	SubscriptionCurrencyXcd SubscriptionCurrency = "XCD"
	SubscriptionCurrencyXof SubscriptionCurrency = "XOF"
	SubscriptionCurrencyXpf SubscriptionCurrency = "XPF"
	SubscriptionCurrencyYer SubscriptionCurrency = "YER"
	SubscriptionCurrencyZar SubscriptionCurrency = "ZAR"
	SubscriptionCurrencyZmw SubscriptionCurrency = "ZMW"
)

func (SubscriptionCurrency) IsKnown

func (r SubscriptionCurrency) IsKnown() bool

type SubscriptionCustomer

type SubscriptionCustomer struct {
	// Unique identifier for the customer
	CustomerID string `json:"customer_id,required"`
	// Email address of the customer
	Email string `json:"email,required"`
	// Full name of the customer
	Name string                   `json:"name,required"`
	JSON subscriptionCustomerJSON `json:"-"`
}

func (*SubscriptionCustomer) UnmarshalJSON

func (r *SubscriptionCustomer) UnmarshalJSON(data []byte) (err error)

type SubscriptionListParams

type SubscriptionListParams struct {
	// Get events after this created time
	CreatedAtGte param.Field[time.Time] `query:"created_at_gte" format:"date-time"`
	// Get events created before this time
	CreatedAtLte param.Field[time.Time] `query:"created_at_lte" format:"date-time"`
	// Filter by customer id
	CustomerID param.Field[string] `query:"customer_id"`
	// Page number default is 0
	PageNumber param.Field[int64] `query:"page_number"`
	// Page size default is 10 max is 100
	PageSize param.Field[int64] `query:"page_size"`
	// Filter by status
	Status param.Field[SubscriptionListParamsStatus] `query:"status"`
}

func (SubscriptionListParams) URLQuery

func (r SubscriptionListParams) URLQuery() (v url.Values)

URLQuery serializes SubscriptionListParams's query parameters as `url.Values`.

type SubscriptionListParamsStatus added in v0.17.0

type SubscriptionListParamsStatus string

Filter by status

const (
	SubscriptionListParamsStatusPending   SubscriptionListParamsStatus = "pending"
	SubscriptionListParamsStatusActive    SubscriptionListParamsStatus = "active"
	SubscriptionListParamsStatusOnHold    SubscriptionListParamsStatus = "on_hold"
	SubscriptionListParamsStatusPaused    SubscriptionListParamsStatus = "paused"
	SubscriptionListParamsStatusCancelled SubscriptionListParamsStatus = "cancelled"
	SubscriptionListParamsStatusFailed    SubscriptionListParamsStatus = "failed"
	SubscriptionListParamsStatusExpired   SubscriptionListParamsStatus = "expired"
)

func (SubscriptionListParamsStatus) IsKnown added in v0.17.0

func (r SubscriptionListParamsStatus) IsKnown() bool

type SubscriptionNewParams

type SubscriptionNewParams struct {
	Billing  param.Field[SubscriptionNewParamsBilling]       `json:"billing,required"`
	Customer param.Field[SubscriptionNewParamsCustomerUnion] `json:"customer,required"`
	// Unique identifier of the product to subscribe to
	ProductID param.Field[string] `json:"product_id,required"`
	// Number of units to subscribe for. Must be at least 1.
	Quantity param.Field[int64]             `json:"quantity,required"`
	Metadata param.Field[map[string]string] `json:"metadata"`
	// If true, generates a payment link. Defaults to false if not specified.
	PaymentLink param.Field[bool] `json:"payment_link"`
	// Optional URL to redirect after successful subscription creation
	ReturnURL param.Field[string] `json:"return_url"`
	// Optional trial period in days If specified, this value overrides the trial
	// period set in the product's price Must be between 0 and 10000 days
	TrialPeriodDays param.Field[int64] `json:"trial_period_days"`
}

func (SubscriptionNewParams) MarshalJSON

func (r SubscriptionNewParams) MarshalJSON() (data []byte, err error)

type SubscriptionNewParamsBilling

type SubscriptionNewParamsBilling struct {
	// City name
	City param.Field[string] `json:"city,required"`
	// ISO country code alpha2 variant
	Country param.Field[CountryCode] `json:"country,required"`
	// State or province name
	State param.Field[string] `json:"state,required"`
	// Street address including house number and unit/apartment if applicable
	Street param.Field[string] `json:"street,required"`
	// Postal code or ZIP code
	Zipcode param.Field[string] `json:"zipcode,required"`
}

func (SubscriptionNewParamsBilling) MarshalJSON

func (r SubscriptionNewParamsBilling) MarshalJSON() (data []byte, err error)

type SubscriptionNewParamsCustomer

type SubscriptionNewParamsCustomer struct {
	// When false, the most recently created customer object with the given email is
	// used if exists. When true, a new customer object is always created False by
	// default
	CreateNewCustomer param.Field[bool]   `json:"create_new_customer"`
	CustomerID        param.Field[string] `json:"customer_id"`
	Email             param.Field[string] `json:"email"`
	Name              param.Field[string] `json:"name"`
	PhoneNumber       param.Field[string] `json:"phone_number"`
}

func (SubscriptionNewParamsCustomer) MarshalJSON

func (r SubscriptionNewParamsCustomer) MarshalJSON() (data []byte, err error)

type SubscriptionNewParamsCustomerAttachExistingCustomer added in v0.12.0

type SubscriptionNewParamsCustomerAttachExistingCustomer struct {
	CustomerID param.Field[string] `json:"customer_id,required"`
}

func (SubscriptionNewParamsCustomerAttachExistingCustomer) MarshalJSON added in v0.12.0

func (r SubscriptionNewParamsCustomerAttachExistingCustomer) MarshalJSON() (data []byte, err error)

type SubscriptionNewParamsCustomerCreateNewCustomer added in v0.12.0

type SubscriptionNewParamsCustomerCreateNewCustomer struct {
	Email param.Field[string] `json:"email,required"`
	Name  param.Field[string] `json:"name,required"`
	// When false, the most recently created customer object with the given email is
	// used if exists. When true, a new customer object is always created False by
	// default
	CreateNewCustomer param.Field[bool]   `json:"create_new_customer"`
	PhoneNumber       param.Field[string] `json:"phone_number"`
}

func (SubscriptionNewParamsCustomerCreateNewCustomer) MarshalJSON added in v0.12.0

func (r SubscriptionNewParamsCustomerCreateNewCustomer) MarshalJSON() (data []byte, err error)

type SubscriptionNewParamsCustomerUnion added in v0.12.0

type SubscriptionNewParamsCustomerUnion interface {
	// contains filtered or unexported methods
}

Satisfied by SubscriptionNewParamsCustomerAttachExistingCustomer, SubscriptionNewParamsCustomerCreateNewCustomer, SubscriptionNewParamsCustomer.

type SubscriptionNewResponse

type SubscriptionNewResponse struct {
	Customer SubscriptionNewResponseCustomer `json:"customer,required"`
	Metadata map[string]string               `json:"metadata,required"`
	// Tax will be added to the amount and charged to the customer on each billing
	// cycle
	RecurringPreTaxAmount int64 `json:"recurring_pre_tax_amount,required"`
	// Unique identifier for the subscription
	SubscriptionID string `json:"subscription_id,required"`
	// Client secret used to load Dodo checkout SDK NOTE : Dodo checkout SDK will be
	// coming soon
	ClientSecret string `json:"client_secret,nullable"`
	// URL to checkout page
	PaymentLink string                      `json:"payment_link,nullable"`
	JSON        subscriptionNewResponseJSON `json:"-"`
}

func (*SubscriptionNewResponse) UnmarshalJSON

func (r *SubscriptionNewResponse) UnmarshalJSON(data []byte) (err error)

type SubscriptionNewResponseCustomer

type SubscriptionNewResponseCustomer struct {
	// Unique identifier for the customer
	CustomerID string `json:"customer_id,required"`
	// Email address of the customer
	Email string `json:"email,required"`
	// Full name of the customer
	Name string                              `json:"name,required"`
	JSON subscriptionNewResponseCustomerJSON `json:"-"`
}

func (*SubscriptionNewResponseCustomer) UnmarshalJSON

func (r *SubscriptionNewResponseCustomer) UnmarshalJSON(data []byte) (err error)

type SubscriptionPaymentFrequencyInterval

type SubscriptionPaymentFrequencyInterval string
const (
	SubscriptionPaymentFrequencyIntervalDay   SubscriptionPaymentFrequencyInterval = "Day"
	SubscriptionPaymentFrequencyIntervalWeek  SubscriptionPaymentFrequencyInterval = "Week"
	SubscriptionPaymentFrequencyIntervalMonth SubscriptionPaymentFrequencyInterval = "Month"
	SubscriptionPaymentFrequencyIntervalYear  SubscriptionPaymentFrequencyInterval = "Year"
)

func (SubscriptionPaymentFrequencyInterval) IsKnown

type SubscriptionService

type SubscriptionService struct {
	Options []option.RequestOption
}

SubscriptionService contains methods and other services that help with interacting with the Dodo Payments API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSubscriptionService method instead.

func NewSubscriptionService

func NewSubscriptionService(opts ...option.RequestOption) (r *SubscriptionService)

NewSubscriptionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SubscriptionService) Get

func (r *SubscriptionService) Get(ctx context.Context, subscriptionID string, opts ...option.RequestOption) (res *Subscription, err error)

func (*SubscriptionService) List

func (*SubscriptionService) New

func (*SubscriptionService) Update

func (r *SubscriptionService) Update(ctx context.Context, subscriptionID string, body SubscriptionUpdateParams, opts ...option.RequestOption) (res *Subscription, err error)

type SubscriptionStatus

type SubscriptionStatus string
const (
	SubscriptionStatusPending   SubscriptionStatus = "pending"
	SubscriptionStatusActive    SubscriptionStatus = "active"
	SubscriptionStatusOnHold    SubscriptionStatus = "on_hold"
	SubscriptionStatusPaused    SubscriptionStatus = "paused"
	SubscriptionStatusCancelled SubscriptionStatus = "cancelled"
	SubscriptionStatusFailed    SubscriptionStatus = "failed"
	SubscriptionStatusExpired   SubscriptionStatus = "expired"
)

func (SubscriptionStatus) IsKnown

func (r SubscriptionStatus) IsKnown() bool

type SubscriptionSubscriptionPeriodInterval

type SubscriptionSubscriptionPeriodInterval string
const (
	SubscriptionSubscriptionPeriodIntervalDay   SubscriptionSubscriptionPeriodInterval = "Day"
	SubscriptionSubscriptionPeriodIntervalWeek  SubscriptionSubscriptionPeriodInterval = "Week"
	SubscriptionSubscriptionPeriodIntervalMonth SubscriptionSubscriptionPeriodInterval = "Month"
	SubscriptionSubscriptionPeriodIntervalYear  SubscriptionSubscriptionPeriodInterval = "Year"
)

func (SubscriptionSubscriptionPeriodInterval) IsKnown

type SubscriptionUpdateParams

type SubscriptionUpdateParams struct {
	Metadata param.Field[map[string]string]              `json:"metadata"`
	Status   param.Field[SubscriptionUpdateParamsStatus] `json:"status"`
}

func (SubscriptionUpdateParams) MarshalJSON

func (r SubscriptionUpdateParams) MarshalJSON() (data []byte, err error)

type SubscriptionUpdateParamsStatus

type SubscriptionUpdateParamsStatus string
const (
	SubscriptionUpdateParamsStatusPending   SubscriptionUpdateParamsStatus = "pending"
	SubscriptionUpdateParamsStatusActive    SubscriptionUpdateParamsStatus = "active"
	SubscriptionUpdateParamsStatusOnHold    SubscriptionUpdateParamsStatus = "on_hold"
	SubscriptionUpdateParamsStatusPaused    SubscriptionUpdateParamsStatus = "paused"
	SubscriptionUpdateParamsStatusCancelled SubscriptionUpdateParamsStatus = "cancelled"
	SubscriptionUpdateParamsStatusFailed    SubscriptionUpdateParamsStatus = "failed"
	SubscriptionUpdateParamsStatusExpired   SubscriptionUpdateParamsStatus = "expired"
)

func (SubscriptionUpdateParamsStatus) IsKnown

type WebhookEvent

type WebhookEvent struct {
	BusinessID        string           `json:"business_id,required"`
	CreatedAt         time.Time        `json:"created_at,required" format:"date-time"`
	EventID           string           `json:"event_id,required"`
	EventType         string           `json:"event_type,required"`
	ObjectID          string           `json:"object_id,required"`
	LatestAttemptedAt time.Time        `json:"latest_attempted_at,nullable" format:"date-time"`
	Request           string           `json:"request,nullable"`
	Response          string           `json:"response,nullable"`
	JSON              webhookEventJSON `json:"-"`
}

func (*WebhookEvent) UnmarshalJSON

func (r *WebhookEvent) UnmarshalJSON(data []byte) (err error)

type WebhookEventListParams

type WebhookEventListParams struct {
	// Get events after this created time
	CreatedAtGte param.Field[time.Time] `query:"created_at_gte" format:"date-time"`
	// Get events created before this time
	CreatedAtLte param.Field[time.Time] `query:"created_at_lte" format:"date-time"`
	// Min : 1, Max : 100, default 10
	Limit param.Field[int64] `query:"limit"`
	// Get events history of a specific object like payment/subscription/refund/dispute
	ObjectID param.Field[string] `query:"object_id"`
	// Page number default is 0
	PageNumber param.Field[int64] `query:"page_number"`
	// Page size default is 10 max is 100
	PageSize param.Field[int64] `query:"page_size"`
}

func (WebhookEventListParams) URLQuery

func (r WebhookEventListParams) URLQuery() (v url.Values)

URLQuery serializes WebhookEventListParams's query parameters as `url.Values`.

type WebhookEventService

type WebhookEventService struct {
	Options []option.RequestOption
}

WebhookEventService contains methods and other services that help with interacting with the Dodo Payments API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWebhookEventService method instead.

func NewWebhookEventService

func NewWebhookEventService(opts ...option.RequestOption) (r *WebhookEventService)

NewWebhookEventService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*WebhookEventService) Get

func (r *WebhookEventService) Get(ctx context.Context, webhookEventID string, opts ...option.RequestOption) (res *WebhookEvent, err error)

func (*WebhookEventService) List

func (*WebhookEventService) ListAutoPaging added in v0.12.0

Directories

Path Synopsis
packages

Jump to

Keyboard shortcuts

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