api

package module
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: MIT Imports: 8 Imported by: 0

README

Suward Go Library

fern shield

The Suward Go library provides convenient access to the Suward APIs from Go.

Table of Contents

Reference

A full reference for this library is available here.

Usage

Instantiate and use the client with the following:

package example

import (
    context "context"

    suwardsdkgo "github.com/crylabsorg/suward-sdk-go"
    client "github.com/crylabsorg/suward-sdk-go/client"
    option "github.com/crylabsorg/suward-sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithAPIKey(
            "<value>",
        ),
    )
    request := &suwardsdkgo.CryptopayCreatePaymentRequest{}
    client.Payments.CreatePayment(
        context.TODO(),
        request,
    )
}

Environments

You can choose between different environments by using the option.WithBaseURL option. You can configure any arbitrary base URL, which is particularly useful in test environments.

client := client.NewClient(
    option.WithBaseURL(api.Environments.Default),
)

Errors

Structured error types are returned from API calls that return non-success status codes. These errors are compatible with the errors.Is and errors.As APIs, so you can access the error like so:

response, err := client.Payments.CreatePayment(...)
if err != nil {
    var apiError *core.APIError
    if errors.As(err, apiError) {
        // Do something with the API error ...
    }
    return err
}

Request Options

A variety of request options are included to adapt the behavior of the library, which includes configuring authorization tokens, or providing your own instrumented *http.Client.

These request options can either be specified on the client so that they're applied on every request, or for an individual request, like so:

Providing your own *http.Client is recommended. Otherwise, the http.DefaultClient will be used, and your client will wait indefinitely for a response (unless the per-request, context-based timeout is used).

// Specify default options applied on every request.
client := client.NewClient(
    option.WithToken("<YOUR_API_KEY>"),
    option.WithHTTPClient(
        &http.Client{
            Timeout: 5 * time.Second,
        },
    ),
)

// Specify options for an individual request.
response, err := client.Payments.CreatePayment(
    ...,
    option.WithToken("<YOUR_API_KEY>"),
)

Advanced

Response Headers

You can access the raw HTTP response data by using the WithRawResponse field on the client. This is useful when you need to examine the response headers received from the API call. (When the endpoint is paginated, the raw HTTP response data will be included automatically in the Page response object.)

response, err := client.Payments.WithRawResponse.CreatePayment(...)
if err != nil {
    return err
}
fmt.Printf("Got response headers: %v", response.Header)
fmt.Printf("Got status code: %d", response.StatusCode)
Retries

The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long as the request is deemed retryable and the number of retry attempts has not grown larger than the configured retry limit (default: 2).

Which status codes are retried depends on the retryStatusCodes generator configuration:

legacy (current default): retries on

  • 408 (Timeout)
  • 429 (Too Many Requests)
  • 5XX (All server errors, including 500)

recommended: retries on

  • 408 (Timeout)
  • 429 (Too Many Requests)
  • 502 (Bad Gateway)
  • 503 (Service Unavailable)
  • 504 (Gateway Timeout)

If the Retry-After header is present in the response, the SDK will prioritize respecting its value exactly over the default exponential backoff.

Use the option.WithMaxAttempts option to configure this behavior for the entire client or an individual request:

client := client.NewClient(
    option.WithMaxAttempts(1),
)

response, err := client.Payments.CreatePayment(
    ...,
    option.WithMaxAttempts(1),
)
Timeouts

Setting a timeout for each individual request is as simple as using the standard context library. Setting a one second timeout for an individual API call looks like the following:

ctx, cancel := context.WithTimeout(ctx, time.Second)
defer cancel()

response, err := client.Payments.CreatePayment(ctx, ...)
Explicit Null

If you want to send the explicit null JSON value through an optional parameter, you can use the setters
that come with every object. Calling a setter method for a property will flip a bit in the explicitFields bitfield for that setter's object; during serialization, any property with a flipped bit will have its omittable status stripped, so zero or nil values will be sent explicitly rather than omitted altogether:

type ExampleRequest struct {
    // An optional string parameter.
    Name *string `json:"name,omitempty" url:"-"`

    // Private bitmask of fields set to an explicit value and therefore not to be omitted
    explicitFields *big.Int `json:"-" url:"-"`
}

request := &ExampleRequest{}
request.SetName(nil)

response, err := client.Payments.CreatePayment(ctx, request, ...)

Contributing

While we value open-source contributions to this SDK, this library is generated programmatically. Additions made directly to this library would have to be moved over to our generation code, otherwise they would be overwritten upon the next generated release. Feel free to open a PR as a proof of concept, but know that we will not be able to merge it as-is. We suggest opening an issue first to discuss with us!

On the other hand, contributions to the README are always very welcome!

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Environments = struct {
	Default string
}{
	Default: "https://api.suward.com",
}

Environments defines all of the API environments. These values can be used with the WithBaseURL RequestOption to override the client's default environment, if any.

View Source
var ErrorCodes internal.ErrorCodes = internal.ErrorCodes{
	400: func(apiError *core.APIError) error {
		return &BadRequestError{
			APIError: apiError,
		}
	},
	401: func(apiError *core.APIError) error {
		return &UnauthorizedError{
			APIError: apiError,
		}
	},
	500: func(apiError *core.APIError) error {
		return &InternalServerError{
			APIError: apiError,
		}
	},
	404: func(apiError *core.APIError) error {
		return &NotFoundError{
			APIError: apiError,
		}
	},
}

Functions

func Bool

func Bool(b bool) *bool

Bool returns a pointer to the given bool value.

func Byte

func Byte(b byte) *byte

Byte returns a pointer to the given byte value.

func Bytes

func Bytes(b []byte) *[]byte

Bytes returns a pointer to the given []byte value.

func Complex64

func Complex64(c complex64) *complex64

Complex64 returns a pointer to the given complex64 value.

func Complex128

func Complex128(c complex128) *complex128

Complex128 returns a pointer to the given complex128 value.

func Float32

func Float32(f float32) *float32

Float32 returns a pointer to the given float32 value.

func Float64

func Float64(f float64) *float64

Float64 returns a pointer to the given float64 value.

func Int

func Int(i int) *int

Int returns a pointer to the given int value.

func Int8

func Int8(i int8) *int8

Int8 returns a pointer to the given int8 value.

func Int16

func Int16(i int16) *int16

Int16 returns a pointer to the given int16 value.

func Int32

func Int32(i int32) *int32

Int32 returns a pointer to the given int32 value.

func Int64

func Int64(i int64) *int64

Int64 returns a pointer to the given int64 value.

func MustParseDate

func MustParseDate(date string) time.Time

MustParseDate attempts to parse the given string as a date time.Time, and panics upon failure.

func MustParseDateTime

func MustParseDateTime(datetime string) time.Time

MustParseDateTime attempts to parse the given string as a datetime time.Time, and panics upon failure.

func Rune

func Rune(r rune) *rune

Rune returns a pointer to the given rune value.

func String

func String(s string) *string

String returns a pointer to the given string value.

func Time

func Time(t time.Time) *time.Time

Time returns a pointer to the given time.Time value.

func UUID

func UUID(u uuid.UUID) *uuid.UUID

UUID returns a pointer to the given uuid.UUID value.

func Uint

func Uint(u uint) *uint

Uint returns a pointer to the given uint value.

func Uint8

func Uint8(u uint8) *uint8

Uint8 returns a pointer to the given uint8 value.

func Uint16

func Uint16(u uint16) *uint16

Uint16 returns a pointer to the given uint16 value.

func Uint32

func Uint32(u uint32) *uint32

Uint32 returns a pointer to the given uint32 value.

func Uint64

func Uint64(u uint64) *uint64

Uint64 returns a pointer to the given uint64 value.

func Uintptr

func Uintptr(u uintptr) *uintptr

Uintptr returns a pointer to the given uintptr value.

Types

type BadRequestError

type BadRequestError struct {
	*core.APIError
	Body *ControllerErrorResponse
}

Bad Request

func (*BadRequestError) MarshalJSON

func (b *BadRequestError) MarshalJSON() ([]byte, error)

func (*BadRequestError) UnmarshalJSON

func (b *BadRequestError) UnmarshalJSON(data []byte) error

func (*BadRequestError) Unwrap

func (b *BadRequestError) Unwrap() error

type ControllerErrorResponse

type ControllerErrorResponse struct {
	Args      []any   `json:"args,omitempty" url:"args,omitempty"`
	ErrorCode *int    `json:"errorCode,omitempty" url:"errorCode,omitempty"`
	Message   *string `json:"message,omitempty" url:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*ControllerErrorResponse) GetArgs

func (c *ControllerErrorResponse) GetArgs() []any

func (*ControllerErrorResponse) GetErrorCode

func (c *ControllerErrorResponse) GetErrorCode() *int

func (*ControllerErrorResponse) GetExtraProperties

func (c *ControllerErrorResponse) GetExtraProperties() map[string]interface{}

func (*ControllerErrorResponse) GetMessage

func (c *ControllerErrorResponse) GetMessage() *string

func (*ControllerErrorResponse) MarshalJSON

func (c *ControllerErrorResponse) MarshalJSON() ([]byte, error)

func (*ControllerErrorResponse) SetArgs

func (c *ControllerErrorResponse) SetArgs(args []any)

SetArgs sets the Args field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*ControllerErrorResponse) SetErrorCode

func (c *ControllerErrorResponse) SetErrorCode(errorCode *int)

SetErrorCode sets the ErrorCode field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*ControllerErrorResponse) SetMessage

func (c *ControllerErrorResponse) SetMessage(message *string)

SetMessage sets the Message field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*ControllerErrorResponse) String

func (c *ControllerErrorResponse) String() string

func (*ControllerErrorResponse) UnmarshalJSON

func (c *ControllerErrorResponse) UnmarshalJSON(data []byte) error

type CryptopayAssetID

type CryptopayAssetID string

Asset id-string (see GET /v1/assets), e.g. USDT_ETHEREUM.

const (
	CryptopayAssetIDUsdtEthereum           CryptopayAssetID = "USDT_ETHEREUM"
	CryptopayAssetIDUsdtArbitrum           CryptopayAssetID = "USDT_ARBITRUM"
	CryptopayAssetIDUsdtOptimism           CryptopayAssetID = "USDT_OPTIMISM"
	CryptopayAssetIDUsdtBase               CryptopayAssetID = "USDT_BASE"
	CryptopayAssetIDUsdtBsc                CryptopayAssetID = "USDT_BSC"
	CryptopayAssetIDUsdtPlasma             CryptopayAssetID = "USDT_PLASMA"
	CryptopayAssetIDUsdtPolygon            CryptopayAssetID = "USDT_POLYGON"
	CryptopayAssetIDUsdcEthereum           CryptopayAssetID = "USDC_ETHEREUM"
	CryptopayAssetIDUsdcArbitrum           CryptopayAssetID = "USDC_ARBITRUM"
	CryptopayAssetIDUsdCeArbitrum          CryptopayAssetID = "USDCE_ARBITRUM"
	CryptopayAssetIDUsdcOptimism           CryptopayAssetID = "USDC_OPTIMISM"
	CryptopayAssetIDUsdcBase               CryptopayAssetID = "USDC_BASE"
	CryptopayAssetIDUsdcBsc                CryptopayAssetID = "USDC_BSC"
	CryptopayAssetIDUsdcPlasma             CryptopayAssetID = "USDC_PLASMA"
	CryptopayAssetIDUsdcPolygon            CryptopayAssetID = "USDC_POLYGON"
	CryptopayAssetIDEthEthereum            CryptopayAssetID = "ETH_ETHEREUM"
	CryptopayAssetIDEthArbitrum            CryptopayAssetID = "ETH_ARBITRUM"
	CryptopayAssetIDEthOptimism            CryptopayAssetID = "ETH_OPTIMISM"
	CryptopayAssetIDEthBase                CryptopayAssetID = "ETH_BASE"
	CryptopayAssetIDXplPlasma              CryptopayAssetID = "XPL_PLASMA"
	CryptopayAssetIDBnbBsc                 CryptopayAssetID = "BNB_BSC"
	CryptopayAssetIDPolPolygon             CryptopayAssetID = "POL_POLYGON"
	CryptopayAssetIDTestcoinEthereum       CryptopayAssetID = "TESTCOIN_ETHEREUM"
	CryptopayAssetIDTestcoinOptimism       CryptopayAssetID = "TESTCOIN_OPTIMISM"
	CryptopayAssetIDTestcoinPlasma         CryptopayAssetID = "TESTCOIN_PLASMA"
	CryptopayAssetIDTeststablecoinEthereum CryptopayAssetID = "TESTSTABLECOIN_ETHEREUM"
	CryptopayAssetIDTeststablecoinOptimism CryptopayAssetID = "TESTSTABLECOIN_OPTIMISM"
	CryptopayAssetIDTeststablecoinPlasma   CryptopayAssetID = "TESTSTABLECOIN_PLASMA"
)

func NewCryptopayAssetIDFromString

func NewCryptopayAssetIDFromString(s string) (CryptopayAssetID, error)

func (CryptopayAssetID) Ptr

type CryptopayCreatePaymentRequest

type CryptopayCreatePaymentRequest struct {
	ActivationFlowSeconds *int                        `json:"activationFlowSeconds,omitempty" url:"-"`
	Amount                *string                     `json:"amount,omitempty" url:"-"`
	Asset                 *CryptopayAssetID           `json:"asset,omitempty" url:"-"`
	ExternalID            *string                     `json:"externalId,omitempty" url:"-"`
	IsTest                *bool                       `json:"isTest,omitempty" url:"-"`
	Metadata              map[string]any              `json:"metadata,omitempty" url:"-"`
	PaymentWindowSeconds  *int                        `json:"paymentWindowSeconds,omitempty" url:"-"`
	RedirectConfig        *CryptopayRedirectConfigDto `json:"redirectConfig,omitempty" url:"-"`
	UnderpaymentTolerance *string                     `json:"underpaymentTolerance,omitempty" url:"-"`
	WebhookURL            *string                     `json:"webhookUrl,omitempty" url:"-"`
	// contains filtered or unexported fields
}

func (*CryptopayCreatePaymentRequest) MarshalJSON

func (c *CryptopayCreatePaymentRequest) MarshalJSON() ([]byte, error)

func (*CryptopayCreatePaymentRequest) SetActivationFlowSeconds

func (c *CryptopayCreatePaymentRequest) SetActivationFlowSeconds(activationFlowSeconds *int)

SetActivationFlowSeconds sets the ActivationFlowSeconds field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayCreatePaymentRequest) SetAmount

func (c *CryptopayCreatePaymentRequest) SetAmount(amount *string)

SetAmount sets the Amount field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayCreatePaymentRequest) SetAsset

func (c *CryptopayCreatePaymentRequest) SetAsset(asset *CryptopayAssetID)

SetAsset sets the Asset field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayCreatePaymentRequest) SetExternalID

func (c *CryptopayCreatePaymentRequest) SetExternalID(externalID *string)

SetExternalID sets the ExternalID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayCreatePaymentRequest) SetIsTest

func (c *CryptopayCreatePaymentRequest) SetIsTest(isTest *bool)

SetIsTest sets the IsTest field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayCreatePaymentRequest) SetMetadata

func (c *CryptopayCreatePaymentRequest) SetMetadata(metadata map[string]any)

SetMetadata sets the Metadata field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayCreatePaymentRequest) SetPaymentWindowSeconds

func (c *CryptopayCreatePaymentRequest) SetPaymentWindowSeconds(paymentWindowSeconds *int)

SetPaymentWindowSeconds sets the PaymentWindowSeconds field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayCreatePaymentRequest) SetRedirectConfig

func (c *CryptopayCreatePaymentRequest) SetRedirectConfig(redirectConfig *CryptopayRedirectConfigDto)

SetRedirectConfig sets the RedirectConfig field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayCreatePaymentRequest) SetUnderpaymentTolerance

func (c *CryptopayCreatePaymentRequest) SetUnderpaymentTolerance(underpaymentTolerance *string)

SetUnderpaymentTolerance sets the UnderpaymentTolerance field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayCreatePaymentRequest) SetWebhookURL

func (c *CryptopayCreatePaymentRequest) SetWebhookURL(webhookURL *string)

SetWebhookURL sets the WebhookURL field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayCreatePaymentRequest) UnmarshalJSON

func (c *CryptopayCreatePaymentRequest) UnmarshalJSON(data []byte) error

type CryptopayCreateStaticWalletRequest

type CryptopayCreateStaticWalletRequest struct {
	AllowedAssets []CryptopayAssetID `json:"allowedAssets,omitempty" url:"-"`
	ExternalID    *string            `json:"externalId,omitempty" url:"-"`
	IsTest        *bool              `json:"isTest,omitempty" url:"-"`
	Metadata      map[string]any     `json:"metadata,omitempty" url:"-"`
	WebhookURL    *string            `json:"webhookUrl,omitempty" url:"-"`
	// contains filtered or unexported fields
}

func (*CryptopayCreateStaticWalletRequest) MarshalJSON

func (c *CryptopayCreateStaticWalletRequest) MarshalJSON() ([]byte, error)

func (*CryptopayCreateStaticWalletRequest) SetAllowedAssets

func (c *CryptopayCreateStaticWalletRequest) SetAllowedAssets(allowedAssets []CryptopayAssetID)

SetAllowedAssets sets the AllowedAssets field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayCreateStaticWalletRequest) SetExternalID

func (c *CryptopayCreateStaticWalletRequest) SetExternalID(externalID *string)

SetExternalID sets the ExternalID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayCreateStaticWalletRequest) SetIsTest

func (c *CryptopayCreateStaticWalletRequest) SetIsTest(isTest *bool)

SetIsTest sets the IsTest field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayCreateStaticWalletRequest) SetMetadata

func (c *CryptopayCreateStaticWalletRequest) SetMetadata(metadata map[string]any)

SetMetadata sets the Metadata field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayCreateStaticWalletRequest) SetWebhookURL

func (c *CryptopayCreateStaticWalletRequest) SetWebhookURL(webhookURL *string)

SetWebhookURL sets the WebhookURL field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayCreateStaticWalletRequest) UnmarshalJSON

func (c *CryptopayCreateStaticWalletRequest) UnmarshalJSON(data []byte) error

type CryptopayListPaymentsResponse

type CryptopayListPaymentsResponse struct {
	HasMore *bool                       `json:"hasMore,omitempty" url:"hasMore,omitempty"`
	Items   []*CryptopayPaymentResponse `json:"items,omitempty" url:"items,omitempty"`
	LastID  *string                     `json:"lastId,omitempty" url:"lastId,omitempty"`
	// contains filtered or unexported fields
}

func (*CryptopayListPaymentsResponse) GetExtraProperties

func (c *CryptopayListPaymentsResponse) GetExtraProperties() map[string]interface{}

func (*CryptopayListPaymentsResponse) GetHasMore

func (c *CryptopayListPaymentsResponse) GetHasMore() *bool

func (*CryptopayListPaymentsResponse) GetItems

func (*CryptopayListPaymentsResponse) GetLastID

func (c *CryptopayListPaymentsResponse) GetLastID() *string

func (*CryptopayListPaymentsResponse) MarshalJSON

func (c *CryptopayListPaymentsResponse) MarshalJSON() ([]byte, error)

func (*CryptopayListPaymentsResponse) SetHasMore

func (c *CryptopayListPaymentsResponse) SetHasMore(hasMore *bool)

SetHasMore sets the HasMore field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayListPaymentsResponse) SetItems

SetItems sets the Items field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayListPaymentsResponse) SetLastID

func (c *CryptopayListPaymentsResponse) SetLastID(lastID *string)

SetLastID sets the LastID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayListPaymentsResponse) String

func (*CryptopayListPaymentsResponse) UnmarshalJSON

func (c *CryptopayListPaymentsResponse) UnmarshalJSON(data []byte) error

type CryptopayListStaticDepositsResponse

type CryptopayListStaticDepositsResponse struct {
	HasMore *bool                             `json:"hasMore,omitempty" url:"hasMore,omitempty"`
	Items   []*CryptopayStaticDepositResponse `json:"items,omitempty" url:"items,omitempty"`
	LastID  *string                           `json:"lastId,omitempty" url:"lastId,omitempty"`
	// contains filtered or unexported fields
}

func (*CryptopayListStaticDepositsResponse) GetExtraProperties

func (c *CryptopayListStaticDepositsResponse) GetExtraProperties() map[string]interface{}

func (*CryptopayListStaticDepositsResponse) GetHasMore

func (c *CryptopayListStaticDepositsResponse) GetHasMore() *bool

func (*CryptopayListStaticDepositsResponse) GetItems

func (*CryptopayListStaticDepositsResponse) GetLastID

func (*CryptopayListStaticDepositsResponse) MarshalJSON

func (c *CryptopayListStaticDepositsResponse) MarshalJSON() ([]byte, error)

func (*CryptopayListStaticDepositsResponse) SetHasMore

func (c *CryptopayListStaticDepositsResponse) SetHasMore(hasMore *bool)

SetHasMore sets the HasMore field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayListStaticDepositsResponse) SetItems

SetItems sets the Items field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayListStaticDepositsResponse) SetLastID

func (c *CryptopayListStaticDepositsResponse) SetLastID(lastID *string)

SetLastID sets the LastID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayListStaticDepositsResponse) String

func (*CryptopayListStaticDepositsResponse) UnmarshalJSON

func (c *CryptopayListStaticDepositsResponse) UnmarshalJSON(data []byte) error

type CryptopayListStaticWalletsResponse

type CryptopayListStaticWalletsResponse struct {
	HasMore *bool                            `json:"hasMore,omitempty" url:"hasMore,omitempty"`
	Items   []*CryptopayStaticWalletResponse `json:"items,omitempty" url:"items,omitempty"`
	LastID  *string                          `json:"lastId,omitempty" url:"lastId,omitempty"`
	// contains filtered or unexported fields
}

func (*CryptopayListStaticWalletsResponse) GetExtraProperties

func (c *CryptopayListStaticWalletsResponse) GetExtraProperties() map[string]interface{}

func (*CryptopayListStaticWalletsResponse) GetHasMore

func (c *CryptopayListStaticWalletsResponse) GetHasMore() *bool

func (*CryptopayListStaticWalletsResponse) GetItems

func (*CryptopayListStaticWalletsResponse) GetLastID

func (*CryptopayListStaticWalletsResponse) MarshalJSON

func (c *CryptopayListStaticWalletsResponse) MarshalJSON() ([]byte, error)

func (*CryptopayListStaticWalletsResponse) SetHasMore

func (c *CryptopayListStaticWalletsResponse) SetHasMore(hasMore *bool)

SetHasMore sets the HasMore field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayListStaticWalletsResponse) SetItems

SetItems sets the Items field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayListStaticWalletsResponse) SetLastID

func (c *CryptopayListStaticWalletsResponse) SetLastID(lastID *string)

SetLastID sets the LastID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayListStaticWalletsResponse) String

func (*CryptopayListStaticWalletsResponse) UnmarshalJSON

func (c *CryptopayListStaticWalletsResponse) UnmarshalJSON(data []byte) error

type CryptopayPaymentResponse

type CryptopayPaymentResponse struct {
	AcceptedAt            *int                            `json:"acceptedAt,omitempty" url:"acceptedAt,omitempty"`
	ActivatedAt           *int                            `json:"activatedAt,omitempty" url:"activatedAt,omitempty"`
	ActivationFlowSeconds *int                            `json:"activationFlowSeconds,omitempty" url:"activationFlowSeconds,omitempty"`
	Address               *string                         `json:"address,omitempty" url:"address,omitempty"`
	Amount                *string                         `json:"amount,omitempty" url:"amount,omitempty"`
	AmountConfirmed       *string                         `json:"amountConfirmed,omitempty" url:"amountConfirmed,omitempty"`
	AmountReceived        *string                         `json:"amountReceived,omitempty" url:"amountReceived,omitempty"`
	Asset                 *CryptopayAssetID               `json:"asset,omitempty" url:"asset,omitempty"`
	CreatedAt             *int                            `json:"createdAt,omitempty" url:"createdAt,omitempty"`
	ExpiresAt             *int                            `json:"expiresAt,omitempty" url:"expiresAt,omitempty"`
	ExternalID            *string                         `json:"externalId,omitempty" url:"externalId,omitempty"`
	Fee                   *string                         `json:"fee,omitempty" url:"fee,omitempty"`
	ID                    *string                         `json:"id,omitempty" url:"id,omitempty"`
	IsTest                *bool                           `json:"isTest,omitempty" url:"isTest,omitempty"`
	Metadata              map[string]any                  `json:"metadata,omitempty" url:"metadata,omitempty"`
	NetworkFee            *string                         `json:"networkFee,omitempty" url:"networkFee,omitempty"`
	PaymentWindowSeconds  *int                            `json:"paymentWindowSeconds,omitempty" url:"paymentWindowSeconds,omitempty"`
	ProjectID             *string                         `json:"projectId,omitempty" url:"projectId,omitempty"`
	RedirectConfig        *CryptopayRedirectConfigDto     `json:"redirectConfig,omitempty" url:"redirectConfig,omitempty"`
	Status                *CryptopayPaymentStatusEnum     `json:"status,omitempty" url:"status,omitempty"`
	SubStatus             *CryptopayPaymentSubStatusEnum  `json:"subStatus,omitempty" url:"subStatus,omitempty"`
	Transactions          []*CryptopayTransactionResponse `json:"transactions,omitempty" url:"transactions,omitempty"`
	UnderpaymentTolerance *string                         `json:"underpaymentTolerance,omitempty" url:"underpaymentTolerance,omitempty"`
	UpdatedAt             *int                            `json:"updatedAt,omitempty" url:"updatedAt,omitempty"`
	WebhookURL            *string                         `json:"webhookUrl,omitempty" url:"webhookUrl,omitempty"`
	// contains filtered or unexported fields
}

func (*CryptopayPaymentResponse) GetAcceptedAt

func (c *CryptopayPaymentResponse) GetAcceptedAt() *int

func (*CryptopayPaymentResponse) GetActivatedAt

func (c *CryptopayPaymentResponse) GetActivatedAt() *int

func (*CryptopayPaymentResponse) GetActivationFlowSeconds

func (c *CryptopayPaymentResponse) GetActivationFlowSeconds() *int

func (*CryptopayPaymentResponse) GetAddress

func (c *CryptopayPaymentResponse) GetAddress() *string

func (*CryptopayPaymentResponse) GetAmount

func (c *CryptopayPaymentResponse) GetAmount() *string

func (*CryptopayPaymentResponse) GetAmountConfirmed

func (c *CryptopayPaymentResponse) GetAmountConfirmed() *string

func (*CryptopayPaymentResponse) GetAmountReceived

func (c *CryptopayPaymentResponse) GetAmountReceived() *string

func (*CryptopayPaymentResponse) GetAsset

func (*CryptopayPaymentResponse) GetCreatedAt

func (c *CryptopayPaymentResponse) GetCreatedAt() *int

func (*CryptopayPaymentResponse) GetExpiresAt

func (c *CryptopayPaymentResponse) GetExpiresAt() *int

func (*CryptopayPaymentResponse) GetExternalID

func (c *CryptopayPaymentResponse) GetExternalID() *string

func (*CryptopayPaymentResponse) GetExtraProperties

func (c *CryptopayPaymentResponse) GetExtraProperties() map[string]interface{}

func (*CryptopayPaymentResponse) GetFee

func (c *CryptopayPaymentResponse) GetFee() *string

func (*CryptopayPaymentResponse) GetID

func (c *CryptopayPaymentResponse) GetID() *string

func (*CryptopayPaymentResponse) GetIsTest

func (c *CryptopayPaymentResponse) GetIsTest() *bool

func (*CryptopayPaymentResponse) GetMetadata

func (c *CryptopayPaymentResponse) GetMetadata() map[string]any

func (*CryptopayPaymentResponse) GetNetworkFee

func (c *CryptopayPaymentResponse) GetNetworkFee() *string

func (*CryptopayPaymentResponse) GetPaymentWindowSeconds

func (c *CryptopayPaymentResponse) GetPaymentWindowSeconds() *int

func (*CryptopayPaymentResponse) GetProjectID

func (c *CryptopayPaymentResponse) GetProjectID() *string

func (*CryptopayPaymentResponse) GetRedirectConfig

func (c *CryptopayPaymentResponse) GetRedirectConfig() *CryptopayRedirectConfigDto

func (*CryptopayPaymentResponse) GetStatus

func (*CryptopayPaymentResponse) GetSubStatus

func (*CryptopayPaymentResponse) GetTransactions

func (*CryptopayPaymentResponse) GetUnderpaymentTolerance

func (c *CryptopayPaymentResponse) GetUnderpaymentTolerance() *string

func (*CryptopayPaymentResponse) GetUpdatedAt

func (c *CryptopayPaymentResponse) GetUpdatedAt() *int

func (*CryptopayPaymentResponse) GetWebhookURL

func (c *CryptopayPaymentResponse) GetWebhookURL() *string

func (*CryptopayPaymentResponse) MarshalJSON

func (c *CryptopayPaymentResponse) MarshalJSON() ([]byte, error)

func (*CryptopayPaymentResponse) SetAcceptedAt

func (c *CryptopayPaymentResponse) SetAcceptedAt(acceptedAt *int)

SetAcceptedAt sets the AcceptedAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetActivatedAt

func (c *CryptopayPaymentResponse) SetActivatedAt(activatedAt *int)

SetActivatedAt sets the ActivatedAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetActivationFlowSeconds

func (c *CryptopayPaymentResponse) SetActivationFlowSeconds(activationFlowSeconds *int)

SetActivationFlowSeconds sets the ActivationFlowSeconds field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetAddress

func (c *CryptopayPaymentResponse) SetAddress(address *string)

SetAddress sets the Address field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetAmount

func (c *CryptopayPaymentResponse) SetAmount(amount *string)

SetAmount sets the Amount field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetAmountConfirmed

func (c *CryptopayPaymentResponse) SetAmountConfirmed(amountConfirmed *string)

SetAmountConfirmed sets the AmountConfirmed field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetAmountReceived

func (c *CryptopayPaymentResponse) SetAmountReceived(amountReceived *string)

SetAmountReceived sets the AmountReceived field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetAsset

func (c *CryptopayPaymentResponse) SetAsset(asset *CryptopayAssetID)

SetAsset sets the Asset field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetCreatedAt

func (c *CryptopayPaymentResponse) SetCreatedAt(createdAt *int)

SetCreatedAt sets the CreatedAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetExpiresAt

func (c *CryptopayPaymentResponse) SetExpiresAt(expiresAt *int)

SetExpiresAt sets the ExpiresAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetExternalID

func (c *CryptopayPaymentResponse) SetExternalID(externalID *string)

SetExternalID sets the ExternalID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetFee

func (c *CryptopayPaymentResponse) SetFee(fee *string)

SetFee sets the Fee field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetID

func (c *CryptopayPaymentResponse) SetID(id *string)

SetID sets the ID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetIsTest

func (c *CryptopayPaymentResponse) SetIsTest(isTest *bool)

SetIsTest sets the IsTest field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetMetadata

func (c *CryptopayPaymentResponse) SetMetadata(metadata map[string]any)

SetMetadata sets the Metadata field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetNetworkFee

func (c *CryptopayPaymentResponse) SetNetworkFee(networkFee *string)

SetNetworkFee sets the NetworkFee field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetPaymentWindowSeconds

func (c *CryptopayPaymentResponse) SetPaymentWindowSeconds(paymentWindowSeconds *int)

SetPaymentWindowSeconds sets the PaymentWindowSeconds field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetProjectID

func (c *CryptopayPaymentResponse) SetProjectID(projectID *string)

SetProjectID sets the ProjectID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetRedirectConfig

func (c *CryptopayPaymentResponse) SetRedirectConfig(redirectConfig *CryptopayRedirectConfigDto)

SetRedirectConfig sets the RedirectConfig field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetStatus

SetStatus sets the Status field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetSubStatus

func (c *CryptopayPaymentResponse) SetSubStatus(subStatus *CryptopayPaymentSubStatusEnum)

SetSubStatus sets the SubStatus field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetTransactions

func (c *CryptopayPaymentResponse) SetTransactions(transactions []*CryptopayTransactionResponse)

SetTransactions sets the Transactions field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetUnderpaymentTolerance

func (c *CryptopayPaymentResponse) SetUnderpaymentTolerance(underpaymentTolerance *string)

SetUnderpaymentTolerance sets the UnderpaymentTolerance field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetUpdatedAt

func (c *CryptopayPaymentResponse) SetUpdatedAt(updatedAt *int)

SetUpdatedAt sets the UpdatedAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) SetWebhookURL

func (c *CryptopayPaymentResponse) SetWebhookURL(webhookURL *string)

SetWebhookURL sets the WebhookURL field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPaymentResponse) String

func (c *CryptopayPaymentResponse) String() string

func (*CryptopayPaymentResponse) UnmarshalJSON

func (c *CryptopayPaymentResponse) UnmarshalJSON(data []byte) error

type CryptopayPaymentStatusEnum

type CryptopayPaymentStatusEnum string
const (
	CryptopayPaymentStatusEnumPending  CryptopayPaymentStatusEnum = "pending"
	CryptopayPaymentStatusEnumAccepted CryptopayPaymentStatusEnum = "accepted"
	CryptopayPaymentStatusEnumSuccess  CryptopayPaymentStatusEnum = "success"
	CryptopayPaymentStatusEnumFailed   CryptopayPaymentStatusEnum = "failed"
)

func NewCryptopayPaymentStatusEnumFromString

func NewCryptopayPaymentStatusEnumFromString(s string) (CryptopayPaymentStatusEnum, error)

func (CryptopayPaymentStatusEnum) Ptr

type CryptopayPaymentSubStatusEnum

type CryptopayPaymentSubStatusEnum string
const (
	CryptopayPaymentSubStatusEnumCreated           CryptopayPaymentSubStatusEnum = "created"
	CryptopayPaymentSubStatusEnumActivated         CryptopayPaymentSubStatusEnum = "activated"
	CryptopayPaymentSubStatusEnumAwaitingPayment   CryptopayPaymentSubStatusEnum = "awaitingPayment"
	CryptopayPaymentSubStatusEnumConfirming        CryptopayPaymentSubStatusEnum = "confirming"
	CryptopayPaymentSubStatusEnumAcceptedCompleted CryptopayPaymentSubStatusEnum = "acceptedCompleted"
	CryptopayPaymentSubStatusEnumAcceptedOverpaid  CryptopayPaymentSubStatusEnum = "acceptedOverpaid"
	CryptopayPaymentSubStatusEnumAcceptedUnderpaid CryptopayPaymentSubStatusEnum = "acceptedUnderpaid"
	CryptopayPaymentSubStatusEnumCompleted         CryptopayPaymentSubStatusEnum = "completed"
	CryptopayPaymentSubStatusEnumOverpaid          CryptopayPaymentSubStatusEnum = "overpaid"
	CryptopayPaymentSubStatusEnumUnderpaid         CryptopayPaymentSubStatusEnum = "underpaid"
	CryptopayPaymentSubStatusEnumExpired           CryptopayPaymentSubStatusEnum = "expired"
	CryptopayPaymentSubStatusEnumCancelled         CryptopayPaymentSubStatusEnum = "cancelled"
	CryptopayPaymentSubStatusEnumPartiallyPaid     CryptopayPaymentSubStatusEnum = "partiallyPaid"
)

func NewCryptopayPaymentSubStatusEnumFromString

func NewCryptopayPaymentSubStatusEnumFromString(s string) (CryptopayPaymentSubStatusEnum, error)

func (CryptopayPaymentSubStatusEnum) Ptr

type CryptopayPublicPaymentResponse

type CryptopayPublicPaymentResponse struct {
	ActivatedAt           *int                           `json:"activatedAt,omitempty" url:"activatedAt,omitempty"`
	ActivationFlowSeconds *int                           `json:"activationFlowSeconds,omitempty" url:"activationFlowSeconds,omitempty"`
	Address               *string                        `json:"address,omitempty" url:"address,omitempty"`
	Amount                *string                        `json:"amount,omitempty" url:"amount,omitempty"`
	AmountReceived        *string                        `json:"amountReceived,omitempty" url:"amountReceived,omitempty"`
	Asset                 *CryptopayAssetID              `json:"asset,omitempty" url:"asset,omitempty"`
	CreatedAt             *int                           `json:"createdAt,omitempty" url:"createdAt,omitempty"`
	ExpiresAt             *int                           `json:"expiresAt,omitempty" url:"expiresAt,omitempty"`
	ID                    *string                        `json:"id,omitempty" url:"id,omitempty"`
	PaymentWindowSeconds  *int                           `json:"paymentWindowSeconds,omitempty" url:"paymentWindowSeconds,omitempty"`
	Redirect              *CryptopayPublicRedirect       `json:"redirect,omitempty" url:"redirect,omitempty"`
	Status                *CryptopayPaymentStatusEnum    `json:"status,omitempty" url:"status,omitempty"`
	SubStatus             *CryptopayPaymentSubStatusEnum `json:"subStatus,omitempty" url:"subStatus,omitempty"`
	UnderpaymentTolerance *string                        `json:"underpaymentTolerance,omitempty" url:"underpaymentTolerance,omitempty"`
	UpdatedAt             *int                           `json:"updatedAt,omitempty" url:"updatedAt,omitempty"`
	// contains filtered or unexported fields
}

func (*CryptopayPublicPaymentResponse) GetActivatedAt

func (c *CryptopayPublicPaymentResponse) GetActivatedAt() *int

func (*CryptopayPublicPaymentResponse) GetActivationFlowSeconds

func (c *CryptopayPublicPaymentResponse) GetActivationFlowSeconds() *int

func (*CryptopayPublicPaymentResponse) GetAddress

func (c *CryptopayPublicPaymentResponse) GetAddress() *string

func (*CryptopayPublicPaymentResponse) GetAmount

func (c *CryptopayPublicPaymentResponse) GetAmount() *string

func (*CryptopayPublicPaymentResponse) GetAmountReceived

func (c *CryptopayPublicPaymentResponse) GetAmountReceived() *string

func (*CryptopayPublicPaymentResponse) GetAsset

func (*CryptopayPublicPaymentResponse) GetCreatedAt

func (c *CryptopayPublicPaymentResponse) GetCreatedAt() *int

func (*CryptopayPublicPaymentResponse) GetExpiresAt

func (c *CryptopayPublicPaymentResponse) GetExpiresAt() *int

func (*CryptopayPublicPaymentResponse) GetExtraProperties

func (c *CryptopayPublicPaymentResponse) GetExtraProperties() map[string]interface{}

func (*CryptopayPublicPaymentResponse) GetID

func (*CryptopayPublicPaymentResponse) GetPaymentWindowSeconds

func (c *CryptopayPublicPaymentResponse) GetPaymentWindowSeconds() *int

func (*CryptopayPublicPaymentResponse) GetRedirect

func (*CryptopayPublicPaymentResponse) GetStatus

func (*CryptopayPublicPaymentResponse) GetSubStatus

func (*CryptopayPublicPaymentResponse) GetUnderpaymentTolerance

func (c *CryptopayPublicPaymentResponse) GetUnderpaymentTolerance() *string

func (*CryptopayPublicPaymentResponse) GetUpdatedAt

func (c *CryptopayPublicPaymentResponse) GetUpdatedAt() *int

func (*CryptopayPublicPaymentResponse) MarshalJSON

func (c *CryptopayPublicPaymentResponse) MarshalJSON() ([]byte, error)

func (*CryptopayPublicPaymentResponse) SetActivatedAt

func (c *CryptopayPublicPaymentResponse) SetActivatedAt(activatedAt *int)

SetActivatedAt sets the ActivatedAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPublicPaymentResponse) SetActivationFlowSeconds

func (c *CryptopayPublicPaymentResponse) SetActivationFlowSeconds(activationFlowSeconds *int)

SetActivationFlowSeconds sets the ActivationFlowSeconds field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPublicPaymentResponse) SetAddress

func (c *CryptopayPublicPaymentResponse) SetAddress(address *string)

SetAddress sets the Address field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPublicPaymentResponse) SetAmount

func (c *CryptopayPublicPaymentResponse) SetAmount(amount *string)

SetAmount sets the Amount field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPublicPaymentResponse) SetAmountReceived

func (c *CryptopayPublicPaymentResponse) SetAmountReceived(amountReceived *string)

SetAmountReceived sets the AmountReceived field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPublicPaymentResponse) SetAsset

SetAsset sets the Asset field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPublicPaymentResponse) SetCreatedAt

func (c *CryptopayPublicPaymentResponse) SetCreatedAt(createdAt *int)

SetCreatedAt sets the CreatedAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPublicPaymentResponse) SetExpiresAt

func (c *CryptopayPublicPaymentResponse) SetExpiresAt(expiresAt *int)

SetExpiresAt sets the ExpiresAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPublicPaymentResponse) SetID

func (c *CryptopayPublicPaymentResponse) SetID(id *string)

SetID sets the ID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPublicPaymentResponse) SetPaymentWindowSeconds

func (c *CryptopayPublicPaymentResponse) SetPaymentWindowSeconds(paymentWindowSeconds *int)

SetPaymentWindowSeconds sets the PaymentWindowSeconds field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPublicPaymentResponse) SetRedirect

func (c *CryptopayPublicPaymentResponse) SetRedirect(redirect *CryptopayPublicRedirect)

SetRedirect sets the Redirect field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPublicPaymentResponse) SetStatus

SetStatus sets the Status field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPublicPaymentResponse) SetSubStatus

SetSubStatus sets the SubStatus field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPublicPaymentResponse) SetUnderpaymentTolerance

func (c *CryptopayPublicPaymentResponse) SetUnderpaymentTolerance(underpaymentTolerance *string)

SetUnderpaymentTolerance sets the UnderpaymentTolerance field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPublicPaymentResponse) SetUpdatedAt

func (c *CryptopayPublicPaymentResponse) SetUpdatedAt(updatedAt *int)

SetUpdatedAt sets the UpdatedAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPublicPaymentResponse) String

func (*CryptopayPublicPaymentResponse) UnmarshalJSON

func (c *CryptopayPublicPaymentResponse) UnmarshalJSON(data []byte) error

type CryptopayPublicRedirect

type CryptopayPublicRedirect struct {
	Query map[string]string `json:"query,omitempty" url:"query,omitempty"`
	URL   *string           `json:"url,omitempty" url:"url,omitempty"`
	// contains filtered or unexported fields
}

func (*CryptopayPublicRedirect) GetExtraProperties

func (c *CryptopayPublicRedirect) GetExtraProperties() map[string]interface{}

func (*CryptopayPublicRedirect) GetQuery

func (c *CryptopayPublicRedirect) GetQuery() map[string]string

func (*CryptopayPublicRedirect) GetURL

func (c *CryptopayPublicRedirect) GetURL() *string

func (*CryptopayPublicRedirect) MarshalJSON

func (c *CryptopayPublicRedirect) MarshalJSON() ([]byte, error)

func (*CryptopayPublicRedirect) SetQuery

func (c *CryptopayPublicRedirect) SetQuery(query map[string]string)

SetQuery sets the Query field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPublicRedirect) SetURL

func (c *CryptopayPublicRedirect) SetURL(url *string)

SetURL sets the URL field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayPublicRedirect) String

func (c *CryptopayPublicRedirect) String() string

func (*CryptopayPublicRedirect) UnmarshalJSON

func (c *CryptopayPublicRedirect) UnmarshalJSON(data []byte) error

type CryptopayRedirectConfigDto

type CryptopayRedirectConfigDto struct {
	Data   *string                                `json:"data,omitempty" url:"data,omitempty"`
	Params []CryptopayRedirectConfigDtoParamsItem `json:"params,omitempty" url:"params,omitempty"`
	URL    *string                                `json:"url,omitempty" url:"url,omitempty"`
	// contains filtered or unexported fields
}

func (*CryptopayRedirectConfigDto) GetData

func (c *CryptopayRedirectConfigDto) GetData() *string

func (*CryptopayRedirectConfigDto) GetExtraProperties

func (c *CryptopayRedirectConfigDto) GetExtraProperties() map[string]interface{}

func (*CryptopayRedirectConfigDto) GetParams

func (*CryptopayRedirectConfigDto) GetURL

func (c *CryptopayRedirectConfigDto) GetURL() *string

func (*CryptopayRedirectConfigDto) MarshalJSON

func (c *CryptopayRedirectConfigDto) MarshalJSON() ([]byte, error)

func (*CryptopayRedirectConfigDto) SetData

func (c *CryptopayRedirectConfigDto) SetData(data *string)

SetData sets the Data field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayRedirectConfigDto) SetParams

SetParams sets the Params field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayRedirectConfigDto) SetURL

func (c *CryptopayRedirectConfigDto) SetURL(url *string)

SetURL sets the URL field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayRedirectConfigDto) String

func (c *CryptopayRedirectConfigDto) String() string

func (*CryptopayRedirectConfigDto) UnmarshalJSON

func (c *CryptopayRedirectConfigDto) UnmarshalJSON(data []byte) error

type CryptopayRedirectConfigDtoParamsItem

type CryptopayRedirectConfigDtoParamsItem string
const (
	CryptopayRedirectConfigDtoParamsItemID         CryptopayRedirectConfigDtoParamsItem = "id"
	CryptopayRedirectConfigDtoParamsItemExternalID CryptopayRedirectConfigDtoParamsItem = "externalId"
)

func NewCryptopayRedirectConfigDtoParamsItemFromString

func NewCryptopayRedirectConfigDtoParamsItemFromString(s string) (CryptopayRedirectConfigDtoParamsItem, error)

func (CryptopayRedirectConfigDtoParamsItem) Ptr

type CryptopaySimulatePaymentRequest

type CryptopaySimulatePaymentRequest struct {
	// Payment ID
	PaymentID string                         `json:"-" url:"-"`
	Amount    *string                        `json:"amount,omitempty" url:"-"`
	SubStatus *CryptopayPaymentSubStatusEnum `json:"subStatus,omitempty" url:"-"`
	// contains filtered or unexported fields
}

func (*CryptopaySimulatePaymentRequest) MarshalJSON

func (c *CryptopaySimulatePaymentRequest) MarshalJSON() ([]byte, error)

func (*CryptopaySimulatePaymentRequest) SetAmount

func (c *CryptopaySimulatePaymentRequest) SetAmount(amount *string)

SetAmount sets the Amount field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopaySimulatePaymentRequest) SetPaymentID

func (c *CryptopaySimulatePaymentRequest) SetPaymentID(paymentID string)

SetPaymentID sets the PaymentID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopaySimulatePaymentRequest) SetSubStatus

SetSubStatus sets the SubStatus field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopaySimulatePaymentRequest) UnmarshalJSON

func (c *CryptopaySimulatePaymentRequest) UnmarshalJSON(data []byte) error

type CryptopaySimulateStaticDepositRequest

type CryptopaySimulateStaticDepositRequest struct {
	// Static wallet ID
	StaticWalletID string                                       `json:"-" url:"-"`
	Amount         *string                                      `json:"amount,omitempty" url:"-"`
	Asset          *CryptopayAssetID                            `json:"asset,omitempty" url:"-"`
	Status         *CryptopaySimulateStaticDepositRequestStatus `json:"status,omitempty" url:"-"`
	TransferIndex  *string                                      `json:"transferIndex,omitempty" url:"-"`
	TxHash         *string                                      `json:"txHash,omitempty" url:"-"`
	// contains filtered or unexported fields
}

func (*CryptopaySimulateStaticDepositRequest) MarshalJSON

func (c *CryptopaySimulateStaticDepositRequest) MarshalJSON() ([]byte, error)

func (*CryptopaySimulateStaticDepositRequest) SetAmount

func (c *CryptopaySimulateStaticDepositRequest) SetAmount(amount *string)

SetAmount sets the Amount field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopaySimulateStaticDepositRequest) SetAsset

SetAsset sets the Asset field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopaySimulateStaticDepositRequest) SetStaticWalletID

func (c *CryptopaySimulateStaticDepositRequest) SetStaticWalletID(staticWalletID string)

SetStaticWalletID sets the StaticWalletID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopaySimulateStaticDepositRequest) SetStatus

SetStatus sets the Status field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopaySimulateStaticDepositRequest) SetTransferIndex

func (c *CryptopaySimulateStaticDepositRequest) SetTransferIndex(transferIndex *string)

SetTransferIndex sets the TransferIndex field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopaySimulateStaticDepositRequest) SetTxHash

func (c *CryptopaySimulateStaticDepositRequest) SetTxHash(txHash *string)

SetTxHash sets the TxHash field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopaySimulateStaticDepositRequest) UnmarshalJSON

func (c *CryptopaySimulateStaticDepositRequest) UnmarshalJSON(data []byte) error

type CryptopaySimulateStaticDepositRequestStatus

type CryptopaySimulateStaticDepositRequestStatus string
const (
	CryptopaySimulateStaticDepositRequestStatusDetected    CryptopaySimulateStaticDepositRequestStatus = "detected"
	CryptopaySimulateStaticDepositRequestStatusAccepted    CryptopaySimulateStaticDepositRequestStatus = "accepted"
	CryptopaySimulateStaticDepositRequestStatusConfirmed   CryptopaySimulateStaticDepositRequestStatus = "confirmed"
	CryptopaySimulateStaticDepositRequestStatusInvalidated CryptopaySimulateStaticDepositRequestStatus = "invalidated"
)

func NewCryptopaySimulateStaticDepositRequestStatusFromString

func NewCryptopaySimulateStaticDepositRequestStatusFromString(s string) (CryptopaySimulateStaticDepositRequestStatus, error)

func (CryptopaySimulateStaticDepositRequestStatus) Ptr

type CryptopayStaticDepositResponse

type CryptopayStaticDepositResponse struct {
	AcceptedAt  *int              `json:"acceptedAt,omitempty" url:"acceptedAt,omitempty"`
	Address     *string           `json:"address,omitempty" url:"address,omitempty"`
	Amount      *string           `json:"amount,omitempty" url:"amount,omitempty"`
	Asset       *CryptopayAssetID `json:"asset,omitempty" url:"asset,omitempty"`
	ConfirmedAt *int              `json:"confirmedAt,omitempty" url:"confirmedAt,omitempty"`
	CreatedAt   *int              `json:"createdAt,omitempty" url:"createdAt,omitempty"`
	DetectedAt  *int              `json:"detectedAt,omitempty" url:"detectedAt,omitempty"`
	// ExternalID is the static wallet's externalId, denormalized onto the deposit.
	ExternalID     *string                               `json:"externalId,omitempty" url:"externalId,omitempty"`
	Fee            *string                               `json:"fee,omitempty" url:"fee,omitempty"`
	ID             *string                               `json:"id,omitempty" url:"id,omitempty"`
	InvalidatedAt  *int                                  `json:"invalidatedAt,omitempty" url:"invalidatedAt,omitempty"`
	NetAmount      *string                               `json:"netAmount,omitempty" url:"netAmount,omitempty"`
	NetworkFee     *string                               `json:"networkFee,omitempty" url:"networkFee,omitempty"`
	ProjectID      *string                               `json:"projectId,omitempty" url:"projectId,omitempty"`
	StaticWalletID *string                               `json:"staticWalletId,omitempty" url:"staticWalletId,omitempty"`
	Status         *CryptopayStaticDepositResponseStatus `json:"status,omitempty" url:"status,omitempty"`
	TransferIndex  *string                               `json:"transferIndex,omitempty" url:"transferIndex,omitempty"`
	TxHash         *string                               `json:"txHash,omitempty" url:"txHash,omitempty"`
	UpdatedAt      *int                                  `json:"updatedAt,omitempty" url:"updatedAt,omitempty"`
	// contains filtered or unexported fields
}

func (*CryptopayStaticDepositResponse) GetAcceptedAt

func (c *CryptopayStaticDepositResponse) GetAcceptedAt() *int

func (*CryptopayStaticDepositResponse) GetAddress

func (c *CryptopayStaticDepositResponse) GetAddress() *string

func (*CryptopayStaticDepositResponse) GetAmount

func (c *CryptopayStaticDepositResponse) GetAmount() *string

func (*CryptopayStaticDepositResponse) GetAsset

func (*CryptopayStaticDepositResponse) GetConfirmedAt

func (c *CryptopayStaticDepositResponse) GetConfirmedAt() *int

func (*CryptopayStaticDepositResponse) GetCreatedAt

func (c *CryptopayStaticDepositResponse) GetCreatedAt() *int

func (*CryptopayStaticDepositResponse) GetDetectedAt

func (c *CryptopayStaticDepositResponse) GetDetectedAt() *int

func (*CryptopayStaticDepositResponse) GetExternalID

func (c *CryptopayStaticDepositResponse) GetExternalID() *string

func (*CryptopayStaticDepositResponse) GetExtraProperties

func (c *CryptopayStaticDepositResponse) GetExtraProperties() map[string]interface{}

func (*CryptopayStaticDepositResponse) GetFee

func (*CryptopayStaticDepositResponse) GetID

func (*CryptopayStaticDepositResponse) GetInvalidatedAt

func (c *CryptopayStaticDepositResponse) GetInvalidatedAt() *int

func (*CryptopayStaticDepositResponse) GetNetAmount

func (c *CryptopayStaticDepositResponse) GetNetAmount() *string

func (*CryptopayStaticDepositResponse) GetNetworkFee

func (c *CryptopayStaticDepositResponse) GetNetworkFee() *string

func (*CryptopayStaticDepositResponse) GetProjectID

func (c *CryptopayStaticDepositResponse) GetProjectID() *string

func (*CryptopayStaticDepositResponse) GetStaticWalletID

func (c *CryptopayStaticDepositResponse) GetStaticWalletID() *string

func (*CryptopayStaticDepositResponse) GetStatus

func (*CryptopayStaticDepositResponse) GetTransferIndex

func (c *CryptopayStaticDepositResponse) GetTransferIndex() *string

func (*CryptopayStaticDepositResponse) GetTxHash

func (c *CryptopayStaticDepositResponse) GetTxHash() *string

func (*CryptopayStaticDepositResponse) GetUpdatedAt

func (c *CryptopayStaticDepositResponse) GetUpdatedAt() *int

func (*CryptopayStaticDepositResponse) MarshalJSON

func (c *CryptopayStaticDepositResponse) MarshalJSON() ([]byte, error)

func (*CryptopayStaticDepositResponse) SetAcceptedAt

func (c *CryptopayStaticDepositResponse) SetAcceptedAt(acceptedAt *int)

SetAcceptedAt sets the AcceptedAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticDepositResponse) SetAddress

func (c *CryptopayStaticDepositResponse) SetAddress(address *string)

SetAddress sets the Address field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticDepositResponse) SetAmount

func (c *CryptopayStaticDepositResponse) SetAmount(amount *string)

SetAmount sets the Amount field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticDepositResponse) SetAsset

SetAsset sets the Asset field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticDepositResponse) SetConfirmedAt

func (c *CryptopayStaticDepositResponse) SetConfirmedAt(confirmedAt *int)

SetConfirmedAt sets the ConfirmedAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticDepositResponse) SetCreatedAt

func (c *CryptopayStaticDepositResponse) SetCreatedAt(createdAt *int)

SetCreatedAt sets the CreatedAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticDepositResponse) SetDetectedAt

func (c *CryptopayStaticDepositResponse) SetDetectedAt(detectedAt *int)

SetDetectedAt sets the DetectedAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticDepositResponse) SetExternalID

func (c *CryptopayStaticDepositResponse) SetExternalID(externalID *string)

SetExternalID sets the ExternalID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticDepositResponse) SetFee

func (c *CryptopayStaticDepositResponse) SetFee(fee *string)

SetFee sets the Fee field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticDepositResponse) SetID

func (c *CryptopayStaticDepositResponse) SetID(id *string)

SetID sets the ID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticDepositResponse) SetInvalidatedAt

func (c *CryptopayStaticDepositResponse) SetInvalidatedAt(invalidatedAt *int)

SetInvalidatedAt sets the InvalidatedAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticDepositResponse) SetNetAmount

func (c *CryptopayStaticDepositResponse) SetNetAmount(netAmount *string)

SetNetAmount sets the NetAmount field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticDepositResponse) SetNetworkFee

func (c *CryptopayStaticDepositResponse) SetNetworkFee(networkFee *string)

SetNetworkFee sets the NetworkFee field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticDepositResponse) SetProjectID

func (c *CryptopayStaticDepositResponse) SetProjectID(projectID *string)

SetProjectID sets the ProjectID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticDepositResponse) SetStaticWalletID

func (c *CryptopayStaticDepositResponse) SetStaticWalletID(staticWalletID *string)

SetStaticWalletID sets the StaticWalletID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticDepositResponse) SetStatus

SetStatus sets the Status field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticDepositResponse) SetTransferIndex

func (c *CryptopayStaticDepositResponse) SetTransferIndex(transferIndex *string)

SetTransferIndex sets the TransferIndex field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticDepositResponse) SetTxHash

func (c *CryptopayStaticDepositResponse) SetTxHash(txHash *string)

SetTxHash sets the TxHash field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticDepositResponse) SetUpdatedAt

func (c *CryptopayStaticDepositResponse) SetUpdatedAt(updatedAt *int)

SetUpdatedAt sets the UpdatedAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticDepositResponse) String

func (*CryptopayStaticDepositResponse) UnmarshalJSON

func (c *CryptopayStaticDepositResponse) UnmarshalJSON(data []byte) error

type CryptopayStaticDepositResponseStatus

type CryptopayStaticDepositResponseStatus string
const (
	CryptopayStaticDepositResponseStatusDetected    CryptopayStaticDepositResponseStatus = "detected"
	CryptopayStaticDepositResponseStatusAccepted    CryptopayStaticDepositResponseStatus = "accepted"
	CryptopayStaticDepositResponseStatusConfirmed   CryptopayStaticDepositResponseStatus = "confirmed"
	CryptopayStaticDepositResponseStatusIgnored     CryptopayStaticDepositResponseStatus = "ignored"
	CryptopayStaticDepositResponseStatusInvalidated CryptopayStaticDepositResponseStatus = "invalidated"
)

func NewCryptopayStaticDepositResponseStatusFromString

func NewCryptopayStaticDepositResponseStatusFromString(s string) (CryptopayStaticDepositResponseStatus, error)

func (CryptopayStaticDepositResponseStatus) Ptr

type CryptopayStaticWalletResponse

type CryptopayStaticWalletResponse struct {
	Address       *string            `json:"address,omitempty" url:"address,omitempty"`
	AllowedAssets []CryptopayAssetID `json:"allowedAssets,omitempty" url:"allowedAssets,omitempty"`
	CreatedAt     *int               `json:"createdAt,omitempty" url:"createdAt,omitempty"`
	ExternalID    *string            `json:"externalId,omitempty" url:"externalId,omitempty"`
	ID            *string            `json:"id,omitempty" url:"id,omitempty"`
	IsTest        *bool              `json:"isTest,omitempty" url:"isTest,omitempty"`
	Metadata      map[string]any     `json:"metadata,omitempty" url:"metadata,omitempty"`
	ProjectID     *string            `json:"projectId,omitempty" url:"projectId,omitempty"`
	UpdatedAt     *int               `json:"updatedAt,omitempty" url:"updatedAt,omitempty"`
	WebhookURL    *string            `json:"webhookUrl,omitempty" url:"webhookUrl,omitempty"`
	// contains filtered or unexported fields
}

func (*CryptopayStaticWalletResponse) GetAddress

func (c *CryptopayStaticWalletResponse) GetAddress() *string

func (*CryptopayStaticWalletResponse) GetAllowedAssets

func (c *CryptopayStaticWalletResponse) GetAllowedAssets() []CryptopayAssetID

func (*CryptopayStaticWalletResponse) GetCreatedAt

func (c *CryptopayStaticWalletResponse) GetCreatedAt() *int

func (*CryptopayStaticWalletResponse) GetExternalID

func (c *CryptopayStaticWalletResponse) GetExternalID() *string

func (*CryptopayStaticWalletResponse) GetExtraProperties

func (c *CryptopayStaticWalletResponse) GetExtraProperties() map[string]interface{}

func (*CryptopayStaticWalletResponse) GetID

func (*CryptopayStaticWalletResponse) GetIsTest

func (c *CryptopayStaticWalletResponse) GetIsTest() *bool

func (*CryptopayStaticWalletResponse) GetMetadata

func (c *CryptopayStaticWalletResponse) GetMetadata() map[string]any

func (*CryptopayStaticWalletResponse) GetProjectID

func (c *CryptopayStaticWalletResponse) GetProjectID() *string

func (*CryptopayStaticWalletResponse) GetUpdatedAt

func (c *CryptopayStaticWalletResponse) GetUpdatedAt() *int

func (*CryptopayStaticWalletResponse) GetWebhookURL

func (c *CryptopayStaticWalletResponse) GetWebhookURL() *string

func (*CryptopayStaticWalletResponse) MarshalJSON

func (c *CryptopayStaticWalletResponse) MarshalJSON() ([]byte, error)

func (*CryptopayStaticWalletResponse) SetAddress

func (c *CryptopayStaticWalletResponse) SetAddress(address *string)

SetAddress sets the Address field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticWalletResponse) SetAllowedAssets

func (c *CryptopayStaticWalletResponse) SetAllowedAssets(allowedAssets []CryptopayAssetID)

SetAllowedAssets sets the AllowedAssets field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticWalletResponse) SetCreatedAt

func (c *CryptopayStaticWalletResponse) SetCreatedAt(createdAt *int)

SetCreatedAt sets the CreatedAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticWalletResponse) SetExternalID

func (c *CryptopayStaticWalletResponse) SetExternalID(externalID *string)

SetExternalID sets the ExternalID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticWalletResponse) SetID

func (c *CryptopayStaticWalletResponse) SetID(id *string)

SetID sets the ID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticWalletResponse) SetIsTest

func (c *CryptopayStaticWalletResponse) SetIsTest(isTest *bool)

SetIsTest sets the IsTest field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticWalletResponse) SetMetadata

func (c *CryptopayStaticWalletResponse) SetMetadata(metadata map[string]any)

SetMetadata sets the Metadata field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticWalletResponse) SetProjectID

func (c *CryptopayStaticWalletResponse) SetProjectID(projectID *string)

SetProjectID sets the ProjectID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticWalletResponse) SetUpdatedAt

func (c *CryptopayStaticWalletResponse) SetUpdatedAt(updatedAt *int)

SetUpdatedAt sets the UpdatedAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticWalletResponse) SetWebhookURL

func (c *CryptopayStaticWalletResponse) SetWebhookURL(webhookURL *string)

SetWebhookURL sets the WebhookURL field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayStaticWalletResponse) String

func (*CryptopayStaticWalletResponse) UnmarshalJSON

func (c *CryptopayStaticWalletResponse) UnmarshalJSON(data []byte) error

type CryptopayTransactionResponse

type CryptopayTransactionResponse struct {
	AcceptedAt *int    `json:"acceptedAt,omitempty" url:"acceptedAt,omitempty"`
	Amount     *string `json:"amount,omitempty" url:"amount,omitempty"`
	DetectedAt *int    `json:"detectedAt,omitempty" url:"detectedAt,omitempty"`
	TxHash     *string `json:"txHash,omitempty" url:"txHash,omitempty"`
	// contains filtered or unexported fields
}

func (*CryptopayTransactionResponse) GetAcceptedAt

func (c *CryptopayTransactionResponse) GetAcceptedAt() *int

func (*CryptopayTransactionResponse) GetAmount

func (c *CryptopayTransactionResponse) GetAmount() *string

func (*CryptopayTransactionResponse) GetDetectedAt

func (c *CryptopayTransactionResponse) GetDetectedAt() *int

func (*CryptopayTransactionResponse) GetExtraProperties

func (c *CryptopayTransactionResponse) GetExtraProperties() map[string]interface{}

func (*CryptopayTransactionResponse) GetTxHash

func (c *CryptopayTransactionResponse) GetTxHash() *string

func (*CryptopayTransactionResponse) MarshalJSON

func (c *CryptopayTransactionResponse) MarshalJSON() ([]byte, error)

func (*CryptopayTransactionResponse) SetAcceptedAt

func (c *CryptopayTransactionResponse) SetAcceptedAt(acceptedAt *int)

SetAcceptedAt sets the AcceptedAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayTransactionResponse) SetAmount

func (c *CryptopayTransactionResponse) SetAmount(amount *string)

SetAmount sets the Amount field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayTransactionResponse) SetDetectedAt

func (c *CryptopayTransactionResponse) SetDetectedAt(detectedAt *int)

SetDetectedAt sets the DetectedAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayTransactionResponse) SetTxHash

func (c *CryptopayTransactionResponse) SetTxHash(txHash *string)

SetTxHash sets the TxHash field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayTransactionResponse) String

func (*CryptopayTransactionResponse) UnmarshalJSON

func (c *CryptopayTransactionResponse) UnmarshalJSON(data []byte) error

type CryptopayUpdateStaticWalletRequest

type CryptopayUpdateStaticWalletRequest struct {
	// Static wallet ID
	StaticWalletID string             `json:"-" url:"-"`
	AllowedAssets  []CryptopayAssetID `json:"allowedAssets,omitempty" url:"-"`
	Metadata       map[string]any     `json:"metadata,omitempty" url:"-"`
	WebhookURL     *string            `json:"webhookUrl,omitempty" url:"-"`
	// contains filtered or unexported fields
}

func (*CryptopayUpdateStaticWalletRequest) MarshalJSON

func (c *CryptopayUpdateStaticWalletRequest) MarshalJSON() ([]byte, error)

func (*CryptopayUpdateStaticWalletRequest) SetAllowedAssets

func (c *CryptopayUpdateStaticWalletRequest) SetAllowedAssets(allowedAssets []CryptopayAssetID)

SetAllowedAssets sets the AllowedAssets field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayUpdateStaticWalletRequest) SetMetadata

func (c *CryptopayUpdateStaticWalletRequest) SetMetadata(metadata map[string]any)

SetMetadata sets the Metadata field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayUpdateStaticWalletRequest) SetStaticWalletID

func (c *CryptopayUpdateStaticWalletRequest) SetStaticWalletID(staticWalletID string)

SetStaticWalletID sets the StaticWalletID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayUpdateStaticWalletRequest) SetWebhookURL

func (c *CryptopayUpdateStaticWalletRequest) SetWebhookURL(webhookURL *string)

SetWebhookURL sets the WebhookURL field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*CryptopayUpdateStaticWalletRequest) UnmarshalJSON

func (c *CryptopayUpdateStaticWalletRequest) UnmarshalJSON(data []byte) error

type DeleteV1StaticWalletsStaticWalletIDRequest

type DeleteV1StaticWalletsStaticWalletIDRequest struct {
	// Static wallet ID
	StaticWalletID string `json:"-" url:"-"`
	// contains filtered or unexported fields
}

func (*DeleteV1StaticWalletsStaticWalletIDRequest) SetStaticWalletID

func (d *DeleteV1StaticWalletsStaticWalletIDRequest) SetStaticWalletID(staticWalletID string)

SetStaticWalletID sets the StaticWalletID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

type FileParam

type FileParam struct {
	io.Reader
	// contains filtered or unexported fields
}

FileParam is a file type suitable for multipart/form-data uploads.

func NewFileParam

func NewFileParam(
	reader io.Reader,
	filename string,
	contentType string,
	opts ...FileParamOption,
) *FileParam

NewFileParam returns a *FileParam type suitable for multipart/form-data uploads. All file upload endpoints accept a simple io.Reader, which is usually created by opening a file via os.Open.

However, some endpoints require additional metadata about the file such as a specific Content-Type or custom filename. FileParam makes it easier to create the correct type signature for these endpoints.

func (*FileParam) ContentType

func (f *FileParam) ContentType() string

func (*FileParam) Name

func (f *FileParam) Name() string

type FileParamOption

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

FileParamOption adapts the behavior of the FileParam. No options are implemented yet, but this interface allows for future extensibility.

type GetV1PaymentsPaymentIDRequest

type GetV1PaymentsPaymentIDRequest struct {
	// Payment ID
	PaymentID string `json:"-" url:"-"`
	// contains filtered or unexported fields
}

func (*GetV1PaymentsPaymentIDRequest) SetPaymentID

func (g *GetV1PaymentsPaymentIDRequest) SetPaymentID(paymentID string)

SetPaymentID sets the PaymentID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

type GetV1PaymentsPaymentIDResponse

type GetV1PaymentsPaymentIDResponse struct {
	CryptopayPaymentResponse       *CryptopayPaymentResponse
	CryptopayPublicPaymentResponse *CryptopayPublicPaymentResponse
	// contains filtered or unexported fields
}

func (*GetV1PaymentsPaymentIDResponse) Accept

func (*GetV1PaymentsPaymentIDResponse) GetCryptopayPaymentResponse

func (g *GetV1PaymentsPaymentIDResponse) GetCryptopayPaymentResponse() *CryptopayPaymentResponse

func (*GetV1PaymentsPaymentIDResponse) GetCryptopayPublicPaymentResponse

func (g *GetV1PaymentsPaymentIDResponse) GetCryptopayPublicPaymentResponse() *CryptopayPublicPaymentResponse

func (GetV1PaymentsPaymentIDResponse) MarshalJSON

func (g GetV1PaymentsPaymentIDResponse) MarshalJSON() ([]byte, error)

func (*GetV1PaymentsPaymentIDResponse) UnmarshalJSON

func (g *GetV1PaymentsPaymentIDResponse) UnmarshalJSON(data []byte) error

type GetV1PaymentsPaymentIDResponseVisitor

type GetV1PaymentsPaymentIDResponseVisitor interface {
	VisitCryptopayPaymentResponse(*CryptopayPaymentResponse) error
	VisitCryptopayPublicPaymentResponse(*CryptopayPublicPaymentResponse) error
}

type GetV1PaymentsRequest

type GetV1PaymentsRequest struct {
	// Sort order (asc/desc)
	Order *GetV1PaymentsRequestOrder `json:"-" url:"order,omitempty"`
	// Limit (default 20, max 100)
	Limit *int `json:"-" url:"limit,omitempty"`
	// Last ID for pagination
	LastID *string `json:"-" url:"lastId,omitempty"`
	// contains filtered or unexported fields
}

func (*GetV1PaymentsRequest) SetLastID

func (g *GetV1PaymentsRequest) SetLastID(lastID *string)

SetLastID sets the LastID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*GetV1PaymentsRequest) SetLimit

func (g *GetV1PaymentsRequest) SetLimit(limit *int)

SetLimit sets the Limit field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*GetV1PaymentsRequest) SetOrder

func (g *GetV1PaymentsRequest) SetOrder(order *GetV1PaymentsRequestOrder)

SetOrder sets the Order field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

type GetV1PaymentsRequestOrder

type GetV1PaymentsRequestOrder string
const (
	GetV1PaymentsRequestOrderAsc  GetV1PaymentsRequestOrder = "asc"
	GetV1PaymentsRequestOrderDesc GetV1PaymentsRequestOrder = "desc"
)

func NewGetV1PaymentsRequestOrderFromString

func NewGetV1PaymentsRequestOrderFromString(s string) (GetV1PaymentsRequestOrder, error)

func (GetV1PaymentsRequestOrder) Ptr

type GetV1StaticWalletsRequest

type GetV1StaticWalletsRequest struct {
	// Sort order (asc/desc)
	Order *GetV1StaticWalletsRequestOrder `json:"-" url:"order,omitempty"`
	// Limit (default 20, max 100)
	Limit *int `json:"-" url:"limit,omitempty"`
	// Last ID for pagination
	LastID *string `json:"-" url:"lastId,omitempty"`
	// contains filtered or unexported fields
}

func (*GetV1StaticWalletsRequest) SetLastID

func (g *GetV1StaticWalletsRequest) SetLastID(lastID *string)

SetLastID sets the LastID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*GetV1StaticWalletsRequest) SetLimit

func (g *GetV1StaticWalletsRequest) SetLimit(limit *int)

SetLimit sets the Limit field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*GetV1StaticWalletsRequest) SetOrder

SetOrder sets the Order field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

type GetV1StaticWalletsRequestOrder

type GetV1StaticWalletsRequestOrder string
const (
	GetV1StaticWalletsRequestOrderAsc  GetV1StaticWalletsRequestOrder = "asc"
	GetV1StaticWalletsRequestOrderDesc GetV1StaticWalletsRequestOrder = "desc"
)

func NewGetV1StaticWalletsRequestOrderFromString

func NewGetV1StaticWalletsRequestOrderFromString(s string) (GetV1StaticWalletsRequestOrder, error)

func (GetV1StaticWalletsRequestOrder) Ptr

type GetV1StaticWalletsStaticWalletIDDepositsDepositIDRequest

type GetV1StaticWalletsStaticWalletIDDepositsDepositIDRequest struct {
	// Static wallet ID
	StaticWalletID string `json:"-" url:"-"`
	// Deposit ID
	DepositID string `json:"-" url:"-"`
	// contains filtered or unexported fields
}

func (*GetV1StaticWalletsStaticWalletIDDepositsDepositIDRequest) SetDepositID

SetDepositID sets the DepositID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*GetV1StaticWalletsStaticWalletIDDepositsDepositIDRequest) SetStaticWalletID

func (g *GetV1StaticWalletsStaticWalletIDDepositsDepositIDRequest) SetStaticWalletID(staticWalletID string)

SetStaticWalletID sets the StaticWalletID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

type GetV1StaticWalletsStaticWalletIDDepositsRequest

type GetV1StaticWalletsStaticWalletIDDepositsRequest struct {
	// Static wallet ID
	StaticWalletID string `json:"-" url:"-"`
	// Sort order (asc/desc)
	Order *GetV1StaticWalletsStaticWalletIDDepositsRequestOrder `json:"-" url:"order,omitempty"`
	// Limit (default 20, max 100)
	Limit *int `json:"-" url:"limit,omitempty"`
	// Last ID for pagination
	LastID *string `json:"-" url:"lastId,omitempty"`
	// contains filtered or unexported fields
}

func (*GetV1StaticWalletsStaticWalletIDDepositsRequest) SetLastID

SetLastID sets the LastID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*GetV1StaticWalletsStaticWalletIDDepositsRequest) SetLimit

SetLimit sets the Limit field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*GetV1StaticWalletsStaticWalletIDDepositsRequest) SetOrder

SetOrder sets the Order field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*GetV1StaticWalletsStaticWalletIDDepositsRequest) SetStaticWalletID

func (g *GetV1StaticWalletsStaticWalletIDDepositsRequest) SetStaticWalletID(staticWalletID string)

SetStaticWalletID sets the StaticWalletID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

type GetV1StaticWalletsStaticWalletIDDepositsRequestOrder

type GetV1StaticWalletsStaticWalletIDDepositsRequestOrder string
const (
	GetV1StaticWalletsStaticWalletIDDepositsRequestOrderAsc  GetV1StaticWalletsStaticWalletIDDepositsRequestOrder = "asc"
	GetV1StaticWalletsStaticWalletIDDepositsRequestOrderDesc GetV1StaticWalletsStaticWalletIDDepositsRequestOrder = "desc"
)

func NewGetV1StaticWalletsStaticWalletIDDepositsRequestOrderFromString

func NewGetV1StaticWalletsStaticWalletIDDepositsRequestOrderFromString(s string) (GetV1StaticWalletsStaticWalletIDDepositsRequestOrder, error)

func (GetV1StaticWalletsStaticWalletIDDepositsRequestOrder) Ptr

type GetV1StaticWalletsStaticWalletIDRequest

type GetV1StaticWalletsStaticWalletIDRequest struct {
	// Static wallet ID
	StaticWalletID string `json:"-" url:"-"`
	// contains filtered or unexported fields
}

func (*GetV1StaticWalletsStaticWalletIDRequest) SetStaticWalletID

func (g *GetV1StaticWalletsStaticWalletIDRequest) SetStaticWalletID(staticWalletID string)

SetStaticWalletID sets the StaticWalletID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

type InternalServerError

type InternalServerError struct {
	*core.APIError
	Body *ControllerErrorResponse
}

Internal Server Error

func (*InternalServerError) MarshalJSON

func (i *InternalServerError) MarshalJSON() ([]byte, error)

func (*InternalServerError) UnmarshalJSON

func (i *InternalServerError) UnmarshalJSON(data []byte) error

func (*InternalServerError) Unwrap

func (i *InternalServerError) Unwrap() error

type NotFoundError

type NotFoundError struct {
	*core.APIError
	Body *ControllerErrorResponse
}

Not Found

func (*NotFoundError) MarshalJSON

func (n *NotFoundError) MarshalJSON() ([]byte, error)

func (*NotFoundError) UnmarshalJSON

func (n *NotFoundError) UnmarshalJSON(data []byte) error

func (*NotFoundError) Unwrap

func (n *NotFoundError) Unwrap() error

type PostV1PaymentsPaymentIDActivateRequest

type PostV1PaymentsPaymentIDActivateRequest struct {
	// Payment ID
	PaymentID string `json:"-" url:"-"`
	// contains filtered or unexported fields
}

func (*PostV1PaymentsPaymentIDActivateRequest) SetPaymentID

func (p *PostV1PaymentsPaymentIDActivateRequest) SetPaymentID(paymentID string)

SetPaymentID sets the PaymentID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

type PostV1PaymentsPaymentIDCancelRequest

type PostV1PaymentsPaymentIDCancelRequest struct {
	// Payment ID
	PaymentID string `json:"-" url:"-"`
	// contains filtered or unexported fields
}

func (*PostV1PaymentsPaymentIDCancelRequest) SetPaymentID

func (p *PostV1PaymentsPaymentIDCancelRequest) SetPaymentID(paymentID string)

SetPaymentID sets the PaymentID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

type UnauthorizedError

type UnauthorizedError struct {
	*core.APIError
	Body *ControllerErrorResponse
}

Unauthorized

func (*UnauthorizedError) MarshalJSON

func (u *UnauthorizedError) MarshalJSON() ([]byte, error)

func (*UnauthorizedError) UnmarshalJSON

func (u *UnauthorizedError) UnmarshalJSON(data []byte) error

func (*UnauthorizedError) Unwrap

func (u *UnauthorizedError) Unwrap() error

type WebhookPaymentEvent

type WebhookPaymentEvent struct {
	Type    WebhookPaymentEventType `json:"type" url:"type"`
	EventID string                  `json:"eventId" url:"eventId"`
	// Event creation time, unix milliseconds.
	CreatedAt int64                     `json:"createdAt" url:"createdAt"`
	Payment   *CryptopayPaymentResponse `json:"payment" url:"payment"`
	// contains filtered or unexported fields
}

func (*WebhookPaymentEvent) GetCreatedAt

func (w *WebhookPaymentEvent) GetCreatedAt() int64

func (*WebhookPaymentEvent) GetEventID

func (w *WebhookPaymentEvent) GetEventID() string

func (*WebhookPaymentEvent) GetExtraProperties

func (w *WebhookPaymentEvent) GetExtraProperties() map[string]interface{}

func (*WebhookPaymentEvent) GetPayment

func (*WebhookPaymentEvent) GetType

func (*WebhookPaymentEvent) MarshalJSON

func (w *WebhookPaymentEvent) MarshalJSON() ([]byte, error)

func (*WebhookPaymentEvent) SetCreatedAt

func (w *WebhookPaymentEvent) SetCreatedAt(createdAt int64)

SetCreatedAt sets the CreatedAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*WebhookPaymentEvent) SetEventID

func (w *WebhookPaymentEvent) SetEventID(eventID string)

SetEventID sets the EventID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*WebhookPaymentEvent) SetPayment

func (w *WebhookPaymentEvent) SetPayment(payment *CryptopayPaymentResponse)

SetPayment sets the Payment field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*WebhookPaymentEvent) SetType

func (w *WebhookPaymentEvent) SetType(type_ WebhookPaymentEventType)

SetType sets the Type field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*WebhookPaymentEvent) String

func (w *WebhookPaymentEvent) String() string

func (*WebhookPaymentEvent) UnmarshalJSON

func (w *WebhookPaymentEvent) UnmarshalJSON(data []byte) error

type WebhookPaymentEventType

type WebhookPaymentEventType string
const (
	WebhookPaymentEventTypePaymentAccepted WebhookPaymentEventType = "payment.accepted"
	WebhookPaymentEventTypePaymentSuccess  WebhookPaymentEventType = "payment.success"
	WebhookPaymentEventTypePaymentFailed   WebhookPaymentEventType = "payment.failed"
)

func NewWebhookPaymentEventTypeFromString

func NewWebhookPaymentEventTypeFromString(s string) (WebhookPaymentEventType, error)

func (WebhookPaymentEventType) Ptr

type WebhookStaticDepositEvent

type WebhookStaticDepositEvent struct {
	Type    WebhookStaticDepositEventType `json:"type" url:"type"`
	EventID string                        `json:"eventId" url:"eventId"`
	// Event creation time, unix milliseconds.
	CreatedAt     int64                           `json:"createdAt" url:"createdAt"`
	StaticDeposit *CryptopayStaticDepositResponse `json:"staticDeposit" url:"staticDeposit"`
	// contains filtered or unexported fields
}

func (*WebhookStaticDepositEvent) GetCreatedAt

func (w *WebhookStaticDepositEvent) GetCreatedAt() int64

func (*WebhookStaticDepositEvent) GetEventID

func (w *WebhookStaticDepositEvent) GetEventID() string

func (*WebhookStaticDepositEvent) GetExtraProperties

func (w *WebhookStaticDepositEvent) GetExtraProperties() map[string]interface{}

func (*WebhookStaticDepositEvent) GetStaticDeposit

func (*WebhookStaticDepositEvent) GetType

func (*WebhookStaticDepositEvent) MarshalJSON

func (w *WebhookStaticDepositEvent) MarshalJSON() ([]byte, error)

func (*WebhookStaticDepositEvent) SetCreatedAt

func (w *WebhookStaticDepositEvent) SetCreatedAt(createdAt int64)

SetCreatedAt sets the CreatedAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*WebhookStaticDepositEvent) SetEventID

func (w *WebhookStaticDepositEvent) SetEventID(eventID string)

SetEventID sets the EventID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*WebhookStaticDepositEvent) SetStaticDeposit

func (w *WebhookStaticDepositEvent) SetStaticDeposit(staticDeposit *CryptopayStaticDepositResponse)

SetStaticDeposit sets the StaticDeposit field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*WebhookStaticDepositEvent) SetType

SetType sets the Type field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.

func (*WebhookStaticDepositEvent) String

func (w *WebhookStaticDepositEvent) String() string

func (*WebhookStaticDepositEvent) UnmarshalJSON

func (w *WebhookStaticDepositEvent) UnmarshalJSON(data []byte) error

type WebhookStaticDepositEventType

type WebhookStaticDepositEventType string
const (
	WebhookStaticDepositEventTypeStaticDepositAccepted WebhookStaticDepositEventType = "static_deposit.accepted"
	WebhookStaticDepositEventTypeStaticDepositSuccess  WebhookStaticDepositEventType = "static_deposit.success"
)

func NewWebhookStaticDepositEventTypeFromString

func NewWebhookStaticDepositEventTypeFromString(s string) (WebhookStaticDepositEventType, error)

func (WebhookStaticDepositEventType) Ptr

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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