oapi

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

README

OpenAPI

Generate library from the Up Bank OpenAPI spec

go generate ./oapi

Documentation

Overview

Package oapi provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Index

Constants

View Source
const (
	Bearer_authScopes = "bearer_auth.Scopes"
)

Variables

This section is empty.

Functions

func NewDeleteTransactionsTransactionIdRelationshipsTagsRequest

func NewDeleteTransactionsTransactionIdRelationshipsTagsRequest(server string, transactionId string, body DeleteTransactionsTransactionIdRelationshipsTagsJSONRequestBody) (*http.Request, error)

NewDeleteTransactionsTransactionIdRelationshipsTagsRequest calls the generic DeleteTransactionsTransactionIdRelationshipsTags builder with application/json body

func NewDeleteTransactionsTransactionIdRelationshipsTagsRequestWithBody

func NewDeleteTransactionsTransactionIdRelationshipsTagsRequestWithBody(server string, transactionId string, contentType string, body io.Reader) (*http.Request, error)

NewDeleteTransactionsTransactionIdRelationshipsTagsRequestWithBody generates requests for DeleteTransactionsTransactionIdRelationshipsTags with any type of body

func NewDeleteWebhooksIdRequest

func NewDeleteWebhooksIdRequest(server string, id string) (*http.Request, error)

NewDeleteWebhooksIdRequest generates requests for DeleteWebhooksId

func NewGetAccountsAccountIdTransactionsRequest

func NewGetAccountsAccountIdTransactionsRequest(server string, accountId string, params *GetAccountsAccountIdTransactionsParams) (*http.Request, error)

NewGetAccountsAccountIdTransactionsRequest generates requests for GetAccountsAccountIdTransactions

func NewGetAccountsIdRequest

func NewGetAccountsIdRequest(server string, id string) (*http.Request, error)

NewGetAccountsIdRequest generates requests for GetAccountsId

func NewGetAccountsRequest

func NewGetAccountsRequest(server string, params *GetAccountsParams) (*http.Request, error)

NewGetAccountsRequest generates requests for GetAccounts

func NewGetAttachmentsIdRequest

func NewGetAttachmentsIdRequest(server string, id string) (*http.Request, error)

NewGetAttachmentsIdRequest generates requests for GetAttachmentsId

func NewGetAttachmentsRequest

func NewGetAttachmentsRequest(server string) (*http.Request, error)

NewGetAttachmentsRequest generates requests for GetAttachments

func NewGetCategoriesIdRequest

func NewGetCategoriesIdRequest(server string, id string) (*http.Request, error)

NewGetCategoriesIdRequest generates requests for GetCategoriesId

func NewGetCategoriesRequest

func NewGetCategoriesRequest(server string, params *GetCategoriesParams) (*http.Request, error)

NewGetCategoriesRequest generates requests for GetCategories

func NewGetTagsRequest

func NewGetTagsRequest(server string, params *GetTagsParams) (*http.Request, error)

NewGetTagsRequest generates requests for GetTags

func NewGetTransactionsIdRequest

func NewGetTransactionsIdRequest(server string, id string) (*http.Request, error)

NewGetTransactionsIdRequest generates requests for GetTransactionsId

func NewGetTransactionsRequest

func NewGetTransactionsRequest(server string, params *GetTransactionsParams) (*http.Request, error)

NewGetTransactionsRequest generates requests for GetTransactions

func NewGetUtilPingRequest

func NewGetUtilPingRequest(server string) (*http.Request, error)

NewGetUtilPingRequest generates requests for GetUtilPing

func NewGetWebhooksIdRequest

func NewGetWebhooksIdRequest(server string, id string) (*http.Request, error)

NewGetWebhooksIdRequest generates requests for GetWebhooksId

func NewGetWebhooksRequest

func NewGetWebhooksRequest(server string, params *GetWebhooksParams) (*http.Request, error)

NewGetWebhooksRequest generates requests for GetWebhooks

func NewGetWebhooksWebhookIdLogsRequest

func NewGetWebhooksWebhookIdLogsRequest(server string, webhookId string, params *GetWebhooksWebhookIdLogsParams) (*http.Request, error)

NewGetWebhooksWebhookIdLogsRequest generates requests for GetWebhooksWebhookIdLogs

func NewPatchTransactionsTransactionIdRelationshipsCategoryRequest

func NewPatchTransactionsTransactionIdRelationshipsCategoryRequest(server string, transactionId string, body PatchTransactionsTransactionIdRelationshipsCategoryJSONRequestBody) (*http.Request, error)

NewPatchTransactionsTransactionIdRelationshipsCategoryRequest calls the generic PatchTransactionsTransactionIdRelationshipsCategory builder with application/json body

func NewPatchTransactionsTransactionIdRelationshipsCategoryRequestWithBody

func NewPatchTransactionsTransactionIdRelationshipsCategoryRequestWithBody(server string, transactionId string, contentType string, body io.Reader) (*http.Request, error)

NewPatchTransactionsTransactionIdRelationshipsCategoryRequestWithBody generates requests for PatchTransactionsTransactionIdRelationshipsCategory with any type of body

func NewPostTransactionsTransactionIdRelationshipsTagsRequest

func NewPostTransactionsTransactionIdRelationshipsTagsRequest(server string, transactionId string, body PostTransactionsTransactionIdRelationshipsTagsJSONRequestBody) (*http.Request, error)

NewPostTransactionsTransactionIdRelationshipsTagsRequest calls the generic PostTransactionsTransactionIdRelationshipsTags builder with application/json body

func NewPostTransactionsTransactionIdRelationshipsTagsRequestWithBody

func NewPostTransactionsTransactionIdRelationshipsTagsRequestWithBody(server string, transactionId string, contentType string, body io.Reader) (*http.Request, error)

NewPostTransactionsTransactionIdRelationshipsTagsRequestWithBody generates requests for PostTransactionsTransactionIdRelationshipsTags with any type of body

func NewPostWebhooksRequest

func NewPostWebhooksRequest(server string, body PostWebhooksJSONRequestBody) (*http.Request, error)

NewPostWebhooksRequest calls the generic PostWebhooks builder with application/json body

func NewPostWebhooksRequestWithBody

func NewPostWebhooksRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPostWebhooksRequestWithBody generates requests for PostWebhooks with any type of body

func NewPostWebhooksWebhookIdPingRequest

func NewPostWebhooksWebhookIdPingRequest(server string, webhookId string) (*http.Request, error)

NewPostWebhooksWebhookIdPingRequest generates requests for PostWebhooksWebhookIdPing

Types

type AccountResource

type AccountResource struct {
	Attributes struct {
		// AccountType The bank account type of this account.
		AccountType AccountTypeEnum `json:"accountType"`

		// Balance The available balance of the account, taking into account any amounts
		// that are currently on hold.
		Balance MoneyObject `json:"balance"`

		// CreatedAt The date-time at which this account was first opened.
		CreatedAt time.Time `json:"createdAt"`

		// DisplayName The name associated with the account in the Up application.
		DisplayName string `json:"displayName"`

		// OwnershipType The ownership structure for this account.
		OwnershipType OwnershipTypeEnum `json:"ownershipType"`
	} `json:"attributes"`

	// Id The unique identifier for this account.
	Id    string `json:"id"`
	Links *struct {
		// Self The canonical link to this resource within the API.
		Self string `json:"self"`
	} `json:"links,omitempty"`
	Relationships struct {
		Transactions struct {
			Links *struct {
				// Related The link to retrieve the related resource(s) in this relationship.
				Related string `json:"related"`
			} `json:"links,omitempty"`
		} `json:"transactions"`
	} `json:"relationships"`

	// Type The type of this resource: `accounts`
	Type string `json:"type"`
}

AccountResource Provides information about an Up bank account.

type AccountTypeEnum

type AccountTypeEnum = interface{}

AccountTypeEnum Specifies the type of bank account. Currently returned values are `SAVER`, `TRANSACTIONAL` and `HOME_LOAN`.

type AttachmentResource

type AttachmentResource struct {
	Attributes struct {
		// CreatedAt The date-time when the file was created.
		CreatedAt *time.Time `json:"createdAt"`

		// FileContentType Content type for the uploaded attachment.
		FileContentType *string `json:"fileContentType"`

		// FileExtension File extension for the uploaded attachment.
		FileExtension *string `json:"fileExtension"`

		// FileURL A temporary link to download the file.
		FileURL *string `json:"fileURL"`

		// FileURLExpiresAt The date-time at which the `fileURL` link expires.
		FileURLExpiresAt time.Time `json:"fileURLExpiresAt"`
	} `json:"attributes"`

	// Id The unique identifier for this attachment.
	Id    string `json:"id"`
	Links *struct {
		// Self The canonical link to this resource within the API.
		Self string `json:"self"`
	} `json:"links,omitempty"`
	Relationships struct {
		Transaction struct {
			Data struct {
				// Id The unique identifier of the resource within its type.
				Id string `json:"id"`

				// Type The type of this resource: `transactions`
				Type string `json:"type"`
			} `json:"data"`
			Links *struct {
				// Related The link to retrieve the related resource(s) in this relationship.
				Related string `json:"related"`
			} `json:"links,omitempty"`
		} `json:"transaction"`
	} `json:"relationships"`

	// Type The type of this resource: `attachments`
	Type string `json:"type"`
}

AttachmentResource defines model for AttachmentResource.

type CardPurchaseMethodEnum

type CardPurchaseMethodEnum = interface{}

CardPurchaseMethodEnum Specifies the type of card charge.

type CardPurchaseMethodObject

type CardPurchaseMethodObject struct {
	// CardNumberSuffix The last four digits of the card used for the purchase, if applicable.
	CardNumberSuffix *string `json:"cardNumberSuffix"`

	// Method The type of card purchase.
	Method CardPurchaseMethodEnum `json:"method"`
}

CardPurchaseMethodObject Provides information about the card used for a transaction.

type CashbackObject

type CashbackObject struct {
	// Amount The total amount of cashback paid, represented as a positive value.
	Amount MoneyObject `json:"amount"`

	// Description A brief description of why this cashback was paid.
	Description string `json:"description"`
}

CashbackObject Provides information about an instant reimbursement in the form of cashback.

type CategoryInputResourceIdentifier

type CategoryInputResourceIdentifier struct {
	// Id The unique identifier of the category, as returned by the `/categories`
	// endpoint.
	Id string `json:"id"`

	// Type The type of this resource: `categories`
	Type string `json:"type"`
}

CategoryInputResourceIdentifier Uniquely identifies a category in the API.

type CategoryResource

type CategoryResource struct {
	Attributes struct {
		// Name The name of this category as seen in the Up application.
		Name string `json:"name"`
	} `json:"attributes"`

	// Id The unique identifier for this category. This is a human-readable but
	// URL-safe value.
	Id    string `json:"id"`
	Links *struct {
		// Self The canonical link to this resource within the API.
		Self string `json:"self"`
	} `json:"links,omitempty"`
	Relationships struct {
		Children struct {
			Data []struct {
				// Id The unique identifier of the resource within its type.
				Id string `json:"id"`

				// Type The type of this resource: `categories`
				Type string `json:"type"`
			} `json:"data"`
			Links *struct {
				// Related The link to retrieve the related resource(s) in this relationship.
				Related string `json:"related"`
			} `json:"links,omitempty"`
		} `json:"children"`
		Parent struct {
			Data *struct {
				// Id The unique identifier of the resource within its type.
				Id string `json:"id"`

				// Type The type of this resource: `categories`
				Type string `json:"type"`
			} `json:"data"`
			Links *struct {
				// Related The link to retrieve the related resource(s) in this relationship.
				Related string `json:"related"`
			} `json:"links,omitempty"`
		} `json:"parent"`
	} `json:"relationships"`

	// Type The type of this resource: `categories`
	Type string `json:"type"`
}

CategoryResource Provides information about a category and its ancestry.

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) DeleteTransactionsTransactionIdRelationshipsTags

func (c *Client) DeleteTransactionsTransactionIdRelationshipsTags(ctx context.Context, transactionId string, body DeleteTransactionsTransactionIdRelationshipsTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteTransactionsTransactionIdRelationshipsTagsWithBody

func (c *Client) DeleteTransactionsTransactionIdRelationshipsTagsWithBody(ctx context.Context, transactionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteWebhooksId

func (c *Client) DeleteWebhooksId(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetAccounts

func (c *Client) GetAccounts(ctx context.Context, params *GetAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetAccountsAccountIdTransactions

func (c *Client) GetAccountsAccountIdTransactions(ctx context.Context, accountId string, params *GetAccountsAccountIdTransactionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetAccountsId

func (c *Client) GetAccountsId(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetAttachments

func (c *Client) GetAttachments(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetAttachmentsId

func (c *Client) GetAttachmentsId(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetCategories

func (c *Client) GetCategories(ctx context.Context, params *GetCategoriesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetCategoriesId

func (c *Client) GetCategoriesId(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetTags

func (c *Client) GetTags(ctx context.Context, params *GetTagsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetTransactions

func (c *Client) GetTransactions(ctx context.Context, params *GetTransactionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetTransactionsId

func (c *Client) GetTransactionsId(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetUtilPing

func (c *Client) GetUtilPing(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetWebhooks

func (c *Client) GetWebhooks(ctx context.Context, params *GetWebhooksParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetWebhooksId

func (c *Client) GetWebhooksId(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetWebhooksWebhookIdLogs

func (c *Client) GetWebhooksWebhookIdLogs(ctx context.Context, webhookId string, params *GetWebhooksWebhookIdLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PatchTransactionsTransactionIdRelationshipsCategory

func (c *Client) PatchTransactionsTransactionIdRelationshipsCategory(ctx context.Context, transactionId string, body PatchTransactionsTransactionIdRelationshipsCategoryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PatchTransactionsTransactionIdRelationshipsCategoryWithBody

func (c *Client) PatchTransactionsTransactionIdRelationshipsCategoryWithBody(ctx context.Context, transactionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostTransactionsTransactionIdRelationshipsTags

func (c *Client) PostTransactionsTransactionIdRelationshipsTags(ctx context.Context, transactionId string, body PostTransactionsTransactionIdRelationshipsTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostTransactionsTransactionIdRelationshipsTagsWithBody

func (c *Client) PostTransactionsTransactionIdRelationshipsTagsWithBody(ctx context.Context, transactionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostWebhooks

func (c *Client) PostWebhooks(ctx context.Context, body PostWebhooksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostWebhooksWebhookIdPing

func (c *Client) PostWebhooksWebhookIdPing(ctx context.Context, webhookId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostWebhooksWithBody

func (c *Client) PostWebhooksWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// GetAccounts request
	GetAccounts(ctx context.Context, params *GetAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetAccountsAccountIdTransactions request
	GetAccountsAccountIdTransactions(ctx context.Context, accountId string, params *GetAccountsAccountIdTransactionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetAccountsId request
	GetAccountsId(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetAttachments request
	GetAttachments(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetAttachmentsId request
	GetAttachmentsId(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetCategories request
	GetCategories(ctx context.Context, params *GetCategoriesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetCategoriesId request
	GetCategoriesId(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTags request
	GetTags(ctx context.Context, params *GetTagsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTransactions request
	GetTransactions(ctx context.Context, params *GetTransactionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTransactionsId request
	GetTransactionsId(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PatchTransactionsTransactionIdRelationshipsCategoryWithBody request with any body
	PatchTransactionsTransactionIdRelationshipsCategoryWithBody(ctx context.Context, transactionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PatchTransactionsTransactionIdRelationshipsCategory(ctx context.Context, transactionId string, body PatchTransactionsTransactionIdRelationshipsCategoryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteTransactionsTransactionIdRelationshipsTagsWithBody request with any body
	DeleteTransactionsTransactionIdRelationshipsTagsWithBody(ctx context.Context, transactionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	DeleteTransactionsTransactionIdRelationshipsTags(ctx context.Context, transactionId string, body DeleteTransactionsTransactionIdRelationshipsTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostTransactionsTransactionIdRelationshipsTagsWithBody request with any body
	PostTransactionsTransactionIdRelationshipsTagsWithBody(ctx context.Context, transactionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostTransactionsTransactionIdRelationshipsTags(ctx context.Context, transactionId string, body PostTransactionsTransactionIdRelationshipsTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetUtilPing request
	GetUtilPing(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetWebhooks request
	GetWebhooks(ctx context.Context, params *GetWebhooksParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostWebhooksWithBody request with any body
	PostWebhooksWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostWebhooks(ctx context.Context, body PostWebhooksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteWebhooksId request
	DeleteWebhooksId(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetWebhooksId request
	GetWebhooksId(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetWebhooksWebhookIdLogs request
	GetWebhooksWebhookIdLogs(ctx context.Context, webhookId string, params *GetWebhooksWebhookIdLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostWebhooksWebhookIdPing request
	PostWebhooksWebhookIdPing(ctx context.Context, webhookId string, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) DeleteTransactionsTransactionIdRelationshipsTagsWithBodyWithResponse

func (c *ClientWithResponses) DeleteTransactionsTransactionIdRelationshipsTagsWithBodyWithResponse(ctx context.Context, transactionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteTransactionsTransactionIdRelationshipsTagsResponse, error)

DeleteTransactionsTransactionIdRelationshipsTagsWithBodyWithResponse request with arbitrary body returning *DeleteTransactionsTransactionIdRelationshipsTagsResponse

func (*ClientWithResponses) DeleteWebhooksIdWithResponse

func (c *ClientWithResponses) DeleteWebhooksIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteWebhooksIdResponse, error)

DeleteWebhooksIdWithResponse request returning *DeleteWebhooksIdResponse

func (*ClientWithResponses) GetAccountsAccountIdTransactionsWithResponse

func (c *ClientWithResponses) GetAccountsAccountIdTransactionsWithResponse(ctx context.Context, accountId string, params *GetAccountsAccountIdTransactionsParams, reqEditors ...RequestEditorFn) (*GetAccountsAccountIdTransactionsResponse, error)

GetAccountsAccountIdTransactionsWithResponse request returning *GetAccountsAccountIdTransactionsResponse

func (*ClientWithResponses) GetAccountsIdWithResponse

func (c *ClientWithResponses) GetAccountsIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetAccountsIdResponse, error)

GetAccountsIdWithResponse request returning *GetAccountsIdResponse

func (*ClientWithResponses) GetAccountsWithResponse

func (c *ClientWithResponses) GetAccountsWithResponse(ctx context.Context, params *GetAccountsParams, reqEditors ...RequestEditorFn) (*GetAccountsResponse, error)

GetAccountsWithResponse request returning *GetAccountsResponse

func (*ClientWithResponses) GetAttachmentsIdWithResponse

func (c *ClientWithResponses) GetAttachmentsIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetAttachmentsIdResponse, error)

GetAttachmentsIdWithResponse request returning *GetAttachmentsIdResponse

func (*ClientWithResponses) GetAttachmentsWithResponse

func (c *ClientWithResponses) GetAttachmentsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAttachmentsResponse, error)

GetAttachmentsWithResponse request returning *GetAttachmentsResponse

func (*ClientWithResponses) GetCategoriesIdWithResponse

func (c *ClientWithResponses) GetCategoriesIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetCategoriesIdResponse, error)

GetCategoriesIdWithResponse request returning *GetCategoriesIdResponse

func (*ClientWithResponses) GetCategoriesWithResponse

func (c *ClientWithResponses) GetCategoriesWithResponse(ctx context.Context, params *GetCategoriesParams, reqEditors ...RequestEditorFn) (*GetCategoriesResponse, error)

GetCategoriesWithResponse request returning *GetCategoriesResponse

func (*ClientWithResponses) GetTagsWithResponse

func (c *ClientWithResponses) GetTagsWithResponse(ctx context.Context, params *GetTagsParams, reqEditors ...RequestEditorFn) (*GetTagsResponse, error)

GetTagsWithResponse request returning *GetTagsResponse

func (*ClientWithResponses) GetTransactionsIdWithResponse

func (c *ClientWithResponses) GetTransactionsIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetTransactionsIdResponse, error)

GetTransactionsIdWithResponse request returning *GetTransactionsIdResponse

func (*ClientWithResponses) GetTransactionsWithResponse

func (c *ClientWithResponses) GetTransactionsWithResponse(ctx context.Context, params *GetTransactionsParams, reqEditors ...RequestEditorFn) (*GetTransactionsResponse, error)

GetTransactionsWithResponse request returning *GetTransactionsResponse

func (*ClientWithResponses) GetUtilPingWithResponse

func (c *ClientWithResponses) GetUtilPingWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetUtilPingResponse, error)

GetUtilPingWithResponse request returning *GetUtilPingResponse

func (*ClientWithResponses) GetWebhooksIdWithResponse

func (c *ClientWithResponses) GetWebhooksIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetWebhooksIdResponse, error)

GetWebhooksIdWithResponse request returning *GetWebhooksIdResponse

func (*ClientWithResponses) GetWebhooksWebhookIdLogsWithResponse

func (c *ClientWithResponses) GetWebhooksWebhookIdLogsWithResponse(ctx context.Context, webhookId string, params *GetWebhooksWebhookIdLogsParams, reqEditors ...RequestEditorFn) (*GetWebhooksWebhookIdLogsResponse, error)

GetWebhooksWebhookIdLogsWithResponse request returning *GetWebhooksWebhookIdLogsResponse

func (*ClientWithResponses) GetWebhooksWithResponse

func (c *ClientWithResponses) GetWebhooksWithResponse(ctx context.Context, params *GetWebhooksParams, reqEditors ...RequestEditorFn) (*GetWebhooksResponse, error)

GetWebhooksWithResponse request returning *GetWebhooksResponse

func (*ClientWithResponses) PatchTransactionsTransactionIdRelationshipsCategoryWithBodyWithResponse

func (c *ClientWithResponses) PatchTransactionsTransactionIdRelationshipsCategoryWithBodyWithResponse(ctx context.Context, transactionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchTransactionsTransactionIdRelationshipsCategoryResponse, error)

PatchTransactionsTransactionIdRelationshipsCategoryWithBodyWithResponse request with arbitrary body returning *PatchTransactionsTransactionIdRelationshipsCategoryResponse

func (*ClientWithResponses) PostTransactionsTransactionIdRelationshipsTagsWithBodyWithResponse

func (c *ClientWithResponses) PostTransactionsTransactionIdRelationshipsTagsWithBodyWithResponse(ctx context.Context, transactionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTransactionsTransactionIdRelationshipsTagsResponse, error)

PostTransactionsTransactionIdRelationshipsTagsWithBodyWithResponse request with arbitrary body returning *PostTransactionsTransactionIdRelationshipsTagsResponse

func (*ClientWithResponses) PostWebhooksWebhookIdPingWithResponse

func (c *ClientWithResponses) PostWebhooksWebhookIdPingWithResponse(ctx context.Context, webhookId string, reqEditors ...RequestEditorFn) (*PostWebhooksWebhookIdPingResponse, error)

PostWebhooksWebhookIdPingWithResponse request returning *PostWebhooksWebhookIdPingResponse

func (*ClientWithResponses) PostWebhooksWithBodyWithResponse

func (c *ClientWithResponses) PostWebhooksWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostWebhooksResponse, error)

PostWebhooksWithBodyWithResponse request with arbitrary body returning *PostWebhooksResponse

func (*ClientWithResponses) PostWebhooksWithResponse

func (c *ClientWithResponses) PostWebhooksWithResponse(ctx context.Context, body PostWebhooksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostWebhooksResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetAccountsWithResponse request
	GetAccountsWithResponse(ctx context.Context, params *GetAccountsParams, reqEditors ...RequestEditorFn) (*GetAccountsResponse, error)

	// GetAccountsAccountIdTransactionsWithResponse request
	GetAccountsAccountIdTransactionsWithResponse(ctx context.Context, accountId string, params *GetAccountsAccountIdTransactionsParams, reqEditors ...RequestEditorFn) (*GetAccountsAccountIdTransactionsResponse, error)

	// GetAccountsIdWithResponse request
	GetAccountsIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetAccountsIdResponse, error)

	// GetAttachmentsWithResponse request
	GetAttachmentsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAttachmentsResponse, error)

	// GetAttachmentsIdWithResponse request
	GetAttachmentsIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetAttachmentsIdResponse, error)

	// GetCategoriesWithResponse request
	GetCategoriesWithResponse(ctx context.Context, params *GetCategoriesParams, reqEditors ...RequestEditorFn) (*GetCategoriesResponse, error)

	// GetCategoriesIdWithResponse request
	GetCategoriesIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetCategoriesIdResponse, error)

	// GetTagsWithResponse request
	GetTagsWithResponse(ctx context.Context, params *GetTagsParams, reqEditors ...RequestEditorFn) (*GetTagsResponse, error)

	// GetTransactionsWithResponse request
	GetTransactionsWithResponse(ctx context.Context, params *GetTransactionsParams, reqEditors ...RequestEditorFn) (*GetTransactionsResponse, error)

	// GetTransactionsIdWithResponse request
	GetTransactionsIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetTransactionsIdResponse, error)

	// PatchTransactionsTransactionIdRelationshipsCategoryWithBodyWithResponse request with any body
	PatchTransactionsTransactionIdRelationshipsCategoryWithBodyWithResponse(ctx context.Context, transactionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchTransactionsTransactionIdRelationshipsCategoryResponse, error)

	PatchTransactionsTransactionIdRelationshipsCategoryWithResponse(ctx context.Context, transactionId string, body PatchTransactionsTransactionIdRelationshipsCategoryJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchTransactionsTransactionIdRelationshipsCategoryResponse, error)

	// DeleteTransactionsTransactionIdRelationshipsTagsWithBodyWithResponse request with any body
	DeleteTransactionsTransactionIdRelationshipsTagsWithBodyWithResponse(ctx context.Context, transactionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteTransactionsTransactionIdRelationshipsTagsResponse, error)

	DeleteTransactionsTransactionIdRelationshipsTagsWithResponse(ctx context.Context, transactionId string, body DeleteTransactionsTransactionIdRelationshipsTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteTransactionsTransactionIdRelationshipsTagsResponse, error)

	// PostTransactionsTransactionIdRelationshipsTagsWithBodyWithResponse request with any body
	PostTransactionsTransactionIdRelationshipsTagsWithBodyWithResponse(ctx context.Context, transactionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTransactionsTransactionIdRelationshipsTagsResponse, error)

	PostTransactionsTransactionIdRelationshipsTagsWithResponse(ctx context.Context, transactionId string, body PostTransactionsTransactionIdRelationshipsTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTransactionsTransactionIdRelationshipsTagsResponse, error)

	// GetUtilPingWithResponse request
	GetUtilPingWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetUtilPingResponse, error)

	// GetWebhooksWithResponse request
	GetWebhooksWithResponse(ctx context.Context, params *GetWebhooksParams, reqEditors ...RequestEditorFn) (*GetWebhooksResponse, error)

	// PostWebhooksWithBodyWithResponse request with any body
	PostWebhooksWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostWebhooksResponse, error)

	PostWebhooksWithResponse(ctx context.Context, body PostWebhooksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostWebhooksResponse, error)

	// DeleteWebhooksIdWithResponse request
	DeleteWebhooksIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteWebhooksIdResponse, error)

	// GetWebhooksIdWithResponse request
	GetWebhooksIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetWebhooksIdResponse, error)

	// GetWebhooksWebhookIdLogsWithResponse request
	GetWebhooksWebhookIdLogsWithResponse(ctx context.Context, webhookId string, params *GetWebhooksWebhookIdLogsParams, reqEditors ...RequestEditorFn) (*GetWebhooksWebhookIdLogsResponse, error)

	// PostWebhooksWebhookIdPingWithResponse request
	PostWebhooksWebhookIdPingWithResponse(ctx context.Context, webhookId string, reqEditors ...RequestEditorFn) (*PostWebhooksWebhookIdPingResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CreateWebhookRequest

type CreateWebhookRequest struct {
	// Data The webhook resource to create.
	Data WebhookInputResource `json:"data"`
}

CreateWebhookRequest Request to create a new webhook. This currently only requires a `url` attribute.

type CreateWebhookResponse

type CreateWebhookResponse struct {
	// Data The webhook that was created.
	Data WebhookResource `json:"data"`
}

CreateWebhookResponse Successful response after creating a webhook.

type CustomerObject

type CustomerObject struct {
	// DisplayName The Upname or preferred name of the customer
	DisplayName string `json:"displayName"`
}

CustomerObject Provides information about the customer who initiated a transaction

type DeleteTransactionsTransactionIdRelationshipsTagsJSONRequestBody

type DeleteTransactionsTransactionIdRelationshipsTagsJSONRequestBody = UpdateTransactionTagsRequest

DeleteTransactionsTransactionIdRelationshipsTagsJSONRequestBody defines body for DeleteTransactionsTransactionIdRelationshipsTags for application/json ContentType.

type DeleteTransactionsTransactionIdRelationshipsTagsResponse

type DeleteTransactionsTransactionIdRelationshipsTagsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseDeleteTransactionsTransactionIdRelationshipsTagsResponse

func ParseDeleteTransactionsTransactionIdRelationshipsTagsResponse(rsp *http.Response) (*DeleteTransactionsTransactionIdRelationshipsTagsResponse, error)

ParseDeleteTransactionsTransactionIdRelationshipsTagsResponse parses an HTTP response from a DeleteTransactionsTransactionIdRelationshipsTagsWithResponse call

func (DeleteTransactionsTransactionIdRelationshipsTagsResponse) Status

Status returns HTTPResponse.Status

func (DeleteTransactionsTransactionIdRelationshipsTagsResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type DeleteWebhooksIdResponse

type DeleteWebhooksIdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseDeleteWebhooksIdResponse

func ParseDeleteWebhooksIdResponse(rsp *http.Response) (*DeleteWebhooksIdResponse, error)

ParseDeleteWebhooksIdResponse parses an HTTP response from a DeleteWebhooksIdWithResponse call

func (DeleteWebhooksIdResponse) Status

func (r DeleteWebhooksIdResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteWebhooksIdResponse) StatusCode

func (r DeleteWebhooksIdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ErrorObject

type ErrorObject struct {
	// Detail A detailed description of this error. This should be considered unique
	// to individual occurrences of an error and subject to change. It is
	// useful for debugging purposes.
	Detail string `json:"detail"`

	// Source If applicable, location in the request that this error relates to. This
	// may be a parameter in the query string, or a an attribute in the
	// request body.
	Source *struct {
		// Parameter If this error relates to a query parameter, the name of the
		// parameter.
		Parameter *string `json:"parameter,omitempty"`

		// Pointer If this error relates to an attribute in the request body, a
		// rfc-6901 JSON pointer to the attribute.
		Pointer *string `json:"pointer,omitempty"`
	} `json:"source,omitempty"`

	// Status The HTTP status code associated with this error. This can also be
	// obtained from the response headers. The status indicates the broad type
	// of error according to HTTP semantics.
	Status string `json:"status"`

	// Title A short description of this error. This should be stable across
	// multiple occurrences of this type of error and typically expands on the
	// reason for the status code.
	Title string `json:"title"`
}

ErrorObject Provides information about an error processing a request.

type ErrorResponse

type ErrorResponse struct {
	// Errors The list of errors returned in this response.
	Errors []ErrorObject `json:"errors"`
}

ErrorResponse Generic error response that returns one or more errors.

type GetAccountResponse

type GetAccountResponse struct {
	// Data The account returned in this response.
	Data AccountResource `json:"data"`
}

GetAccountResponse Successful response to get a single account.

type GetAccountsAccountIdTransactionsParams

type GetAccountsAccountIdTransactionsParams struct {
	// PageSize The number of records to return in each page.
	PageSize *int `form:"page[size],omitempty" json:"page[size],omitempty"`

	// FilterStatus The transaction status for which to return records. This
	// can be used to filter `HELD` transactions from those
	// that are `SETTLED`.
	FilterStatus *TransactionStatusEnum `form:"filter[status],omitempty" json:"filter[status],omitempty"`

	// FilterSince The start date-time from which to return records,
	// formatted according to rfc-3339. Not to be used for
	// pagination purposes.
	FilterSince *time.Time `form:"filter[since],omitempty" json:"filter[since],omitempty"`

	// FilterUntil The end date-time up to which to return records,
	// formatted according to rfc-3339. Not to be used for
	// pagination purposes.
	FilterUntil *time.Time `form:"filter[until],omitempty" json:"filter[until],omitempty"`

	// FilterCategory The category identifier for which to filter transactions.
	// Both parent and child categories can be filtered through
	// this parameter. Providing an invalid category identifier
	// results in a `404` response.
	FilterCategory *string `form:"filter[category],omitempty" json:"filter[category],omitempty"`

	// FilterTag A transaction tag to filter for which to return records.
	// If the tag does not exist, zero records are returned and
	// a success response is given.
	FilterTag *string `form:"filter[tag],omitempty" json:"filter[tag],omitempty"`
}

GetAccountsAccountIdTransactionsParams defines parameters for GetAccountsAccountIdTransactions.

type GetAccountsAccountIdTransactionsResponse

type GetAccountsAccountIdTransactionsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ListTransactionsResponse
}

func ParseGetAccountsAccountIdTransactionsResponse

func ParseGetAccountsAccountIdTransactionsResponse(rsp *http.Response) (*GetAccountsAccountIdTransactionsResponse, error)

ParseGetAccountsAccountIdTransactionsResponse parses an HTTP response from a GetAccountsAccountIdTransactionsWithResponse call

func (GetAccountsAccountIdTransactionsResponse) Status

Status returns HTTPResponse.Status

func (GetAccountsAccountIdTransactionsResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type GetAccountsIdResponse

type GetAccountsIdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetAccountResponse
}

func ParseGetAccountsIdResponse

func ParseGetAccountsIdResponse(rsp *http.Response) (*GetAccountsIdResponse, error)

ParseGetAccountsIdResponse parses an HTTP response from a GetAccountsIdWithResponse call

func (GetAccountsIdResponse) Status

func (r GetAccountsIdResponse) Status() string

Status returns HTTPResponse.Status

func (GetAccountsIdResponse) StatusCode

func (r GetAccountsIdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetAccountsParams

type GetAccountsParams struct {
	// PageSize The number of records to return in each page.
	PageSize *int `form:"page[size],omitempty" json:"page[size],omitempty"`

	// FilterAccountType The type of account for which to return records. This
	// can be used to filter Savers from spending accounts.
	FilterAccountType *AccountTypeEnum `form:"filter[accountType],omitempty" json:"filter[accountType],omitempty"`

	// FilterOwnershipType The account ownership structure for which to return
	// records. This can be used to filter 2Up accounts from Up
	// accounts.
	FilterOwnershipType *OwnershipTypeEnum `form:"filter[ownershipType],omitempty" json:"filter[ownershipType],omitempty"`
}

GetAccountsParams defines parameters for GetAccounts.

type GetAccountsResponse

type GetAccountsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ListAccountsResponse
}

func ParseGetAccountsResponse

func ParseGetAccountsResponse(rsp *http.Response) (*GetAccountsResponse, error)

ParseGetAccountsResponse parses an HTTP response from a GetAccountsWithResponse call

func (GetAccountsResponse) Status

func (r GetAccountsResponse) Status() string

Status returns HTTPResponse.Status

func (GetAccountsResponse) StatusCode

func (r GetAccountsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetAttachmentResponse

type GetAttachmentResponse struct {
	// Data The attachment returned in this response.
	Data AttachmentResource `json:"data"`
}

GetAttachmentResponse Successful response to get a single attachment.

type GetAttachmentsIdResponse

type GetAttachmentsIdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetAttachmentResponse
}

func ParseGetAttachmentsIdResponse

func ParseGetAttachmentsIdResponse(rsp *http.Response) (*GetAttachmentsIdResponse, error)

ParseGetAttachmentsIdResponse parses an HTTP response from a GetAttachmentsIdWithResponse call

func (GetAttachmentsIdResponse) Status

func (r GetAttachmentsIdResponse) Status() string

Status returns HTTPResponse.Status

func (GetAttachmentsIdResponse) StatusCode

func (r GetAttachmentsIdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetAttachmentsResponse

type GetAttachmentsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ListAttachmentsResponse
}

func ParseGetAttachmentsResponse

func ParseGetAttachmentsResponse(rsp *http.Response) (*GetAttachmentsResponse, error)

ParseGetAttachmentsResponse parses an HTTP response from a GetAttachmentsWithResponse call

func (GetAttachmentsResponse) Status

func (r GetAttachmentsResponse) Status() string

Status returns HTTPResponse.Status

func (GetAttachmentsResponse) StatusCode

func (r GetAttachmentsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetCategoriesIdResponse

type GetCategoriesIdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetCategoryResponse
}

func ParseGetCategoriesIdResponse

func ParseGetCategoriesIdResponse(rsp *http.Response) (*GetCategoriesIdResponse, error)

ParseGetCategoriesIdResponse parses an HTTP response from a GetCategoriesIdWithResponse call

func (GetCategoriesIdResponse) Status

func (r GetCategoriesIdResponse) Status() string

Status returns HTTPResponse.Status

func (GetCategoriesIdResponse) StatusCode

func (r GetCategoriesIdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetCategoriesParams

type GetCategoriesParams struct {
	// FilterParent The unique identifier of a parent category for which to
	// return only its children. Providing an invalid category
	// identifier results in a `404` response.
	FilterParent *string `form:"filter[parent],omitempty" json:"filter[parent],omitempty"`
}

GetCategoriesParams defines parameters for GetCategories.

type GetCategoriesResponse

type GetCategoriesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ListCategoriesResponse
}

func ParseGetCategoriesResponse

func ParseGetCategoriesResponse(rsp *http.Response) (*GetCategoriesResponse, error)

ParseGetCategoriesResponse parses an HTTP response from a GetCategoriesWithResponse call

func (GetCategoriesResponse) Status

func (r GetCategoriesResponse) Status() string

Status returns HTTPResponse.Status

func (GetCategoriesResponse) StatusCode

func (r GetCategoriesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetCategoryResponse

type GetCategoryResponse struct {
	// Data The category returned in this response.
	Data CategoryResource `json:"data"`
}

GetCategoryResponse Successful response to get a single category and its ancestry.

type GetTagsParams

type GetTagsParams struct {
	// PageSize The number of records to return in each page.
	PageSize *int `form:"page[size],omitempty" json:"page[size],omitempty"`
}

GetTagsParams defines parameters for GetTags.

type GetTagsResponse

type GetTagsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ListTagsResponse
}

func ParseGetTagsResponse

func ParseGetTagsResponse(rsp *http.Response) (*GetTagsResponse, error)

ParseGetTagsResponse parses an HTTP response from a GetTagsWithResponse call

func (GetTagsResponse) Status

func (r GetTagsResponse) Status() string

Status returns HTTPResponse.Status

func (GetTagsResponse) StatusCode

func (r GetTagsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetTransactionResponse

type GetTransactionResponse struct {
	// Data The transaction returned in this response.
	Data TransactionResource `json:"data"`
}

GetTransactionResponse Successful response to get a single transaction.

type GetTransactionsIdResponse

type GetTransactionsIdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetTransactionResponse
}

func ParseGetTransactionsIdResponse

func ParseGetTransactionsIdResponse(rsp *http.Response) (*GetTransactionsIdResponse, error)

ParseGetTransactionsIdResponse parses an HTTP response from a GetTransactionsIdWithResponse call

func (GetTransactionsIdResponse) Status

func (r GetTransactionsIdResponse) Status() string

Status returns HTTPResponse.Status

func (GetTransactionsIdResponse) StatusCode

func (r GetTransactionsIdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetTransactionsParams

type GetTransactionsParams struct {
	// PageSize The number of records to return in each page.
	PageSize *int `form:"page[size],omitempty" json:"page[size],omitempty"`

	// FilterStatus The transaction status for which to return records. This
	// can be used to filter `HELD` transactions from those
	// that are `SETTLED`.
	FilterStatus *TransactionStatusEnum `form:"filter[status],omitempty" json:"filter[status],omitempty"`

	// FilterSince The start date-time from which to return records,
	// formatted according to rfc-3339. Not to be used for
	// pagination purposes.
	FilterSince *time.Time `form:"filter[since],omitempty" json:"filter[since],omitempty"`

	// FilterUntil The end date-time up to which to return records,
	// formatted according to rfc-3339. Not to be used for
	// pagination purposes.
	FilterUntil *time.Time `form:"filter[until],omitempty" json:"filter[until],omitempty"`

	// FilterCategory The category identifier for which to filter transactions.
	// Both parent and child categories can be filtered through
	// this parameter. Providing an invalid category identifier
	// results in a `404` response.
	FilterCategory *string `form:"filter[category],omitempty" json:"filter[category],omitempty"`

	// FilterTag A transaction tag to filter for which to return records.
	// If the tag does not exist, zero records are returned and
	// a success response is given.
	FilterTag *string `form:"filter[tag],omitempty" json:"filter[tag],omitempty"`
}

GetTransactionsParams defines parameters for GetTransactions.

type GetTransactionsResponse

type GetTransactionsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ListTransactionsResponse
}

func ParseGetTransactionsResponse

func ParseGetTransactionsResponse(rsp *http.Response) (*GetTransactionsResponse, error)

ParseGetTransactionsResponse parses an HTTP response from a GetTransactionsWithResponse call

func (GetTransactionsResponse) Status

func (r GetTransactionsResponse) Status() string

Status returns HTTPResponse.Status

func (GetTransactionsResponse) StatusCode

func (r GetTransactionsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetUtilPingResponse

type GetUtilPingResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PingResponse
	JSON401      *ErrorResponse
}

func ParseGetUtilPingResponse

func ParseGetUtilPingResponse(rsp *http.Response) (*GetUtilPingResponse, error)

ParseGetUtilPingResponse parses an HTTP response from a GetUtilPingWithResponse call

func (GetUtilPingResponse) Status

func (r GetUtilPingResponse) Status() string

Status returns HTTPResponse.Status

func (GetUtilPingResponse) StatusCode

func (r GetUtilPingResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetWebhookResponse

type GetWebhookResponse struct {
	// Data The webhook returned in this response.
	Data WebhookResource `json:"data"`
}

GetWebhookResponse Successful response to get a single webhook.

type GetWebhooksIdResponse

type GetWebhooksIdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetWebhookResponse
}

func ParseGetWebhooksIdResponse

func ParseGetWebhooksIdResponse(rsp *http.Response) (*GetWebhooksIdResponse, error)

ParseGetWebhooksIdResponse parses an HTTP response from a GetWebhooksIdWithResponse call

func (GetWebhooksIdResponse) Status

func (r GetWebhooksIdResponse) Status() string

Status returns HTTPResponse.Status

func (GetWebhooksIdResponse) StatusCode

func (r GetWebhooksIdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetWebhooksParams

type GetWebhooksParams struct {
	// PageSize The number of records to return in each page.
	PageSize *int `form:"page[size],omitempty" json:"page[size],omitempty"`
}

GetWebhooksParams defines parameters for GetWebhooks.

type GetWebhooksResponse

type GetWebhooksResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ListWebhooksResponse
}

func ParseGetWebhooksResponse

func ParseGetWebhooksResponse(rsp *http.Response) (*GetWebhooksResponse, error)

ParseGetWebhooksResponse parses an HTTP response from a GetWebhooksWithResponse call

func (GetWebhooksResponse) Status

func (r GetWebhooksResponse) Status() string

Status returns HTTPResponse.Status

func (GetWebhooksResponse) StatusCode

func (r GetWebhooksResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetWebhooksWebhookIdLogsParams

type GetWebhooksWebhookIdLogsParams struct {
	// PageSize The number of records to return in each page.
	PageSize *int `form:"page[size],omitempty" json:"page[size],omitempty"`
}

GetWebhooksWebhookIdLogsParams defines parameters for GetWebhooksWebhookIdLogs.

type GetWebhooksWebhookIdLogsResponse

type GetWebhooksWebhookIdLogsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ListWebhookDeliveryLogsResponse
}

func ParseGetWebhooksWebhookIdLogsResponse

func ParseGetWebhooksWebhookIdLogsResponse(rsp *http.Response) (*GetWebhooksWebhookIdLogsResponse, error)

ParseGetWebhooksWebhookIdLogsResponse parses an HTTP response from a GetWebhooksWebhookIdLogsWithResponse call

func (GetWebhooksWebhookIdLogsResponse) Status

Status returns HTTPResponse.Status

func (GetWebhooksWebhookIdLogsResponse) StatusCode

func (r GetWebhooksWebhookIdLogsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HoldInfoObject

type HoldInfoObject struct {
	// Amount The amount of this transaction while in the `HELD` status, in
	// Australian dollars.
	Amount MoneyObject `json:"amount"`

	// ForeignAmount The foreign currency amount of this transaction while in the `HELD`
	// status. This field will be `null` for domestic transactions. The amount
	// was converted to the AUD amount reflected in the `amount` field.
	ForeignAmount *MoneyObject `json:"foreignAmount"`
}

HoldInfoObject Provides information about the amount at which a transaction was in the `HELD` status.

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type ListAccountsResponse

type ListAccountsResponse struct {
	// Data The list of accounts returned in this response.
	Data  []AccountResource `json:"data"`
	Links struct {
		// Next The link to the next page in the results. If this value is `null`
		// there is no next page.
		Next *string `json:"next"`

		// Prev The link to the previous page in the results. If this value is `null`
		// there is no previous page.
		Prev *string `json:"prev"`
	} `json:"links"`
}

ListAccountsResponse Successful response to get all accounts. This returns a paginated list of accounts, which can be scrolled by following the `prev` and `next` links if present.

type ListAttachmentsResponse

type ListAttachmentsResponse struct {
	// Data The list of attachments returned in this response.
	Data  []AttachmentResource `json:"data"`
	Links struct {
		// Next The link to the next page in the results. If this value is `null`
		// there is no next page.
		Next *string `json:"next"`

		// Prev The link to the previous page in the results. If this value is `null`
		// there is no previous page.
		Prev *string `json:"prev"`
	} `json:"links"`
}

ListAttachmentsResponse Successful response to get all attachments. This returns a paginated list of attachments, which can be scrolled by following the `prev` and `next` links if present.

type ListCategoriesResponse

type ListCategoriesResponse struct {
	// Data The list of categories returned in this response.
	Data []CategoryResource `json:"data"`
}

ListCategoriesResponse Successful response to get all categories and their ancestry. The returned list is not paginated.

type ListTagsResponse

type ListTagsResponse struct {
	// Data The list of tags returned in this response.
	Data  []TagResource `json:"data"`
	Links struct {
		// Next The link to the next page in the results. If this value is `null`
		// there is no next page.
		Next *string `json:"next"`

		// Prev The link to the previous page in the results. If this value is `null`
		// there is no previous page.
		Prev *string `json:"prev"`
	} `json:"links"`
}

ListTagsResponse Successful response to get all tags. This returns a paginated list of tags, which can be scrolled by following the `prev` and `next` links if present.

type ListTransactionsResponse

type ListTransactionsResponse struct {
	// Data The list of transactions returned in this response.
	Data  []TransactionResource `json:"data"`
	Links struct {
		// Next The link to the next page in the results. If this value is `null`
		// there is no next page.
		Next *string `json:"next"`

		// Prev The link to the previous page in the results. If this value is `null`
		// there is no previous page.
		Prev *string `json:"prev"`
	} `json:"links"`
}

ListTransactionsResponse Successful response to get all transactions. This returns a paginated list of transactions, which can be scrolled by following the `prev` and `next` links if present.

type ListWebhookDeliveryLogsResponse

type ListWebhookDeliveryLogsResponse struct {
	// Data The list of delivery logs returned in this response.
	Data  []WebhookDeliveryLogResource `json:"data"`
	Links struct {
		// Next The link to the next page in the results. If this value is `null`
		// there is no next page.
		Next *string `json:"next"`

		// Prev The link to the previous page in the results. If this value is `null`
		// there is no previous page.
		Prev *string `json:"prev"`
	} `json:"links"`
}

ListWebhookDeliveryLogsResponse Successful response to get all delivery logs for a webhook. This returns a paginated list of delivery logs, which can be scrolled by following the `next` and `prev` links if present.

type ListWebhooksResponse

type ListWebhooksResponse struct {
	// Data The list of webhooks returned in this response.
	Data  []WebhookResource `json:"data"`
	Links struct {
		// Next The link to the next page in the results. If this value is `null`
		// there is no next page.
		Next *string `json:"next"`

		// Prev The link to the previous page in the results. If this value is `null`
		// there is no previous page.
		Prev *string `json:"prev"`
	} `json:"links"`
}

ListWebhooksResponse Successful response to get all webhooks. This returns a paginated list of webhooks, which can be scrolled by following the `prev` and `next` links if present.

type MoneyObject

type MoneyObject struct {
	// CurrencyCode The ISO 4217 currency code.
	CurrencyCode string `json:"currencyCode"`

	// Value The amount of money, formatted as a string in the relevant currency.
	// For example, for an Australian dollar value of $10.56, this field will
	// be `"10.56"`. The currency symbol is not included in the string.
	Value string `json:"value"`

	// ValueInBaseUnits The amount of money in the smallest denomination for the currency, as a
	// 64-bit integer.  For example, for an Australian dollar value of $10.56,
	// this field will be `1056`.
	ValueInBaseUnits int `json:"valueInBaseUnits"`
}

MoneyObject Provides information about a value of money.

type NoteObject

type NoteObject struct {
	// Text A text note about the transaction.
	Text string `json:"text"`
}

NoteObject Provides information about the note and attachement.

type OwnershipTypeEnum

type OwnershipTypeEnum = interface{}

OwnershipTypeEnum Specifies the structure under which a bank account is owned. Currently returned values are `INDIVIDUAL` and `JOINT`.

type PatchTransactionsTransactionIdRelationshipsCategoryJSONRequestBody

type PatchTransactionsTransactionIdRelationshipsCategoryJSONRequestBody = UpdateTransactionCategoryRequest

PatchTransactionsTransactionIdRelationshipsCategoryJSONRequestBody defines body for PatchTransactionsTransactionIdRelationshipsCategory for application/json ContentType.

type PatchTransactionsTransactionIdRelationshipsCategoryResponse

type PatchTransactionsTransactionIdRelationshipsCategoryResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePatchTransactionsTransactionIdRelationshipsCategoryResponse

func ParsePatchTransactionsTransactionIdRelationshipsCategoryResponse(rsp *http.Response) (*PatchTransactionsTransactionIdRelationshipsCategoryResponse, error)

ParsePatchTransactionsTransactionIdRelationshipsCategoryResponse parses an HTTP response from a PatchTransactionsTransactionIdRelationshipsCategoryWithResponse call

func (PatchTransactionsTransactionIdRelationshipsCategoryResponse) Status

Status returns HTTPResponse.Status

func (PatchTransactionsTransactionIdRelationshipsCategoryResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type PingResponse

type PingResponse struct {
	Meta struct {
		// Id The unique identifier of the authenticated customer.
		Id string `json:"id"`

		// StatusEmoji A cute emoji that represents the response status.
		StatusEmoji string `json:"statusEmoji"`
	} `json:"meta"`
}

PingResponse Basic ping response to verify authentication.

type PostTransactionsTransactionIdRelationshipsTagsJSONRequestBody

type PostTransactionsTransactionIdRelationshipsTagsJSONRequestBody = UpdateTransactionTagsRequest

PostTransactionsTransactionIdRelationshipsTagsJSONRequestBody defines body for PostTransactionsTransactionIdRelationshipsTags for application/json ContentType.

type PostTransactionsTransactionIdRelationshipsTagsResponse

type PostTransactionsTransactionIdRelationshipsTagsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePostTransactionsTransactionIdRelationshipsTagsResponse

func ParsePostTransactionsTransactionIdRelationshipsTagsResponse(rsp *http.Response) (*PostTransactionsTransactionIdRelationshipsTagsResponse, error)

ParsePostTransactionsTransactionIdRelationshipsTagsResponse parses an HTTP response from a PostTransactionsTransactionIdRelationshipsTagsWithResponse call

func (PostTransactionsTransactionIdRelationshipsTagsResponse) Status

Status returns HTTPResponse.Status

func (PostTransactionsTransactionIdRelationshipsTagsResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type PostWebhooksJSONRequestBody

type PostWebhooksJSONRequestBody = CreateWebhookRequest

PostWebhooksJSONRequestBody defines body for PostWebhooks for application/json ContentType.

type PostWebhooksResponse

type PostWebhooksResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *CreateWebhookResponse
}

func ParsePostWebhooksResponse

func ParsePostWebhooksResponse(rsp *http.Response) (*PostWebhooksResponse, error)

ParsePostWebhooksResponse parses an HTTP response from a PostWebhooksWithResponse call

func (PostWebhooksResponse) Status

func (r PostWebhooksResponse) Status() string

Status returns HTTPResponse.Status

func (PostWebhooksResponse) StatusCode

func (r PostWebhooksResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostWebhooksWebhookIdPingResponse

type PostWebhooksWebhookIdPingResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *WebhookEventCallback
}

func ParsePostWebhooksWebhookIdPingResponse

func ParsePostWebhooksWebhookIdPingResponse(rsp *http.Response) (*PostWebhooksWebhookIdPingResponse, error)

ParsePostWebhooksWebhookIdPingResponse parses an HTTP response from a PostWebhooksWebhookIdPingWithResponse call

func (PostWebhooksWebhookIdPingResponse) Status

Status returns HTTPResponse.Status

func (PostWebhooksWebhookIdPingResponse) StatusCode

func (r PostWebhooksWebhookIdPingResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type RoundUpObject

type RoundUpObject struct {
	// Amount The total amount of this Round Up, including any boosts, represented as
	// a negative value.
	Amount MoneyObject `json:"amount"`

	// BoostPortion The portion of the Round Up `amount` owing to boosted Round Ups,
	// represented as a negative value. If no boost was added to the Round Up
	// this field will be `null`.
	BoostPortion *MoneyObject `json:"boostPortion"`
}

RoundUpObject Provides information about how a Round Up was applied, such as whether or not a boost was included in the Round Up.

type TagInputResourceIdentifier

type TagInputResourceIdentifier struct {
	// Id The label of the tag, which also acts as the tag’s unique identifier.
	Id string `json:"id"`

	// Type The type of this resource: `tags`
	Type string `json:"type"`
}

TagInputResourceIdentifier Uniquely identifies a single tag in the API.

type TagResource

type TagResource struct {
	// Id The label of the tag, which also acts as the tag’s unique identifier.
	Id            string `json:"id"`
	Relationships struct {
		Transactions struct {
			Links *struct {
				// Related The link to retrieve the related resource(s) in this relationship.
				Related string `json:"related"`
			} `json:"links,omitempty"`
		} `json:"transactions"`
	} `json:"relationships"`

	// Type The type of this resource: `tags`
	Type string `json:"type"`
}

TagResource Provides information about a tag.

type TransactionResource

type TransactionResource struct {
	Attributes struct {
		// Amount The amount of this transaction in Australian dollars. For
		// transactions that were once `HELD` but are now `SETTLED`, refer to
		// the `holdInfo` field for the original `amount` the transaction was
		// `HELD` at.
		Amount MoneyObject `json:"amount"`

		// CardPurchaseMethod Information about the card used for this transaction, if applicable.
		CardPurchaseMethod *CardPurchaseMethodObject `json:"cardPurchaseMethod"`

		// Cashback If all or part of this transaction was instantly reimbursed in the
		// form of cashback, details of the reimbursement.
		Cashback *CashbackObject `json:"cashback"`

		// CreatedAt The date-time at which this transaction was first encountered.
		CreatedAt time.Time `json:"createdAt"`

		// Description A short description for this transaction. Usually the merchant name
		// for purchases.
		Description string `json:"description"`

		// ForeignAmount The foreign currency amount of this transaction. This field will be
		// `null` for domestic transactions. The amount was converted to the AUD
		// amount reflected in the `amount` of this transaction. Refer to the
		// `holdInfo` field for the original `foreignAmount` the transaction was
		// `HELD` at.
		ForeignAmount *MoneyObject `json:"foreignAmount"`

		// HoldInfo If this transaction is currently in the `HELD` status, or was ever in
		// the `HELD` status, the `amount` and `foreignAmount` of the
		// transaction while `HELD`.
		HoldInfo *HoldInfoObject `json:"holdInfo"`

		// IsCategorizable Boolean flag set to true on transactions that support the use of
		// categories.
		IsCategorizable bool `json:"isCategorizable"`

		// Message Attached message for this transaction, such as a payment message, or a
		// transfer note.
		Message *string `json:"message"`

		// Note A customer provided note about the transaction.  Can only be provided by Up High subscribers.
		Note *NoteObject `json:"note"`

		// PerformingCustomer The customer who initated the transaction.  For 2Up accounts this could be the customer who's card was used.
		PerformingCustomer *CustomerObject `json:"performingCustomer"`

		// RawText The original, unprocessed text of the transaction. This is often not
		// a perfect indicator of the actual merchant, but it is useful for
		// reconciliation purposes in some cases.
		RawText *string `json:"rawText"`

		// RoundUp Details of how this transaction was rounded-up. If no Round Up was
		// applied this field will be `null`.
		RoundUp *RoundUpObject `json:"roundUp"`

		// SettledAt The date-time at which this transaction settled. This field will be
		// `null` for transactions that are currently in the `HELD` status.
		SettledAt *time.Time `json:"settledAt"`

		// Status The current processing status of this transaction, according to
		// whether or not this transaction has settled or is still held.
		Status TransactionStatusEnum `json:"status"`

		// TransactionType A description of the transaction method used e.g. Purchase, BPAY Payment.
		TransactionType *string `json:"transactionType"`
	} `json:"attributes"`

	// Id The unique identifier for this transaction.
	Id    string `json:"id"`
	Links *struct {
		// Self The canonical link to this resource within the API.
		Self string `json:"self"`
	} `json:"links,omitempty"`
	Relationships struct {
		Account struct {
			Data struct {
				// Id The unique identifier of the resource within its type.
				Id string `json:"id"`

				// Type The type of this resource: `accounts`
				Type string `json:"type"`
			} `json:"data"`
			Links *struct {
				// Related The link to retrieve the related resource(s) in this relationship.
				Related string `json:"related"`
			} `json:"links,omitempty"`
		} `json:"account"`
		Attachment struct {
			Data *struct {
				// Id The unique identifier of the resource within its type.
				Id string `json:"id"`

				// Type The type of this resource: `attachments`
				Type string `json:"type"`
			} `json:"data"`
			Links *struct {
				// Related The link to retrieve the related resource(s) in this relationship.
				Related string `json:"related"`
			} `json:"links,omitempty"`
		} `json:"attachment"`
		Category struct {
			Data *struct {
				// Id The unique identifier of the resource within its type.
				Id string `json:"id"`

				// Type The type of this resource: `categories`
				Type string `json:"type"`
			} `json:"data"`
			Links *struct {
				// Related The link to retrieve the related resource(s) in this relationship.
				Related *string `json:"related,omitempty"`

				// Self The link to retrieve or modify linkage between this resources and the
				// related resource(s) in this relationship.
				Self string `json:"self"`
			} `json:"links,omitempty"`
		} `json:"category"`
		ParentCategory struct {
			Data *struct {
				// Id The unique identifier of the resource within its type.
				Id string `json:"id"`

				// Type The type of this resource: `categories`
				Type string `json:"type"`
			} `json:"data"`
			Links *struct {
				// Related The link to retrieve the related resource(s) in this relationship.
				Related string `json:"related"`
			} `json:"links,omitempty"`
		} `json:"parentCategory"`
		Tags struct {
			Data []struct {
				// Id The label of the tag, which also acts as the tag’s unique identifier.
				Id string `json:"id"`

				// Type The type of this resource: `tags`
				Type string `json:"type"`
			} `json:"data"`
			Links *struct {
				// Self The link to retrieve or modify linkage between this resources and the
				// related resource(s) in this relationship.
				Self string `json:"self"`
			} `json:"links,omitempty"`
		} `json:"tags"`

		// TransferAccount If this transaction is a transfer between accounts, this relationship
		// will contain the account the transaction went to/came from. The
		// `amount` field can be used to determine the direction of the transfer.
		TransferAccount struct {
			Data *struct {
				// Id The unique identifier of the resource within its type.
				Id string `json:"id"`

				// Type The type of this resource: `accounts`
				Type string `json:"type"`
			} `json:"data"`
			Links *struct {
				// Related The link to retrieve the related resource(s) in this relationship.
				Related string `json:"related"`
			} `json:"links,omitempty"`
		} `json:"transferAccount"`
	} `json:"relationships"`

	// Type The type of this resource: `transactions`
	Type string `json:"type"`
}

TransactionResource defines model for TransactionResource.

type TransactionStatusEnum

type TransactionStatusEnum = interface{}

TransactionStatusEnum Specifies which stage of processing a transaction is currently at. Currently returned values are `HELD` and `SETTLED`. When a transaction is held, its account’s `availableBalance` is affected. When a transaction is settled, its account’s `currentBalance` is affected.

type UpdateTransactionCategoryRequest

type UpdateTransactionCategoryRequest struct {
	// Data The category to set on the transaction. Set this entire key to `null`
	// de-categorize a transaction.
	Data *CategoryInputResourceIdentifier `json:"data"`
}

UpdateTransactionCategoryRequest Request to update the category associated with a transaction.

type UpdateTransactionTagsRequest

type UpdateTransactionTagsRequest struct {
	// Data The tags to add to or remove from the transaction.
	Data []TagInputResourceIdentifier `json:"data"`
}

UpdateTransactionTagsRequest Request to add or remove tags associated with a transaction.

type WebhookDeliveryLogResource

type WebhookDeliveryLogResource struct {
	Attributes struct {
		// CreatedAt The date-time at which this log entry was created.
		CreatedAt time.Time `json:"createdAt"`

		// DeliveryStatus The success or failure status of this delivery attempt.
		DeliveryStatus WebhookDeliveryStatusEnum `json:"deliveryStatus"`

		// Request Information about the request that was sent to the webhook URL.
		Request struct {
			// Body The payload that was sent in the request body.
			Body string `json:"body"`
		} `json:"request"`

		// Response Information about the response that was received from the webhook URL.
		Response *struct {
			// Body The payload that was received in the response body.
			Body string `json:"body"`

			// StatusCode The HTTP status code received in the response.
			StatusCode int `json:"statusCode"`
		} `json:"response"`
	} `json:"attributes"`

	// Id The unique identifier for this log entry.
	Id            string `json:"id"`
	Relationships struct {
		WebhookEvent struct {
			Data struct {
				// Id The unique identifier of the resource within its type.
				Id string `json:"id"`

				// Type The type of this resource: `webhook-events`
				Type string `json:"type"`
			} `json:"data"`
		} `json:"webhookEvent"`
	} `json:"relationships"`

	// Type The type of this resource: `webhook-delivery-logs`
	Type string `json:"type"`
}

WebhookDeliveryLogResource Provides historical webhook event delivery information for analysis and debugging purposes.

type WebhookDeliveryStatusEnum

type WebhookDeliveryStatusEnum = interface{}

WebhookDeliveryStatusEnum Specifies the nature of the success or failure of a webhook delivery attempt to the subscribed webhook URL. The currently returned values are described below:

  • **`DELIVERED`**: The event was delivered to the webhook URL successfully and a `200` response was received.
  • **`UNDELIVERABLE`**: The webhook URL was not reachable, or timed out.
  • **`BAD_RESPONSE_CODE`**: The event was delivered to the webhook URL but a non-`200` response was received.

type WebhookEventCallback

type WebhookEventCallback struct {
	// Data The webhook event data sent to the subscribed webhook.
	Data WebhookEventResource `json:"data"`
}

WebhookEventCallback Asynchronous callback request used for webhook event delivery.

type WebhookEventResource

type WebhookEventResource struct {
	Attributes struct {
		// CreatedAt The date-time at which this event was generated.
		CreatedAt time.Time `json:"createdAt"`

		// EventType The type of this event. This can be used to determine what action to
		// take in response to the event.
		EventType WebhookEventTypeEnum `json:"eventType"`
	} `json:"attributes"`

	// Id The unique identifier for this event. This will remain constant across
	// delivery retries.
	Id            string `json:"id"`
	Relationships struct {
		Transaction *struct {
			Data struct {
				// Id The unique identifier of the resource within its type.
				Id string `json:"id"`

				// Type The type of this resource: `transactions`
				Type string `json:"type"`
			} `json:"data"`
			Links *struct {
				// Related The link to retrieve the related resource(s) in this relationship.
				Related string `json:"related"`
			} `json:"links,omitempty"`
		} `json:"transaction,omitempty"`
		Webhook struct {
			Data struct {
				// Id The unique identifier of the resource within its type.
				Id string `json:"id"`

				// Type The type of this resource: `webhooks`
				Type string `json:"type"`
			} `json:"data"`
			Links *struct {
				// Related The link to retrieve the related resource(s) in this relationship.
				Related string `json:"related"`
			} `json:"links,omitempty"`
		} `json:"webhook"`
	} `json:"relationships"`

	// Type The type of this resource: `webhook-events`
	Type string `json:"type"`
}

WebhookEventResource Provides the event data used in asynchronous webhook event callbacks to subscribed endpoints. Webhooks events have defined `eventType`s and may optionally relate to other resources within the Up API.

type WebhookEventTypeEnum

type WebhookEventTypeEnum = interface{}

WebhookEventTypeEnum Specifies the type of a webhook event. This can be used to determine what action to take in response to the event, such as which relationships to expect.

type WebhookInputResource

type WebhookInputResource struct {
	Attributes struct {
		// Description An optional description for this webhook, up to 64 characters in
		// length.
		Description *string `json:"description"`

		// Url The URL that this webhook should post events to. This must be a valid
		// HTTP or HTTPS URL that does not exceed 300 characters in length.
		Url string `json:"url"`
	} `json:"attributes"`
}

WebhookInputResource Represents a webhook specified as request input.

type WebhookResource

type WebhookResource struct {
	Attributes struct {
		// CreatedAt The date-time at which this webhook was created.
		CreatedAt time.Time `json:"createdAt"`

		// Description An optional description that was provided at the time the webhook was
		// created.
		Description *string `json:"description"`

		// SecretKey A shared secret key used to sign all webhook events sent to the
		// configured webhook URL. This field is returned only once, upon the
		// initial creation of the webhook. If lost, create a new webhook and
		// delete this webhook.
		//
		// The webhook URL receives a request with a
		// `X-Up-Authenticity-Signature` header, which is the SHA-256 HMAC of
		// the entire raw request body signed using this `secretKey`. It is
		// advised to compute and check this signature to verify the
		// authenticity of requests sent to the webhook URL. See
		// [Handling webhook events](#callback_post_webhookURL) for full
		// details.
		SecretKey *string `json:"secretKey,omitempty"`

		// Url The URL that this webhook is configured to `POST` events to.
		Url string `json:"url"`
	} `json:"attributes"`

	// Id The unique identifier for this webhook.
	Id    string `json:"id"`
	Links *struct {
		// Self The canonical link to this resource within the API.
		Self string `json:"self"`
	} `json:"links,omitempty"`
	Relationships struct {
		Logs struct {
			Links *struct {
				// Related The link to retrieve the related resource(s) in this relationship.
				Related string `json:"related"`
			} `json:"links,omitempty"`
		} `json:"logs"`
	} `json:"relationships"`

	// Type The type of this resource: `webhooks`
	Type string `json:"type"`
}

WebhookResource Provides information about a webhook.

Jump to

Keyboard shortcuts

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