Documentation
¶
Index ¶
- type BulkTransfer
- type DefaultTransferService
- func (s *DefaultTransferService) CreateRecipient(recipient *Recipient) (*Recipient, error)
- func (s *DefaultTransferService) DisableOTP() (response.Response, error)
- func (s *DefaultTransferService) EnableOTP() (response.Response, error)
- func (s *DefaultTransferService) Finalize(code, otp string) (response.Response, error)
- func (s *DefaultTransferService) FinalizeOTPDisable(otp string) (response.Response, error)
- func (s *DefaultTransferService) Get(idCode string) (*Transfer, error)
- func (s *DefaultTransferService) Initiate(req *Request) (*Transfer, error)
- func (s *DefaultTransferService) List() (*List, error)
- func (s *DefaultTransferService) ListN(count, offset int) (*List, error)
- func (s *DefaultTransferService) ListRecipients() (*RecipientList, error)
- func (s *DefaultTransferService) ListRecipientsN(count, offset int) (*RecipientList, error)
- func (s *DefaultTransferService) MakeBulkTransfer(req *BulkTransfer) (response.Response, error)
- func (s *DefaultTransferService) ResendOTP(transferCode, reason string) (response.Response, error)
- type List
- type Recipient
- type RecipientList
- type Request
- type Service
- type Transfer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BulkTransfer ¶
type BulkTransfer struct {
Currency string `json:"currency,omitempty"`
Source string `json:"source,omitempty"`
Transfers []map[string]interface{} `json:"transfers,omitempty"`
}
BulkTransfer represents a Paystack bulk transfer You need to disable the Transfers OTP requirement to use this endpoint
type DefaultTransferService ¶
DefaultTransferService handles operations related to the transfer For more details see https://developers.paystack.co/v1.0/reference#create-transfer
func (*DefaultTransferService) CreateRecipient ¶
func (s *DefaultTransferService) CreateRecipient(recipient *Recipient) (*Recipient, error)
CreateRecipient creates a new transfer recipient For more details see https://developers.paystack.co/v1.0/reference#create-transferrecipient
func (*DefaultTransferService) DisableOTP ¶
func (s *DefaultTransferService) DisableOTP() (response.Response, error)
DisableOTP disables OTP requirement for Transfers In the event that you want to be able to complete transfers programmatically without use of OTPs, this endpoint helps disable that…. with an OTP. No arguments required. You will get an OTP.
func (*DefaultTransferService) EnableOTP ¶
func (s *DefaultTransferService) EnableOTP() (response.Response, error)
EnableOTP enables OTP requirement for Transfers In the event that a customer wants to stop being able to complete transfers programmatically, this endpoint helps turn OTP requirement back on. No arguments required.
func (*DefaultTransferService) Finalize ¶
func (s *DefaultTransferService) Finalize(code, otp string) (response.Response, error)
Finalize completes a transfer request For more details see https://developers.paystack.co/v1.0/reference#finalize-transfer
func (*DefaultTransferService) FinalizeOTPDisable ¶
func (s *DefaultTransferService) FinalizeOTPDisable(otp string) (response.Response, error)
FinalizeOTPDisable finalizes disabling of OTP requirement for Transfers For more details see https://developers.paystack.co/v1.0/reference#finalize-disabling-of-otp-requirement-for-transfers
func (*DefaultTransferService) Get ¶
func (s *DefaultTransferService) Get(idCode string) (*Transfer, error)
Get returns the details of a transfer. For more details see https://developers.paystack.co/v1.0/reference#fetch-transfer
func (*DefaultTransferService) Initiate ¶
func (s *DefaultTransferService) Initiate(req *Request) (*Transfer, error)
Initiate initiates a new transfer For more details see https://developers.paystack.co/v1.0/reference#initiate-transfer
func (*DefaultTransferService) List ¶
func (s *DefaultTransferService) List() (*List, error)
List returns a list of transfers. For more details see https://developers.paystack.co/v1.0/reference#list-transfers
func (*DefaultTransferService) ListN ¶
func (s *DefaultTransferService) ListN(count, offset int) (*List, error)
ListN returns a list of transfers For more details see https://developers.paystack.co/v1.0/reference#list-transfers
func (*DefaultTransferService) ListRecipients ¶
func (s *DefaultTransferService) ListRecipients() (*RecipientList, error)
ListRecipients returns a list of transfer recipients. For more details see https://developers.paystack.co/v1.0/reference#list-transferrecipients
func (*DefaultTransferService) ListRecipientsN ¶
func (s *DefaultTransferService) ListRecipientsN(count, offset int) (*RecipientList, error)
ListRecipientsN returns a list of transfer recipients For more details see https://developers.paystack.co/v1.0/reference#list-transferrecipients
func (*DefaultTransferService) MakeBulkTransfer ¶
func (s *DefaultTransferService) MakeBulkTransfer(req *BulkTransfer) (response.Response, error)
MakeBulkTransfer initiates a new bulk transfer request You need to disable the Transfers OTP requirement to use this endpoint For more details see https://developers.paystack.co/v1.0/reference#initiate-bulk-transfer
func (*DefaultTransferService) ResendOTP ¶
func (s *DefaultTransferService) ResendOTP(transferCode, reason string) (response.Response, error)
ResendOTP generates a new OTP and sends to customer in the event they are having trouble receiving one. For more details see https://developers.paystack.co/v1.0/reference#resend-otp-for-transfer
type Recipient ¶
type Recipient struct {
ID int `json:"id,omitempty"`
CreatedAt string `json:"createdAt,omitempty"`
UpdatedAt string `json:"updatedAt,omitempty"`
Type string `json:",omitempty"`
Name string `json:"name,omitempty"`
Metadata client.Metadata `json:"metadata,omitempty"`
AccountNumber string `json:"account_number,omitempty"`
BankCode string `json:"bank_code,omitempty"`
Currency string `json:"currency,omitempty"`
Description string `json:"description,omitempty"`
Active bool `json:"active,omitempty"`
Details map[string]interface{} `json:"details,omitempty"`
Domain string `json:"domain,omitempty"`
RecipientCode string `json:"recipient_code,omitempty"`
}
Recipient represents a Paystack transfer recipient For more details see https://developers.paystack.co/v1.0/reference#create-transfer-recipient
type RecipientList ¶
RecipientList is a list object for transfer recipient.
type Service ¶
type Service interface {
Initiate(req *Request) (*Transfer, error)
Finalize(code, otp string) (response.Response, error)
MakeBulkTransfer(req *BulkTransfer) (response.Response, error)
Get(idCode string) (*Transfer, error)
List() (*List, error)
ListN(count, offset int) (*List, error)
ResendOTP(transferCode, reason string) (response.Response, error)
EnableOTP() (response.Response, error)
FinalizeOTPDisable(otp string) (response.Response, error)
CreateRecipient(recipient *Recipient) (*Recipient, error)
ListRecipients() (*RecipientList, error)
ListRecipientsN(count, offset int) (*RecipientList, error)
DisableOTP() (response.Response, error)
}
type Transfer ¶
type Transfer struct {
ID int `json:"id,omitempty"`
CreatedAt string `json:"createdAt,omitempty"`
UpdatedAt string `json:"updatedAt,omitempty"`
Domain string `json:"domain,omitempty"`
Integration int `json:"integration,omitempty"`
Source string `json:"source,omitempty"`
Amount float32 `json:"amount,omitempty"`
Currency string `json:"currency,omitempty"`
Reason string `json:"reason,omitempty"`
TransferCode string `json:"transfer_code,omitempty"`
// Initiate returns recipient ID as recipient value, Fetch returns recipient object
Recipient interface{} `json:"recipient,omitempty"`
Status string `json:"status,omitempty"`
// confirm types for source_details and failures
SourceDetails interface{} `json:"source_details,omitempty"`
Failures interface{} `json:"failures,omitempty"`
TransferredAt string `json:"transferred_at,omitempty"`
TitanCode string `json:"titan_code,omitempty"`
}
Transfer is the resource representing your Paystack transfer. For more details see https://developers.paystack.co/v1.0/reference#initiate-transfer