Documentation
¶
Index ¶
- func Bool(b bool) param.Opt[bool]
- func BoolPtr(v bool) *bool
- func DefaultClientOptions() []option.RequestOption
- func File(rdr io.Reader, filename string, contentType string) file
- func Float(f float64) param.Opt[float64]
- func FloatPtr(v float64) *float64
- func Int(i int64) param.Opt[int64]
- func IntPtr(v int64) *int64
- func Opt[T comparable](v T) param.Opt[T]
- func Ptr[T any](v T) *T
- func String(s string) param.Opt[string]
- func StringPtr(v string) *string
- func Time(t time.Time) param.Opt[time.Time]
- func TimePtr(v time.Time) *time.Time
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, ...) error
- func (r *Client) Get(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Post(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Put(ctx context.Context, path string, params any, res any, ...) error
- type Error
- type ExperimentalPaymentFlowGetResponse
- type ExperimentalPaymentFlowNewParams
- type ExperimentalPaymentFlowNewParamsInvoiceExternalID
- type ExperimentalPaymentFlowNewParamsInvoiceID
- type ExperimentalPaymentFlowNewParamsInvoiceUnion
- type ExperimentalPaymentFlowNewParamsType
- type ExperimentalPaymentFlowNewResponse
- type ExperimentalPaymentFlowSearchParams
- type ExperimentalPaymentFlowSearchParamsPageInfo
- type ExperimentalPaymentFlowSearchResponse
- type ExperimentalPaymentFlowService
- func (r *ExperimentalPaymentFlowService) Get(ctx context.Context, paymentFlowRef string, opts ...option.RequestOption) (res *ExperimentalPaymentFlowGetResponse, err error)
- func (r *ExperimentalPaymentFlowService) New(ctx context.Context, body ExperimentalPaymentFlowNewParams, ...) (res *ExperimentalPaymentFlowNewResponse, err error)
- func (r *ExperimentalPaymentFlowService) Search(ctx context.Context, body ExperimentalPaymentFlowSearchParams, ...) (res *ExperimentalPaymentFlowSearchResponse, err error)
- type ExperimentalPaymentGetResponse
- type ExperimentalPaymentSearchParams
- type ExperimentalPaymentSearchParamsPageInfo
- type ExperimentalPaymentSearchResponse
- type ExperimentalPaymentService
- func (r *ExperimentalPaymentService) Get(ctx context.Context, paymentRef string, opts ...option.RequestOption) (res *ExperimentalPaymentGetResponse, err error)
- func (r *ExperimentalPaymentService) Search(ctx context.Context, body ExperimentalPaymentSearchParams, ...) (res *ExperimentalPaymentSearchResponse, err error)
- type ExperimentalService
- type ExternalAccount
- type ExternalAccountListResponse
- type ExternalAccountNewParams
- type ExternalAccountNewResponse
- type ExternalAccountService
- type Invoice
- type InvoiceGetResponse
- type InvoiceGetResponseData
- type InvoiceGetResponseDataBalance
- type InvoiceGetResponseDataBalanceNet
- type InvoiceGetResponseDataBalancePayins
- type InvoiceGetResponseDataBalancePayouts
- type InvoiceGetResponseDataPayment
- type InvoiceGetResponseDataPaymentTransaction
- type InvoiceGetResponseDataPaymentTransactionTag
- type InvoiceGetResponseDataPaymentUser
- type InvoiceGetResponseDataUser
- type InvoiceGetResponseDataUserBalance
- type InvoiceGetResponseDataUserBalanceNet
- type InvoiceGetResponseDataUserBalancePayins
- type InvoiceGetResponseDataUserBalancePayouts
- type InvoiceLineItem
- type InvoiceLineItemPrice
- type InvoiceLineItemTag
- type InvoiceListHistoryResponse
- type InvoiceListResponse
- type InvoiceNewParams
- type InvoiceNewParamsLineItem
- type InvoiceNewParamsLineItemPrice
- type InvoiceNewParamsLineItemTag
- type InvoiceNewParamsLineItemUserExternalID
- type InvoiceNewParamsLineItemUserID
- type InvoiceNewParamsLineItemUserUnion
- type InvoiceNewParamsTag
- type InvoiceNewResponse
- type InvoiceSearchParams
- type InvoiceSearchParamsFilter
- type InvoiceSearchParamsFilterTags
- type InvoiceSearchParamsFilterTagsAll
- type InvoiceSearchParamsFilterTagsAny
- type InvoiceSearchParamsFilterTransactionTags
- type InvoiceSearchParamsFilterTransactionTagsAll
- type InvoiceSearchParamsFilterTransactionTagsAny
- type InvoiceSearchParamsFilterUsers
- type InvoiceSearchParamsFilterUsersAllExternalID
- type InvoiceSearchParamsFilterUsersAllID
- type InvoiceSearchParamsFilterUsersAllUnion
- type InvoiceSearchParamsFilterUsersAnyExternalID
- type InvoiceSearchParamsFilterUsersAnyID
- type InvoiceSearchParamsFilterUsersAnyUnion
- type InvoiceSearchParamsPageInfo
- type InvoiceSearchResponse
- type InvoiceSearchResponseData
- type InvoiceSearchResponseDataInvoice
- type InvoiceSearchResponseDataInvoiceBalance
- type InvoiceSearchResponseDataInvoiceBalanceNet
- type InvoiceSearchResponseDataInvoiceBalancePayins
- type InvoiceSearchResponseDataInvoiceBalancePayouts
- type InvoiceSearchResponseDataInvoicePayment
- type InvoiceSearchResponseDataInvoicePaymentTransaction
- type InvoiceSearchResponseDataInvoicePaymentTransactionTag
- type InvoiceSearchResponseDataInvoicePaymentUser
- type InvoiceSearchResponseDataInvoiceUser
- type InvoiceSearchResponseDataInvoiceUserBalance
- type InvoiceSearchResponseDataInvoiceUserBalanceNet
- type InvoiceSearchResponseDataInvoiceUserBalancePayins
- type InvoiceSearchResponseDataInvoiceUserBalancePayouts
- type InvoiceSearchResponseDataPageInfo
- type InvoiceService
- func (r *InvoiceService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *InvoiceGetResponse, err error)
- func (r *InvoiceService) List(ctx context.Context, opts ...option.RequestOption) (res *InvoiceListResponse, err error)
- func (r *InvoiceService) ListHistory(ctx context.Context, id string, opts ...option.RequestOption) (res *InvoiceListHistoryResponse, err error)
- func (r *InvoiceService) New(ctx context.Context, body InvoiceNewParams, opts ...option.RequestOption) (res *InvoiceNewResponse, err error)
- func (r *InvoiceService) Search(ctx context.Context, body InvoiceSearchParams, opts ...option.RequestOption) (res *InvoiceSearchResponse, err error)
- func (r *InvoiceService) Update(ctx context.Context, id string, body InvoiceUpdateParams, ...) (res *InvoiceUpdateResponse, err error)
- type InvoiceStatus
- type InvoiceTag
- type InvoiceUpdateParams
- type InvoiceUpdateParamsLineItems
- type InvoiceUpdateParamsLineItemsCreate
- type InvoiceUpdateParamsLineItemsCreatePrice
- type InvoiceUpdateParamsLineItemsCreateTag
- type InvoiceUpdateParamsLineItemsCreateUserExternalID
- type InvoiceUpdateParamsLineItemsCreateUserID
- type InvoiceUpdateParamsLineItemsCreateUserUnion
- type InvoiceUpdateParamsLineItemsDelete
- type InvoiceUpdateParamsLineItemsUpdate
- type InvoiceUpdateParamsLineItemsUpdatePrice
- type InvoiceUpdateParamsLineItemsUpdateTags
- type InvoiceUpdateParamsLineItemsUpdateTagsCreate
- type InvoiceUpdateParamsLineItemsUpdateTagsDelete
- type InvoiceUpdateParamsLineItemsUpdateTagsSet
- type InvoiceUpdateParamsLineItemsUpdateTagsUpdate
- type InvoiceUpdateParamsTags
- type InvoiceUpdateParamsTagsCreate
- type InvoiceUpdateParamsTagsDelete
- type InvoiceUpdateParamsTagsSet
- type InvoiceUpdateParamsTagsUpdate
- type InvoiceUpdateResponse
- type Payment
- type PaymentFlow
- type PaymentFlowInvoice
- type PaymentFlowPaymentPlan
- type PaymentFlowPaymentPlanBatch
- type PaymentFlowPaymentPlanBatchPayment
- type PaymentFlowPaymentPlanBatchPaymentUser
- type Product
- type ProductGetResponse
- type ProductListResponse
- type ProductNewParams
- type ProductNewParamsPaidByRoleID
- type ProductNewParamsPaidByRoleName
- type ProductNewParamsPaidByRoleUnion
- type ProductNewParamsPaidToRoleID
- type ProductNewParamsPaidToRoleName
- type ProductNewParamsPaidToRoleUnion
- type ProductNewResponse
- type ProductPaidByRole
- type ProductPaidToRole
- type ProductService
- func (r *ProductService) Get(ctx context.Context, code string, opts ...option.RequestOption) (res *ProductGetResponse, err error)
- func (r *ProductService) List(ctx context.Context, opts ...option.RequestOption) (res *ProductListResponse, err error)
- func (r *ProductService) New(ctx context.Context, body ProductNewParams, opts ...option.RequestOption) (res *ProductNewResponse, err error)
- type Roledeprecated
- type RoleListResponsedeprecated
- type RoleNewParams
- type RoleNewResponsedeprecated
- type RoleService
- type Transaction
- type TransactionAccount
- type TransactionAllocation
- type TransactionAllocationUser
- type TransactionCurrency
- type TransactionGetResponse
- type TransactionListHistoryResponse
- type TransactionListParams
- type TransactionListParamsReconciliationStatus
- type TransactionListResponse
- type TransactionNewParams
- type TransactionNewParamsAccount
- type TransactionNewParamsAllocation
- type TransactionNewParamsAllocationUserExternalID
- type TransactionNewParamsAllocationUserID
- type TransactionNewParamsAllocationUserUnion
- type TransactionNewParamsCurrency
- type TransactionNewParamsTag
- type TransactionNewResponse
- type TransactionSearchAllocationsParams
- type TransactionSearchAllocationsParamsFilter
- type TransactionSearchAllocationsParamsFilterInvoiceID
- type TransactionSearchAllocationsResponse
- type TransactionSearchAllocationsResponseData
- type TransactionSearchAllocationsResponseDataTransaction
- type TransactionSearchAllocationsResponseDataUser
- type TransactionSearchParams
- type TransactionSearchParamsFilter
- type TransactionSearchParamsFilterAccount
- type TransactionSearchParamsFilterAccountAny
- type TransactionSearchParamsFilterTags
- type TransactionSearchParamsFilterTagsAll
- type TransactionSearchParamsFilterTagsAny
- type TransactionSearchParamsPageInfo
- type TransactionSearchResponse
- type TransactionSearchResponseDataV2
- type TransactionSearchResponseDataV2PageInfo
- type TransactionService
- func (r *TransactionService) Get(ctx context.Context, transactionRef string, opts ...option.RequestOption) (res *TransactionGetResponse, err error)
- func (r *TransactionService) List(ctx context.Context, query TransactionListParams, opts ...option.RequestOption) (res *TransactionListResponse, err error)
- func (r *TransactionService) ListHistory(ctx context.Context, transactionRef string, opts ...option.RequestOption) (res *TransactionListHistoryResponse, err error)
- func (r *TransactionService) New(ctx context.Context, body TransactionNewParams, opts ...option.RequestOption) (res *TransactionNewResponse, err error)
- func (r *TransactionService) Search(ctx context.Context, body TransactionSearchParams, ...) (res *TransactionSearchResponse, err error)
- func (r *TransactionService) SearchAllocations(ctx context.Context, body TransactionSearchAllocationsParams, ...) (res *TransactionSearchAllocationsResponse, err error)
- func (r *TransactionService) Update(ctx context.Context, transactionRef string, body TransactionUpdateParams, ...) (res *TransactionUpdateResponse, err error)
- type TransactionTag
- type TransactionUpdateParams
- type TransactionUpdateParamsAllocations
- type TransactionUpdateParamsAllocationsCreate
- type TransactionUpdateParamsAllocationsCreateUserExternalID
- type TransactionUpdateParamsAllocationsCreateUserID
- type TransactionUpdateParamsAllocationsCreateUserUnion
- type TransactionUpdateParamsAllocationsUpdate
- type TransactionUpdateParamsTags
- type TransactionUpdateParamsTagsCreate
- type TransactionUpdateParamsTagsDelete
- type TransactionUpdateParamsTagsSet
- type TransactionUpdateParamsTagsUpdate
- type TransactionUpdateResponse
- type User
- type UserListResponse
- type UserNewParams
- type UserNewParamsTag
- type UserNewResponse
- type UserService
- type UserTag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultClientOptions ¶
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (FRAGMENT_CLIENT_ID, FRAGMENT_CLIENT_SECRET, FRAGMENT_BASE_URL). This should be used to initialize new clients.
func Opt ¶
func Opt[T comparable](v T) param.Opt[T]
Types ¶
type Client ¶
type Client struct {
Experimental ExperimentalService
// External account management operations
ExternalAccounts ExternalAccountService
// Invoice management operations
Invoices InvoiceService
// Product management operations
Products ProductService
// Role management operations
Roles RoleService
// Transaction sync operations
Transactions TransactionService
// User management operations
Users UserService
// contains filtered or unexported fields
}
Client creates a struct with services and top level methods that help with interacting with the fragment API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r Client)
NewClient generates a new client with the default option read from the environment (FRAGMENT_CLIENT_ID, FRAGMENT_CLIENT_SECRET, FRAGMENT_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type ExperimentalPaymentFlowGetResponse ¶
type ExperimentalPaymentFlowGetResponse struct {
// Payment flow object.
Data PaymentFlow `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ExperimentalPaymentFlowGetResponse) RawJSON ¶
func (r ExperimentalPaymentFlowGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExperimentalPaymentFlowGetResponse) UnmarshalJSON ¶
func (r *ExperimentalPaymentFlowGetResponse) UnmarshalJSON(data []byte) error
type ExperimentalPaymentFlowNewParams ¶
type ExperimentalPaymentFlowNewParams struct {
// User-provided unique external ID.
ExternalID string `json:"external_id" api:"required"`
// Invoice to settle.
Invoice ExperimentalPaymentFlowNewParamsInvoiceUnion `json:"invoice,omitzero" api:"required"`
// Type of payment flow.
//
// Any of "single_invoice_settlement".
Type ExperimentalPaymentFlowNewParamsType `json:"type,omitzero" api:"required"`
// contains filtered or unexported fields
}
func (ExperimentalPaymentFlowNewParams) MarshalJSON ¶
func (r ExperimentalPaymentFlowNewParams) MarshalJSON() (data []byte, err error)
func (*ExperimentalPaymentFlowNewParams) UnmarshalJSON ¶
func (r *ExperimentalPaymentFlowNewParams) UnmarshalJSON(data []byte) error
type ExperimentalPaymentFlowNewParamsInvoiceExternalID ¶
type ExperimentalPaymentFlowNewParamsInvoiceExternalID struct {
// Invoice external ID.
ExternalID string `json:"external_id" api:"required"`
// contains filtered or unexported fields
}
The property ExternalID is required.
func (ExperimentalPaymentFlowNewParamsInvoiceExternalID) MarshalJSON ¶
func (r ExperimentalPaymentFlowNewParamsInvoiceExternalID) MarshalJSON() (data []byte, err error)
func (*ExperimentalPaymentFlowNewParamsInvoiceExternalID) UnmarshalJSON ¶
func (r *ExperimentalPaymentFlowNewParamsInvoiceExternalID) UnmarshalJSON(data []byte) error
type ExperimentalPaymentFlowNewParamsInvoiceID ¶
type ExperimentalPaymentFlowNewParamsInvoiceID struct {
// Fragment invoice ID.
ID string `json:"id" api:"required"`
// contains filtered or unexported fields
}
The property ID is required.
func (ExperimentalPaymentFlowNewParamsInvoiceID) MarshalJSON ¶
func (r ExperimentalPaymentFlowNewParamsInvoiceID) MarshalJSON() (data []byte, err error)
func (*ExperimentalPaymentFlowNewParamsInvoiceID) UnmarshalJSON ¶
func (r *ExperimentalPaymentFlowNewParamsInvoiceID) UnmarshalJSON(data []byte) error
type ExperimentalPaymentFlowNewParamsInvoiceUnion ¶
type ExperimentalPaymentFlowNewParamsInvoiceUnion struct {
OfExperimentalPaymentFlowNewsInvoiceID *ExperimentalPaymentFlowNewParamsInvoiceID `json:",omitzero,inline"`
OfExperimentalPaymentFlowNewsInvoiceExternalID *ExperimentalPaymentFlowNewParamsInvoiceExternalID `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ExperimentalPaymentFlowNewParamsInvoiceUnion) MarshalJSON ¶
func (u ExperimentalPaymentFlowNewParamsInvoiceUnion) MarshalJSON() ([]byte, error)
func (*ExperimentalPaymentFlowNewParamsInvoiceUnion) UnmarshalJSON ¶
func (u *ExperimentalPaymentFlowNewParamsInvoiceUnion) UnmarshalJSON(data []byte) error
type ExperimentalPaymentFlowNewParamsType ¶
type ExperimentalPaymentFlowNewParamsType string
Type of payment flow.
const (
ExperimentalPaymentFlowNewParamsTypeSingleInvoiceSettlement ExperimentalPaymentFlowNewParamsType = "single_invoice_settlement"
)
type ExperimentalPaymentFlowNewResponse ¶
type ExperimentalPaymentFlowNewResponse struct {
// Payment flow object.
Data PaymentFlow `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ExperimentalPaymentFlowNewResponse) RawJSON ¶
func (r ExperimentalPaymentFlowNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExperimentalPaymentFlowNewResponse) UnmarshalJSON ¶
func (r *ExperimentalPaymentFlowNewResponse) UnmarshalJSON(data []byte) error
type ExperimentalPaymentFlowSearchParams ¶
type ExperimentalPaymentFlowSearchParams struct {
// Filter by invoice ID.
InvoiceID param.Opt[string] `json:"invoice_id,omitzero"`
// Pagination parameters.
PageInfo ExperimentalPaymentFlowSearchParamsPageInfo `json:"page_info,omitzero"`
// contains filtered or unexported fields
}
func (ExperimentalPaymentFlowSearchParams) MarshalJSON ¶
func (r ExperimentalPaymentFlowSearchParams) MarshalJSON() (data []byte, err error)
func (*ExperimentalPaymentFlowSearchParams) UnmarshalJSON ¶
func (r *ExperimentalPaymentFlowSearchParams) UnmarshalJSON(data []byte) error
type ExperimentalPaymentFlowSearchParamsPageInfo ¶
type ExperimentalPaymentFlowSearchParamsPageInfo struct {
// Pagination cursor.
After param.Opt[string] `json:"after,omitzero"`
// Maximum number of results.
Limit param.Opt[float64] `json:"limit,omitzero"`
// contains filtered or unexported fields
}
Pagination parameters.
func (ExperimentalPaymentFlowSearchParamsPageInfo) MarshalJSON ¶
func (r ExperimentalPaymentFlowSearchParamsPageInfo) MarshalJSON() (data []byte, err error)
func (*ExperimentalPaymentFlowSearchParamsPageInfo) UnmarshalJSON ¶
func (r *ExperimentalPaymentFlowSearchParamsPageInfo) UnmarshalJSON(data []byte) error
type ExperimentalPaymentFlowSearchResponse ¶
type ExperimentalPaymentFlowSearchResponse struct {
Data []PaymentFlow `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
List of payment flows.
func (ExperimentalPaymentFlowSearchResponse) RawJSON ¶
func (r ExperimentalPaymentFlowSearchResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExperimentalPaymentFlowSearchResponse) UnmarshalJSON ¶
func (r *ExperimentalPaymentFlowSearchResponse) UnmarshalJSON(data []byte) error
type ExperimentalPaymentFlowService ¶
type ExperimentalPaymentFlowService struct {
// contains filtered or unexported fields
}
Payment flow operations
ExperimentalPaymentFlowService contains methods and other services that help with interacting with the fragment API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewExperimentalPaymentFlowService method instead.
func NewExperimentalPaymentFlowService ¶
func NewExperimentalPaymentFlowService(opts ...option.RequestOption) (r ExperimentalPaymentFlowService)
NewExperimentalPaymentFlowService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ExperimentalPaymentFlowService) Get ¶
func (r *ExperimentalPaymentFlowService) Get(ctx context.Context, paymentFlowRef string, opts ...option.RequestOption) (res *ExperimentalPaymentFlowGetResponse, err error)
Gets a payment flow by ID or external ID.
func (*ExperimentalPaymentFlowService) New ¶
func (r *ExperimentalPaymentFlowService) New(ctx context.Context, body ExperimentalPaymentFlowNewParams, opts ...option.RequestOption) (res *ExperimentalPaymentFlowNewResponse, err error)
Creates a new payment flow.
func (*ExperimentalPaymentFlowService) Search ¶
func (r *ExperimentalPaymentFlowService) Search(ctx context.Context, body ExperimentalPaymentFlowSearchParams, opts ...option.RequestOption) (res *ExperimentalPaymentFlowSearchResponse, err error)
Searches payment flows.
type ExperimentalPaymentGetResponse ¶
type ExperimentalPaymentGetResponse struct {
// Payment object.
Data Payment `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ExperimentalPaymentGetResponse) RawJSON ¶
func (r ExperimentalPaymentGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExperimentalPaymentGetResponse) UnmarshalJSON ¶
func (r *ExperimentalPaymentGetResponse) UnmarshalJSON(data []byte) error
type ExperimentalPaymentSearchParams ¶
type ExperimentalPaymentSearchParams struct {
// Filter by payment flow ID.
PaymentFlowID param.Opt[string] `json:"payment_flow_id,omitzero"`
// Pagination parameters.
PageInfo ExperimentalPaymentSearchParamsPageInfo `json:"page_info,omitzero"`
// contains filtered or unexported fields
}
func (ExperimentalPaymentSearchParams) MarshalJSON ¶
func (r ExperimentalPaymentSearchParams) MarshalJSON() (data []byte, err error)
func (*ExperimentalPaymentSearchParams) UnmarshalJSON ¶
func (r *ExperimentalPaymentSearchParams) UnmarshalJSON(data []byte) error
type ExperimentalPaymentSearchParamsPageInfo ¶
type ExperimentalPaymentSearchParamsPageInfo struct {
// Pagination cursor.
After param.Opt[string] `json:"after,omitzero"`
// Maximum number of results.
Limit param.Opt[float64] `json:"limit,omitzero"`
// contains filtered or unexported fields
}
Pagination parameters.
func (ExperimentalPaymentSearchParamsPageInfo) MarshalJSON ¶
func (r ExperimentalPaymentSearchParamsPageInfo) MarshalJSON() (data []byte, err error)
func (*ExperimentalPaymentSearchParamsPageInfo) UnmarshalJSON ¶
func (r *ExperimentalPaymentSearchParamsPageInfo) UnmarshalJSON(data []byte) error
type ExperimentalPaymentSearchResponse ¶
type ExperimentalPaymentSearchResponse struct {
Data []Payment `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
List of payments.
func (ExperimentalPaymentSearchResponse) RawJSON ¶
func (r ExperimentalPaymentSearchResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExperimentalPaymentSearchResponse) UnmarshalJSON ¶
func (r *ExperimentalPaymentSearchResponse) UnmarshalJSON(data []byte) error
type ExperimentalPaymentService ¶
type ExperimentalPaymentService struct {
// contains filtered or unexported fields
}
Payment operations
ExperimentalPaymentService contains methods and other services that help with interacting with the fragment API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewExperimentalPaymentService method instead.
func NewExperimentalPaymentService ¶
func NewExperimentalPaymentService(opts ...option.RequestOption) (r ExperimentalPaymentService)
NewExperimentalPaymentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ExperimentalPaymentService) Get ¶
func (r *ExperimentalPaymentService) Get(ctx context.Context, paymentRef string, opts ...option.RequestOption) (res *ExperimentalPaymentGetResponse, err error)
Gets a payment by ID or external ID.
func (*ExperimentalPaymentService) Search ¶
func (r *ExperimentalPaymentService) Search(ctx context.Context, body ExperimentalPaymentSearchParams, opts ...option.RequestOption) (res *ExperimentalPaymentSearchResponse, err error)
Searches payments.
type ExperimentalService ¶
type ExperimentalService struct {
// Payment flow operations
PaymentFlows ExperimentalPaymentFlowService
// Payment operations
Payments ExperimentalPaymentService
// contains filtered or unexported fields
}
ExperimentalService contains methods and other services that help with interacting with the fragment API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewExperimentalService method instead.
func NewExperimentalService ¶
func NewExperimentalService(opts ...option.RequestOption) (r ExperimentalService)
NewExperimentalService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type ExternalAccount ¶
type ExternalAccount struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// User-provided unique ID.
ExternalID string `json:"external_id" api:"required"`
// Name of the account.
Name string `json:"name" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExternalID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
External account object.
func (ExternalAccount) RawJSON ¶
func (r ExternalAccount) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExternalAccount) UnmarshalJSON ¶
func (r *ExternalAccount) UnmarshalJSON(data []byte) error
type ExternalAccountListResponse ¶
type ExternalAccountListResponse struct {
Data []ExternalAccount `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
List of external accounts.
func (ExternalAccountListResponse) RawJSON ¶
func (r ExternalAccountListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExternalAccountListResponse) UnmarshalJSON ¶
func (r *ExternalAccountListResponse) UnmarshalJSON(data []byte) error
type ExternalAccountNewParams ¶
type ExternalAccountNewParams struct {
// User-provided unique ID.
ExternalID string `json:"external_id" api:"required"`
// Name of the account.
Name string `json:"name" api:"required"`
// contains filtered or unexported fields
}
func (ExternalAccountNewParams) MarshalJSON ¶
func (r ExternalAccountNewParams) MarshalJSON() (data []byte, err error)
func (*ExternalAccountNewParams) UnmarshalJSON ¶
func (r *ExternalAccountNewParams) UnmarshalJSON(data []byte) error
type ExternalAccountNewResponse ¶
type ExternalAccountNewResponse struct {
// External account object.
Data ExternalAccount `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ExternalAccountNewResponse) RawJSON ¶
func (r ExternalAccountNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExternalAccountNewResponse) UnmarshalJSON ¶
func (r *ExternalAccountNewResponse) UnmarshalJSON(data []byte) error
type ExternalAccountService ¶
type ExternalAccountService struct {
// contains filtered or unexported fields
}
External account management operations
ExternalAccountService contains methods and other services that help with interacting with the fragment API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewExternalAccountService method instead.
func NewExternalAccountService ¶
func NewExternalAccountService(opts ...option.RequestOption) (r ExternalAccountService)
NewExternalAccountService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ExternalAccountService) List ¶
func (r *ExternalAccountService) List(ctx context.Context, opts ...option.RequestOption) (res *ExternalAccountListResponse, err error)
Lists all external accounts.
func (*ExternalAccountService) New ¶
func (r *ExternalAccountService) New(ctx context.Context, body ExternalAccountNewParams, opts ...option.RequestOption) (res *ExternalAccountNewResponse, err error)
Creates an external account.
type Invoice ¶
type Invoice struct {
// Unique invoice ID.
ID string `json:"id" api:"required"`
// Timestamp when the invoice was created. Uses ISO 8601 format.
Created time.Time `json:"created" api:"required" format:"date-time"`
// Status of the invoice. Deprecated.
//
// Any of "active".
//
// Deprecated: deprecated
Status InvoiceStatus `json:"status" api:"required"`
// Tags for the invoice.
Tags []InvoiceTag `json:"tags" api:"required"`
// Current version of the invoice.
Version float64 `json:"version" api:"required"`
// Workspace the invoice belongs to.
WorkspaceID string `json:"workspace_id" api:"required"`
// Line items for the invoice.
LineItems []InvoiceLineItem `json:"line_items"`
// Timestamp when the invoice was last modified. Uses ISO 8601 format.
Modified time.Time `json:"modified" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Created respjson.Field
Status respjson.Field
Tags respjson.Field
Version respjson.Field
WorkspaceID respjson.Field
LineItems respjson.Field
Modified respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Invoice object.
func (*Invoice) UnmarshalJSON ¶
type InvoiceGetResponse ¶
type InvoiceGetResponse struct {
// Invoice with balance details.
Data InvoiceGetResponseData `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InvoiceGetResponse) RawJSON ¶
func (r InvoiceGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceGetResponse) UnmarshalJSON ¶
func (r *InvoiceGetResponse) UnmarshalJSON(data []byte) error
type InvoiceGetResponseData ¶
type InvoiceGetResponseData struct {
// Invoice-level balances by currency.
Balances []InvoiceGetResponseDataBalance `json:"balances" api:"required"`
// Payments allocated to the invoice.
Payments []InvoiceGetResponseDataPayment `json:"payments" api:"required"`
// Users involved in the invoice.
Users []InvoiceGetResponseDataUser `json:"users" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Balances respjson.Field
Payments respjson.Field
Users respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
Invoice
}
Invoice with balance details.
func (InvoiceGetResponseData) RawJSON ¶
func (r InvoiceGetResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceGetResponseData) UnmarshalJSON ¶
func (r *InvoiceGetResponseData) UnmarshalJSON(data []byte) error
type InvoiceGetResponseDataBalance ¶
type InvoiceGetResponseDataBalance struct {
// ISO 4217 or crypto currency code.
Currency string `json:"currency" api:"required"`
// Net balance breakdown.
Net InvoiceGetResponseDataBalanceNet `json:"net" api:"required"`
// Payins balance breakdown.
Payins InvoiceGetResponseDataBalancePayins `json:"payins" api:"required"`
// Payouts balance breakdown.
Payouts InvoiceGetResponseDataBalancePayouts `json:"payouts" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Currency respjson.Field
Net respjson.Field
Payins respjson.Field
Payouts respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InvoiceGetResponseDataBalance) RawJSON ¶
func (r InvoiceGetResponseDataBalance) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceGetResponseDataBalance) UnmarshalJSON ¶
func (r *InvoiceGetResponseDataBalance) UnmarshalJSON(data []byte) error
type InvoiceGetResponseDataBalanceNet ¶
type InvoiceGetResponseDataBalanceNet struct {
// Actual amount as a string in the smallest currency unit, such as cents for USD.
Actual string `json:"actual" api:"required"`
// Expected amount as a string in the smallest currency unit, such as cents for
// USD.
Expected string `json:"expected" api:"required"`
// Remaining amount as a string in the smallest currency unit, such as cents for
// USD.
Remaining string `json:"remaining" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Actual respjson.Field
Expected respjson.Field
Remaining respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Net balance breakdown.
func (InvoiceGetResponseDataBalanceNet) RawJSON ¶
func (r InvoiceGetResponseDataBalanceNet) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceGetResponseDataBalanceNet) UnmarshalJSON ¶
func (r *InvoiceGetResponseDataBalanceNet) UnmarshalJSON(data []byte) error
type InvoiceGetResponseDataBalancePayins ¶
type InvoiceGetResponseDataBalancePayins struct {
// Actual amount as a string in the smallest currency unit, such as cents for USD.
Actual string `json:"actual" api:"required"`
// Expected amount as a string in the smallest currency unit, such as cents for
// USD.
Expected string `json:"expected" api:"required"`
// Remaining amount as a string in the smallest currency unit, such as cents for
// USD.
Remaining string `json:"remaining" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Actual respjson.Field
Expected respjson.Field
Remaining respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payins balance breakdown.
func (InvoiceGetResponseDataBalancePayins) RawJSON ¶
func (r InvoiceGetResponseDataBalancePayins) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceGetResponseDataBalancePayins) UnmarshalJSON ¶
func (r *InvoiceGetResponseDataBalancePayins) UnmarshalJSON(data []byte) error
type InvoiceGetResponseDataBalancePayouts ¶
type InvoiceGetResponseDataBalancePayouts struct {
// Actual amount as a string in the smallest currency unit, such as cents for USD.
Actual string `json:"actual" api:"required"`
// Expected amount as a string in the smallest currency unit, such as cents for
// USD.
Expected string `json:"expected" api:"required"`
// Remaining amount as a string in the smallest currency unit, such as cents for
// USD.
Remaining string `json:"remaining" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Actual respjson.Field
Expected respjson.Field
Remaining respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payouts balance breakdown.
func (InvoiceGetResponseDataBalancePayouts) RawJSON ¶
func (r InvoiceGetResponseDataBalancePayouts) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceGetResponseDataBalancePayouts) UnmarshalJSON ¶
func (r *InvoiceGetResponseDataBalancePayouts) UnmarshalJSON(data []byte) error
type InvoiceGetResponseDataPayment ¶
type InvoiceGetResponseDataPayment struct {
// Amount allocated as a string in the smallest currency unit, such as cents for
// USD.
Amount string `json:"amount" api:"required"`
// ISO 4217 or crypto currency code.
//
// Any of "ADA", "BTC", "DAI", "ETH", "SOL", "USDC", "USDT", "USDG", "EURC",
// "CADC", "CADT", "XLM", "UNI", "BCH", "LTC", "AAVE", "LINK", "MATIC", "PTS",
// "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM",
// "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN",
// "BWP", "BYR", "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUC",
// "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR",
// "FJD", "FKP", "GBP", "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD",
// "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP", "INR", "IQD", "IRR",
// "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD",
// "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", "MAD", "MDL", "MGA",
// "MKD", "MMK", "MNT", "MOP", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN", "NAD",
// "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR",
// "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG",
// "SEK", "SGD", "SHP", "SLL", "SOS", "SPL", "SRD", "SVC", "SYP", "STN", "SZL",
// "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TVD", "TWD", "TZS", "UAH",
// "UGX", "USD", "UYU", "UZS", "VEF", "VND", "VUV", "WST", "XAF", "XCD", "XOF",
// "XPF", "YER", "ZAR", "ZMW", "LOGICAL", "CUSTOM".
Currency string `json:"currency" api:"required"`
// Timestamp when the parent transaction was posted. Uses ISO 8601 format.
Posted time.Time `json:"posted" api:"required" format:"date-time"`
// Transaction the payment is applied to.
Transaction InvoiceGetResponseDataPaymentTransaction `json:"transaction" api:"required"`
// Type of the payment.
//
// Any of "payin", "payout".
Type string `json:"type" api:"required"`
// User associated with the payment.
User InvoiceGetResponseDataPaymentUser `json:"user" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Currency respjson.Field
Posted respjson.Field
Transaction respjson.Field
Type respjson.Field
User respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A payment allocated to the invoice.
func (InvoiceGetResponseDataPayment) RawJSON ¶
func (r InvoiceGetResponseDataPayment) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceGetResponseDataPayment) UnmarshalJSON ¶
func (r *InvoiceGetResponseDataPayment) UnmarshalJSON(data []byte) error
type InvoiceGetResponseDataPaymentTransaction ¶
type InvoiceGetResponseDataPaymentTransaction struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// User-provided unique ID.
ExternalID string `json:"external_id" api:"required"`
// Tags from the parent transaction.
Tags []InvoiceGetResponseDataPaymentTransactionTag `json:"tags" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExternalID respjson.Field
Tags respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Transaction the payment is applied to.
func (InvoiceGetResponseDataPaymentTransaction) RawJSON ¶
func (r InvoiceGetResponseDataPaymentTransaction) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceGetResponseDataPaymentTransaction) UnmarshalJSON ¶
func (r *InvoiceGetResponseDataPaymentTransaction) UnmarshalJSON(data []byte) error
type InvoiceGetResponseDataPaymentTransactionTag ¶
type InvoiceGetResponseDataPaymentTransactionTag struct {
// Tag key.
Key string `json:"key" api:"required"`
// Tag value.
Value string `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Key respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A key-value tag pair.
func (InvoiceGetResponseDataPaymentTransactionTag) RawJSON ¶
func (r InvoiceGetResponseDataPaymentTransactionTag) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceGetResponseDataPaymentTransactionTag) UnmarshalJSON ¶
func (r *InvoiceGetResponseDataPaymentTransactionTag) UnmarshalJSON(data []byte) error
type InvoiceGetResponseDataPaymentUser ¶
type InvoiceGetResponseDataPaymentUser struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// User-provided unique ID.
ExternalID string `json:"external_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
User associated with the payment.
func (InvoiceGetResponseDataPaymentUser) RawJSON ¶
func (r InvoiceGetResponseDataPaymentUser) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceGetResponseDataPaymentUser) UnmarshalJSON ¶
func (r *InvoiceGetResponseDataPaymentUser) UnmarshalJSON(data []byte) error
type InvoiceGetResponseDataUser ¶
type InvoiceGetResponseDataUser struct {
// User-provided unique external ID.
ID string `json:"id" api:"required"`
// Per-currency balance breakdown for the user.
Balances []InvoiceGetResponseDataUserBalance `json:"balances" api:"required"`
// User-provided unique ID.
ExternalID string `json:"external_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Balances respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InvoiceGetResponseDataUser) RawJSON ¶
func (r InvoiceGetResponseDataUser) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceGetResponseDataUser) UnmarshalJSON ¶
func (r *InvoiceGetResponseDataUser) UnmarshalJSON(data []byte) error
type InvoiceGetResponseDataUserBalance ¶
type InvoiceGetResponseDataUserBalance struct {
// ISO 4217 or crypto currency code.
Currency string `json:"currency" api:"required"`
// Net balance breakdown.
Net InvoiceGetResponseDataUserBalanceNet `json:"net" api:"required"`
// Payins balance breakdown.
Payins InvoiceGetResponseDataUserBalancePayins `json:"payins" api:"required"`
// Payouts balance breakdown.
Payouts InvoiceGetResponseDataUserBalancePayouts `json:"payouts" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Currency respjson.Field
Net respjson.Field
Payins respjson.Field
Payouts respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InvoiceGetResponseDataUserBalance) RawJSON ¶
func (r InvoiceGetResponseDataUserBalance) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceGetResponseDataUserBalance) UnmarshalJSON ¶
func (r *InvoiceGetResponseDataUserBalance) UnmarshalJSON(data []byte) error
type InvoiceGetResponseDataUserBalanceNet ¶
type InvoiceGetResponseDataUserBalanceNet struct {
// Actual amount as a string in the smallest currency unit, such as cents for USD.
Actual string `json:"actual" api:"required"`
// Expected amount as a string in the smallest currency unit, such as cents for
// USD.
Expected string `json:"expected" api:"required"`
// Remaining amount as a string in the smallest currency unit, such as cents for
// USD.
Remaining string `json:"remaining" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Actual respjson.Field
Expected respjson.Field
Remaining respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Net balance breakdown.
func (InvoiceGetResponseDataUserBalanceNet) RawJSON ¶
func (r InvoiceGetResponseDataUserBalanceNet) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceGetResponseDataUserBalanceNet) UnmarshalJSON ¶
func (r *InvoiceGetResponseDataUserBalanceNet) UnmarshalJSON(data []byte) error
type InvoiceGetResponseDataUserBalancePayins ¶
type InvoiceGetResponseDataUserBalancePayins struct {
// Actual amount as a string in the smallest currency unit, such as cents for USD.
Actual string `json:"actual" api:"required"`
// Expected amount as a string in the smallest currency unit, such as cents for
// USD.
Expected string `json:"expected" api:"required"`
// Remaining amount as a string in the smallest currency unit, such as cents for
// USD.
Remaining string `json:"remaining" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Actual respjson.Field
Expected respjson.Field
Remaining respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payins balance breakdown.
func (InvoiceGetResponseDataUserBalancePayins) RawJSON ¶
func (r InvoiceGetResponseDataUserBalancePayins) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceGetResponseDataUserBalancePayins) UnmarshalJSON ¶
func (r *InvoiceGetResponseDataUserBalancePayins) UnmarshalJSON(data []byte) error
type InvoiceGetResponseDataUserBalancePayouts ¶
type InvoiceGetResponseDataUserBalancePayouts struct {
// Actual amount as a string in the smallest currency unit, such as cents for USD.
Actual string `json:"actual" api:"required"`
// Expected amount as a string in the smallest currency unit, such as cents for
// USD.
Expected string `json:"expected" api:"required"`
// Remaining amount as a string in the smallest currency unit, such as cents for
// USD.
Remaining string `json:"remaining" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Actual respjson.Field
Expected respjson.Field
Remaining respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payouts balance breakdown.
func (InvoiceGetResponseDataUserBalancePayouts) RawJSON ¶
func (r InvoiceGetResponseDataUserBalancePayouts) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceGetResponseDataUserBalancePayouts) UnmarshalJSON ¶
func (r *InvoiceGetResponseDataUserBalancePayouts) UnmarshalJSON(data []byte) error
type InvoiceLineItem ¶
type InvoiceLineItem struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// Total amount as a string in the smallest currency unit, such as cents for USD.
// Deprecated, use price.amount instead.
//
// Deprecated: deprecated
Amount string `json:"amount" api:"required"`
// ISO 4217 or crypto currency code.
//
// Any of "ADA", "BTC", "DAI", "ETH", "SOL", "USDC", "USDT", "USDG", "EURC",
// "CADC", "CADT", "XLM", "UNI", "BCH", "LTC", "AAVE", "LINK", "MATIC", "PTS",
// "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM",
// "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN",
// "BWP", "BYR", "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUC",
// "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR",
// "FJD", "FKP", "GBP", "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD",
// "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP", "INR", "IQD", "IRR",
// "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD",
// "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", "MAD", "MDL", "MGA",
// "MKD", "MMK", "MNT", "MOP", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN", "NAD",
// "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR",
// "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG",
// "SEK", "SGD", "SHP", "SLL", "SOS", "SPL", "SRD", "SVC", "SYP", "STN", "SZL",
// "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TVD", "TWD", "TZS", "UAH",
// "UGX", "USD", "UYU", "UZS", "VEF", "VND", "VUV", "WST", "XAF", "XCD", "XOF",
// "XPF", "YER", "ZAR", "ZMW", "LOGICAL", "CUSTOM".
CurrencyCode string `json:"currency_code" api:"required"`
// Description of the line item.
Description string `json:"description" api:"required"`
// Price breakdown.
Price InvoiceLineItemPrice `json:"price" api:"required"`
// Unique identifier for the product.
ProductID string `json:"product_id" api:"required"`
// Tags for the line item.
Tags []InvoiceLineItemTag `json:"tags" api:"required"`
// Type of the line item.
//
// Any of "payin", "payout".
Type string `json:"type" api:"required"`
// User-provided unique external ID.
UserID string `json:"user_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Amount respjson.Field
CurrencyCode respjson.Field
Description respjson.Field
Price respjson.Field
ProductID respjson.Field
Tags respjson.Field
Type respjson.Field
UserID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Invoice line item.
func (InvoiceLineItem) RawJSON ¶
func (r InvoiceLineItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceLineItem) UnmarshalJSON ¶
func (r *InvoiceLineItem) UnmarshalJSON(data []byte) error
type InvoiceLineItemPrice ¶
type InvoiceLineItemPrice struct {
// Total amount as a string in the smallest currency unit, such as cents for USD.
Amount string `json:"amount" api:"required"`
// Number of units.
Quantity int64 `json:"quantity" api:"required"`
// Unit price as a string in the smallest currency unit, such as cents for USD.
UnitPrice string `json:"unit_price" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Quantity respjson.Field
UnitPrice respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Price breakdown.
func (InvoiceLineItemPrice) RawJSON ¶
func (r InvoiceLineItemPrice) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceLineItemPrice) UnmarshalJSON ¶
func (r *InvoiceLineItemPrice) UnmarshalJSON(data []byte) error
type InvoiceLineItemTag ¶
type InvoiceLineItemTag struct {
// Tag key.
Key string `json:"key" api:"required"`
// Tag value.
Value string `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Key respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A key-value tag pair.
func (InvoiceLineItemTag) RawJSON ¶
func (r InvoiceLineItemTag) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceLineItemTag) UnmarshalJSON ¶
func (r *InvoiceLineItemTag) UnmarshalJSON(data []byte) error
type InvoiceListHistoryResponse ¶
type InvoiceListHistoryResponse struct {
// Version history of the invoice.
Data []Invoice `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InvoiceListHistoryResponse) RawJSON ¶
func (r InvoiceListHistoryResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceListHistoryResponse) UnmarshalJSON ¶
func (r *InvoiceListHistoryResponse) UnmarshalJSON(data []byte) error
type InvoiceListResponse ¶
type InvoiceListResponse struct {
// List of invoices.
Data []Invoice `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InvoiceListResponse) RawJSON ¶
func (r InvoiceListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceListResponse) UnmarshalJSON ¶
func (r *InvoiceListResponse) UnmarshalJSON(data []byte) error
type InvoiceNewParams ¶
type InvoiceNewParams struct {
// Unique ID for the invoice.
InvoiceID string `json:"invoice_id" api:"required"`
// Line items to create with the invoice.
LineItems []InvoiceNewParamsLineItem `json:"line_items,omitzero" api:"required"`
// Tags for the invoice.
Tags []InvoiceNewParamsTag `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (InvoiceNewParams) MarshalJSON ¶
func (r InvoiceNewParams) MarshalJSON() (data []byte, err error)
func (*InvoiceNewParams) UnmarshalJSON ¶
func (r *InvoiceNewParams) UnmarshalJSON(data []byte) error
type InvoiceNewParamsLineItem ¶
type InvoiceNewParamsLineItem struct {
// Description of the line item.
Description string `json:"description" api:"required"`
// Unique identifier for the product.
ProductID string `json:"product_id" api:"required"`
// Type of the line item.
//
// Any of "payin", "payout".
Type string `json:"type,omitzero" api:"required"`
// Identifies a user by `id` or `external_id`.
User InvoiceNewParamsLineItemUserUnion `json:"user,omitzero" api:"required"`
// Total amount as a string in the smallest currency unit, such as cents for USD.
// Deprecated, use price instead.
//
// Deprecated: deprecated
Amount param.Opt[string] `json:"amount,omitzero"`
// ISO 4217 or crypto currency code.
//
// Any of "ADA", "BTC", "DAI", "ETH", "SOL", "USDC", "USDT", "USDG", "EURC",
// "CADC", "CADT", "XLM", "UNI", "BCH", "LTC", "AAVE", "LINK", "MATIC", "PTS",
// "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM",
// "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN",
// "BWP", "BYR", "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUC",
// "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR",
// "FJD", "FKP", "GBP", "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD",
// "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP", "INR", "IQD", "IRR",
// "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD",
// "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", "MAD", "MDL", "MGA",
// "MKD", "MMK", "MNT", "MOP", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN", "NAD",
// "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR",
// "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG",
// "SEK", "SGD", "SHP", "SLL", "SOS", "SPL", "SRD", "SVC", "SYP", "STN", "SZL",
// "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TVD", "TWD", "TZS", "UAH",
// "UGX", "USD", "UYU", "UZS", "VEF", "VND", "VUV", "WST", "XAF", "XCD", "XOF",
// "XPF", "YER", "ZAR", "ZMW", "LOGICAL", "CUSTOM".
CurrencyCode string `json:"currency_code,omitzero"`
// Price breakdown. Provide amount, or unit_price and quantity, or all three.
Price InvoiceNewParamsLineItemPrice `json:"price,omitzero"`
// Tags for the line item.
Tags []InvoiceNewParamsLineItemTag `json:"tags,omitzero"`
// contains filtered or unexported fields
}
Data to create a line item.
The properties Description, ProductID, Type, User are required.
func (InvoiceNewParamsLineItem) MarshalJSON ¶
func (r InvoiceNewParamsLineItem) MarshalJSON() (data []byte, err error)
func (*InvoiceNewParamsLineItem) UnmarshalJSON ¶
func (r *InvoiceNewParamsLineItem) UnmarshalJSON(data []byte) error
type InvoiceNewParamsLineItemPrice ¶
type InvoiceNewParamsLineItemPrice struct {
// Total amount as a string in the smallest currency unit, such as cents for USD.
// Required if unit_price and quantity are not provided.
Amount param.Opt[string] `json:"amount,omitzero"`
// Number of units for the line item.
Quantity param.Opt[int64] `json:"quantity,omitzero"`
// Price per unit as a string in the smallest currency unit, such as cents for USD.
UnitPrice param.Opt[string] `json:"unit_price,omitzero"`
// contains filtered or unexported fields
}
Price breakdown. Provide amount, or unit_price and quantity, or all three.
func (InvoiceNewParamsLineItemPrice) MarshalJSON ¶
func (r InvoiceNewParamsLineItemPrice) MarshalJSON() (data []byte, err error)
func (*InvoiceNewParamsLineItemPrice) UnmarshalJSON ¶
func (r *InvoiceNewParamsLineItemPrice) UnmarshalJSON(data []byte) error
type InvoiceNewParamsLineItemTag ¶
type InvoiceNewParamsLineItemTag struct {
// Tag key. Must not contain #, /, or :. Max 50 characters.
Key string `json:"key" api:"required"`
// Tag value. Must not contain #, /, or :. Max 200 characters.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
A key-value tag pair for metadata.
The properties Key, Value are required.
func (InvoiceNewParamsLineItemTag) MarshalJSON ¶
func (r InvoiceNewParamsLineItemTag) MarshalJSON() (data []byte, err error)
func (*InvoiceNewParamsLineItemTag) UnmarshalJSON ¶
func (r *InvoiceNewParamsLineItemTag) UnmarshalJSON(data []byte) error
type InvoiceNewParamsLineItemUserExternalID ¶
type InvoiceNewParamsLineItemUserExternalID struct {
// User-provided unique ID.
ExternalID string `json:"external_id" api:"required"`
// contains filtered or unexported fields
}
The property ExternalID is required.
func (InvoiceNewParamsLineItemUserExternalID) MarshalJSON ¶
func (r InvoiceNewParamsLineItemUserExternalID) MarshalJSON() (data []byte, err error)
func (*InvoiceNewParamsLineItemUserExternalID) UnmarshalJSON ¶
func (r *InvoiceNewParamsLineItemUserExternalID) UnmarshalJSON(data []byte) error
type InvoiceNewParamsLineItemUserID ¶
type InvoiceNewParamsLineItemUserID struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// contains filtered or unexported fields
}
The property ID is required.
func (InvoiceNewParamsLineItemUserID) MarshalJSON ¶
func (r InvoiceNewParamsLineItemUserID) MarshalJSON() (data []byte, err error)
func (*InvoiceNewParamsLineItemUserID) UnmarshalJSON ¶
func (r *InvoiceNewParamsLineItemUserID) UnmarshalJSON(data []byte) error
type InvoiceNewParamsLineItemUserUnion ¶
type InvoiceNewParamsLineItemUserUnion struct {
OfInvoiceNewsLineItemUserID *InvoiceNewParamsLineItemUserID `json:",omitzero,inline"`
OfInvoiceNewsLineItemUserExternalID *InvoiceNewParamsLineItemUserExternalID `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (InvoiceNewParamsLineItemUserUnion) MarshalJSON ¶
func (u InvoiceNewParamsLineItemUserUnion) MarshalJSON() ([]byte, error)
func (*InvoiceNewParamsLineItemUserUnion) UnmarshalJSON ¶
func (u *InvoiceNewParamsLineItemUserUnion) UnmarshalJSON(data []byte) error
type InvoiceNewParamsTag ¶
type InvoiceNewParamsTag struct {
// Tag key. Must not contain #, /, or :. Max 50 characters.
Key string `json:"key" api:"required"`
// Tag value. Must not contain #, /, or :. Max 200 characters.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
A key-value tag pair for metadata.
The properties Key, Value are required.
func (InvoiceNewParamsTag) MarshalJSON ¶
func (r InvoiceNewParamsTag) MarshalJSON() (data []byte, err error)
func (*InvoiceNewParamsTag) UnmarshalJSON ¶
func (r *InvoiceNewParamsTag) UnmarshalJSON(data []byte) error
type InvoiceNewResponse ¶
type InvoiceNewResponse struct {
// Invoice object.
Data Invoice `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InvoiceNewResponse) RawJSON ¶
func (r InvoiceNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceNewResponse) UnmarshalJSON ¶
func (r *InvoiceNewResponse) UnmarshalJSON(data []byte) error
type InvoiceSearchParams ¶
type InvoiceSearchParams struct {
// Filter criteria for the search.
Filter InvoiceSearchParamsFilter `json:"filter,omitzero" api:"required"`
// Pagination parameters.
PageInfo InvoiceSearchParamsPageInfo `json:"page_info,omitzero"`
// contains filtered or unexported fields
}
func (InvoiceSearchParams) MarshalJSON ¶
func (r InvoiceSearchParams) MarshalJSON() (data []byte, err error)
func (*InvoiceSearchParams) UnmarshalJSON ¶
func (r *InvoiceSearchParams) UnmarshalJSON(data []byte) error
type InvoiceSearchParamsFilter ¶
type InvoiceSearchParamsFilter struct {
// Filter by invoice status. `open` returns invoices with non-zero clearing account
// balances.
//
// Any of "open".
Status string `json:"status,omitzero"`
// Tag-based filter criteria. When both `any` and `all` are provided, results must
// match every entry in `all` AND at least one entry in `any`.
Tags InvoiceSearchParamsFilterTags `json:"tags,omitzero"`
// Filter invoices by tags on transactions allocated to them. Returns invoices that
// have at least one allocated transaction matching the specified tags.
TransactionTags InvoiceSearchParamsFilterTransactionTags `json:"transaction_tags,omitzero"`
// Line item user filter criteria. When both `any` and `all` are provided, results
// must match every entry in `all` AND at least one entry in `any`.
Users InvoiceSearchParamsFilterUsers `json:"users,omitzero"`
// contains filtered or unexported fields
}
Filter criteria for the search.
func (InvoiceSearchParamsFilter) MarshalJSON ¶
func (r InvoiceSearchParamsFilter) MarshalJSON() (data []byte, err error)
func (*InvoiceSearchParamsFilter) UnmarshalJSON ¶
func (r *InvoiceSearchParamsFilter) UnmarshalJSON(data []byte) error
type InvoiceSearchParamsFilterTags ¶
type InvoiceSearchParamsFilterTags struct {
// Returns invoices matching every specified tag, using AND logic.
All []InvoiceSearchParamsFilterTagsAll `json:"all,omitzero"`
// Returns invoices matching at least one of the specified tags, using OR logic.
Any []InvoiceSearchParamsFilterTagsAny `json:"any,omitzero"`
// contains filtered or unexported fields
}
Tag-based filter criteria. When both `any` and `all` are provided, results must match every entry in `all` AND at least one entry in `any`.
func (InvoiceSearchParamsFilterTags) MarshalJSON ¶
func (r InvoiceSearchParamsFilterTags) MarshalJSON() (data []byte, err error)
func (*InvoiceSearchParamsFilterTags) UnmarshalJSON ¶
func (r *InvoiceSearchParamsFilterTags) UnmarshalJSON(data []byte) error
type InvoiceSearchParamsFilterTagsAll ¶
type InvoiceSearchParamsFilterTagsAll struct {
// Tag key to filter on. Must be an exact match; wildcards are not supported.
Key string `json:"key" api:"required"`
// Tag value pattern to filter on. Supports wildcards: `*` matches any characters,
// `?` matches a single character. Use `\*` or `\?` to match literal asterisks or
// question marks. Use `*` to match any value for the given key.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
A tag filter.
The properties Key, Value are required.
func (InvoiceSearchParamsFilterTagsAll) MarshalJSON ¶
func (r InvoiceSearchParamsFilterTagsAll) MarshalJSON() (data []byte, err error)
func (*InvoiceSearchParamsFilterTagsAll) UnmarshalJSON ¶
func (r *InvoiceSearchParamsFilterTagsAll) UnmarshalJSON(data []byte) error
type InvoiceSearchParamsFilterTagsAny ¶
type InvoiceSearchParamsFilterTagsAny struct {
// Tag key to filter on. Must be an exact match; wildcards are not supported.
Key string `json:"key" api:"required"`
// Tag value pattern to filter on. Supports wildcards: `*` matches any characters,
// `?` matches a single character. Use `\*` or `\?` to match literal asterisks or
// question marks. Use `*` to match any value for the given key.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
A tag filter.
The properties Key, Value are required.
func (InvoiceSearchParamsFilterTagsAny) MarshalJSON ¶
func (r InvoiceSearchParamsFilterTagsAny) MarshalJSON() (data []byte, err error)
func (*InvoiceSearchParamsFilterTagsAny) UnmarshalJSON ¶
func (r *InvoiceSearchParamsFilterTagsAny) UnmarshalJSON(data []byte) error
type InvoiceSearchParamsFilterTransactionTags ¶
type InvoiceSearchParamsFilterTransactionTags struct {
// Returns transactions matching every specified tag, using AND logic.
All []InvoiceSearchParamsFilterTransactionTagsAll `json:"all,omitzero"`
// Returns transactions matching at least one of the specified tags, using OR
// logic.
Any []InvoiceSearchParamsFilterTransactionTagsAny `json:"any,omitzero"`
// contains filtered or unexported fields
}
Filter invoices by tags on transactions allocated to them. Returns invoices that have at least one allocated transaction matching the specified tags.
func (InvoiceSearchParamsFilterTransactionTags) MarshalJSON ¶
func (r InvoiceSearchParamsFilterTransactionTags) MarshalJSON() (data []byte, err error)
func (*InvoiceSearchParamsFilterTransactionTags) UnmarshalJSON ¶
func (r *InvoiceSearchParamsFilterTransactionTags) UnmarshalJSON(data []byte) error
type InvoiceSearchParamsFilterTransactionTagsAll ¶
type InvoiceSearchParamsFilterTransactionTagsAll struct {
// Tag key to filter on. Must be an exact match; wildcards are not supported.
Key string `json:"key" api:"required"`
// Tag value pattern to filter on. Supports wildcards: `*` matches any characters,
// `?` matches a single character. Use `\*` or `\?` to match literal asterisks or
// question marks. Use `*` to match any value for the given key.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
A tag filter.
The properties Key, Value are required.
func (InvoiceSearchParamsFilterTransactionTagsAll) MarshalJSON ¶
func (r InvoiceSearchParamsFilterTransactionTagsAll) MarshalJSON() (data []byte, err error)
func (*InvoiceSearchParamsFilterTransactionTagsAll) UnmarshalJSON ¶
func (r *InvoiceSearchParamsFilterTransactionTagsAll) UnmarshalJSON(data []byte) error
type InvoiceSearchParamsFilterTransactionTagsAny ¶
type InvoiceSearchParamsFilterTransactionTagsAny struct {
// Tag key to filter on. Must be an exact match; wildcards are not supported.
Key string `json:"key" api:"required"`
// Tag value pattern to filter on. Supports wildcards: `*` matches any characters,
// `?` matches a single character. Use `\*` or `\?` to match literal asterisks or
// question marks. Use `*` to match any value for the given key.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
A tag filter.
The properties Key, Value are required.
func (InvoiceSearchParamsFilterTransactionTagsAny) MarshalJSON ¶
func (r InvoiceSearchParamsFilterTransactionTagsAny) MarshalJSON() (data []byte, err error)
func (*InvoiceSearchParamsFilterTransactionTagsAny) UnmarshalJSON ¶
func (r *InvoiceSearchParamsFilterTransactionTagsAny) UnmarshalJSON(data []byte) error
type InvoiceSearchParamsFilterUsers ¶
type InvoiceSearchParamsFilterUsers struct {
// Returns invoices matching every specified line item user, using AND logic.
All []InvoiceSearchParamsFilterUsersAllUnion `json:"all,omitzero"`
// Returns invoices matching at least one of the specified line item users, using
// OR logic.
Any []InvoiceSearchParamsFilterUsersAnyUnion `json:"any,omitzero"`
// contains filtered or unexported fields
}
Line item user filter criteria. When both `any` and `all` are provided, results must match every entry in `all` AND at least one entry in `any`.
func (InvoiceSearchParamsFilterUsers) MarshalJSON ¶
func (r InvoiceSearchParamsFilterUsers) MarshalJSON() (data []byte, err error)
func (*InvoiceSearchParamsFilterUsers) UnmarshalJSON ¶
func (r *InvoiceSearchParamsFilterUsers) UnmarshalJSON(data []byte) error
type InvoiceSearchParamsFilterUsersAllExternalID ¶
type InvoiceSearchParamsFilterUsersAllExternalID struct {
// User-provided unique ID.
ExternalID string `json:"external_id" api:"required"`
// contains filtered or unexported fields
}
The property ExternalID is required.
func (InvoiceSearchParamsFilterUsersAllExternalID) MarshalJSON ¶
func (r InvoiceSearchParamsFilterUsersAllExternalID) MarshalJSON() (data []byte, err error)
func (*InvoiceSearchParamsFilterUsersAllExternalID) UnmarshalJSON ¶
func (r *InvoiceSearchParamsFilterUsersAllExternalID) UnmarshalJSON(data []byte) error
type InvoiceSearchParamsFilterUsersAllID ¶
type InvoiceSearchParamsFilterUsersAllID struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// contains filtered or unexported fields
}
The property ID is required.
func (InvoiceSearchParamsFilterUsersAllID) MarshalJSON ¶
func (r InvoiceSearchParamsFilterUsersAllID) MarshalJSON() (data []byte, err error)
func (*InvoiceSearchParamsFilterUsersAllID) UnmarshalJSON ¶
func (r *InvoiceSearchParamsFilterUsersAllID) UnmarshalJSON(data []byte) error
type InvoiceSearchParamsFilterUsersAllUnion ¶
type InvoiceSearchParamsFilterUsersAllUnion struct {
OfInvoiceSearchsFilterUsersAllID *InvoiceSearchParamsFilterUsersAllID `json:",omitzero,inline"`
OfInvoiceSearchsFilterUsersAllExternalID *InvoiceSearchParamsFilterUsersAllExternalID `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (InvoiceSearchParamsFilterUsersAllUnion) MarshalJSON ¶
func (u InvoiceSearchParamsFilterUsersAllUnion) MarshalJSON() ([]byte, error)
func (*InvoiceSearchParamsFilterUsersAllUnion) UnmarshalJSON ¶
func (u *InvoiceSearchParamsFilterUsersAllUnion) UnmarshalJSON(data []byte) error
type InvoiceSearchParamsFilterUsersAnyExternalID ¶
type InvoiceSearchParamsFilterUsersAnyExternalID struct {
// User-provided unique ID.
ExternalID string `json:"external_id" api:"required"`
// contains filtered or unexported fields
}
The property ExternalID is required.
func (InvoiceSearchParamsFilterUsersAnyExternalID) MarshalJSON ¶
func (r InvoiceSearchParamsFilterUsersAnyExternalID) MarshalJSON() (data []byte, err error)
func (*InvoiceSearchParamsFilterUsersAnyExternalID) UnmarshalJSON ¶
func (r *InvoiceSearchParamsFilterUsersAnyExternalID) UnmarshalJSON(data []byte) error
type InvoiceSearchParamsFilterUsersAnyID ¶
type InvoiceSearchParamsFilterUsersAnyID struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// contains filtered or unexported fields
}
The property ID is required.
func (InvoiceSearchParamsFilterUsersAnyID) MarshalJSON ¶
func (r InvoiceSearchParamsFilterUsersAnyID) MarshalJSON() (data []byte, err error)
func (*InvoiceSearchParamsFilterUsersAnyID) UnmarshalJSON ¶
func (r *InvoiceSearchParamsFilterUsersAnyID) UnmarshalJSON(data []byte) error
type InvoiceSearchParamsFilterUsersAnyUnion ¶
type InvoiceSearchParamsFilterUsersAnyUnion struct {
OfInvoiceSearchsFilterUsersAnyID *InvoiceSearchParamsFilterUsersAnyID `json:",omitzero,inline"`
OfInvoiceSearchsFilterUsersAnyExternalID *InvoiceSearchParamsFilterUsersAnyExternalID `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (InvoiceSearchParamsFilterUsersAnyUnion) MarshalJSON ¶
func (u InvoiceSearchParamsFilterUsersAnyUnion) MarshalJSON() ([]byte, error)
func (*InvoiceSearchParamsFilterUsersAnyUnion) UnmarshalJSON ¶
func (u *InvoiceSearchParamsFilterUsersAnyUnion) UnmarshalJSON(data []byte) error
type InvoiceSearchParamsPageInfo ¶
type InvoiceSearchParamsPageInfo struct {
// Cursor for fetching the next page of results.
After param.Opt[string] `json:"after,omitzero"`
// Number of results to return. Defaults to 20.
Limit param.Opt[int64] `json:"limit,omitzero"`
// contains filtered or unexported fields
}
Pagination parameters.
func (InvoiceSearchParamsPageInfo) MarshalJSON ¶
func (r InvoiceSearchParamsPageInfo) MarshalJSON() (data []byte, err error)
func (*InvoiceSearchParamsPageInfo) UnmarshalJSON ¶
func (r *InvoiceSearchParamsPageInfo) UnmarshalJSON(data []byte) error
type InvoiceSearchResponse ¶
type InvoiceSearchResponse struct {
// Search results for invoices.
Data InvoiceSearchResponseData `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Search results for invoices.
func (InvoiceSearchResponse) RawJSON ¶
func (r InvoiceSearchResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceSearchResponse) UnmarshalJSON ¶
func (r *InvoiceSearchResponse) UnmarshalJSON(data []byte) error
type InvoiceSearchResponseData ¶
type InvoiceSearchResponseData struct {
// Invoices matching the search criteria.
Invoices []InvoiceSearchResponseDataInvoice `json:"invoices" api:"required"`
// Pagination cursors.
PageInfo InvoiceSearchResponseDataPageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Invoices respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Search results for invoices.
func (InvoiceSearchResponseData) RawJSON ¶
func (r InvoiceSearchResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceSearchResponseData) UnmarshalJSON ¶
func (r *InvoiceSearchResponseData) UnmarshalJSON(data []byte) error
type InvoiceSearchResponseDataInvoice ¶
type InvoiceSearchResponseDataInvoice struct {
// Invoice-level balances by currency.
Balances []InvoiceSearchResponseDataInvoiceBalance `json:"balances" api:"required"`
// Payments allocated to the invoice.
Payments []InvoiceSearchResponseDataInvoicePayment `json:"payments" api:"required"`
// Users involved in the invoice.
Users []InvoiceSearchResponseDataInvoiceUser `json:"users" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Balances respjson.Field
Payments respjson.Field
Users respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
Invoice
}
Invoice with balance details.
func (InvoiceSearchResponseDataInvoice) RawJSON ¶
func (r InvoiceSearchResponseDataInvoice) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceSearchResponseDataInvoice) UnmarshalJSON ¶
func (r *InvoiceSearchResponseDataInvoice) UnmarshalJSON(data []byte) error
type InvoiceSearchResponseDataInvoiceBalance ¶
type InvoiceSearchResponseDataInvoiceBalance struct {
// ISO 4217 or crypto currency code.
Currency string `json:"currency" api:"required"`
// Net balance breakdown.
Net InvoiceSearchResponseDataInvoiceBalanceNet `json:"net" api:"required"`
// Payins balance breakdown.
Payins InvoiceSearchResponseDataInvoiceBalancePayins `json:"payins" api:"required"`
// Payouts balance breakdown.
Payouts InvoiceSearchResponseDataInvoiceBalancePayouts `json:"payouts" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Currency respjson.Field
Net respjson.Field
Payins respjson.Field
Payouts respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InvoiceSearchResponseDataInvoiceBalance) RawJSON ¶
func (r InvoiceSearchResponseDataInvoiceBalance) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceSearchResponseDataInvoiceBalance) UnmarshalJSON ¶
func (r *InvoiceSearchResponseDataInvoiceBalance) UnmarshalJSON(data []byte) error
type InvoiceSearchResponseDataInvoiceBalanceNet ¶
type InvoiceSearchResponseDataInvoiceBalanceNet struct {
// Actual amount as a string in the smallest currency unit, such as cents for USD.
Actual string `json:"actual" api:"required"`
// Expected amount as a string in the smallest currency unit, such as cents for
// USD.
Expected string `json:"expected" api:"required"`
// Remaining amount as a string in the smallest currency unit, such as cents for
// USD.
Remaining string `json:"remaining" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Actual respjson.Field
Expected respjson.Field
Remaining respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Net balance breakdown.
func (InvoiceSearchResponseDataInvoiceBalanceNet) RawJSON ¶
func (r InvoiceSearchResponseDataInvoiceBalanceNet) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceSearchResponseDataInvoiceBalanceNet) UnmarshalJSON ¶
func (r *InvoiceSearchResponseDataInvoiceBalanceNet) UnmarshalJSON(data []byte) error
type InvoiceSearchResponseDataInvoiceBalancePayins ¶
type InvoiceSearchResponseDataInvoiceBalancePayins struct {
// Actual amount as a string in the smallest currency unit, such as cents for USD.
Actual string `json:"actual" api:"required"`
// Expected amount as a string in the smallest currency unit, such as cents for
// USD.
Expected string `json:"expected" api:"required"`
// Remaining amount as a string in the smallest currency unit, such as cents for
// USD.
Remaining string `json:"remaining" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Actual respjson.Field
Expected respjson.Field
Remaining respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payins balance breakdown.
func (InvoiceSearchResponseDataInvoiceBalancePayins) RawJSON ¶
func (r InvoiceSearchResponseDataInvoiceBalancePayins) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceSearchResponseDataInvoiceBalancePayins) UnmarshalJSON ¶
func (r *InvoiceSearchResponseDataInvoiceBalancePayins) UnmarshalJSON(data []byte) error
type InvoiceSearchResponseDataInvoiceBalancePayouts ¶
type InvoiceSearchResponseDataInvoiceBalancePayouts struct {
// Actual amount as a string in the smallest currency unit, such as cents for USD.
Actual string `json:"actual" api:"required"`
// Expected amount as a string in the smallest currency unit, such as cents for
// USD.
Expected string `json:"expected" api:"required"`
// Remaining amount as a string in the smallest currency unit, such as cents for
// USD.
Remaining string `json:"remaining" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Actual respjson.Field
Expected respjson.Field
Remaining respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payouts balance breakdown.
func (InvoiceSearchResponseDataInvoiceBalancePayouts) RawJSON ¶
func (r InvoiceSearchResponseDataInvoiceBalancePayouts) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceSearchResponseDataInvoiceBalancePayouts) UnmarshalJSON ¶
func (r *InvoiceSearchResponseDataInvoiceBalancePayouts) UnmarshalJSON(data []byte) error
type InvoiceSearchResponseDataInvoicePayment ¶
type InvoiceSearchResponseDataInvoicePayment struct {
// Amount allocated as a string in the smallest currency unit, such as cents for
// USD.
Amount string `json:"amount" api:"required"`
// ISO 4217 or crypto currency code.
//
// Any of "ADA", "BTC", "DAI", "ETH", "SOL", "USDC", "USDT", "USDG", "EURC",
// "CADC", "CADT", "XLM", "UNI", "BCH", "LTC", "AAVE", "LINK", "MATIC", "PTS",
// "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM",
// "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN",
// "BWP", "BYR", "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUC",
// "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR",
// "FJD", "FKP", "GBP", "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD",
// "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP", "INR", "IQD", "IRR",
// "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD",
// "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", "MAD", "MDL", "MGA",
// "MKD", "MMK", "MNT", "MOP", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN", "NAD",
// "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR",
// "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG",
// "SEK", "SGD", "SHP", "SLL", "SOS", "SPL", "SRD", "SVC", "SYP", "STN", "SZL",
// "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TVD", "TWD", "TZS", "UAH",
// "UGX", "USD", "UYU", "UZS", "VEF", "VND", "VUV", "WST", "XAF", "XCD", "XOF",
// "XPF", "YER", "ZAR", "ZMW", "LOGICAL", "CUSTOM".
Currency string `json:"currency" api:"required"`
// Timestamp when the parent transaction was posted. Uses ISO 8601 format.
Posted time.Time `json:"posted" api:"required" format:"date-time"`
// Transaction the payment is applied to.
Transaction InvoiceSearchResponseDataInvoicePaymentTransaction `json:"transaction" api:"required"`
// Type of the payment.
//
// Any of "payin", "payout".
Type string `json:"type" api:"required"`
// User associated with the payment.
User InvoiceSearchResponseDataInvoicePaymentUser `json:"user" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Currency respjson.Field
Posted respjson.Field
Transaction respjson.Field
Type respjson.Field
User respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A payment allocated to the invoice.
func (InvoiceSearchResponseDataInvoicePayment) RawJSON ¶
func (r InvoiceSearchResponseDataInvoicePayment) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceSearchResponseDataInvoicePayment) UnmarshalJSON ¶
func (r *InvoiceSearchResponseDataInvoicePayment) UnmarshalJSON(data []byte) error
type InvoiceSearchResponseDataInvoicePaymentTransaction ¶
type InvoiceSearchResponseDataInvoicePaymentTransaction struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// User-provided unique ID.
ExternalID string `json:"external_id" api:"required"`
// Tags from the parent transaction.
Tags []InvoiceSearchResponseDataInvoicePaymentTransactionTag `json:"tags" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExternalID respjson.Field
Tags respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Transaction the payment is applied to.
func (InvoiceSearchResponseDataInvoicePaymentTransaction) RawJSON ¶
func (r InvoiceSearchResponseDataInvoicePaymentTransaction) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceSearchResponseDataInvoicePaymentTransaction) UnmarshalJSON ¶
func (r *InvoiceSearchResponseDataInvoicePaymentTransaction) UnmarshalJSON(data []byte) error
type InvoiceSearchResponseDataInvoicePaymentTransactionTag ¶
type InvoiceSearchResponseDataInvoicePaymentTransactionTag struct {
// Tag key.
Key string `json:"key" api:"required"`
// Tag value.
Value string `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Key respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A key-value tag pair.
func (InvoiceSearchResponseDataInvoicePaymentTransactionTag) RawJSON ¶
func (r InvoiceSearchResponseDataInvoicePaymentTransactionTag) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceSearchResponseDataInvoicePaymentTransactionTag) UnmarshalJSON ¶
func (r *InvoiceSearchResponseDataInvoicePaymentTransactionTag) UnmarshalJSON(data []byte) error
type InvoiceSearchResponseDataInvoicePaymentUser ¶
type InvoiceSearchResponseDataInvoicePaymentUser struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// User-provided unique ID.
ExternalID string `json:"external_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
User associated with the payment.
func (InvoiceSearchResponseDataInvoicePaymentUser) RawJSON ¶
func (r InvoiceSearchResponseDataInvoicePaymentUser) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceSearchResponseDataInvoicePaymentUser) UnmarshalJSON ¶
func (r *InvoiceSearchResponseDataInvoicePaymentUser) UnmarshalJSON(data []byte) error
type InvoiceSearchResponseDataInvoiceUser ¶
type InvoiceSearchResponseDataInvoiceUser struct {
// User-provided unique external ID.
ID string `json:"id" api:"required"`
// Per-currency balance breakdown for the user.
Balances []InvoiceSearchResponseDataInvoiceUserBalance `json:"balances" api:"required"`
// User-provided unique ID.
ExternalID string `json:"external_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Balances respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InvoiceSearchResponseDataInvoiceUser) RawJSON ¶
func (r InvoiceSearchResponseDataInvoiceUser) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceSearchResponseDataInvoiceUser) UnmarshalJSON ¶
func (r *InvoiceSearchResponseDataInvoiceUser) UnmarshalJSON(data []byte) error
type InvoiceSearchResponseDataInvoiceUserBalance ¶
type InvoiceSearchResponseDataInvoiceUserBalance struct {
// ISO 4217 or crypto currency code.
Currency string `json:"currency" api:"required"`
// Net balance breakdown.
Net InvoiceSearchResponseDataInvoiceUserBalanceNet `json:"net" api:"required"`
// Payins balance breakdown.
Payins InvoiceSearchResponseDataInvoiceUserBalancePayins `json:"payins" api:"required"`
// Payouts balance breakdown.
Payouts InvoiceSearchResponseDataInvoiceUserBalancePayouts `json:"payouts" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Currency respjson.Field
Net respjson.Field
Payins respjson.Field
Payouts respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InvoiceSearchResponseDataInvoiceUserBalance) RawJSON ¶
func (r InvoiceSearchResponseDataInvoiceUserBalance) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceSearchResponseDataInvoiceUserBalance) UnmarshalJSON ¶
func (r *InvoiceSearchResponseDataInvoiceUserBalance) UnmarshalJSON(data []byte) error
type InvoiceSearchResponseDataInvoiceUserBalanceNet ¶
type InvoiceSearchResponseDataInvoiceUserBalanceNet struct {
// Actual amount as a string in the smallest currency unit, such as cents for USD.
Actual string `json:"actual" api:"required"`
// Expected amount as a string in the smallest currency unit, such as cents for
// USD.
Expected string `json:"expected" api:"required"`
// Remaining amount as a string in the smallest currency unit, such as cents for
// USD.
Remaining string `json:"remaining" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Actual respjson.Field
Expected respjson.Field
Remaining respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Net balance breakdown.
func (InvoiceSearchResponseDataInvoiceUserBalanceNet) RawJSON ¶
func (r InvoiceSearchResponseDataInvoiceUserBalanceNet) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceSearchResponseDataInvoiceUserBalanceNet) UnmarshalJSON ¶
func (r *InvoiceSearchResponseDataInvoiceUserBalanceNet) UnmarshalJSON(data []byte) error
type InvoiceSearchResponseDataInvoiceUserBalancePayins ¶
type InvoiceSearchResponseDataInvoiceUserBalancePayins struct {
// Actual amount as a string in the smallest currency unit, such as cents for USD.
Actual string `json:"actual" api:"required"`
// Expected amount as a string in the smallest currency unit, such as cents for
// USD.
Expected string `json:"expected" api:"required"`
// Remaining amount as a string in the smallest currency unit, such as cents for
// USD.
Remaining string `json:"remaining" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Actual respjson.Field
Expected respjson.Field
Remaining respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payins balance breakdown.
func (InvoiceSearchResponseDataInvoiceUserBalancePayins) RawJSON ¶
func (r InvoiceSearchResponseDataInvoiceUserBalancePayins) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceSearchResponseDataInvoiceUserBalancePayins) UnmarshalJSON ¶
func (r *InvoiceSearchResponseDataInvoiceUserBalancePayins) UnmarshalJSON(data []byte) error
type InvoiceSearchResponseDataInvoiceUserBalancePayouts ¶
type InvoiceSearchResponseDataInvoiceUserBalancePayouts struct {
// Actual amount as a string in the smallest currency unit, such as cents for USD.
Actual string `json:"actual" api:"required"`
// Expected amount as a string in the smallest currency unit, such as cents for
// USD.
Expected string `json:"expected" api:"required"`
// Remaining amount as a string in the smallest currency unit, such as cents for
// USD.
Remaining string `json:"remaining" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Actual respjson.Field
Expected respjson.Field
Remaining respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payouts balance breakdown.
func (InvoiceSearchResponseDataInvoiceUserBalancePayouts) RawJSON ¶
func (r InvoiceSearchResponseDataInvoiceUserBalancePayouts) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceSearchResponseDataInvoiceUserBalancePayouts) UnmarshalJSON ¶
func (r *InvoiceSearchResponseDataInvoiceUserBalancePayouts) UnmarshalJSON(data []byte) error
type InvoiceSearchResponseDataPageInfo ¶
type InvoiceSearchResponseDataPageInfo struct {
// Cursor to fetch the next page of results.
NextCursor string `json:"next_cursor"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
NextCursor respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Pagination cursors.
func (InvoiceSearchResponseDataPageInfo) RawJSON ¶
func (r InvoiceSearchResponseDataPageInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceSearchResponseDataPageInfo) UnmarshalJSON ¶
func (r *InvoiceSearchResponseDataPageInfo) UnmarshalJSON(data []byte) error
type InvoiceService ¶
type InvoiceService struct {
// contains filtered or unexported fields
}
Invoice management operations
InvoiceService contains methods and other services that help with interacting with the fragment API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInvoiceService method instead.
func NewInvoiceService ¶
func NewInvoiceService(opts ...option.RequestOption) (r InvoiceService)
NewInvoiceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*InvoiceService) Get ¶
func (r *InvoiceService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *InvoiceGetResponse, err error)
Retrieves an invoice.
func (*InvoiceService) List ¶
func (r *InvoiceService) List(ctx context.Context, opts ...option.RequestOption) (res *InvoiceListResponse, err error)
Lists all invoices.
func (*InvoiceService) ListHistory ¶
func (r *InvoiceService) ListHistory(ctx context.Context, id string, opts ...option.RequestOption) (res *InvoiceListHistoryResponse, err error)
Retrieves the version history of an invoice.
func (*InvoiceService) New ¶
func (r *InvoiceService) New(ctx context.Context, body InvoiceNewParams, opts ...option.RequestOption) (res *InvoiceNewResponse, err error)
Creates an invoice.
func (*InvoiceService) Search ¶
func (r *InvoiceService) Search(ctx context.Context, body InvoiceSearchParams, opts ...option.RequestOption) (res *InvoiceSearchResponse, err error)
Searches invoices.
func (*InvoiceService) Update ¶
func (r *InvoiceService) Update(ctx context.Context, id string, body InvoiceUpdateParams, opts ...option.RequestOption) (res *InvoiceUpdateResponse, err error)
Updates an invoice.
type InvoiceStatus ¶
type InvoiceStatus string
Status of the invoice. Deprecated.
const (
InvoiceStatusActive InvoiceStatus = "active"
)
type InvoiceTag ¶
type InvoiceTag struct {
// Tag key.
Key string `json:"key" api:"required"`
// Tag value.
Value string `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Key respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A key-value tag pair.
func (InvoiceTag) RawJSON ¶
func (r InvoiceTag) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceTag) UnmarshalJSON ¶
func (r *InvoiceTag) UnmarshalJSON(data []byte) error
type InvoiceUpdateParams ¶
type InvoiceUpdateParams struct {
// Current version of the invoice. Must match the stored version.
CurrentInvoiceVersion float64 `json:"current_invoice_version" api:"required"`
// Line item updates.
LineItems InvoiceUpdateParamsLineItems `json:"line_items,omitzero"`
// Tag updates.
Tags InvoiceUpdateParamsTags `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (InvoiceUpdateParams) MarshalJSON ¶
func (r InvoiceUpdateParams) MarshalJSON() (data []byte, err error)
func (*InvoiceUpdateParams) UnmarshalJSON ¶
func (r *InvoiceUpdateParams) UnmarshalJSON(data []byte) error
type InvoiceUpdateParamsLineItems ¶
type InvoiceUpdateParamsLineItems struct {
// Line items to add to the invoice.
Create []InvoiceUpdateParamsLineItemsCreate `json:"create,omitzero"`
// Line items to remove from the invoice.
Delete []InvoiceUpdateParamsLineItemsDelete `json:"delete,omitzero"`
// Existing line items to update.
Update []InvoiceUpdateParamsLineItemsUpdate `json:"update,omitzero"`
// contains filtered or unexported fields
}
Line item updates.
func (InvoiceUpdateParamsLineItems) MarshalJSON ¶
func (r InvoiceUpdateParamsLineItems) MarshalJSON() (data []byte, err error)
func (*InvoiceUpdateParamsLineItems) UnmarshalJSON ¶
func (r *InvoiceUpdateParamsLineItems) UnmarshalJSON(data []byte) error
type InvoiceUpdateParamsLineItemsCreate ¶
type InvoiceUpdateParamsLineItemsCreate struct {
// Description of the line item.
Description string `json:"description" api:"required"`
// Unique identifier for the product.
ProductID string `json:"product_id" api:"required"`
// Type of the line item.
//
// Any of "payin", "payout".
Type string `json:"type,omitzero" api:"required"`
// Identifies a user by `id` or `external_id`.
User InvoiceUpdateParamsLineItemsCreateUserUnion `json:"user,omitzero" api:"required"`
// Total amount as a string in the smallest currency unit, such as cents for USD.
// Deprecated, use price instead.
//
// Deprecated: deprecated
Amount param.Opt[string] `json:"amount,omitzero"`
// ISO 4217 or crypto currency code.
//
// Any of "ADA", "BTC", "DAI", "ETH", "SOL", "USDC", "USDT", "USDG", "EURC",
// "CADC", "CADT", "XLM", "UNI", "BCH", "LTC", "AAVE", "LINK", "MATIC", "PTS",
// "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM",
// "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN",
// "BWP", "BYR", "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUC",
// "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR",
// "FJD", "FKP", "GBP", "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD",
// "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP", "INR", "IQD", "IRR",
// "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD",
// "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", "MAD", "MDL", "MGA",
// "MKD", "MMK", "MNT", "MOP", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN", "NAD",
// "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR",
// "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG",
// "SEK", "SGD", "SHP", "SLL", "SOS", "SPL", "SRD", "SVC", "SYP", "STN", "SZL",
// "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TVD", "TWD", "TZS", "UAH",
// "UGX", "USD", "UYU", "UZS", "VEF", "VND", "VUV", "WST", "XAF", "XCD", "XOF",
// "XPF", "YER", "ZAR", "ZMW", "LOGICAL", "CUSTOM".
CurrencyCode string `json:"currency_code,omitzero"`
// Price breakdown. Provide amount, or unit_price and quantity, or all three.
Price InvoiceUpdateParamsLineItemsCreatePrice `json:"price,omitzero"`
// Tags for the line item.
Tags []InvoiceUpdateParamsLineItemsCreateTag `json:"tags,omitzero"`
// contains filtered or unexported fields
}
Data to create a line item.
The properties Description, ProductID, Type, User are required.
func (InvoiceUpdateParamsLineItemsCreate) MarshalJSON ¶
func (r InvoiceUpdateParamsLineItemsCreate) MarshalJSON() (data []byte, err error)
func (*InvoiceUpdateParamsLineItemsCreate) UnmarshalJSON ¶
func (r *InvoiceUpdateParamsLineItemsCreate) UnmarshalJSON(data []byte) error
type InvoiceUpdateParamsLineItemsCreatePrice ¶
type InvoiceUpdateParamsLineItemsCreatePrice struct {
// Total amount as a string in the smallest currency unit, such as cents for USD.
// Required if unit_price and quantity are not provided.
Amount param.Opt[string] `json:"amount,omitzero"`
// Number of units for the line item.
Quantity param.Opt[int64] `json:"quantity,omitzero"`
// Price per unit as a string in the smallest currency unit, such as cents for USD.
UnitPrice param.Opt[string] `json:"unit_price,omitzero"`
// contains filtered or unexported fields
}
Price breakdown. Provide amount, or unit_price and quantity, or all three.
func (InvoiceUpdateParamsLineItemsCreatePrice) MarshalJSON ¶
func (r InvoiceUpdateParamsLineItemsCreatePrice) MarshalJSON() (data []byte, err error)
func (*InvoiceUpdateParamsLineItemsCreatePrice) UnmarshalJSON ¶
func (r *InvoiceUpdateParamsLineItemsCreatePrice) UnmarshalJSON(data []byte) error
type InvoiceUpdateParamsLineItemsCreateTag ¶
type InvoiceUpdateParamsLineItemsCreateTag struct {
// Tag key. Must not contain #, /, or :. Max 50 characters.
Key string `json:"key" api:"required"`
// Tag value. Must not contain #, /, or :. Max 200 characters.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
A key-value tag pair for metadata.
The properties Key, Value are required.
func (InvoiceUpdateParamsLineItemsCreateTag) MarshalJSON ¶
func (r InvoiceUpdateParamsLineItemsCreateTag) MarshalJSON() (data []byte, err error)
func (*InvoiceUpdateParamsLineItemsCreateTag) UnmarshalJSON ¶
func (r *InvoiceUpdateParamsLineItemsCreateTag) UnmarshalJSON(data []byte) error
type InvoiceUpdateParamsLineItemsCreateUserExternalID ¶
type InvoiceUpdateParamsLineItemsCreateUserExternalID struct {
// User-provided unique ID.
ExternalID string `json:"external_id" api:"required"`
// contains filtered or unexported fields
}
The property ExternalID is required.
func (InvoiceUpdateParamsLineItemsCreateUserExternalID) MarshalJSON ¶
func (r InvoiceUpdateParamsLineItemsCreateUserExternalID) MarshalJSON() (data []byte, err error)
func (*InvoiceUpdateParamsLineItemsCreateUserExternalID) UnmarshalJSON ¶
func (r *InvoiceUpdateParamsLineItemsCreateUserExternalID) UnmarshalJSON(data []byte) error
type InvoiceUpdateParamsLineItemsCreateUserID ¶
type InvoiceUpdateParamsLineItemsCreateUserID struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// contains filtered or unexported fields
}
The property ID is required.
func (InvoiceUpdateParamsLineItemsCreateUserID) MarshalJSON ¶
func (r InvoiceUpdateParamsLineItemsCreateUserID) MarshalJSON() (data []byte, err error)
func (*InvoiceUpdateParamsLineItemsCreateUserID) UnmarshalJSON ¶
func (r *InvoiceUpdateParamsLineItemsCreateUserID) UnmarshalJSON(data []byte) error
type InvoiceUpdateParamsLineItemsCreateUserUnion ¶
type InvoiceUpdateParamsLineItemsCreateUserUnion struct {
OfInvoiceUpdatesLineItemsCreateUserID *InvoiceUpdateParamsLineItemsCreateUserID `json:",omitzero,inline"`
OfInvoiceUpdatesLineItemsCreateUserExternalID *InvoiceUpdateParamsLineItemsCreateUserExternalID `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (InvoiceUpdateParamsLineItemsCreateUserUnion) MarshalJSON ¶
func (u InvoiceUpdateParamsLineItemsCreateUserUnion) MarshalJSON() ([]byte, error)
func (*InvoiceUpdateParamsLineItemsCreateUserUnion) UnmarshalJSON ¶
func (u *InvoiceUpdateParamsLineItemsCreateUserUnion) UnmarshalJSON(data []byte) error
type InvoiceUpdateParamsLineItemsDelete ¶
type InvoiceUpdateParamsLineItemsDelete struct {
// Unique identifier for the line item to delete.
ID string `json:"id" api:"required"`
// contains filtered or unexported fields
}
The property ID is required.
func (InvoiceUpdateParamsLineItemsDelete) MarshalJSON ¶
func (r InvoiceUpdateParamsLineItemsDelete) MarshalJSON() (data []byte, err error)
func (*InvoiceUpdateParamsLineItemsDelete) UnmarshalJSON ¶
func (r *InvoiceUpdateParamsLineItemsDelete) UnmarshalJSON(data []byte) error
type InvoiceUpdateParamsLineItemsUpdate ¶
type InvoiceUpdateParamsLineItemsUpdate struct {
// Unique identifier for the line item to update.
ID string `json:"id" api:"required"`
Description param.Opt[string] `json:"description,omitzero"`
Price InvoiceUpdateParamsLineItemsUpdatePrice `json:"price,omitzero"`
// Tag updates.
Tags InvoiceUpdateParamsLineItemsUpdateTags `json:"tags,omitzero"`
// contains filtered or unexported fields
}
Data for updating a line item.
The property ID is required.
func (InvoiceUpdateParamsLineItemsUpdate) MarshalJSON ¶
func (r InvoiceUpdateParamsLineItemsUpdate) MarshalJSON() (data []byte, err error)
func (*InvoiceUpdateParamsLineItemsUpdate) UnmarshalJSON ¶
func (r *InvoiceUpdateParamsLineItemsUpdate) UnmarshalJSON(data []byte) error
type InvoiceUpdateParamsLineItemsUpdatePrice ¶
type InvoiceUpdateParamsLineItemsUpdatePrice struct {
// Number of units for the line item.
Quantity int64 `json:"quantity" api:"required"`
// Price per unit as a string in the smallest currency unit, such as cents for USD.
UnitPrice string `json:"unit_price" api:"required"`
// Total amount as a string in the smallest currency unit, such as cents for USD.
Amount param.Opt[string] `json:"amount,omitzero"`
// contains filtered or unexported fields
}
The properties Quantity, UnitPrice are required.
func (InvoiceUpdateParamsLineItemsUpdatePrice) MarshalJSON ¶
func (r InvoiceUpdateParamsLineItemsUpdatePrice) MarshalJSON() (data []byte, err error)
func (*InvoiceUpdateParamsLineItemsUpdatePrice) UnmarshalJSON ¶
func (r *InvoiceUpdateParamsLineItemsUpdatePrice) UnmarshalJSON(data []byte) error
type InvoiceUpdateParamsLineItemsUpdateTags ¶
type InvoiceUpdateParamsLineItemsUpdateTags struct {
// Tags to create. The tag key must not already exist.
Create []InvoiceUpdateParamsLineItemsUpdateTagsCreate `json:"create,omitzero"`
// Tags to remove.
Delete []InvoiceUpdateParamsLineItemsUpdateTagsDelete `json:"delete,omitzero"`
// Tags to set. Creates a new tag or updates an existing tag.
Set []InvoiceUpdateParamsLineItemsUpdateTagsSet `json:"set,omitzero"`
// Tags to update. The tag key must already exist.
Update []InvoiceUpdateParamsLineItemsUpdateTagsUpdate `json:"update,omitzero"`
// contains filtered or unexported fields
}
Tag updates.
func (InvoiceUpdateParamsLineItemsUpdateTags) MarshalJSON ¶
func (r InvoiceUpdateParamsLineItemsUpdateTags) MarshalJSON() (data []byte, err error)
func (*InvoiceUpdateParamsLineItemsUpdateTags) UnmarshalJSON ¶
func (r *InvoiceUpdateParamsLineItemsUpdateTags) UnmarshalJSON(data []byte) error
type InvoiceUpdateParamsLineItemsUpdateTagsCreate ¶
type InvoiceUpdateParamsLineItemsUpdateTagsCreate struct {
// Tag key. Must not contain #, /, or :. Max 50 characters.
Key string `json:"key" api:"required"`
// Tag value. Must not contain #, /, or :. Max 200 characters.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
A key-value tag pair for metadata.
The properties Key, Value are required.
func (InvoiceUpdateParamsLineItemsUpdateTagsCreate) MarshalJSON ¶
func (r InvoiceUpdateParamsLineItemsUpdateTagsCreate) MarshalJSON() (data []byte, err error)
func (*InvoiceUpdateParamsLineItemsUpdateTagsCreate) UnmarshalJSON ¶
func (r *InvoiceUpdateParamsLineItemsUpdateTagsCreate) UnmarshalJSON(data []byte) error
type InvoiceUpdateParamsLineItemsUpdateTagsDelete ¶
type InvoiceUpdateParamsLineItemsUpdateTagsDelete struct {
// Tag key to delete.
Key string `json:"key" api:"required"`
// contains filtered or unexported fields
}
The property Key is required.
func (InvoiceUpdateParamsLineItemsUpdateTagsDelete) MarshalJSON ¶
func (r InvoiceUpdateParamsLineItemsUpdateTagsDelete) MarshalJSON() (data []byte, err error)
func (*InvoiceUpdateParamsLineItemsUpdateTagsDelete) UnmarshalJSON ¶
func (r *InvoiceUpdateParamsLineItemsUpdateTagsDelete) UnmarshalJSON(data []byte) error
type InvoiceUpdateParamsLineItemsUpdateTagsSet ¶
type InvoiceUpdateParamsLineItemsUpdateTagsSet struct {
// Tag key. Must not contain #, /, or :. Max 50 characters.
Key string `json:"key" api:"required"`
// Tag value. Must not contain #, /, or :. Max 200 characters.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
A key-value tag pair for metadata.
The properties Key, Value are required.
func (InvoiceUpdateParamsLineItemsUpdateTagsSet) MarshalJSON ¶
func (r InvoiceUpdateParamsLineItemsUpdateTagsSet) MarshalJSON() (data []byte, err error)
func (*InvoiceUpdateParamsLineItemsUpdateTagsSet) UnmarshalJSON ¶
func (r *InvoiceUpdateParamsLineItemsUpdateTagsSet) UnmarshalJSON(data []byte) error
type InvoiceUpdateParamsLineItemsUpdateTagsUpdate ¶
type InvoiceUpdateParamsLineItemsUpdateTagsUpdate struct {
// Tag key. Must not contain #, /, or :. Max 50 characters.
Key string `json:"key" api:"required"`
// Tag value. Must not contain #, /, or :. Max 200 characters.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
A key-value tag pair for metadata.
The properties Key, Value are required.
func (InvoiceUpdateParamsLineItemsUpdateTagsUpdate) MarshalJSON ¶
func (r InvoiceUpdateParamsLineItemsUpdateTagsUpdate) MarshalJSON() (data []byte, err error)
func (*InvoiceUpdateParamsLineItemsUpdateTagsUpdate) UnmarshalJSON ¶
func (r *InvoiceUpdateParamsLineItemsUpdateTagsUpdate) UnmarshalJSON(data []byte) error
type InvoiceUpdateParamsTags ¶
type InvoiceUpdateParamsTags struct {
// Tags to create. The tag key must not already exist.
Create []InvoiceUpdateParamsTagsCreate `json:"create,omitzero"`
// Tags to remove.
Delete []InvoiceUpdateParamsTagsDelete `json:"delete,omitzero"`
// Tags to set. Creates a new tag or updates an existing tag.
Set []InvoiceUpdateParamsTagsSet `json:"set,omitzero"`
// Tags to update. The tag key must already exist.
Update []InvoiceUpdateParamsTagsUpdate `json:"update,omitzero"`
// contains filtered or unexported fields
}
Tag updates.
func (InvoiceUpdateParamsTags) MarshalJSON ¶
func (r InvoiceUpdateParamsTags) MarshalJSON() (data []byte, err error)
func (*InvoiceUpdateParamsTags) UnmarshalJSON ¶
func (r *InvoiceUpdateParamsTags) UnmarshalJSON(data []byte) error
type InvoiceUpdateParamsTagsCreate ¶
type InvoiceUpdateParamsTagsCreate struct {
// Tag key. Must not contain #, /, or :. Max 50 characters.
Key string `json:"key" api:"required"`
// Tag value. Must not contain #, /, or :. Max 200 characters.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
A key-value tag pair for metadata.
The properties Key, Value are required.
func (InvoiceUpdateParamsTagsCreate) MarshalJSON ¶
func (r InvoiceUpdateParamsTagsCreate) MarshalJSON() (data []byte, err error)
func (*InvoiceUpdateParamsTagsCreate) UnmarshalJSON ¶
func (r *InvoiceUpdateParamsTagsCreate) UnmarshalJSON(data []byte) error
type InvoiceUpdateParamsTagsDelete ¶
type InvoiceUpdateParamsTagsDelete struct {
// Tag key to delete.
Key string `json:"key" api:"required"`
// contains filtered or unexported fields
}
The property Key is required.
func (InvoiceUpdateParamsTagsDelete) MarshalJSON ¶
func (r InvoiceUpdateParamsTagsDelete) MarshalJSON() (data []byte, err error)
func (*InvoiceUpdateParamsTagsDelete) UnmarshalJSON ¶
func (r *InvoiceUpdateParamsTagsDelete) UnmarshalJSON(data []byte) error
type InvoiceUpdateParamsTagsSet ¶
type InvoiceUpdateParamsTagsSet struct {
// Tag key. Must not contain #, /, or :. Max 50 characters.
Key string `json:"key" api:"required"`
// Tag value. Must not contain #, /, or :. Max 200 characters.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
A key-value tag pair for metadata.
The properties Key, Value are required.
func (InvoiceUpdateParamsTagsSet) MarshalJSON ¶
func (r InvoiceUpdateParamsTagsSet) MarshalJSON() (data []byte, err error)
func (*InvoiceUpdateParamsTagsSet) UnmarshalJSON ¶
func (r *InvoiceUpdateParamsTagsSet) UnmarshalJSON(data []byte) error
type InvoiceUpdateParamsTagsUpdate ¶
type InvoiceUpdateParamsTagsUpdate struct {
// Tag key. Must not contain #, /, or :. Max 50 characters.
Key string `json:"key" api:"required"`
// Tag value. Must not contain #, /, or :. Max 200 characters.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
A key-value tag pair for metadata.
The properties Key, Value are required.
func (InvoiceUpdateParamsTagsUpdate) MarshalJSON ¶
func (r InvoiceUpdateParamsTagsUpdate) MarshalJSON() (data []byte, err error)
func (*InvoiceUpdateParamsTagsUpdate) UnmarshalJSON ¶
func (r *InvoiceUpdateParamsTagsUpdate) UnmarshalJSON(data []byte) error
type InvoiceUpdateResponse ¶
type InvoiceUpdateResponse struct {
// Invoice object.
Data Invoice `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InvoiceUpdateResponse) RawJSON ¶
func (r InvoiceUpdateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*InvoiceUpdateResponse) UnmarshalJSON ¶
func (r *InvoiceUpdateResponse) UnmarshalJSON(data []byte) error
type Payment ¶
type Payment struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// Amount in smallest currency unit.
Amount string `json:"amount" api:"required"`
// Timestamp when the payment was created.
Created string `json:"created" api:"required"`
// Currency code.
Currency string `json:"currency" api:"required"`
// Direction of the payment.
Direction string `json:"direction" api:"required"`
// Timestamp when the payment was last modified.
Modified string `json:"modified" api:"required"`
// Payment account ID.
PaymentAccountID string `json:"payment_account_id" api:"required"`
// Payment flow ID.
PaymentFlowID string `json:"payment_flow_id" api:"required"`
// Status of the payment.
Status string `json:"status" api:"required"`
// Associated transaction IDs.
TransactionIDs []string `json:"transaction_ids" api:"required"`
// User-provided unique ID when the payment was created with one.
ExternalID string `json:"external_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Amount respjson.Field
Created respjson.Field
Currency respjson.Field
Direction respjson.Field
Modified respjson.Field
PaymentAccountID respjson.Field
PaymentFlowID respjson.Field
Status respjson.Field
TransactionIDs respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payment object.
func (*Payment) UnmarshalJSON ¶
type PaymentFlow ¶
type PaymentFlow struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// Timestamp when the payment flow was created.
Created string `json:"created" api:"required"`
// User-provided unique external ID.
ExternalID string `json:"external_id" api:"required"`
// Invoice being settled.
Invoice PaymentFlowInvoice `json:"invoice" api:"required"`
// Timestamp when the payment flow was last modified.
Modified string `json:"modified" api:"required"`
// Payment plan for UI rendering.
PaymentPlan PaymentFlowPaymentPlan `json:"payment_plan" api:"required"`
// Status of the payment flow.
Status string `json:"status" api:"required"`
// Type of payment flow.
Type string `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Created respjson.Field
ExternalID respjson.Field
Invoice respjson.Field
Modified respjson.Field
PaymentPlan respjson.Field
Status respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payment flow object.
func (PaymentFlow) RawJSON ¶
func (r PaymentFlow) RawJSON() string
Returns the unmodified JSON received from the API
func (*PaymentFlow) UnmarshalJSON ¶
func (r *PaymentFlow) UnmarshalJSON(data []byte) error
type PaymentFlowInvoice ¶
type PaymentFlowInvoice struct {
// Invoice identifier.
ID string `json:"id" api:"required"`
// Invoice external ID.
ExternalID string `json:"external_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Invoice being settled.
func (PaymentFlowInvoice) RawJSON ¶
func (r PaymentFlowInvoice) RawJSON() string
Returns the unmodified JSON received from the API
func (*PaymentFlowInvoice) UnmarshalJSON ¶
func (r *PaymentFlowInvoice) UnmarshalJSON(data []byte) error
type PaymentFlowPaymentPlan ¶
type PaymentFlowPaymentPlan struct {
// Payment batches.
Batches []PaymentFlowPaymentPlanBatch `json:"batches" api:"required"`
// When the plan was generated.
GeneratedAt string `json:"generated_at" api:"required"`
// Invoice identifier.
InvoiceID string `json:"invoice_id" api:"required"`
// Plan version.
Version float64 `json:"version" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Batches respjson.Field
GeneratedAt respjson.Field
InvoiceID respjson.Field
Version respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payment plan for UI rendering.
func (PaymentFlowPaymentPlan) RawJSON ¶
func (r PaymentFlowPaymentPlan) RawJSON() string
Returns the unmodified JSON received from the API
func (*PaymentFlowPaymentPlan) UnmarshalJSON ¶
func (r *PaymentFlowPaymentPlan) UnmarshalJSON(data []byte) error
type PaymentFlowPaymentPlanBatch ¶
type PaymentFlowPaymentPlanBatch struct {
// Batch identifier.
BatchID string `json:"batch_id" api:"required"`
// Batches this one depends on.
DependsOn []string `json:"depends_on" api:"required"`
// Human-readable batch label.
Label string `json:"label" api:"required"`
// Payments in this batch.
Payments []PaymentFlowPaymentPlanBatchPayment `json:"payments" api:"required"`
// Batch status.
Status string `json:"status" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BatchID respjson.Field
DependsOn respjson.Field
Label respjson.Field
Payments respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (PaymentFlowPaymentPlanBatch) RawJSON ¶
func (r PaymentFlowPaymentPlanBatch) RawJSON() string
Returns the unmodified JSON received from the API
func (*PaymentFlowPaymentPlanBatch) UnmarshalJSON ¶
func (r *PaymentFlowPaymentPlanBatch) UnmarshalJSON(data []byte) error
type PaymentFlowPaymentPlanBatchPayment ¶
type PaymentFlowPaymentPlanBatchPayment struct {
// Amount in smallest currency unit.
Amount string `json:"amount" api:"required"`
// Currency code.
Currency string `json:"currency" api:"required"`
// Direction of the payment.
Direction string `json:"direction" api:"required"`
// FRAGMENT generated unique ID.
PaymentID string `json:"payment_id" api:"required"`
// Status of the payment.
Status string `json:"status" api:"required"`
// User associated with the payment.
User PaymentFlowPaymentPlanBatchPaymentUser `json:"user" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Currency respjson.Field
Direction respjson.Field
PaymentID respjson.Field
Status respjson.Field
User respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (PaymentFlowPaymentPlanBatchPayment) RawJSON ¶
func (r PaymentFlowPaymentPlanBatchPayment) RawJSON() string
Returns the unmodified JSON received from the API
func (*PaymentFlowPaymentPlanBatchPayment) UnmarshalJSON ¶
func (r *PaymentFlowPaymentPlanBatchPayment) UnmarshalJSON(data []byte) error
type PaymentFlowPaymentPlanBatchPaymentUser ¶
type PaymentFlowPaymentPlanBatchPaymentUser struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// User-provided unique ID.
ExternalID string `json:"external_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
User associated with the payment.
func (PaymentFlowPaymentPlanBatchPaymentUser) RawJSON ¶
func (r PaymentFlowPaymentPlanBatchPaymentUser) RawJSON() string
Returns the unmodified JSON received from the API
func (*PaymentFlowPaymentPlanBatchPaymentUser) UnmarshalJSON ¶
func (r *PaymentFlowPaymentPlanBatchPaymentUser) UnmarshalJSON(data []byte) error
type Product ¶
type Product struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// Product code.
Code string `json:"code" api:"required"`
// Timestamp when the product was created. Uses ISO 8601 format.
Created time.Time `json:"created" api:"required" format:"date-time"`
// Roles that can pay for the product.
PaidByRoles []ProductPaidByRole `json:"paid_by_roles" api:"required"`
// Roles that can receive payment for the product.
PaidToRoles []ProductPaidToRole `json:"paid_to_roles" api:"required"`
// Current version of the product.
UpdateVersion float64 `json:"update_version" api:"required"`
// Workspace ID of the product.
WorkspaceID string `json:"workspace_id" api:"required"`
// Product description.
Description string `json:"description"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Code respjson.Field
Created respjson.Field
PaidByRoles respjson.Field
PaidToRoles respjson.Field
UpdateVersion respjson.Field
WorkspaceID respjson.Field
Description respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Product object.
func (*Product) UnmarshalJSON ¶
type ProductGetResponse ¶
type ProductGetResponse struct {
// Product object.
Data Product `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ProductGetResponse) RawJSON ¶
func (r ProductGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProductGetResponse) UnmarshalJSON ¶
func (r *ProductGetResponse) UnmarshalJSON(data []byte) error
type ProductListResponse ¶
type ProductListResponse struct {
// List of products.
Data []Product `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ProductListResponse) RawJSON ¶
func (r ProductListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProductListResponse) UnmarshalJSON ¶
func (r *ProductListResponse) UnmarshalJSON(data []byte) error
type ProductNewParams ¶
type ProductNewParams struct {
// Unique product code.
Code string `json:"code" api:"required"`
// Product description.
Description param.Opt[string] `json:"description,omitzero"`
// Roles that can pay for the product. Reference roles by `id` or `name`. At least
// one of `paid_by_roles` or `paid_to_roles` must be provided.
PaidByRoles []ProductNewParamsPaidByRoleUnion `json:"paid_by_roles,omitzero"`
// Roles that can receive payment for the product. Reference roles by `id` or
// `name`. At least one of `paid_by_roles` or `paid_to_roles` must be provided.
PaidToRoles []ProductNewParamsPaidToRoleUnion `json:"paid_to_roles,omitzero"`
// contains filtered or unexported fields
}
func (ProductNewParams) MarshalJSON ¶
func (r ProductNewParams) MarshalJSON() (data []byte, err error)
func (*ProductNewParams) UnmarshalJSON ¶
func (r *ProductNewParams) UnmarshalJSON(data []byte) error
type ProductNewParamsPaidByRoleID ¶
type ProductNewParamsPaidByRoleID struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// contains filtered or unexported fields
}
The property ID is required.
func (ProductNewParamsPaidByRoleID) MarshalJSON ¶
func (r ProductNewParamsPaidByRoleID) MarshalJSON() (data []byte, err error)
func (*ProductNewParamsPaidByRoleID) UnmarshalJSON ¶
func (r *ProductNewParamsPaidByRoleID) UnmarshalJSON(data []byte) error
type ProductNewParamsPaidByRoleName ¶
type ProductNewParamsPaidByRoleName struct {
// Name of the role.
Name string `json:"name" api:"required"`
// contains filtered or unexported fields
}
The property Name is required.
func (ProductNewParamsPaidByRoleName) MarshalJSON ¶
func (r ProductNewParamsPaidByRoleName) MarshalJSON() (data []byte, err error)
func (*ProductNewParamsPaidByRoleName) UnmarshalJSON ¶
func (r *ProductNewParamsPaidByRoleName) UnmarshalJSON(data []byte) error
type ProductNewParamsPaidByRoleUnion ¶
type ProductNewParamsPaidByRoleUnion struct {
OfProductNewsPaidByRoleID *ProductNewParamsPaidByRoleID `json:",omitzero,inline"`
OfProductNewsPaidByRoleName *ProductNewParamsPaidByRoleName `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ProductNewParamsPaidByRoleUnion) MarshalJSON ¶
func (u ProductNewParamsPaidByRoleUnion) MarshalJSON() ([]byte, error)
func (*ProductNewParamsPaidByRoleUnion) UnmarshalJSON ¶
func (u *ProductNewParamsPaidByRoleUnion) UnmarshalJSON(data []byte) error
type ProductNewParamsPaidToRoleID ¶
type ProductNewParamsPaidToRoleID struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// contains filtered or unexported fields
}
The property ID is required.
func (ProductNewParamsPaidToRoleID) MarshalJSON ¶
func (r ProductNewParamsPaidToRoleID) MarshalJSON() (data []byte, err error)
func (*ProductNewParamsPaidToRoleID) UnmarshalJSON ¶
func (r *ProductNewParamsPaidToRoleID) UnmarshalJSON(data []byte) error
type ProductNewParamsPaidToRoleName ¶
type ProductNewParamsPaidToRoleName struct {
// Name of the role.
Name string `json:"name" api:"required"`
// contains filtered or unexported fields
}
The property Name is required.
func (ProductNewParamsPaidToRoleName) MarshalJSON ¶
func (r ProductNewParamsPaidToRoleName) MarshalJSON() (data []byte, err error)
func (*ProductNewParamsPaidToRoleName) UnmarshalJSON ¶
func (r *ProductNewParamsPaidToRoleName) UnmarshalJSON(data []byte) error
type ProductNewParamsPaidToRoleUnion ¶
type ProductNewParamsPaidToRoleUnion struct {
OfProductNewsPaidToRoleID *ProductNewParamsPaidToRoleID `json:",omitzero,inline"`
OfProductNewsPaidToRoleName *ProductNewParamsPaidToRoleName `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ProductNewParamsPaidToRoleUnion) MarshalJSON ¶
func (u ProductNewParamsPaidToRoleUnion) MarshalJSON() ([]byte, error)
func (*ProductNewParamsPaidToRoleUnion) UnmarshalJSON ¶
func (u *ProductNewParamsPaidToRoleUnion) UnmarshalJSON(data []byte) error
type ProductNewResponse ¶
type ProductNewResponse struct {
// Product object.
Data Product `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ProductNewResponse) RawJSON ¶
func (r ProductNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProductNewResponse) UnmarshalJSON ¶
func (r *ProductNewResponse) UnmarshalJSON(data []byte) error
type ProductPaidByRole ¶
type ProductPaidByRole struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// Name of the role.
Name string `json:"name" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Role reference in product API responses.
func (ProductPaidByRole) RawJSON ¶
func (r ProductPaidByRole) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProductPaidByRole) UnmarshalJSON ¶
func (r *ProductPaidByRole) UnmarshalJSON(data []byte) error
type ProductPaidToRole ¶
type ProductPaidToRole struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// Name of the role.
Name string `json:"name" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Role reference in product API responses.
func (ProductPaidToRole) RawJSON ¶
func (r ProductPaidToRole) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProductPaidToRole) UnmarshalJSON ¶
func (r *ProductPaidToRole) UnmarshalJSON(data []byte) error
type ProductService ¶
type ProductService struct {
// contains filtered or unexported fields
}
Product management operations
ProductService contains methods and other services that help with interacting with the fragment API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewProductService method instead.
func NewProductService ¶
func NewProductService(opts ...option.RequestOption) (r ProductService)
NewProductService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ProductService) Get ¶
func (r *ProductService) Get(ctx context.Context, code string, opts ...option.RequestOption) (res *ProductGetResponse, err error)
Retrieves a product by code.
func (*ProductService) List ¶
func (r *ProductService) List(ctx context.Context, opts ...option.RequestOption) (res *ProductListResponse, err error)
Lists all products.
func (*ProductService) New ¶
func (r *ProductService) New(ctx context.Context, body ProductNewParams, opts ...option.RequestOption) (res *ProductNewResponse, err error)
Creates a product.
type Role
deprecated
type Role struct {
// FRAGMENT generated unique ID. Deprecated.
//
// Deprecated: deprecated
ID string `json:"id" api:"required"`
// Name of the role. Deprecated, use user tags instead.
//
// Deprecated: deprecated
Role string `json:"role" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Role respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Role object. Deprecated, use user tags instead.
Deprecated: deprecated
func (*Role) UnmarshalJSON ¶
type RoleListResponse
deprecated
type RoleListResponse struct {
// List of roles. Deprecated, use user tags instead.
//
// Deprecated: deprecated
Data []Role `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
List of roles. Deprecated, use user tags instead.
Deprecated: deprecated
func (RoleListResponse) RawJSON ¶
func (r RoleListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*RoleListResponse) UnmarshalJSON ¶
func (r *RoleListResponse) UnmarshalJSON(data []byte) error
type RoleNewParams ¶
type RoleNewParams struct {
// Name of the role. Deprecated, use user tags instead.
Role string `json:"role" api:"required"`
// contains filtered or unexported fields
}
func (RoleNewParams) MarshalJSON ¶
func (r RoleNewParams) MarshalJSON() (data []byte, err error)
func (*RoleNewParams) UnmarshalJSON ¶
func (r *RoleNewParams) UnmarshalJSON(data []byte) error
type RoleNewResponse
deprecated
type RoleNewResponse struct {
// Role object. Deprecated, use user tags instead.
//
// Deprecated: deprecated
Data Role `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Deprecated: deprecated
func (RoleNewResponse) RawJSON ¶
func (r RoleNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*RoleNewResponse) UnmarshalJSON ¶
func (r *RoleNewResponse) UnmarshalJSON(data []byte) error
type RoleService ¶
type RoleService struct {
// contains filtered or unexported fields
}
Role management operations
RoleService contains methods and other services that help with interacting with the fragment API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRoleService method instead.
func NewRoleService ¶
func NewRoleService(opts ...option.RequestOption) (r RoleService)
NewRoleService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RoleService) List
deprecated
func (r *RoleService) List(ctx context.Context, opts ...option.RequestOption) (res *RoleListResponse, err error)
Lists all roles. Deprecated, use user tags instead.
Deprecated: deprecated
func (*RoleService) New
deprecated
func (r *RoleService) New(ctx context.Context, body RoleNewParams, opts ...option.RequestOption) (res *RoleNewResponse, err error)
Creates a role. Deprecated, use user tags instead.
Deprecated: deprecated
type Transaction ¶
type Transaction struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// External account for the transaction.
Account TransactionAccount `json:"account" api:"required"`
// Allocations applied to the transaction.
Allocations []TransactionAllocation `json:"allocations" api:"required"`
// Transaction amount, as a string in the smallest currency unit, such as cents for
// USD. Can be positive or negative.
Amount string `json:"amount" api:"required"`
// Timestamp when the transaction was created. Uses ISO 8601 format.
Created time.Time `json:"created" api:"required" format:"date-time"`
// ISO 4217 or crypto currency code.
//
// Any of "ADA", "BTC", "DAI", "ETH", "SOL", "USDC", "USDT", "USDG", "EURC",
// "CADC", "CADT", "XLM", "UNI", "BCH", "LTC", "AAVE", "LINK", "MATIC", "PTS",
// "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM",
// "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN",
// "BWP", "BYR", "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUC",
// "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR",
// "FJD", "FKP", "GBP", "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD",
// "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP", "INR", "IQD", "IRR",
// "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD",
// "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", "MAD", "MDL", "MGA",
// "MKD", "MMK", "MNT", "MOP", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN", "NAD",
// "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR",
// "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG",
// "SEK", "SGD", "SHP", "SLL", "SOS", "SPL", "SRD", "SVC", "SYP", "STN", "SZL",
// "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TVD", "TWD", "TZS", "UAH",
// "UGX", "USD", "UYU", "UZS", "VEF", "VND", "VUV", "WST", "XAF", "XCD", "XOF",
// "XPF", "YER", "ZAR", "ZMW", "LOGICAL", "CUSTOM".
Currency TransactionCurrency `json:"currency" api:"required"`
// User-provided unique ID.
ExternalID string `json:"external_id" api:"required"`
// Timestamp when the transaction was posted. Uses ISO 8601 format.
Posted time.Time `json:"posted" api:"required" format:"date-time"`
// Tags for the transaction.
Tags []TransactionTag `json:"tags" api:"required"`
// Amount not yet allocated, as a string.
UnallocatedAmount string `json:"unallocated_amount" api:"required"`
// Current version of the transaction.
Version int64 `json:"version" api:"required"`
// Timestamp when the transaction was last modified. Uses ISO 8601 format.
Modified time.Time `json:"modified" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Account respjson.Field
Allocations respjson.Field
Amount respjson.Field
Created respjson.Field
Currency respjson.Field
ExternalID respjson.Field
Posted respjson.Field
Tags respjson.Field
UnallocatedAmount respjson.Field
Version respjson.Field
Modified respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Transaction object.
func (Transaction) RawJSON ¶
func (r Transaction) RawJSON() string
Returns the unmodified JSON received from the API
func (*Transaction) UnmarshalJSON ¶
func (r *Transaction) UnmarshalJSON(data []byte) error
type TransactionAccount ¶
type TransactionAccount struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// User-provided unique ID.
ExternalID string `json:"external_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
External account for the transaction.
func (TransactionAccount) RawJSON ¶
func (r TransactionAccount) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionAccount) UnmarshalJSON ¶
func (r *TransactionAccount) UnmarshalJSON(data []byte) error
type TransactionAllocation ¶
type TransactionAllocation struct {
// Allocated amount, as a positive string in the smallest currency unit, such as
// cents for USD.
Amount string `json:"amount" api:"required"`
// Invoice the allocation is applied against.
InvoiceID string `json:"invoice_id" api:"required"`
// Type of allocation.
//
// Any of "invoice_payin", "invoice_payout".
Type string `json:"type" api:"required"`
// User associated with the allocation.
User TransactionAllocationUser `json:"user" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
InvoiceID respjson.Field
Type respjson.Field
User respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An allocation linking a transaction to an invoice.
func (TransactionAllocation) RawJSON ¶
func (r TransactionAllocation) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionAllocation) UnmarshalJSON ¶
func (r *TransactionAllocation) UnmarshalJSON(data []byte) error
type TransactionAllocationUser ¶
type TransactionAllocationUser struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// User-provided unique ID.
ExternalID string `json:"external_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
User associated with the allocation.
func (TransactionAllocationUser) RawJSON ¶
func (r TransactionAllocationUser) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionAllocationUser) UnmarshalJSON ¶
func (r *TransactionAllocationUser) UnmarshalJSON(data []byte) error
type TransactionCurrency ¶
type TransactionCurrency string
ISO 4217 or crypto currency code.
const ( TransactionCurrencyAda TransactionCurrency = "ADA" TransactionCurrencyBtc TransactionCurrency = "BTC" TransactionCurrencyDai TransactionCurrency = "DAI" TransactionCurrencyEth TransactionCurrency = "ETH" TransactionCurrencySol TransactionCurrency = "SOL" TransactionCurrencyUsdc TransactionCurrency = "USDC" TransactionCurrencyUsdt TransactionCurrency = "USDT" TransactionCurrencyUsdg TransactionCurrency = "USDG" TransactionCurrencyEurc TransactionCurrency = "EURC" TransactionCurrencyCadc TransactionCurrency = "CADC" TransactionCurrencyCadt TransactionCurrency = "CADT" TransactionCurrencyXlm TransactionCurrency = "XLM" TransactionCurrencyUni TransactionCurrency = "UNI" TransactionCurrencyBch TransactionCurrency = "BCH" TransactionCurrencyLtc TransactionCurrency = "LTC" TransactionCurrencyAave TransactionCurrency = "AAVE" TransactionCurrencyLink TransactionCurrency = "LINK" TransactionCurrencyMatic TransactionCurrency = "MATIC" TransactionCurrencyPts TransactionCurrency = "PTS" TransactionCurrencyAed TransactionCurrency = "AED" TransactionCurrencyAfn TransactionCurrency = "AFN" TransactionCurrencyAll TransactionCurrency = "ALL" TransactionCurrencyAmd TransactionCurrency = "AMD" TransactionCurrencyAng TransactionCurrency = "ANG" TransactionCurrencyAoa TransactionCurrency = "AOA" TransactionCurrencyArs TransactionCurrency = "ARS" TransactionCurrencyAud TransactionCurrency = "AUD" TransactionCurrencyAwg TransactionCurrency = "AWG" TransactionCurrencyAzn TransactionCurrency = "AZN" TransactionCurrencyBam TransactionCurrency = "BAM" TransactionCurrencyBbd TransactionCurrency = "BBD" TransactionCurrencyBdt TransactionCurrency = "BDT" TransactionCurrencyBgn TransactionCurrency = "BGN" TransactionCurrencyBhd TransactionCurrency = "BHD" TransactionCurrencyBif TransactionCurrency = "BIF" TransactionCurrencyBmd TransactionCurrency = "BMD" TransactionCurrencyBnd TransactionCurrency = "BND" TransactionCurrencyBob TransactionCurrency = "BOB" TransactionCurrencyBrl TransactionCurrency = "BRL" TransactionCurrencyBsd TransactionCurrency = "BSD" TransactionCurrencyBtn TransactionCurrency = "BTN" TransactionCurrencyBwp TransactionCurrency = "BWP" TransactionCurrencyByr TransactionCurrency = "BYR" TransactionCurrencyBzd TransactionCurrency = "BZD" TransactionCurrencyCad TransactionCurrency = "CAD" TransactionCurrencyCdf TransactionCurrency = "CDF" TransactionCurrencyChf TransactionCurrency = "CHF" TransactionCurrencyClp TransactionCurrency = "CLP" TransactionCurrencyCny TransactionCurrency = "CNY" TransactionCurrencyCop TransactionCurrency = "COP" TransactionCurrencyCrc TransactionCurrency = "CRC" TransactionCurrencyCuc TransactionCurrency = "CUC" TransactionCurrencyCup TransactionCurrency = "CUP" TransactionCurrencyCve TransactionCurrency = "CVE" TransactionCurrencyCzk TransactionCurrency = "CZK" TransactionCurrencyDjf TransactionCurrency = "DJF" TransactionCurrencyDkk TransactionCurrency = "DKK" TransactionCurrencyDop TransactionCurrency = "DOP" TransactionCurrencyDzd TransactionCurrency = "DZD" TransactionCurrencyEgp TransactionCurrency = "EGP" TransactionCurrencyErn TransactionCurrency = "ERN" TransactionCurrencyEtb TransactionCurrency = "ETB" TransactionCurrencyEur TransactionCurrency = "EUR" TransactionCurrencyFjd TransactionCurrency = "FJD" TransactionCurrencyFkp TransactionCurrency = "FKP" TransactionCurrencyGbp TransactionCurrency = "GBP" TransactionCurrencyGel TransactionCurrency = "GEL" TransactionCurrencyGgp TransactionCurrency = "GGP" TransactionCurrencyGhs TransactionCurrency = "GHS" TransactionCurrencyGip TransactionCurrency = "GIP" TransactionCurrencyGmd TransactionCurrency = "GMD" TransactionCurrencyGnf TransactionCurrency = "GNF" TransactionCurrencyGtq TransactionCurrency = "GTQ" TransactionCurrencyGyd TransactionCurrency = "GYD" TransactionCurrencyHkd TransactionCurrency = "HKD" TransactionCurrencyHnl TransactionCurrency = "HNL" TransactionCurrencyHrk TransactionCurrency = "HRK" TransactionCurrencyHtg TransactionCurrency = "HTG" TransactionCurrencyHuf TransactionCurrency = "HUF" TransactionCurrencyIdr TransactionCurrency = "IDR" TransactionCurrencyIls TransactionCurrency = "ILS" TransactionCurrencyImp TransactionCurrency = "IMP" TransactionCurrencyInr TransactionCurrency = "INR" TransactionCurrencyIqd TransactionCurrency = "IQD" TransactionCurrencyIrr TransactionCurrency = "IRR" TransactionCurrencyIsk TransactionCurrency = "ISK" TransactionCurrencyJmd TransactionCurrency = "JMD" TransactionCurrencyJod TransactionCurrency = "JOD" TransactionCurrencyJpy TransactionCurrency = "JPY" TransactionCurrencyKes TransactionCurrency = "KES" TransactionCurrencyKgs TransactionCurrency = "KGS" TransactionCurrencyKhr TransactionCurrency = "KHR" TransactionCurrencyKmf TransactionCurrency = "KMF" TransactionCurrencyKpw TransactionCurrency = "KPW" TransactionCurrencyKrw TransactionCurrency = "KRW" TransactionCurrencyKwd TransactionCurrency = "KWD" TransactionCurrencyKyd TransactionCurrency = "KYD" TransactionCurrencyKzt TransactionCurrency = "KZT" TransactionCurrencyLak TransactionCurrency = "LAK" TransactionCurrencyLbp TransactionCurrency = "LBP" TransactionCurrencyLkr TransactionCurrency = "LKR" TransactionCurrencyLrd TransactionCurrency = "LRD" TransactionCurrencyLsl TransactionCurrency = "LSL" TransactionCurrencyLyd TransactionCurrency = "LYD" TransactionCurrencyMad TransactionCurrency = "MAD" TransactionCurrencyMdl TransactionCurrency = "MDL" TransactionCurrencyMga TransactionCurrency = "MGA" TransactionCurrencyMkd TransactionCurrency = "MKD" TransactionCurrencyMmk TransactionCurrency = "MMK" TransactionCurrencyMnt TransactionCurrency = "MNT" TransactionCurrencyMop TransactionCurrency = "MOP" TransactionCurrencyMur TransactionCurrency = "MUR" TransactionCurrencyMvr TransactionCurrency = "MVR" TransactionCurrencyMwk TransactionCurrency = "MWK" TransactionCurrencyMxn TransactionCurrency = "MXN" TransactionCurrencyMyr TransactionCurrency = "MYR" TransactionCurrencyMzn TransactionCurrency = "MZN" TransactionCurrencyNad TransactionCurrency = "NAD" TransactionCurrencyNgn TransactionCurrency = "NGN" TransactionCurrencyNio TransactionCurrency = "NIO" TransactionCurrencyNok TransactionCurrency = "NOK" TransactionCurrencyNpr TransactionCurrency = "NPR" TransactionCurrencyNzd TransactionCurrency = "NZD" TransactionCurrencyOmr TransactionCurrency = "OMR" TransactionCurrencyPab TransactionCurrency = "PAB" TransactionCurrencyPen TransactionCurrency = "PEN" TransactionCurrencyPgk TransactionCurrency = "PGK" TransactionCurrencyPhp TransactionCurrency = "PHP" TransactionCurrencyPkr TransactionCurrency = "PKR" TransactionCurrencyPln TransactionCurrency = "PLN" TransactionCurrencyPyg TransactionCurrency = "PYG" TransactionCurrencyQar TransactionCurrency = "QAR" TransactionCurrencyRon TransactionCurrency = "RON" TransactionCurrencyRsd TransactionCurrency = "RSD" TransactionCurrencyRub TransactionCurrency = "RUB" TransactionCurrencyRwf TransactionCurrency = "RWF" TransactionCurrencySar TransactionCurrency = "SAR" TransactionCurrencySbd TransactionCurrency = "SBD" TransactionCurrencyScr TransactionCurrency = "SCR" TransactionCurrencySdg TransactionCurrency = "SDG" TransactionCurrencySek TransactionCurrency = "SEK" TransactionCurrencySgd TransactionCurrency = "SGD" TransactionCurrencyShp TransactionCurrency = "SHP" TransactionCurrencySll TransactionCurrency = "SLL" TransactionCurrencySos TransactionCurrency = "SOS" TransactionCurrencySpl TransactionCurrency = "SPL" TransactionCurrencySrd TransactionCurrency = "SRD" TransactionCurrencySvc TransactionCurrency = "SVC" TransactionCurrencySyp TransactionCurrency = "SYP" TransactionCurrencyStn TransactionCurrency = "STN" TransactionCurrencySzl TransactionCurrency = "SZL" TransactionCurrencyThb TransactionCurrency = "THB" TransactionCurrencyTjs TransactionCurrency = "TJS" TransactionCurrencyTmt TransactionCurrency = "TMT" TransactionCurrencyTnd TransactionCurrency = "TND" TransactionCurrencyTop TransactionCurrency = "TOP" TransactionCurrencyTry TransactionCurrency = "TRY" TransactionCurrencyTtd TransactionCurrency = "TTD" TransactionCurrencyTvd TransactionCurrency = "TVD" TransactionCurrencyTwd TransactionCurrency = "TWD" TransactionCurrencyTzs TransactionCurrency = "TZS" TransactionCurrencyUah TransactionCurrency = "UAH" TransactionCurrencyUgx TransactionCurrency = "UGX" TransactionCurrencyUsd TransactionCurrency = "USD" TransactionCurrencyUyu TransactionCurrency = "UYU" TransactionCurrencyUzs TransactionCurrency = "UZS" TransactionCurrencyVef TransactionCurrency = "VEF" TransactionCurrencyVnd TransactionCurrency = "VND" TransactionCurrencyVuv TransactionCurrency = "VUV" TransactionCurrencyWst TransactionCurrency = "WST" TransactionCurrencyXaf TransactionCurrency = "XAF" TransactionCurrencyXcd TransactionCurrency = "XCD" TransactionCurrencyXof TransactionCurrency = "XOF" TransactionCurrencyXpf TransactionCurrency = "XPF" TransactionCurrencyYer TransactionCurrency = "YER" TransactionCurrencyZar TransactionCurrency = "ZAR" TransactionCurrencyZmw TransactionCurrency = "ZMW" TransactionCurrencyLogical TransactionCurrency = "LOGICAL" TransactionCurrencyCustom TransactionCurrency = "CUSTOM" )
type TransactionGetResponse ¶
type TransactionGetResponse struct {
// Transaction object.
Data Transaction `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TransactionGetResponse) RawJSON ¶
func (r TransactionGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionGetResponse) UnmarshalJSON ¶
func (r *TransactionGetResponse) UnmarshalJSON(data []byte) error
type TransactionListHistoryResponse ¶
type TransactionListHistoryResponse struct {
// List of transaction versions over time, ordered by version, oldest first.
Data []Transaction `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TransactionListHistoryResponse) RawJSON ¶
func (r TransactionListHistoryResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionListHistoryResponse) UnmarshalJSON ¶
func (r *TransactionListHistoryResponse) UnmarshalJSON(data []byte) error
type TransactionListParams ¶
type TransactionListParams struct {
// Filter by account `id` or `external_id`. If the account does not exist, returns
// an empty list.
Account param.Opt[string] `query:"account,omitzero" json:"-"`
// Filter by reconciliation status. `reconciled` returns transactions where
// unallocated_amount is 0. `unreconciled` returns transactions where
// unallocated_amount is not 0. Omit for all transactions.
//
// Any of "reconciled", "unreconciled".
ReconciliationStatus TransactionListParamsReconciliationStatus `query:"reconciliation_status,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (TransactionListParams) URLQuery ¶
func (r TransactionListParams) URLQuery() (v url.Values, err error)
URLQuery serializes TransactionListParams's query parameters as `url.Values`.
type TransactionListParamsReconciliationStatus ¶
type TransactionListParamsReconciliationStatus string
Filter by reconciliation status. `reconciled` returns transactions where unallocated_amount is 0. `unreconciled` returns transactions where unallocated_amount is not 0. Omit for all transactions.
const ( TransactionListParamsReconciliationStatusReconciled TransactionListParamsReconciliationStatus = "reconciled" TransactionListParamsReconciliationStatusUnreconciled TransactionListParamsReconciliationStatus = "unreconciled" )
type TransactionListResponse ¶
type TransactionListResponse struct {
// List of transaction objects matching the filter criteria.
Data []Transaction `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TransactionListResponse) RawJSON ¶
func (r TransactionListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionListResponse) UnmarshalJSON ¶
func (r *TransactionListResponse) UnmarshalJSON(data []byte) error
type TransactionNewParams ¶
type TransactionNewParams struct {
// External account for the transaction. Identify it by `id`, `external_id`, or
// both.
Account TransactionNewParamsAccount `json:"account,omitzero" api:"required"`
// Allocations for the transaction. An empty array indicates unreconciled funds.
Allocations []TransactionNewParamsAllocation `json:"allocations,omitzero" api:"required"`
// Transaction amount, as a string in the smallest currency unit, such as cents for
// USD. Can be positive or negative.
Amount string `json:"amount" api:"required"`
// ISO 4217 or crypto currency code.
//
// Any of "ADA", "BTC", "DAI", "ETH", "SOL", "USDC", "USDT", "USDG", "EURC",
// "CADC", "CADT", "XLM", "UNI", "BCH", "LTC", "AAVE", "LINK", "MATIC", "PTS",
// "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM",
// "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN",
// "BWP", "BYR", "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUC",
// "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR",
// "FJD", "FKP", "GBP", "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD",
// "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP", "INR", "IQD", "IRR",
// "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD",
// "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", "MAD", "MDL", "MGA",
// "MKD", "MMK", "MNT", "MOP", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN", "NAD",
// "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR",
// "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG",
// "SEK", "SGD", "SHP", "SLL", "SOS", "SPL", "SRD", "SVC", "SYP", "STN", "SZL",
// "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TVD", "TWD", "TZS", "UAH",
// "UGX", "USD", "UYU", "UZS", "VEF", "VND", "VUV", "WST", "XAF", "XCD", "XOF",
// "XPF", "YER", "ZAR", "ZMW", "LOGICAL", "CUSTOM".
Currency TransactionNewParamsCurrency `json:"currency,omitzero" api:"required"`
// User-provided unique ID.
ExternalID string `json:"external_id" api:"required"`
// Timestamp when the transaction was posted. Uses ISO 8601 format.
Posted time.Time `json:"posted" api:"required" format:"date-time"`
// Tags for the transaction.
Tags []TransactionNewParamsTag `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (TransactionNewParams) MarshalJSON ¶
func (r TransactionNewParams) MarshalJSON() (data []byte, err error)
func (*TransactionNewParams) UnmarshalJSON ¶
func (r *TransactionNewParams) UnmarshalJSON(data []byte) error
type TransactionNewParamsAccount ¶
type TransactionNewParamsAccount struct {
// FRAGMENT generated unique ID.
ID param.Opt[string] `json:"id,omitzero"`
// User-provided unique ID.
ExternalID param.Opt[string] `json:"external_id,omitzero"`
// contains filtered or unexported fields
}
External account for the transaction. Identify it by `id`, `external_id`, or both.
func (TransactionNewParamsAccount) MarshalJSON ¶
func (r TransactionNewParamsAccount) MarshalJSON() (data []byte, err error)
func (*TransactionNewParamsAccount) UnmarshalJSON ¶
func (r *TransactionNewParamsAccount) UnmarshalJSON(data []byte) error
type TransactionNewParamsAllocation ¶
type TransactionNewParamsAllocation struct {
// Allocation amount, as a positive string in the smallest currency unit, such as
// cents for USD.
Amount string `json:"amount" api:"required"`
// Invoice to allocate against.
InvoiceID string `json:"invoice_id" api:"required"`
// Type of allocation.
//
// Any of "invoice_payin", "invoice_payout".
Type string `json:"type,omitzero" api:"required"`
// Identifies a user by `id` or `external_id`.
User TransactionNewParamsAllocationUserUnion `json:"user,omitzero" api:"required"`
// contains filtered or unexported fields
}
An allocation linking a transaction to an invoice.
The properties Amount, InvoiceID, Type, User are required.
func (TransactionNewParamsAllocation) MarshalJSON ¶
func (r TransactionNewParamsAllocation) MarshalJSON() (data []byte, err error)
func (*TransactionNewParamsAllocation) UnmarshalJSON ¶
func (r *TransactionNewParamsAllocation) UnmarshalJSON(data []byte) error
type TransactionNewParamsAllocationUserExternalID ¶
type TransactionNewParamsAllocationUserExternalID struct {
// User-provided unique ID.
ExternalID string `json:"external_id" api:"required"`
// contains filtered or unexported fields
}
The property ExternalID is required.
func (TransactionNewParamsAllocationUserExternalID) MarshalJSON ¶
func (r TransactionNewParamsAllocationUserExternalID) MarshalJSON() (data []byte, err error)
func (*TransactionNewParamsAllocationUserExternalID) UnmarshalJSON ¶
func (r *TransactionNewParamsAllocationUserExternalID) UnmarshalJSON(data []byte) error
type TransactionNewParamsAllocationUserID ¶
type TransactionNewParamsAllocationUserID struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// contains filtered or unexported fields
}
The property ID is required.
func (TransactionNewParamsAllocationUserID) MarshalJSON ¶
func (r TransactionNewParamsAllocationUserID) MarshalJSON() (data []byte, err error)
func (*TransactionNewParamsAllocationUserID) UnmarshalJSON ¶
func (r *TransactionNewParamsAllocationUserID) UnmarshalJSON(data []byte) error
type TransactionNewParamsAllocationUserUnion ¶
type TransactionNewParamsAllocationUserUnion struct {
OfTransactionNewsAllocationUserID *TransactionNewParamsAllocationUserID `json:",omitzero,inline"`
OfTransactionNewsAllocationUserExternalID *TransactionNewParamsAllocationUserExternalID `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TransactionNewParamsAllocationUserUnion) MarshalJSON ¶
func (u TransactionNewParamsAllocationUserUnion) MarshalJSON() ([]byte, error)
func (*TransactionNewParamsAllocationUserUnion) UnmarshalJSON ¶
func (u *TransactionNewParamsAllocationUserUnion) UnmarshalJSON(data []byte) error
type TransactionNewParamsCurrency ¶
type TransactionNewParamsCurrency string
ISO 4217 or crypto currency code.
const ( TransactionNewParamsCurrencyAda TransactionNewParamsCurrency = "ADA" TransactionNewParamsCurrencyBtc TransactionNewParamsCurrency = "BTC" TransactionNewParamsCurrencyDai TransactionNewParamsCurrency = "DAI" TransactionNewParamsCurrencyEth TransactionNewParamsCurrency = "ETH" TransactionNewParamsCurrencySol TransactionNewParamsCurrency = "SOL" TransactionNewParamsCurrencyUsdc TransactionNewParamsCurrency = "USDC" TransactionNewParamsCurrencyUsdt TransactionNewParamsCurrency = "USDT" TransactionNewParamsCurrencyUsdg TransactionNewParamsCurrency = "USDG" TransactionNewParamsCurrencyEurc TransactionNewParamsCurrency = "EURC" TransactionNewParamsCurrencyCadc TransactionNewParamsCurrency = "CADC" TransactionNewParamsCurrencyCadt TransactionNewParamsCurrency = "CADT" TransactionNewParamsCurrencyXlm TransactionNewParamsCurrency = "XLM" TransactionNewParamsCurrencyUni TransactionNewParamsCurrency = "UNI" TransactionNewParamsCurrencyBch TransactionNewParamsCurrency = "BCH" TransactionNewParamsCurrencyLtc TransactionNewParamsCurrency = "LTC" TransactionNewParamsCurrencyAave TransactionNewParamsCurrency = "AAVE" TransactionNewParamsCurrencyLink TransactionNewParamsCurrency = "LINK" TransactionNewParamsCurrencyMatic TransactionNewParamsCurrency = "MATIC" TransactionNewParamsCurrencyPts TransactionNewParamsCurrency = "PTS" TransactionNewParamsCurrencyAed TransactionNewParamsCurrency = "AED" TransactionNewParamsCurrencyAfn TransactionNewParamsCurrency = "AFN" TransactionNewParamsCurrencyAll TransactionNewParamsCurrency = "ALL" TransactionNewParamsCurrencyAmd TransactionNewParamsCurrency = "AMD" TransactionNewParamsCurrencyAng TransactionNewParamsCurrency = "ANG" TransactionNewParamsCurrencyAoa TransactionNewParamsCurrency = "AOA" TransactionNewParamsCurrencyArs TransactionNewParamsCurrency = "ARS" TransactionNewParamsCurrencyAud TransactionNewParamsCurrency = "AUD" TransactionNewParamsCurrencyAwg TransactionNewParamsCurrency = "AWG" TransactionNewParamsCurrencyAzn TransactionNewParamsCurrency = "AZN" TransactionNewParamsCurrencyBam TransactionNewParamsCurrency = "BAM" TransactionNewParamsCurrencyBbd TransactionNewParamsCurrency = "BBD" TransactionNewParamsCurrencyBdt TransactionNewParamsCurrency = "BDT" TransactionNewParamsCurrencyBgn TransactionNewParamsCurrency = "BGN" TransactionNewParamsCurrencyBhd TransactionNewParamsCurrency = "BHD" TransactionNewParamsCurrencyBif TransactionNewParamsCurrency = "BIF" TransactionNewParamsCurrencyBmd TransactionNewParamsCurrency = "BMD" TransactionNewParamsCurrencyBnd TransactionNewParamsCurrency = "BND" TransactionNewParamsCurrencyBob TransactionNewParamsCurrency = "BOB" TransactionNewParamsCurrencyBrl TransactionNewParamsCurrency = "BRL" TransactionNewParamsCurrencyBsd TransactionNewParamsCurrency = "BSD" TransactionNewParamsCurrencyBtn TransactionNewParamsCurrency = "BTN" TransactionNewParamsCurrencyBwp TransactionNewParamsCurrency = "BWP" TransactionNewParamsCurrencyByr TransactionNewParamsCurrency = "BYR" TransactionNewParamsCurrencyBzd TransactionNewParamsCurrency = "BZD" TransactionNewParamsCurrencyCad TransactionNewParamsCurrency = "CAD" TransactionNewParamsCurrencyCdf TransactionNewParamsCurrency = "CDF" TransactionNewParamsCurrencyChf TransactionNewParamsCurrency = "CHF" TransactionNewParamsCurrencyClp TransactionNewParamsCurrency = "CLP" TransactionNewParamsCurrencyCny TransactionNewParamsCurrency = "CNY" TransactionNewParamsCurrencyCop TransactionNewParamsCurrency = "COP" TransactionNewParamsCurrencyCrc TransactionNewParamsCurrency = "CRC" TransactionNewParamsCurrencyCuc TransactionNewParamsCurrency = "CUC" TransactionNewParamsCurrencyCup TransactionNewParamsCurrency = "CUP" TransactionNewParamsCurrencyCve TransactionNewParamsCurrency = "CVE" TransactionNewParamsCurrencyCzk TransactionNewParamsCurrency = "CZK" TransactionNewParamsCurrencyDjf TransactionNewParamsCurrency = "DJF" TransactionNewParamsCurrencyDkk TransactionNewParamsCurrency = "DKK" TransactionNewParamsCurrencyDop TransactionNewParamsCurrency = "DOP" TransactionNewParamsCurrencyDzd TransactionNewParamsCurrency = "DZD" TransactionNewParamsCurrencyEgp TransactionNewParamsCurrency = "EGP" TransactionNewParamsCurrencyErn TransactionNewParamsCurrency = "ERN" TransactionNewParamsCurrencyEtb TransactionNewParamsCurrency = "ETB" TransactionNewParamsCurrencyEur TransactionNewParamsCurrency = "EUR" TransactionNewParamsCurrencyFjd TransactionNewParamsCurrency = "FJD" TransactionNewParamsCurrencyFkp TransactionNewParamsCurrency = "FKP" TransactionNewParamsCurrencyGbp TransactionNewParamsCurrency = "GBP" TransactionNewParamsCurrencyGel TransactionNewParamsCurrency = "GEL" TransactionNewParamsCurrencyGgp TransactionNewParamsCurrency = "GGP" TransactionNewParamsCurrencyGhs TransactionNewParamsCurrency = "GHS" TransactionNewParamsCurrencyGip TransactionNewParamsCurrency = "GIP" TransactionNewParamsCurrencyGmd TransactionNewParamsCurrency = "GMD" TransactionNewParamsCurrencyGnf TransactionNewParamsCurrency = "GNF" TransactionNewParamsCurrencyGtq TransactionNewParamsCurrency = "GTQ" TransactionNewParamsCurrencyGyd TransactionNewParamsCurrency = "GYD" TransactionNewParamsCurrencyHkd TransactionNewParamsCurrency = "HKD" TransactionNewParamsCurrencyHnl TransactionNewParamsCurrency = "HNL" TransactionNewParamsCurrencyHrk TransactionNewParamsCurrency = "HRK" TransactionNewParamsCurrencyHtg TransactionNewParamsCurrency = "HTG" TransactionNewParamsCurrencyHuf TransactionNewParamsCurrency = "HUF" TransactionNewParamsCurrencyIdr TransactionNewParamsCurrency = "IDR" TransactionNewParamsCurrencyIls TransactionNewParamsCurrency = "ILS" TransactionNewParamsCurrencyImp TransactionNewParamsCurrency = "IMP" TransactionNewParamsCurrencyInr TransactionNewParamsCurrency = "INR" TransactionNewParamsCurrencyIqd TransactionNewParamsCurrency = "IQD" TransactionNewParamsCurrencyIrr TransactionNewParamsCurrency = "IRR" TransactionNewParamsCurrencyIsk TransactionNewParamsCurrency = "ISK" TransactionNewParamsCurrencyJmd TransactionNewParamsCurrency = "JMD" TransactionNewParamsCurrencyJod TransactionNewParamsCurrency = "JOD" TransactionNewParamsCurrencyJpy TransactionNewParamsCurrency = "JPY" TransactionNewParamsCurrencyKes TransactionNewParamsCurrency = "KES" TransactionNewParamsCurrencyKgs TransactionNewParamsCurrency = "KGS" TransactionNewParamsCurrencyKhr TransactionNewParamsCurrency = "KHR" TransactionNewParamsCurrencyKmf TransactionNewParamsCurrency = "KMF" TransactionNewParamsCurrencyKpw TransactionNewParamsCurrency = "KPW" TransactionNewParamsCurrencyKrw TransactionNewParamsCurrency = "KRW" TransactionNewParamsCurrencyKwd TransactionNewParamsCurrency = "KWD" TransactionNewParamsCurrencyKyd TransactionNewParamsCurrency = "KYD" TransactionNewParamsCurrencyKzt TransactionNewParamsCurrency = "KZT" TransactionNewParamsCurrencyLak TransactionNewParamsCurrency = "LAK" TransactionNewParamsCurrencyLbp TransactionNewParamsCurrency = "LBP" TransactionNewParamsCurrencyLkr TransactionNewParamsCurrency = "LKR" TransactionNewParamsCurrencyLrd TransactionNewParamsCurrency = "LRD" TransactionNewParamsCurrencyLsl TransactionNewParamsCurrency = "LSL" TransactionNewParamsCurrencyLyd TransactionNewParamsCurrency = "LYD" TransactionNewParamsCurrencyMad TransactionNewParamsCurrency = "MAD" TransactionNewParamsCurrencyMdl TransactionNewParamsCurrency = "MDL" TransactionNewParamsCurrencyMga TransactionNewParamsCurrency = "MGA" TransactionNewParamsCurrencyMkd TransactionNewParamsCurrency = "MKD" TransactionNewParamsCurrencyMmk TransactionNewParamsCurrency = "MMK" TransactionNewParamsCurrencyMnt TransactionNewParamsCurrency = "MNT" TransactionNewParamsCurrencyMop TransactionNewParamsCurrency = "MOP" TransactionNewParamsCurrencyMur TransactionNewParamsCurrency = "MUR" TransactionNewParamsCurrencyMvr TransactionNewParamsCurrency = "MVR" TransactionNewParamsCurrencyMwk TransactionNewParamsCurrency = "MWK" TransactionNewParamsCurrencyMxn TransactionNewParamsCurrency = "MXN" TransactionNewParamsCurrencyMyr TransactionNewParamsCurrency = "MYR" TransactionNewParamsCurrencyMzn TransactionNewParamsCurrency = "MZN" TransactionNewParamsCurrencyNad TransactionNewParamsCurrency = "NAD" TransactionNewParamsCurrencyNgn TransactionNewParamsCurrency = "NGN" TransactionNewParamsCurrencyNio TransactionNewParamsCurrency = "NIO" TransactionNewParamsCurrencyNok TransactionNewParamsCurrency = "NOK" TransactionNewParamsCurrencyNpr TransactionNewParamsCurrency = "NPR" TransactionNewParamsCurrencyNzd TransactionNewParamsCurrency = "NZD" TransactionNewParamsCurrencyOmr TransactionNewParamsCurrency = "OMR" TransactionNewParamsCurrencyPab TransactionNewParamsCurrency = "PAB" TransactionNewParamsCurrencyPen TransactionNewParamsCurrency = "PEN" TransactionNewParamsCurrencyPgk TransactionNewParamsCurrency = "PGK" TransactionNewParamsCurrencyPhp TransactionNewParamsCurrency = "PHP" TransactionNewParamsCurrencyPkr TransactionNewParamsCurrency = "PKR" TransactionNewParamsCurrencyPln TransactionNewParamsCurrency = "PLN" TransactionNewParamsCurrencyPyg TransactionNewParamsCurrency = "PYG" TransactionNewParamsCurrencyQar TransactionNewParamsCurrency = "QAR" TransactionNewParamsCurrencyRon TransactionNewParamsCurrency = "RON" TransactionNewParamsCurrencyRsd TransactionNewParamsCurrency = "RSD" TransactionNewParamsCurrencyRub TransactionNewParamsCurrency = "RUB" TransactionNewParamsCurrencyRwf TransactionNewParamsCurrency = "RWF" TransactionNewParamsCurrencySar TransactionNewParamsCurrency = "SAR" TransactionNewParamsCurrencySbd TransactionNewParamsCurrency = "SBD" TransactionNewParamsCurrencyScr TransactionNewParamsCurrency = "SCR" TransactionNewParamsCurrencySdg TransactionNewParamsCurrency = "SDG" TransactionNewParamsCurrencySek TransactionNewParamsCurrency = "SEK" TransactionNewParamsCurrencySgd TransactionNewParamsCurrency = "SGD" TransactionNewParamsCurrencyShp TransactionNewParamsCurrency = "SHP" TransactionNewParamsCurrencySll TransactionNewParamsCurrency = "SLL" TransactionNewParamsCurrencySos TransactionNewParamsCurrency = "SOS" TransactionNewParamsCurrencySpl TransactionNewParamsCurrency = "SPL" TransactionNewParamsCurrencySrd TransactionNewParamsCurrency = "SRD" TransactionNewParamsCurrencySvc TransactionNewParamsCurrency = "SVC" TransactionNewParamsCurrencySyp TransactionNewParamsCurrency = "SYP" TransactionNewParamsCurrencyStn TransactionNewParamsCurrency = "STN" TransactionNewParamsCurrencySzl TransactionNewParamsCurrency = "SZL" TransactionNewParamsCurrencyThb TransactionNewParamsCurrency = "THB" TransactionNewParamsCurrencyTjs TransactionNewParamsCurrency = "TJS" TransactionNewParamsCurrencyTmt TransactionNewParamsCurrency = "TMT" TransactionNewParamsCurrencyTnd TransactionNewParamsCurrency = "TND" TransactionNewParamsCurrencyTop TransactionNewParamsCurrency = "TOP" TransactionNewParamsCurrencyTry TransactionNewParamsCurrency = "TRY" TransactionNewParamsCurrencyTtd TransactionNewParamsCurrency = "TTD" TransactionNewParamsCurrencyTvd TransactionNewParamsCurrency = "TVD" TransactionNewParamsCurrencyTwd TransactionNewParamsCurrency = "TWD" TransactionNewParamsCurrencyTzs TransactionNewParamsCurrency = "TZS" TransactionNewParamsCurrencyUah TransactionNewParamsCurrency = "UAH" TransactionNewParamsCurrencyUgx TransactionNewParamsCurrency = "UGX" TransactionNewParamsCurrencyUsd TransactionNewParamsCurrency = "USD" TransactionNewParamsCurrencyUyu TransactionNewParamsCurrency = "UYU" TransactionNewParamsCurrencyUzs TransactionNewParamsCurrency = "UZS" TransactionNewParamsCurrencyVef TransactionNewParamsCurrency = "VEF" TransactionNewParamsCurrencyVnd TransactionNewParamsCurrency = "VND" TransactionNewParamsCurrencyVuv TransactionNewParamsCurrency = "VUV" TransactionNewParamsCurrencyWst TransactionNewParamsCurrency = "WST" TransactionNewParamsCurrencyXaf TransactionNewParamsCurrency = "XAF" TransactionNewParamsCurrencyXcd TransactionNewParamsCurrency = "XCD" TransactionNewParamsCurrencyXof TransactionNewParamsCurrency = "XOF" TransactionNewParamsCurrencyXpf TransactionNewParamsCurrency = "XPF" TransactionNewParamsCurrencyYer TransactionNewParamsCurrency = "YER" TransactionNewParamsCurrencyZar TransactionNewParamsCurrency = "ZAR" TransactionNewParamsCurrencyZmw TransactionNewParamsCurrency = "ZMW" TransactionNewParamsCurrencyLogical TransactionNewParamsCurrency = "LOGICAL" TransactionNewParamsCurrencyCustom TransactionNewParamsCurrency = "CUSTOM" )
type TransactionNewParamsTag ¶
type TransactionNewParamsTag struct {
// Tag key. Must not contain #, /, or :. Max 50 characters.
Key string `json:"key" api:"required"`
// Tag value. Must not contain #, /, or :. Max 200 characters.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
A key-value tag pair for metadata.
The properties Key, Value are required.
func (TransactionNewParamsTag) MarshalJSON ¶
func (r TransactionNewParamsTag) MarshalJSON() (data []byte, err error)
func (*TransactionNewParamsTag) UnmarshalJSON ¶
func (r *TransactionNewParamsTag) UnmarshalJSON(data []byte) error
type TransactionNewResponse ¶
type TransactionNewResponse struct {
// Transaction object.
Data Transaction `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TransactionNewResponse) RawJSON ¶
func (r TransactionNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionNewResponse) UnmarshalJSON ¶
func (r *TransactionNewResponse) UnmarshalJSON(data []byte) error
type TransactionSearchAllocationsParams ¶
type TransactionSearchAllocationsParams struct {
// Filter for searching transaction allocations.
Filter TransactionSearchAllocationsParamsFilter `json:"filter,omitzero" api:"required"`
// contains filtered or unexported fields
}
func (TransactionSearchAllocationsParams) MarshalJSON ¶
func (r TransactionSearchAllocationsParams) MarshalJSON() (data []byte, err error)
func (*TransactionSearchAllocationsParams) UnmarshalJSON ¶
func (r *TransactionSearchAllocationsParams) UnmarshalJSON(data []byte) error
type TransactionSearchAllocationsParamsFilter ¶
type TransactionSearchAllocationsParamsFilter struct {
// Invoice ID filter.
InvoiceID TransactionSearchAllocationsParamsFilterInvoiceID `json:"invoice_id,omitzero" api:"required"`
// contains filtered or unexported fields
}
Filter for searching transaction allocations.
The property InvoiceID is required.
func (TransactionSearchAllocationsParamsFilter) MarshalJSON ¶
func (r TransactionSearchAllocationsParamsFilter) MarshalJSON() (data []byte, err error)
func (*TransactionSearchAllocationsParamsFilter) UnmarshalJSON ¶
func (r *TransactionSearchAllocationsParamsFilter) UnmarshalJSON(data []byte) error
type TransactionSearchAllocationsParamsFilterInvoiceID ¶
type TransactionSearchAllocationsParamsFilterInvoiceID struct {
// Match allocations where invoice_id is any of these values, using OR logic.
Any []string `json:"any,omitzero" api:"required"`
// contains filtered or unexported fields
}
Invoice ID filter.
The property Any is required.
func (TransactionSearchAllocationsParamsFilterInvoiceID) MarshalJSON ¶
func (r TransactionSearchAllocationsParamsFilterInvoiceID) MarshalJSON() (data []byte, err error)
func (*TransactionSearchAllocationsParamsFilterInvoiceID) UnmarshalJSON ¶
func (r *TransactionSearchAllocationsParamsFilterInvoiceID) UnmarshalJSON(data []byte) error
type TransactionSearchAllocationsResponse ¶
type TransactionSearchAllocationsResponse struct {
// List of allocation search results.
Data []TransactionSearchAllocationsResponseData `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TransactionSearchAllocationsResponse) RawJSON ¶
func (r TransactionSearchAllocationsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionSearchAllocationsResponse) UnmarshalJSON ¶
func (r *TransactionSearchAllocationsResponse) UnmarshalJSON(data []byte) error
type TransactionSearchAllocationsResponseData ¶
type TransactionSearchAllocationsResponseData struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// Allocated amount, as a positive string in the smallest currency unit, such as
// cents for USD.
Amount string `json:"amount" api:"required"`
// Invoice the allocation is applied against.
InvoiceID string `json:"invoice_id" api:"required"`
// Timestamp when the parent transaction was posted. Uses ISO 8601 format.
Posted time.Time `json:"posted" api:"required" format:"date-time"`
// Transaction the allocation is applied to.
Transaction TransactionSearchAllocationsResponseDataTransaction `json:"transaction" api:"required"`
// Type of allocation.
//
// Any of "invoice_payin", "invoice_payout".
Type string `json:"type" api:"required"`
// User associated with the allocation.
User TransactionSearchAllocationsResponseDataUser `json:"user" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Amount respjson.Field
InvoiceID respjson.Field
Posted respjson.Field
Transaction respjson.Field
Type respjson.Field
User respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An allocation with a reference to its parent transaction.
func (TransactionSearchAllocationsResponseData) RawJSON ¶
func (r TransactionSearchAllocationsResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionSearchAllocationsResponseData) UnmarshalJSON ¶
func (r *TransactionSearchAllocationsResponseData) UnmarshalJSON(data []byte) error
type TransactionSearchAllocationsResponseDataTransaction ¶
type TransactionSearchAllocationsResponseDataTransaction struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// User-provided unique ID.
ExternalID string `json:"external_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Transaction the allocation is applied to.
func (TransactionSearchAllocationsResponseDataTransaction) RawJSON ¶
func (r TransactionSearchAllocationsResponseDataTransaction) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionSearchAllocationsResponseDataTransaction) UnmarshalJSON ¶
func (r *TransactionSearchAllocationsResponseDataTransaction) UnmarshalJSON(data []byte) error
type TransactionSearchAllocationsResponseDataUser ¶
type TransactionSearchAllocationsResponseDataUser struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// User-provided unique ID.
ExternalID string `json:"external_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
User associated with the allocation.
func (TransactionSearchAllocationsResponseDataUser) RawJSON ¶
func (r TransactionSearchAllocationsResponseDataUser) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionSearchAllocationsResponseDataUser) UnmarshalJSON ¶
func (r *TransactionSearchAllocationsResponseDataUser) UnmarshalJSON(data []byte) error
type TransactionSearchParams ¶
type TransactionSearchParams struct {
// Filter for searching transactions.
Filter TransactionSearchParamsFilter `json:"filter,omitzero" api:"required"`
// Pagination parameters.
PageInfo TransactionSearchParamsPageInfo `json:"page_info,omitzero"`
// contains filtered or unexported fields
}
func (TransactionSearchParams) MarshalJSON ¶
func (r TransactionSearchParams) MarshalJSON() (data []byte, err error)
func (*TransactionSearchParams) UnmarshalJSON ¶
func (r *TransactionSearchParams) UnmarshalJSON(data []byte) error
type TransactionSearchParamsFilter ¶
type TransactionSearchParamsFilter struct {
// Account filter.
Account TransactionSearchParamsFilterAccount `json:"account,omitzero"`
// Tag-based filter criteria. When both `any` and `all` are provided, results must
// match every entry in `all` AND at least one entry in `any`.
Tags TransactionSearchParamsFilterTags `json:"tags,omitzero"`
// contains filtered or unexported fields
}
Filter for searching transactions.
func (TransactionSearchParamsFilter) MarshalJSON ¶
func (r TransactionSearchParamsFilter) MarshalJSON() (data []byte, err error)
func (*TransactionSearchParamsFilter) UnmarshalJSON ¶
func (r *TransactionSearchParamsFilter) UnmarshalJSON(data []byte) error
type TransactionSearchParamsFilterAccount ¶
type TransactionSearchParamsFilterAccount struct {
// Match transactions belonging to any of these accounts, using OR logic.
Any []TransactionSearchParamsFilterAccountAny `json:"any,omitzero" api:"required"`
// contains filtered or unexported fields
}
Account filter.
The property Any is required.
func (TransactionSearchParamsFilterAccount) MarshalJSON ¶
func (r TransactionSearchParamsFilterAccount) MarshalJSON() (data []byte, err error)
func (*TransactionSearchParamsFilterAccount) UnmarshalJSON ¶
func (r *TransactionSearchParamsFilterAccount) UnmarshalJSON(data []byte) error
type TransactionSearchParamsFilterAccountAny ¶
type TransactionSearchParamsFilterAccountAny struct {
// FRAGMENT generated unique ID.
ID param.Opt[string] `json:"id,omitzero"`
// User-provided unique ID.
ExternalID param.Opt[string] `json:"external_id,omitzero"`
// contains filtered or unexported fields
}
External account for the transaction. Identify it by `id`, `external_id`, or both.
func (TransactionSearchParamsFilterAccountAny) MarshalJSON ¶
func (r TransactionSearchParamsFilterAccountAny) MarshalJSON() (data []byte, err error)
func (*TransactionSearchParamsFilterAccountAny) UnmarshalJSON ¶
func (r *TransactionSearchParamsFilterAccountAny) UnmarshalJSON(data []byte) error
type TransactionSearchParamsFilterTags ¶
type TransactionSearchParamsFilterTags struct {
// Returns transactions matching every specified tag, using AND logic.
All []TransactionSearchParamsFilterTagsAll `json:"all,omitzero"`
// Returns transactions matching at least one of the specified tags, using OR
// logic.
Any []TransactionSearchParamsFilterTagsAny `json:"any,omitzero"`
// contains filtered or unexported fields
}
Tag-based filter criteria. When both `any` and `all` are provided, results must match every entry in `all` AND at least one entry in `any`.
func (TransactionSearchParamsFilterTags) MarshalJSON ¶
func (r TransactionSearchParamsFilterTags) MarshalJSON() (data []byte, err error)
func (*TransactionSearchParamsFilterTags) UnmarshalJSON ¶
func (r *TransactionSearchParamsFilterTags) UnmarshalJSON(data []byte) error
type TransactionSearchParamsFilterTagsAll ¶
type TransactionSearchParamsFilterTagsAll struct {
// Tag key to filter on. Must be an exact match; wildcards are not supported.
Key string `json:"key" api:"required"`
// Tag value pattern to filter on. Supports wildcards: `*` matches any characters,
// `?` matches a single character. Use `\*` or `\?` to match literal asterisks or
// question marks. Use `*` to match any value for the given key.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
A tag filter.
The properties Key, Value are required.
func (TransactionSearchParamsFilterTagsAll) MarshalJSON ¶
func (r TransactionSearchParamsFilterTagsAll) MarshalJSON() (data []byte, err error)
func (*TransactionSearchParamsFilterTagsAll) UnmarshalJSON ¶
func (r *TransactionSearchParamsFilterTagsAll) UnmarshalJSON(data []byte) error
type TransactionSearchParamsFilterTagsAny ¶
type TransactionSearchParamsFilterTagsAny struct {
// Tag key to filter on. Must be an exact match; wildcards are not supported.
Key string `json:"key" api:"required"`
// Tag value pattern to filter on. Supports wildcards: `*` matches any characters,
// `?` matches a single character. Use `\*` or `\?` to match literal asterisks or
// question marks. Use `*` to match any value for the given key.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
A tag filter.
The properties Key, Value are required.
func (TransactionSearchParamsFilterTagsAny) MarshalJSON ¶
func (r TransactionSearchParamsFilterTagsAny) MarshalJSON() (data []byte, err error)
func (*TransactionSearchParamsFilterTagsAny) UnmarshalJSON ¶
func (r *TransactionSearchParamsFilterTagsAny) UnmarshalJSON(data []byte) error
type TransactionSearchParamsPageInfo ¶
type TransactionSearchParamsPageInfo struct {
// Cursor for fetching the next page of results.
After param.Opt[string] `json:"after,omitzero"`
// Number of results to return. Defaults to 20.
Limit param.Opt[int64] `json:"limit,omitzero"`
// contains filtered or unexported fields
}
Pagination parameters.
func (TransactionSearchParamsPageInfo) MarshalJSON ¶
func (r TransactionSearchParamsPageInfo) MarshalJSON() (data []byte, err error)
func (*TransactionSearchParamsPageInfo) UnmarshalJSON ¶
func (r *TransactionSearchParamsPageInfo) UnmarshalJSON(data []byte) error
type TransactionSearchResponse ¶
type TransactionSearchResponse struct {
// Deprecated. Use `data_v2.transactions` instead. Returns the full unpaginated
// list of matching transactions.
//
// Deprecated: deprecated
Data []Transaction `json:"data" api:"required"`
DataV2 TransactionSearchResponseDataV2 `json:"data_v2" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
DataV2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TransactionSearchResponse) RawJSON ¶
func (r TransactionSearchResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionSearchResponse) UnmarshalJSON ¶
func (r *TransactionSearchResponse) UnmarshalJSON(data []byte) error
type TransactionSearchResponseDataV2 ¶
type TransactionSearchResponseDataV2 struct {
// Pagination cursors.
PageInfo TransactionSearchResponseDataV2PageInfo `json:"page_info" api:"required"`
// Transactions matching the search criteria.
Transactions []Transaction `json:"transactions" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
PageInfo respjson.Field
Transactions respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TransactionSearchResponseDataV2) RawJSON ¶
func (r TransactionSearchResponseDataV2) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionSearchResponseDataV2) UnmarshalJSON ¶
func (r *TransactionSearchResponseDataV2) UnmarshalJSON(data []byte) error
type TransactionSearchResponseDataV2PageInfo ¶
type TransactionSearchResponseDataV2PageInfo struct {
// Cursor to fetch the next page of results.
NextCursor string `json:"next_cursor"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
NextCursor respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Pagination cursors.
func (TransactionSearchResponseDataV2PageInfo) RawJSON ¶
func (r TransactionSearchResponseDataV2PageInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionSearchResponseDataV2PageInfo) UnmarshalJSON ¶
func (r *TransactionSearchResponseDataV2PageInfo) UnmarshalJSON(data []byte) error
type TransactionService ¶
type TransactionService struct {
// contains filtered or unexported fields
}
Transaction sync operations
TransactionService contains methods and other services that help with interacting with the fragment API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTransactionService method instead.
func NewTransactionService ¶
func NewTransactionService(opts ...option.RequestOption) (r TransactionService)
NewTransactionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TransactionService) Get ¶
func (r *TransactionService) Get(ctx context.Context, transactionRef string, opts ...option.RequestOption) (res *TransactionGetResponse, err error)
Retrieves a transaction by ID or external ID.
func (*TransactionService) List ¶
func (r *TransactionService) List(ctx context.Context, query TransactionListParams, opts ...option.RequestOption) (res *TransactionListResponse, err error)
Lists all transactions.
func (*TransactionService) ListHistory ¶
func (r *TransactionService) ListHistory(ctx context.Context, transactionRef string, opts ...option.RequestOption) (res *TransactionListHistoryResponse, err error)
Retrieves the version history of a transaction.
func (*TransactionService) New ¶
func (r *TransactionService) New(ctx context.Context, body TransactionNewParams, opts ...option.RequestOption) (res *TransactionNewResponse, err error)
Creates a transaction.
func (*TransactionService) Search ¶
func (r *TransactionService) Search(ctx context.Context, body TransactionSearchParams, opts ...option.RequestOption) (res *TransactionSearchResponse, err error)
Searches transactions.
func (*TransactionService) SearchAllocations ¶
func (r *TransactionService) SearchAllocations(ctx context.Context, body TransactionSearchAllocationsParams, opts ...option.RequestOption) (res *TransactionSearchAllocationsResponse, err error)
Searches transaction allocations.
func (*TransactionService) Update ¶
func (r *TransactionService) Update(ctx context.Context, transactionRef string, body TransactionUpdateParams, opts ...option.RequestOption) (res *TransactionUpdateResponse, err error)
Updates a transaction.
type TransactionTag ¶
type TransactionTag struct {
// Tag key.
Key string `json:"key" api:"required"`
// Tag value.
Value string `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Key respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A key-value tag pair.
func (TransactionTag) RawJSON ¶
func (r TransactionTag) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionTag) UnmarshalJSON ¶
func (r *TransactionTag) UnmarshalJSON(data []byte) error
type TransactionUpdateParams ¶
type TransactionUpdateParams struct {
// Current version of the transaction. Must match the stored version.
CurrentTransactionVersion int64 `json:"current_transaction_version" api:"required"`
// Allocation updates.
Allocations TransactionUpdateParamsAllocations `json:"allocations,omitzero"`
// Tag updates.
Tags TransactionUpdateParamsTags `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (TransactionUpdateParams) MarshalJSON ¶
func (r TransactionUpdateParams) MarshalJSON() (data []byte, err error)
func (*TransactionUpdateParams) UnmarshalJSON ¶
func (r *TransactionUpdateParams) UnmarshalJSON(data []byte) error
type TransactionUpdateParamsAllocations ¶
type TransactionUpdateParamsAllocations struct {
// Allocations to create.
Create []TransactionUpdateParamsAllocationsCreate `json:"create,omitzero"`
// Allocations to update.
Update []TransactionUpdateParamsAllocationsUpdate `json:"update,omitzero"`
// contains filtered or unexported fields
}
Allocation updates.
func (TransactionUpdateParamsAllocations) MarshalJSON ¶
func (r TransactionUpdateParamsAllocations) MarshalJSON() (data []byte, err error)
func (*TransactionUpdateParamsAllocations) UnmarshalJSON ¶
func (r *TransactionUpdateParamsAllocations) UnmarshalJSON(data []byte) error
type TransactionUpdateParamsAllocationsCreate ¶
type TransactionUpdateParamsAllocationsCreate struct {
// Allocation amount, as a positive string in the smallest currency unit, such as
// cents for USD.
Amount string `json:"amount" api:"required"`
// Invoice to allocate against.
InvoiceID string `json:"invoice_id" api:"required"`
// Type of allocation.
//
// Any of "invoice_payin", "invoice_payout".
Type string `json:"type,omitzero" api:"required"`
// Identifies a user by `id` or `external_id`.
User TransactionUpdateParamsAllocationsCreateUserUnion `json:"user,omitzero" api:"required"`
// contains filtered or unexported fields
}
An allocation linking a transaction to an invoice.
The properties Amount, InvoiceID, Type, User are required.
func (TransactionUpdateParamsAllocationsCreate) MarshalJSON ¶
func (r TransactionUpdateParamsAllocationsCreate) MarshalJSON() (data []byte, err error)
func (*TransactionUpdateParamsAllocationsCreate) UnmarshalJSON ¶
func (r *TransactionUpdateParamsAllocationsCreate) UnmarshalJSON(data []byte) error
type TransactionUpdateParamsAllocationsCreateUserExternalID ¶
type TransactionUpdateParamsAllocationsCreateUserExternalID struct {
// User-provided unique ID.
ExternalID string `json:"external_id" api:"required"`
// contains filtered or unexported fields
}
The property ExternalID is required.
func (TransactionUpdateParamsAllocationsCreateUserExternalID) MarshalJSON ¶
func (r TransactionUpdateParamsAllocationsCreateUserExternalID) MarshalJSON() (data []byte, err error)
func (*TransactionUpdateParamsAllocationsCreateUserExternalID) UnmarshalJSON ¶
func (r *TransactionUpdateParamsAllocationsCreateUserExternalID) UnmarshalJSON(data []byte) error
type TransactionUpdateParamsAllocationsCreateUserID ¶
type TransactionUpdateParamsAllocationsCreateUserID struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// contains filtered or unexported fields
}
The property ID is required.
func (TransactionUpdateParamsAllocationsCreateUserID) MarshalJSON ¶
func (r TransactionUpdateParamsAllocationsCreateUserID) MarshalJSON() (data []byte, err error)
func (*TransactionUpdateParamsAllocationsCreateUserID) UnmarshalJSON ¶
func (r *TransactionUpdateParamsAllocationsCreateUserID) UnmarshalJSON(data []byte) error
type TransactionUpdateParamsAllocationsCreateUserUnion ¶
type TransactionUpdateParamsAllocationsCreateUserUnion struct {
OfTransactionUpdatesAllocationsCreateUserID *TransactionUpdateParamsAllocationsCreateUserID `json:",omitzero,inline"`
OfTransactionUpdatesAllocationsCreateUserExternalID *TransactionUpdateParamsAllocationsCreateUserExternalID `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TransactionUpdateParamsAllocationsCreateUserUnion) MarshalJSON ¶
func (u TransactionUpdateParamsAllocationsCreateUserUnion) MarshalJSON() ([]byte, error)
func (*TransactionUpdateParamsAllocationsCreateUserUnion) UnmarshalJSON ¶
func (u *TransactionUpdateParamsAllocationsCreateUserUnion) UnmarshalJSON(data []byte) error
type TransactionUpdateParamsAllocationsUpdate ¶
type TransactionUpdateParamsAllocationsUpdate struct {
// Allocation to update.
ID string `json:"id" api:"required"`
// Updated allocation amount, as a positive string in the smallest currency unit,
// such as cents for USD.
Amount string `json:"amount" api:"required"`
// contains filtered or unexported fields
}
The properties ID, Amount are required.
func (TransactionUpdateParamsAllocationsUpdate) MarshalJSON ¶
func (r TransactionUpdateParamsAllocationsUpdate) MarshalJSON() (data []byte, err error)
func (*TransactionUpdateParamsAllocationsUpdate) UnmarshalJSON ¶
func (r *TransactionUpdateParamsAllocationsUpdate) UnmarshalJSON(data []byte) error
type TransactionUpdateParamsTags ¶
type TransactionUpdateParamsTags struct {
// Tags to create. The tag key must not already exist.
Create []TransactionUpdateParamsTagsCreate `json:"create,omitzero"`
// Tags to remove.
Delete []TransactionUpdateParamsTagsDelete `json:"delete,omitzero"`
// Tags to set. Creates a new tag or updates an existing tag.
Set []TransactionUpdateParamsTagsSet `json:"set,omitzero"`
// Tags to update. The tag key must already exist.
Update []TransactionUpdateParamsTagsUpdate `json:"update,omitzero"`
// contains filtered or unexported fields
}
Tag updates.
func (TransactionUpdateParamsTags) MarshalJSON ¶
func (r TransactionUpdateParamsTags) MarshalJSON() (data []byte, err error)
func (*TransactionUpdateParamsTags) UnmarshalJSON ¶
func (r *TransactionUpdateParamsTags) UnmarshalJSON(data []byte) error
type TransactionUpdateParamsTagsCreate ¶
type TransactionUpdateParamsTagsCreate struct {
// Tag key. Must not contain #, /, or :. Max 50 characters.
Key string `json:"key" api:"required"`
// Tag value. Must not contain #, /, or :. Max 200 characters.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
A key-value tag pair for metadata.
The properties Key, Value are required.
func (TransactionUpdateParamsTagsCreate) MarshalJSON ¶
func (r TransactionUpdateParamsTagsCreate) MarshalJSON() (data []byte, err error)
func (*TransactionUpdateParamsTagsCreate) UnmarshalJSON ¶
func (r *TransactionUpdateParamsTagsCreate) UnmarshalJSON(data []byte) error
type TransactionUpdateParamsTagsDelete ¶
type TransactionUpdateParamsTagsDelete struct {
// Tag key to delete.
Key string `json:"key" api:"required"`
// contains filtered or unexported fields
}
The property Key is required.
func (TransactionUpdateParamsTagsDelete) MarshalJSON ¶
func (r TransactionUpdateParamsTagsDelete) MarshalJSON() (data []byte, err error)
func (*TransactionUpdateParamsTagsDelete) UnmarshalJSON ¶
func (r *TransactionUpdateParamsTagsDelete) UnmarshalJSON(data []byte) error
type TransactionUpdateParamsTagsSet ¶
type TransactionUpdateParamsTagsSet struct {
// Tag key. Must not contain #, /, or :. Max 50 characters.
Key string `json:"key" api:"required"`
// Tag value. Must not contain #, /, or :. Max 200 characters.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
A key-value tag pair for metadata.
The properties Key, Value are required.
func (TransactionUpdateParamsTagsSet) MarshalJSON ¶
func (r TransactionUpdateParamsTagsSet) MarshalJSON() (data []byte, err error)
func (*TransactionUpdateParamsTagsSet) UnmarshalJSON ¶
func (r *TransactionUpdateParamsTagsSet) UnmarshalJSON(data []byte) error
type TransactionUpdateParamsTagsUpdate ¶
type TransactionUpdateParamsTagsUpdate struct {
// Tag key. Must not contain #, /, or :. Max 50 characters.
Key string `json:"key" api:"required"`
// Tag value. Must not contain #, /, or :. Max 200 characters.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
A key-value tag pair for metadata.
The properties Key, Value are required.
func (TransactionUpdateParamsTagsUpdate) MarshalJSON ¶
func (r TransactionUpdateParamsTagsUpdate) MarshalJSON() (data []byte, err error)
func (*TransactionUpdateParamsTagsUpdate) UnmarshalJSON ¶
func (r *TransactionUpdateParamsTagsUpdate) UnmarshalJSON(data []byte) error
type TransactionUpdateResponse ¶
type TransactionUpdateResponse struct {
// Transaction object.
Data Transaction `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TransactionUpdateResponse) RawJSON ¶
func (r TransactionUpdateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionUpdateResponse) UnmarshalJSON ¶
func (r *TransactionUpdateResponse) UnmarshalJSON(data []byte) error
type User ¶
type User struct {
// FRAGMENT generated unique ID.
ID string `json:"id" api:"required"`
// User-provided unique ID.
ExternalID string `json:"external_id" api:"required"`
// Name of the user's role. Deprecated, use tags instead.
//
// Deprecated: deprecated
Role string `json:"role" api:"required"`
// Tags for the user.
Tags []UserTag `json:"tags" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExternalID respjson.Field
Role respjson.Field
Tags respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
User object.
func (*User) UnmarshalJSON ¶
type UserListResponse ¶
type UserListResponse struct {
// List of users.
Data []User `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
List of users.
func (UserListResponse) RawJSON ¶
func (r UserListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*UserListResponse) UnmarshalJSON ¶
func (r *UserListResponse) UnmarshalJSON(data []byte) error
type UserNewParams ¶
type UserNewParams struct {
// User-provided unique ID.
ExternalID string `json:"external_id" api:"required"`
// Name of the role to assign. Deprecated, use tags instead.
Role param.Opt[string] `json:"role,omitzero"`
// Tags for the user.
Tags []UserNewParamsTag `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (UserNewParams) MarshalJSON ¶
func (r UserNewParams) MarshalJSON() (data []byte, err error)
func (*UserNewParams) UnmarshalJSON ¶
func (r *UserNewParams) UnmarshalJSON(data []byte) error
type UserNewParamsTag ¶
type UserNewParamsTag struct {
// Tag key. Must not contain #, /, or :. Max 50 characters.
Key string `json:"key" api:"required"`
// Tag value. Must not contain #, /, or :. Max 200 characters.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
A key-value tag pair for metadata.
The properties Key, Value are required.
func (UserNewParamsTag) MarshalJSON ¶
func (r UserNewParamsTag) MarshalJSON() (data []byte, err error)
func (*UserNewParamsTag) UnmarshalJSON ¶
func (r *UserNewParamsTag) UnmarshalJSON(data []byte) error
type UserNewResponse ¶
type UserNewResponse struct {
// User object.
Data User `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (UserNewResponse) RawJSON ¶
func (r UserNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*UserNewResponse) UnmarshalJSON ¶
func (r *UserNewResponse) UnmarshalJSON(data []byte) error
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
User management operations
UserService contains methods and other services that help with interacting with the fragment API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserService method instead.
func NewUserService ¶
func NewUserService(opts ...option.RequestOption) (r UserService)
NewUserService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*UserService) List ¶
func (r *UserService) List(ctx context.Context, opts ...option.RequestOption) (res *UserListResponse, err error)
Lists all users.
func (*UserService) New ¶
func (r *UserService) New(ctx context.Context, body UserNewParams, opts ...option.RequestOption) (res *UserNewResponse, err error)
Creates a user.
type UserTag ¶
type UserTag struct {
// Tag key.
Key string `json:"key" api:"required"`
// Tag value.
Value string `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Key respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A key-value tag pair.
func (*UserTag) UnmarshalJSON ¶
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
encoding/json
Package json implements encoding and decoding of JSON as defined in RFC 7159.
|
Package json implements encoding and decoding of JSON as defined in RFC 7159. |
|
encoding/json/shims
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package.
|
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package. |
|
packages
|
|
|
shared
|
|