Documentation ¶
Index ¶
- func GetListTransaction(data *GetListTransactionParams) (*xendit.ListTransactions, *xendit.Error)
- func GetListTransactionnWithContext(ctx context.Context, data *GetListTransactionParams) (*xendit.ListTransactions, *xendit.Error)
- func GetTransaction(data *GetTransactionParams) (*xendit.Transaction, *xendit.Error)
- func GetTransactionnWithContext(ctx context.Context, data *GetTransactionParams) (*xendit.Transaction, *xendit.Error)
- type Client
- func (c *Client) GetListTransaction(data *GetListTransactionParams) (*xendit.ListTransactions, *xendit.Error)
- func (c *Client) GetListTransactionWithContext(ctx context.Context, data *GetListTransactionParams) (*xendit.ListTransactions, *xendit.Error)
- func (c *Client) GetTransaction(data *GetTransactionParams) (*xendit.Transaction, *xendit.Error)
- func (c *Client) GetTransactionnWithContext(ctx context.Context, data *GetTransactionParams) (*xendit.Transaction, *xendit.Error)
- type GetListTransactionParams
- type GetTransactionParams
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetListTransaction ¶
func GetListTransaction(data *GetListTransactionParams) (*xendit.ListTransactions, *xendit.Error)
GetListTransaction gets one retail outlet fixed payment code
Example ¶
xendit.Opt.SecretKey = "examplesecretkey" getListTransaction := transaction.GetListTransactionParams{ Limit: 10, } resp, err := transaction.GetListTransaction(&getListTransaction) if err != nil { log.Fatal(err.ErrorCode) } fmt.Printf("retrieved list transaction %+v\n", resp)
Output:
func GetListTransactionnWithContext ¶
func GetListTransactionnWithContext(ctx context.Context, data *GetListTransactionParams) (*xendit.ListTransactions, *xendit.Error)
GetListTransactionnWithContext gets one retail outlet fixed payment code with context
func GetTransaction ¶
func GetTransaction(data *GetTransactionParams) (*xendit.Transaction, *xendit.Error)
GetTransaction gets one retail outlet fixed payment code
Example ¶
xendit.Opt.SecretKey = "examplesecretkey" getTransaction := transaction.GetTransactionParams{ TransactionID: "txn_13dd178d-41fa-40b7-8fd3-f83675d6f413", } resp, err := transaction.GetTransaction(&getTransaction) if err != nil { log.Fatal(err.ErrorCode) } fmt.Printf("retrieved transaction %+v\n", resp)
Output:
func GetTransactionnWithContext ¶
func GetTransactionnWithContext(ctx context.Context, data *GetTransactionParams) (*xendit.Transaction, *xendit.Error)
GetTransactionnWithContext gets one retail outlet fixed payment code with context
Types ¶
type Client ¶
type Client struct { Opt *xendit.Option APIRequester xendit.APIRequester }
Client is the client used to invoke invoice API.
func (*Client) GetListTransaction ¶
func (c *Client) GetListTransaction(data *GetListTransactionParams) (*xendit.ListTransactions, *xendit.Error)
GetListTransaction gets list transaction
func (*Client) GetListTransactionWithContext ¶
func (c *Client) GetListTransactionWithContext(ctx context.Context, data *GetListTransactionParams) (*xendit.ListTransactions, *xendit.Error)
GetListTransactionWithContext gets list transaction with context
func (*Client) GetTransaction ¶
func (c *Client) GetTransaction(data *GetTransactionParams) (*xendit.Transaction, *xendit.Error)
GetTransaction gets one transaction
func (*Client) GetTransactionnWithContext ¶
func (c *Client) GetTransactionnWithContext(ctx context.Context, data *GetTransactionParams) (*xendit.Transaction, *xendit.Error)
GetTransactionnWithContext gets one transaction with context
type GetListTransactionParams ¶
type GetListTransactionParams struct { ForUserID string `url:"-"` Types []string `url:"types,omitempty"` Statuses []string `url:"statuses,omitempty"` ChannelCategories []string `url:"channel_categories,omitempty"` ReferenceID string `url:"reference_id,omitempty"` ProductID string `url:"product_id,omitempty"` AccountIdentifier string `url:"account_identifier,omitempty"` Currency string `url:"currency,omitempty"` Amount float64 `url:"Amount,omitempty"` CreatedGte string `url:"created[gte],omitempty"` CreatedLte string `url:"created[lte],omitempty"` UpdatedGte string `url:"updated[gte],omitempty"` UpdatedLte string `url:"updated[lte],omitempty"` Limit int `url:"limit,omitempty"` AfterID string `url:"after_id,omitempty"` BeforeID string `url:"before_id,omitempty"` }
GetListTransactionParams contains parameters for GetListTransaction
type GetTransactionParams ¶
type GetTransactionParams struct { ForUserID string `json:"-"` TransactionID string `json:"transaction_id" validate:"required"` }
GetTransactionParams contains parameters for GetTransaction