stripe

package
v0.0.0-...-f003305 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	CreateOnrampSession(
		ctx context.Context,
		integrationMode string,
		walletAddress string,
		sourceCurrency string,
		sourceExchangeAmount string,
		destinationNetwork string,
		destinationCurrency string,
		supportedDestinationNetworks []string,
	) (*OnrampSessionResponse, error)
}

Client abstracts over the underlying client

func NewWithContext

func NewWithContext(ctx context.Context) (Client, error)

NewWithContext returns a new HTTPClient, retrieving the base URL from the context

type ClientWithPrometheus

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

ClientWithPrometheus implements Client interface with all methods wrapped with Prometheus metrics

func NewClientWithPrometheus

func NewClientWithPrometheus(base Client, instanceName string) ClientWithPrometheus

NewClientWithPrometheus returns an instance of the Client decorated with prometheus summary metric

func (ClientWithPrometheus) CreateOnrampSession

func (_d ClientWithPrometheus) CreateOnrampSession(ctx context.Context, integrationMode string, walletAddress string, sourceCurrency string, sourceExchangeAmount string, destinationNetwork string, destinationCurrency string, supportedDestinationNetworks []string) (op1 *OnrampSessionResponse, err error)

CreateOnrampSession implements Client

type HTTPClient

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

HTTPClient wraps http.Client for interacting with the Stripe server

func (*HTTPClient) CreateOnrampSession

func (c *HTTPClient) CreateOnrampSession(
	ctx context.Context,
	integrationMode string,
	walletAddress string,
	sourceCurrency string,
	sourceExchangeAmount string,
	destinationNetwork string,
	destinationCurrency string,
	supportedDestinationNetworks []string,
) (*OnrampSessionResponse, error)

CreateOnrampSession creates a new onramp session

type OnrampSessionResponse

type OnrampSessionResponse struct {
	RedirectURL string `json:"redirect_url"`
}

OnrampSessionResponse represents the response received from Stripe

Directories

Path Synopsis
Package mock_stripe is a generated GoMock package.
Package mock_stripe is a generated GoMock package.

Jump to

Keyboard shortcuts

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