Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIUser ¶
type APIUser struct { UserID string `json:"userId"` ProviderCallbackHost string `json:"providerCallbackHost"` TargetEnvironment string `json:"targetEnvironment"` }
APIUser contains information about an API User
type AccountBalance ¶
type AccountBalance struct { AvailableBalance string `json:"availableBalance"` Currency string `json:"currency"` }
AccountBalance is available balance of the account
type AccountHolder ¶ added in v0.0.4
type AccountHolder struct { PartyIDType string `json:"partyIdType"` PartyID string `json:"partyId"` }
AccountHolder identifies an account holder in the wallet platform.
type AuthToken ¶
type AuthToken struct { AccessToken string `json:"access_token"` TokenType string `json:"token_type"` ExpiresIn int64 `json:"expires_in"` }
AuthToken is A JWT token which is to authorize against the other API end-points.
type Client ¶
type Client struct { APIUser *apiUserService Collection *collectionService Disbursement *disbursementsService // contains filtered or unexported fields }
Client is the campay API client. Do not instantiate this client with Client{}. Use the New method instead.
type CollectionTransactionStatus ¶ added in v0.0.4
type CollectionTransactionStatus struct { Amount string `json:"amount"` Currency string `json:"currency"` ExternalID string `json:"externalId"` ReferenceID string `json:"referenceId"` Payer *AccountHolder `json:"payer"` Status string `json:"status"` FinancialTransactionID *string `json:"financialTransactionId,omitempty"` Reason *string `json:"reason,omitempty"` }
CollectionTransactionStatus is the status of a request to pay request.
func (*CollectionTransactionStatus) IsCancelled ¶ added in v0.0.4
func (status *CollectionTransactionStatus) IsCancelled() bool
IsCancelled checks if a transaction is cancelled
func (*CollectionTransactionStatus) IsFailed ¶ added in v0.0.4
func (status *CollectionTransactionStatus) IsFailed() bool
IsFailed checks if a transaction is in failed status
func (*CollectionTransactionStatus) IsPending ¶ added in v0.0.4
func (status *CollectionTransactionStatus) IsPending() bool
IsPending checks if a transaction is in pending status
func (*CollectionTransactionStatus) IsSuccessful ¶ added in v0.0.4
func (status *CollectionTransactionStatus) IsSuccessful() bool
IsSuccessful checks if a transaction is successful
type DisbursementTransactionStatus ¶ added in v0.0.4
type DisbursementTransactionStatus struct { Amount string `json:"amount"` Currency string `json:"currency"` ExternalID string `json:"externalId"` ReferenceID string `json:"referenceId"` Payee *AccountHolder `json:"payee"` Status string `json:"status"` FinancialTransactionID *string `json:"financialTransactionId,omitempty"` PayerMessage string `json:"payerMessage"` PayeeNote string `json:"payeeNote"` }
DisbursementTransactionStatus is the status of a request to pay request.
func (*DisbursementTransactionStatus) IsCancelled ¶ added in v0.0.4
func (status *DisbursementTransactionStatus) IsCancelled() bool
IsCancelled checks if a transaction is cancelled
func (*DisbursementTransactionStatus) IsFailed ¶ added in v0.0.4
func (status *DisbursementTransactionStatus) IsFailed() bool
IsFailed checks if a transaction is in failed status
func (*DisbursementTransactionStatus) IsPending ¶ added in v0.0.4
func (status *DisbursementTransactionStatus) IsPending() bool
IsPending checks if a transaction is in pending status
func (*DisbursementTransactionStatus) IsSuccessful ¶ added in v0.0.4
func (status *DisbursementTransactionStatus) IsSuccessful() bool
IsSuccessful checks if a transaction is successful
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option is options for constructing a client
func WithBaseURL ¶
WithBaseURL set's the base url for the flutterwave API
func WithHTTPClient ¶
WithHTTPClient sets the underlying HTTP client used for API requests. By default, http.DefaultClient is used.
func WithSubscriptionKey ¶
WithSubscriptionKey sets the delay in milliseconds before a response is gotten.
func WithTargetEnvironment ¶
WithTargetEnvironment sets the identifier of the EWP system where the transaction shall be processed.
type RequestToPayParams ¶
type RequestToPayParams struct { Amount string `json:"amount"` Currency string `json:"currency"` ExternalID string `json:"externalId"` Payer *AccountHolder `json:"payer"` PayerMessage string `json:"payerMessage"` PayeeNote string `json:"payeeNote"` }
RequestToPayParams is the set of parameters used when creating a payment request
type TransferParams ¶ added in v0.0.4
type TransferParams struct { Amount string `json:"amount"` Currency string `json:"currency"` ExternalID string `json:"externalId"` Payee *AccountHolder `json:"payee"` PayerMessage string `json:"payerMessage"` PayeeNote string `json:"payeeNote"` }
TransferParams is the set of parameters for transferring money to a payee account