formancesdkgo

package module
v2.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 12 Imported by: 1

README ΒΆ

github.com/formancehq/formance-sdk-go/v2

πŸ— Welcome to your new SDK! πŸ—

It has been generated successfully based on your OpenAPI spec. However, it is not yet ready for production use. Here are some next steps:

SDK Installation

go get github.com/formancehq/formance-sdk-go

SDK Example Usage

Example
package main

import (
	"context"
	formancesdkgo "github.com/formancehq/formance-sdk-go/v2"
	"github.com/formancehq/formance-sdk-go/v2/pkg/models/shared"
	"log"
)

func main() {
	s := formancesdkgo.New(
		formancesdkgo.WithSecurity(shared.Security{
			Authorization: "<YOUR_AUTHORIZATION_HERE>",
		}),
	)

	ctx := context.Background()
	res, err := s.GetOIDCWellKnowns(ctx)
	if err != nil {
		log.Fatal(err)
	}
	if res != nil {
		// handle response
	}
}

Available Resources and Operations

Formance SDK
Auth
Ledger
Orchestration
Payments
Reconciliation
Wallets
Webhooks

Error Handling

Handling errors in this SDK should largely match your expectations. All operations return a response object or an error, they will never return both. When specified by the OpenAPI spec document, the SDK will return the appropriate subclass.

Error Object Status Code Content Type
sdkerrors.ErrorResponse default application/json
sdkerrors.SDKError 4xx-5xx /
Example
package main

import (
	"context"
	"errors"
	formancesdkgo "github.com/formancehq/formance-sdk-go/v2"
	"github.com/formancehq/formance-sdk-go/v2/pkg/models/operations"
	"github.com/formancehq/formance-sdk-go/v2/pkg/models/sdkerrors"
	"github.com/formancehq/formance-sdk-go/v2/pkg/models/shared"
	"log"
	"math/big"
)

func main() {
	s := formancesdkgo.New(
		formancesdkgo.WithSecurity(shared.Security{
			Authorization: "<YOUR_AUTHORIZATION_HERE>",
		}),
	)

	ctx := context.Background()
	res, err := s.Ledger.CreateTransactions(ctx, operations.CreateTransactionsRequest{
		Transactions: shared.Transactions{
			Transactions: []shared.TransactionData{
				shared.TransactionData{
					Postings: []shared.Posting{
						shared.Posting{
							Amount:      big.NewInt(100),
							Asset:       "COIN",
							Destination: "users:002",
							Source:      "users:001",
						},
					},
					Reference: formancesdkgo.String("ref:001"),
				},
			},
		},
		Ledger: "ledger001",
	})
	if err != nil {

		var e *sdkerrors.ErrorResponse
		if errors.As(err, &e) {
			// handle error
			log.Fatal(e.Error())
		}

		var e *sdkerrors.SDKError
		if errors.As(err, &e) {
			// handle error
			log.Fatal(e.Error())
		}
	}
}

Server Selection

Select Server by Index

You can override the default server globally using the WithServerIndex option when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:

# Server Variables
0 http://localhost None
Example
package main

import (
	"context"
	formancesdkgo "github.com/formancehq/formance-sdk-go/v2"
	"github.com/formancehq/formance-sdk-go/v2/pkg/models/shared"
	"log"
)

func main() {
	s := formancesdkgo.New(
		formancesdkgo.WithServerIndex(0),
		formancesdkgo.WithSecurity(shared.Security{
			Authorization: "<YOUR_AUTHORIZATION_HERE>",
		}),
	)

	ctx := context.Background()
	res, err := s.GetOIDCWellKnowns(ctx)
	if err != nil {
		log.Fatal(err)
	}
	if res != nil {
		// handle response
	}
}

Override Server URL Per-Client

The default server can also be overridden globally using the WithServerURL option when initializing the SDK client instance. For example:

package main

import (
	"context"
	formancesdkgo "github.com/formancehq/formance-sdk-go/v2"
	"github.com/formancehq/formance-sdk-go/v2/pkg/models/shared"
	"log"
)

func main() {
	s := formancesdkgo.New(
		formancesdkgo.WithServerURL("http://localhost"),
		formancesdkgo.WithSecurity(shared.Security{
			Authorization: "<YOUR_AUTHORIZATION_HERE>",
		}),
	)

	ctx := context.Background()
	res, err := s.GetOIDCWellKnowns(ctx)
	if err != nil {
		log.Fatal(err)
	}
	if res != nil {
		// handle response
	}
}

Custom HTTP Client

The Go SDK makes API calls that wrap an internal HTTP client. The requirements for the HTTP client are very simple. It must match this interface:

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

The built-in net/http client satisfies this interface and a default client based on the built-in is provided by default. To replace this default with a client of your own, you can implement this interface yourself or provide your own client configured as desired. Here's a simple example, which adds a client with a 30 second timeout.

import (
	"net/http"
	"time"
	"github.com/myorg/your-go-sdk"
)

var (
	httpClient = &http.Client{Timeout: 30 * time.Second}
	sdkClient  = sdk.New(sdk.WithClient(httpClient))
)

This can be a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration.

Authentication

Per-Client Security Schemes

This SDK supports the following security scheme globally:

Name Type Scheme
Authorization oauth2 OAuth2 token

You can configure it using the WithSecurity option when initializing the SDK client instance. For example:

package main

import (
	"context"
	formancesdkgo "github.com/formancehq/formance-sdk-go/v2"
	"github.com/formancehq/formance-sdk-go/v2/pkg/models/shared"
	"log"
)

func main() {
	s := formancesdkgo.New(
		formancesdkgo.WithSecurity(shared.Security{
			Authorization: "<YOUR_AUTHORIZATION_HERE>",
		}),
	)

	ctx := context.Background()
	res, err := s.GetOIDCWellKnowns(ctx)
	if err != nil {
		log.Fatal(err)
	}
	if res != nil {
		// handle response
	}
}

Special Types

Development

Maturity

This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.

Contributions

While we value open-source contributions to this SDK, this library is generated programmatically. Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release!

SDK Created by Speakeasy

Documentation ΒΆ

Index ΒΆ

Constants ΒΆ

This section is empty.

Variables ΒΆ

View Source
var ServerList = []string{

	"http://localhost",
}

ServerList contains the list of servers available to the SDK

Functions ΒΆ

func Bool ΒΆ

func Bool(b bool) *bool

Bool provides a helper function to return a pointer to a bool

func Float32 ΒΆ

func Float32(f float32) *float32

Float32 provides a helper function to return a pointer to a float32

func Float64 ΒΆ

func Float64(f float64) *float64

Float64 provides a helper function to return a pointer to a float64

func Int ΒΆ

func Int(i int) *int

Int provides a helper function to return a pointer to an int

func Int64 ΒΆ

func Int64(i int64) *int64

Int64 provides a helper function to return a pointer to an int64

func String ΒΆ

func String(s string) *string

String provides a helper function to return a pointer to a string

Types ΒΆ

type Auth ΒΆ

type Auth struct {
	// contains filtered or unexported fields
}

func (*Auth) CreateClient ΒΆ

CreateClient - Create client

func (*Auth) CreateSecret ΒΆ

CreateSecret - Add a secret to a client

func (*Auth) DeleteClient ΒΆ

DeleteClient - Delete client

func (*Auth) DeleteSecret ΒΆ

DeleteSecret - Delete a secret from a client

func (*Auth) ListClients ΒΆ

func (s *Auth) ListClients(ctx context.Context) (*operations.ListClientsResponse, error)

ListClients - List clients

func (*Auth) ListUsers ΒΆ

func (s *Auth) ListUsers(ctx context.Context) (*operations.ListUsersResponse, error)

ListUsers - List users List users

func (*Auth) ReadClient ΒΆ

ReadClient - Read client

func (*Auth) ReadUser ΒΆ

ReadUser - Read user Read user

func (*Auth) UpdateClient ΒΆ

UpdateClient - Update client

type Formance ΒΆ

type Formance struct {
	Auth           *Auth
	Ledger         *Ledger
	Orchestration  *Orchestration
	Payments       *Payments
	Reconciliation *Reconciliation
	Search         *Search
	Wallets        *Wallets
	Webhooks       *Webhooks
	// contains filtered or unexported fields
}

Formance Stack API: Open, modular foundation for unique payments flows

# Introduction This API is documented in **OpenAPI format**.

# Authentication Formance Stack offers one forms of authentication:

  • OAuth2

OAuth2 - an open protocol to allow secure authorization in a simple and standard method from web, mobile and desktop applications. <SecurityDefinitions />

func New ΒΆ

func New(opts ...SDKOption) *Formance

New creates a new instance of the SDK with the provided options

func (*Formance) GetOIDCWellKnowns ΒΆ added in v2.1.3

func (s *Formance) GetOIDCWellKnowns(ctx context.Context) (*operations.GetOIDCWellKnownsResponse, error)

GetOIDCWellKnowns - Retrieve OpenID connect well-knowns.

func (*Formance) GetVersions ΒΆ

func (s *Formance) GetVersions(ctx context.Context) (*operations.GetVersionsResponse, error)

GetVersions - Show stack version information

type HTTPClient ΒΆ

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

HTTPClient provides an interface for suplying the SDK with a custom HTTP client

type Ledger ΒΆ

type Ledger struct {
	// contains filtered or unexported fields
}

func (*Ledger) AddMetadataOnTransaction ΒΆ

AddMetadataOnTransaction - Set the metadata of a transaction by its ID

func (*Ledger) AddMetadataToAccount ΒΆ

AddMetadataToAccount - Add metadata to an account

func (*Ledger) CountAccounts ΒΆ

CountAccounts - Count the accounts from a ledger

func (*Ledger) CountTransactions ΒΆ

CountTransactions - Count the transactions from a ledger

func (*Ledger) CreateTransaction ΒΆ

CreateTransaction - Create a new transaction to a ledger

func (*Ledger) CreateTransactions ΒΆ

CreateTransactions - Create a new batch of transactions to a ledger

func (*Ledger) GetAccount ΒΆ

GetAccount - Get account by its address

func (*Ledger) GetBalances ΒΆ

GetBalances - Get the balances from a ledger's account

func (*Ledger) GetBalancesAggregated ΒΆ

GetBalancesAggregated - Get the aggregated balances from selected accounts

func (*Ledger) GetInfo ΒΆ

func (s *Ledger) GetInfo(ctx context.Context) (*operations.GetInfoResponse, error)

GetInfo - Show server information

func (*Ledger) GetLedgerInfo ΒΆ

GetLedgerInfo - Get information about a ledger

func (*Ledger) GetMapping ΒΆ

GetMapping - Get the mapping of a ledger

func (*Ledger) GetTransaction ΒΆ

GetTransaction - Get transaction from a ledger by its ID

func (*Ledger) ListAccounts ΒΆ

ListAccounts - List accounts from a ledger List accounts from a ledger, sorted by address in descending order.

func (*Ledger) ListLogs ΒΆ

ListLogs - List the logs from a ledger List the logs from a ledger, sorted by ID in descending order.

func (*Ledger) ListTransactions ΒΆ

ListTransactions - List transactions from a ledger List transactions from a ledger, sorted by txid in descending order.

func (*Ledger) ReadStats ΒΆ

ReadStats - Get statistics from a ledger Get statistics from a ledger. (aggregate metrics on accounts and transactions)

func (*Ledger) RevertTransaction ΒΆ

RevertTransaction - Revert a ledger transaction by its ID

func (*Ledger) RunScript ΒΆ

RunScript - Execute a Numscript This route is deprecated, and has been merged into `POST /{ledger}/transactions`.

Deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.

func (*Ledger) UpdateMapping ΒΆ

UpdateMapping - Update the mapping of a ledger

func (*Ledger) V2AddMetadataOnTransaction ΒΆ

V2AddMetadataOnTransaction - Set the metadata of a transaction by its ID

func (*Ledger) V2AddMetadataToAccount ΒΆ

V2AddMetadataToAccount - Add metadata to an account

func (*Ledger) V2CountAccounts ΒΆ

V2CountAccounts - Count the accounts from a ledger

func (*Ledger) V2CountTransactions ΒΆ

V2CountTransactions - Count the transactions from a ledger

func (*Ledger) V2CreateBulk ΒΆ

V2CreateBulk - Bulk request

func (*Ledger) V2CreateLedger ΒΆ

V2CreateLedger - Create a ledger

func (*Ledger) V2CreateTransaction ΒΆ

V2CreateTransaction - Create a new transaction to a ledger

func (*Ledger) V2DeleteAccountMetadata ΒΆ

V2DeleteAccountMetadata - Delete metadata by key Delete metadata by key

func (*Ledger) V2DeleteLedgerMetadata ΒΆ added in v2.1.3

V2DeleteLedgerMetadata - Delete ledger metadata by key

func (*Ledger) V2DeleteTransactionMetadata ΒΆ

V2DeleteTransactionMetadata - Delete metadata by key Delete metadata by key

func (*Ledger) V2GetAccount ΒΆ

V2GetAccount - Get account by its address

func (*Ledger) V2GetBalancesAggregated ΒΆ

V2GetBalancesAggregated - Get the aggregated balances from selected accounts

func (*Ledger) V2GetInfo ΒΆ

func (s *Ledger) V2GetInfo(ctx context.Context) (*operations.V2GetInfoResponse, error)

V2GetInfo - Show server information

func (*Ledger) V2GetLedger ΒΆ

V2GetLedger - Get a ledger

func (*Ledger) V2GetLedgerInfo ΒΆ

V2GetLedgerInfo - Get information about a ledger

func (*Ledger) V2GetTransaction ΒΆ

V2GetTransaction - Get transaction from a ledger by its ID

func (*Ledger) V2GetVolumesWithBalances ΒΆ added in v2.1.4

V2GetVolumesWithBalances - Get list of volumes with balances for (account/asset)

func (*Ledger) V2ListAccounts ΒΆ

V2ListAccounts - List accounts from a ledger List accounts from a ledger, sorted by address in descending order.

func (*Ledger) V2ListLedgers ΒΆ

V2ListLedgers - List ledgers

func (*Ledger) V2ListLogs ΒΆ

V2ListLogs - List the logs from a ledger List the logs from a ledger, sorted by ID in descending order.

func (*Ledger) V2ListTransactions ΒΆ

V2ListTransactions - List transactions from a ledger List transactions from a ledger, sorted by id in descending order.

func (*Ledger) V2ReadStats ΒΆ

V2ReadStats - Get statistics from a ledger Get statistics from a ledger. (aggregate metrics on accounts and transactions)

func (*Ledger) V2RevertTransaction ΒΆ

V2RevertTransaction - Revert a ledger transaction by its ID

func (*Ledger) V2UpdateLedgerMetadata ΒΆ added in v2.1.3

V2UpdateLedgerMetadata - Update ledger metadata

type Orchestration ΒΆ

type Orchestration struct {
	// contains filtered or unexported fields
}

func (*Orchestration) CancelEvent ΒΆ

CancelEvent - Cancel a running workflow Cancel a running workflow

func (*Orchestration) CreateTrigger ΒΆ

CreateTrigger - Create trigger Create trigger

func (*Orchestration) CreateWorkflow ΒΆ

CreateWorkflow - Create workflow Create a workflow

func (*Orchestration) DeleteTrigger ΒΆ

DeleteTrigger - Delete trigger Read trigger

func (*Orchestration) DeleteWorkflow ΒΆ

DeleteWorkflow - Delete a flow by id Delete a flow by id

func (*Orchestration) GetInstance ΒΆ

GetInstance - Get a workflow instance by id Get a workflow instance by id

func (*Orchestration) GetInstanceHistory ΒΆ

GetInstanceHistory - Get a workflow instance history by id Get a workflow instance history by id

func (*Orchestration) GetInstanceStageHistory ΒΆ

GetInstanceStageHistory - Get a workflow instance stage history Get a workflow instance stage history

func (*Orchestration) GetWorkflow ΒΆ

GetWorkflow - Get a flow by id Get a flow by id

func (*Orchestration) ListInstances ΒΆ

ListInstances - List instances of a workflow List instances of a workflow

func (*Orchestration) ListTriggers ΒΆ

ListTriggers - List triggers List triggers

func (*Orchestration) ListTriggersOccurrences ΒΆ

ListTriggersOccurrences - List triggers occurrences List triggers occurrences

func (*Orchestration) ListWorkflows ΒΆ

ListWorkflows - List registered workflows List registered workflows

func (*Orchestration) OrchestrationgetServerInfo ΒΆ

func (s *Orchestration) OrchestrationgetServerInfo(ctx context.Context) (*operations.OrchestrationgetServerInfoResponse, error)

OrchestrationgetServerInfo - Get server info

func (*Orchestration) ReadTrigger ΒΆ

ReadTrigger - Read trigger Read trigger

func (*Orchestration) RunWorkflow ΒΆ

RunWorkflow - Run workflow Run workflow

func (*Orchestration) SendEvent ΒΆ

SendEvent - Send an event to a running workflow Send an event to a running workflow

func (*Orchestration) TestTrigger ΒΆ

TestTrigger - Test trigger Test trigger

func (*Orchestration) V2CancelEvent ΒΆ

V2CancelEvent - Cancel a running workflow Cancel a running workflow

func (*Orchestration) V2CreateTrigger ΒΆ

V2CreateTrigger - Create trigger Create trigger

func (*Orchestration) V2CreateWorkflow ΒΆ

V2CreateWorkflow - Create workflow Create a workflow

func (*Orchestration) V2DeleteTrigger ΒΆ

V2DeleteTrigger - Delete trigger Read trigger

func (*Orchestration) V2DeleteWorkflow ΒΆ

V2DeleteWorkflow - Delete a flow by id Delete a flow by id

func (*Orchestration) V2GetInstance ΒΆ

V2GetInstance - Get a workflow instance by id Get a workflow instance by id

func (*Orchestration) V2GetInstanceHistory ΒΆ

V2GetInstanceHistory - Get a workflow instance history by id Get a workflow instance history by id

func (*Orchestration) V2GetInstanceStageHistory ΒΆ

V2GetInstanceStageHistory - Get a workflow instance stage history Get a workflow instance stage history

func (*Orchestration) V2GetServerInfo ΒΆ

V2GetServerInfo - Get server info

func (*Orchestration) V2GetWorkflow ΒΆ

V2GetWorkflow - Get a flow by id Get a flow by id

func (*Orchestration) V2ListInstances ΒΆ

V2ListInstances - List instances of a workflow List instances of a workflow

func (*Orchestration) V2ListTriggers ΒΆ

V2ListTriggers - List triggers List triggers

func (*Orchestration) V2ListTriggersOccurrences ΒΆ

V2ListTriggersOccurrences - List triggers occurrences List triggers occurrences

func (*Orchestration) V2ListWorkflows ΒΆ

V2ListWorkflows - List registered workflows List registered workflows

func (*Orchestration) V2ReadTrigger ΒΆ

V2ReadTrigger - Read trigger Read trigger

func (*Orchestration) V2RunWorkflow ΒΆ

V2RunWorkflow - Run workflow Run workflow

func (*Orchestration) V2SendEvent ΒΆ

V2SendEvent - Send an event to a running workflow Send an event to a running workflow

type Payments ΒΆ

type Payments struct {
	// contains filtered or unexported fields
}

func (*Payments) AddAccountToPool ΒΆ

AddAccountToPool - Add an account to a pool Add an account to a pool

func (*Payments) ConnectorsTransfer ΒΆ

ConnectorsTransfer - Transfer funds between Connector accounts Execute a transfer between two accounts.

func (*Payments) CreateAccount ΒΆ added in v2.1.5

CreateAccount - Create an account Create an account

func (*Payments) CreateBankAccount ΒΆ

CreateBankAccount - Create a BankAccount in Payments and on the PSP Create a bank account in Payments and on the PSP.

func (*Payments) CreatePayment ΒΆ

CreatePayment - Create a payment Create a payment

func (*Payments) CreatePool ΒΆ

func (s *Payments) CreatePool(ctx context.Context, request shared.PoolRequest) (*operations.CreatePoolResponse, error)

CreatePool - Create a Pool Create a Pool

func (*Payments) CreateTransferInitiation ΒΆ

CreateTransferInitiation - Create a TransferInitiation Create a transfer initiation

func (*Payments) DeletePool ΒΆ

DeletePool - Delete a Pool Delete a pool by its id.

func (*Payments) DeleteTransferInitiation ΒΆ

DeleteTransferInitiation - Delete a transfer initiation Delete a transfer initiation by its id.

func (*Payments) ForwardBankAccount ΒΆ

ForwardBankAccount - Forward a bank account to a connector

func (*Payments) GetAccountBalances ΒΆ

GetAccountBalances - Get account balances

func (*Payments) GetBankAccount ΒΆ

GetBankAccount - Get a bank account created by user on Formance

func (*Payments) GetConnectorTask ΒΆ

GetConnectorTask - Read a specific task of the connector Get a specific task associated to the connector.

Deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.

func (*Payments) GetConnectorTaskV1 ΒΆ

GetConnectorTaskV1 - Read a specific task of the connector Get a specific task associated to the connector.

func (*Payments) GetPayment ΒΆ

GetPayment - Get a payment

func (*Payments) GetPool ΒΆ

GetPool - Get a Pool

func (*Payments) GetPoolBalances ΒΆ

GetPoolBalances - Get pool balances

func (*Payments) GetTransferInitiation ΒΆ

GetTransferInitiation - Get a transfer initiation

func (*Payments) InstallConnector ΒΆ

InstallConnector - Install a connector Install a connector by its name and config.

func (*Payments) ListAllConnectors ΒΆ

func (s *Payments) ListAllConnectors(ctx context.Context) (*operations.ListAllConnectorsResponse, error)

ListAllConnectors - List all installed connectors List all installed connectors.

func (*Payments) ListBankAccounts ΒΆ

ListBankAccounts - List bank accounts created by user on Formance List all bank accounts created by user on Formance.

func (*Payments) ListConfigsAvailableConnectors ΒΆ

func (s *Payments) ListConfigsAvailableConnectors(ctx context.Context) (*operations.ListConfigsAvailableConnectorsResponse, error)

ListConfigsAvailableConnectors - List the configs of each available connector List the configs of each available connector.

func (*Payments) ListConnectorTasks ΒΆ

ListConnectorTasks - List tasks from a connector List all tasks associated with this connector.

Deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.

func (*Payments) ListConnectorTasksV1 ΒΆ

ListConnectorTasksV1 - List tasks from a connector List all tasks associated with this connector.

func (*Payments) ListPayments ΒΆ

ListPayments - List payments

func (*Payments) ListPools ΒΆ

ListPools - List Pools

func (*Payments) ListTransferInitiations ΒΆ

ListTransferInitiations - List Transfer Initiations

func (*Payments) PaymentsgetAccount ΒΆ

PaymentsgetAccount - Get an account

func (*Payments) PaymentsgetServerInfo ΒΆ

func (s *Payments) PaymentsgetServerInfo(ctx context.Context) (*operations.PaymentsgetServerInfoResponse, error)

PaymentsgetServerInfo - Get server info

func (*Payments) PaymentslistAccounts ΒΆ

PaymentslistAccounts - List accounts

func (*Payments) ReadConnectorConfig ΒΆ

ReadConnectorConfig - Read the config of a connector Read connector config

Deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.

func (*Payments) ReadConnectorConfigV1 ΒΆ

ReadConnectorConfigV1 - Read the config of a connector Read connector config

func (*Payments) RemoveAccountFromPool ΒΆ

RemoveAccountFromPool - Remove an account from a pool Remove an account from a pool by its id.

func (*Payments) ResetConnector ΒΆ

ResetConnector - Reset a connector Reset a connector by its name. It will remove the connector and ALL PAYMENTS generated with it.

Deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.

func (*Payments) ResetConnectorV1 ΒΆ

ResetConnectorV1 - Reset a connector Reset a connector by its name. It will remove the connector and ALL PAYMENTS generated with it.

func (*Payments) RetryTransferInitiation ΒΆ

RetryTransferInitiation - Retry a failed transfer initiation Retry a failed transfer initiation

func (*Payments) ReverseTransferInitiation ΒΆ

ReverseTransferInitiation - Reverse a transfer initiation Reverse transfer initiation

func (*Payments) UdpateTransferInitiationStatus ΒΆ

UdpateTransferInitiationStatus - Update the status of a transfer initiation Update a transfer initiation status

func (*Payments) UninstallConnector ΒΆ

UninstallConnector - Uninstall a connector Uninstall a connector by its name.

Deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.

func (*Payments) UninstallConnectorV1 ΒΆ

UninstallConnectorV1 - Uninstall a connector Uninstall a connector by its name.

func (*Payments) UpdateBankAccountMetadata ΒΆ

UpdateBankAccountMetadata - Update metadata of a bank account

func (*Payments) UpdateConnectorConfigV1 ΒΆ

UpdateConnectorConfigV1 - Update the config of a connector Update connector config

func (*Payments) UpdateMetadata ΒΆ

UpdateMetadata - Update metadata

type Reconciliation ΒΆ

type Reconciliation struct {
	// contains filtered or unexported fields
}

func (*Reconciliation) CreatePolicy ΒΆ

CreatePolicy - Create a policy Create a policy

func (*Reconciliation) DeletePolicy ΒΆ

DeletePolicy - Delete a policy Delete a policy by its id.

func (*Reconciliation) GetPolicy ΒΆ

GetPolicy - Get a policy

func (*Reconciliation) GetReconciliation ΒΆ

GetReconciliation - Get a reconciliation

func (*Reconciliation) ListPolicies ΒΆ

ListPolicies - List policies

func (*Reconciliation) ListReconciliations ΒΆ

ListReconciliations - List reconciliations

func (*Reconciliation) Reconcile ΒΆ

Reconcile using a policy Reconcile using a policy

func (*Reconciliation) ReconciliationgetServerInfo ΒΆ

func (s *Reconciliation) ReconciliationgetServerInfo(ctx context.Context) (*operations.ReconciliationgetServerInfoResponse, error)

ReconciliationgetServerInfo - Get server info

type SDKOption ΒΆ

type SDKOption func(*Formance)

func WithClient ΒΆ

func WithClient(client HTTPClient) SDKOption

WithClient allows the overriding of the default HTTP client used by the SDK

func WithRetryConfig ΒΆ

func WithRetryConfig(retryConfig utils.RetryConfig) SDKOption

func WithSecurity ΒΆ

func WithSecurity(security shared.Security) SDKOption

WithSecurity configures the SDK to use the provided security details

func WithSecuritySource ΒΆ

func WithSecuritySource(security func(context.Context) (shared.Security, error)) SDKOption

WithSecuritySource configures the SDK to invoke the Security Source function on each method call to determine authentication

func WithServerIndex ΒΆ

func WithServerIndex(serverIndex int) SDKOption

WithServerIndex allows the overriding of the default server by index

func WithServerURL ΒΆ

func WithServerURL(serverURL string) SDKOption

WithServerURL allows the overriding of the default server URL

func WithTemplatedServerURL ΒΆ

func WithTemplatedServerURL(serverURL string, params map[string]string) SDKOption

WithTemplatedServerURL allows the overriding of the default server URL with a templated URL populated with the provided parameters

type Search struct {
	// contains filtered or unexported fields
}

func (*Search) Search ΒΆ

func (s *Search) Search(ctx context.Context, request shared.Query) (*operations.SearchResponse, error)

Search ElasticSearch query engine

func (*Search) SearchgetServerInfo ΒΆ

func (s *Search) SearchgetServerInfo(ctx context.Context) (*operations.SearchgetServerInfoResponse, error)

SearchgetServerInfo - Get server info

type Wallets ΒΆ

type Wallets struct {
	// contains filtered or unexported fields
}

func (*Wallets) ConfirmHold ΒΆ

ConfirmHold - Confirm a hold

func (*Wallets) CreateBalance ΒΆ

CreateBalance - Create a balance

func (*Wallets) CreateWallet ΒΆ

CreateWallet - Create a new wallet

func (*Wallets) CreditWallet ΒΆ

CreditWallet - Credit a wallet

func (*Wallets) DebitWallet ΒΆ

DebitWallet - Debit a wallet

func (*Wallets) GetBalance ΒΆ

GetBalance - Get detailed balance

func (*Wallets) GetHold ΒΆ

GetHold - Get a hold

func (*Wallets) GetHolds ΒΆ

GetHolds - Get all holds for a wallet

func (*Wallets) GetWallet ΒΆ

GetWallet - Get a wallet

func (*Wallets) GetWalletSummary ΒΆ

GetWalletSummary - Get wallet summary

func (*Wallets) ListBalances ΒΆ

ListBalances - List balances of a wallet

func (*Wallets) ListWallets ΒΆ

ListWallets - List all wallets

func (*Wallets) UpdateWallet ΒΆ

UpdateWallet - Update a wallet

func (*Wallets) VoidHold ΒΆ

VoidHold - Cancel a hold

func (*Wallets) WalletsgetServerInfo ΒΆ

func (s *Wallets) WalletsgetServerInfo(ctx context.Context) (*operations.WalletsgetServerInfoResponse, error)

WalletsgetServerInfo - Get server info

type Webhooks ΒΆ

type Webhooks struct {
	// contains filtered or unexported fields
}

func (*Webhooks) ActivateConfig ΒΆ

ActivateConfig - Activate one config Activate a webhooks config by ID, to start receiving webhooks to its endpoint.

func (*Webhooks) ChangeConfigSecret ΒΆ

ChangeConfigSecret - Change the signing secret of a config Change the signing secret of the endpoint of a webhooks config.

If not passed or empty, a secret is automatically generated. The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding)

func (*Webhooks) DeactivateConfig ΒΆ

DeactivateConfig - Deactivate one config Deactivate a webhooks config by ID, to stop receiving webhooks to its endpoint.

func (*Webhooks) DeleteConfig ΒΆ

DeleteConfig - Delete one config Delete a webhooks config by ID.

func (*Webhooks) GetManyConfigs ΒΆ

GetManyConfigs - Get many configs Sorted by updated date descending

func (*Webhooks) InsertConfig ΒΆ

func (s *Webhooks) InsertConfig(ctx context.Context, request shared.ConfigUser) (*operations.InsertConfigResponse, error)

InsertConfig - Insert a new config Insert a new webhooks config.

The endpoint should be a valid https URL and be unique.

The secret is the endpoint's verification secret. If not passed or empty, a secret is automatically generated. The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding)

All eventTypes are converted to lower-case when inserted.

func (*Webhooks) TestConfig ΒΆ

TestConfig - Test one config Test a config by sending a webhook to its endpoint.

Directories ΒΆ

Path Synopsis
internal
pkg

Jump to

Keyboard shortcuts

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