Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(baseURL, token string, options ...ClientOption) *client
func NewRequest ¶
Types ¶
type Client ¶
type Client interface {
CreateSession(ctx context.Context, payload CreateSessionPayload) (data CreateSessionResponse, err error)
}
type ClientOption ¶
type ClientOption func(*client)
ClientOption is a function that configures a Client.
func WithHTTPClient ¶
func WithHTTPClient(c HttpClient) ClientOption
WithHTTPClient sets the HTTP client for the paystack API client.
func WithLogger ¶
func WithLogger(l *logrus.Logger) ClientOption
WithLogger sets the *logrus.Logger for the paystack API client.
type CreateSessionPayload ¶
type CreateSessionPayload struct { Verification struct { Person struct { FirstName string `json:"firstName,omitempty"` LastName string `json:"lastName,omitempty"` DateOfBirth string `json:"dateOfBirth,omitempty"` Gender string `json:"gender,omitempty"` } `json:"person"` Callback string `json:"callback,omitempty"` VendorData string `json:"vendorData"` } `json:"verification"` }
type CreateSessionResponse ¶
Click to show internal directories.
Click to hide internal directories.