Documentation
¶
Index ¶
- type BulkChargeBatch
- type BulkChargeBatchList
- type BulkChargeRequest
- type BulkItem
- type DefaultBulkChargeService
- func (s *DefaultBulkChargeService) Get(ctx context.Context, idCode string) (*BulkChargeBatch, error)
- func (s *DefaultBulkChargeService) GetBatchCharges(ctx context.Context, idCode string) (response.Response, error)
- func (s *DefaultBulkChargeService) Initiate(ctx context.Context, req *BulkChargeRequest) (*BulkChargeBatch, error)
- func (s *DefaultBulkChargeService) List(ctx context.Context) (*BulkChargeBatchList, error)
- func (s *DefaultBulkChargeService) ListN(ctx context.Context, count, offset int) (*BulkChargeBatchList, error)
- func (s *DefaultBulkChargeService) PauseBulkCharge(ctx context.Context, batchCode string) (response.Response, error)
- func (s *DefaultBulkChargeService) ResumeBulkCharge(ctx context.Context, batchCode string) (response.Response, error)
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BulkChargeBatch ¶
type BulkChargeBatch struct {
ID int `json:"id,omitempty"`
CreatedAt string `json:"createdAt,omitempty"`
UpdatedAt string `json:"updatedAt,omitempty"`
BatchCode string `json:"batch_code,omitempty"`
Status string `json:"status,omitempty"`
Integration int `json:"integration,omitempty"`
Domain string `json:"domain,omitempty"`
TotalCharges string `json:"total_charges,omitempty"`
PendingCharge string `json:"pending_charge,omitempty"`
}
BulkChargeBatch represents a bulk charge batch object For more details see https://developers.paystack.co/v1.0/reference#initiate-bulk-charge
type BulkChargeBatchList ¶
type BulkChargeBatchList struct {
Meta response.ListMeta
Values []BulkChargeBatch `json:"data,omitempty"`
}
BulkChargeBatchList is a list object for bulkcharges.
type BulkChargeRequest ¶
type BulkChargeRequest struct {
Items []BulkItem
}
BulkChargeRequest is an array of objects with authorization codes and amount
type BulkItem ¶
type BulkItem struct {
Authorization string `json:"authorization,omitempty"`
Amount float32 `json:"amount,omitempty"`
}
BulkItem represents a single bulk charge request item
type DefaultBulkChargeService ¶
DefaultBulkChargeService handles operations related to the bulkcharge For more details see https://developers.paystack.co/v1.0/reference#initiate-bulk-charge
func (*DefaultBulkChargeService) Get ¶
func (s *DefaultBulkChargeService) Get(ctx context.Context, idCode string) (*BulkChargeBatch, error)
Get returns a bulk charge batch This endpoint retrieves a specific batch code. It also returns useful information on its progress by way of the total_charges and pending_charges attributes. For more details see https://developers.paystack.co/v1.0/reference#fetch-bulk-charge-batch
func (*DefaultBulkChargeService) GetBatchCharges ¶
func (s *DefaultBulkChargeService) GetBatchCharges(ctx context.Context, idCode string) (response.Response, error)
GetBatchCharges returns charges in a batch This endpoint retrieves the charges associated with a specified batch code. Pagination parameters are available. You can also filter by status. Charge statuses can be pending, success or failed. For more details see https://developers.paystack.co/v1.0/reference#fetch-charges-in-a-batch
func (*DefaultBulkChargeService) Initiate ¶
func (s *DefaultBulkChargeService) Initiate(ctx context.Context, req *BulkChargeRequest) (*BulkChargeBatch, error)
Initiate initiates a new bulkcharge For more details see https://developers.paystack.co/v1.0/reference#initiate-bulk-charge
func (*DefaultBulkChargeService) List ¶
func (s *DefaultBulkChargeService) List(ctx context.Context) (*BulkChargeBatchList, error)
List returns a list of bulkcharges. For more details see https://developers.paystack.co/v1.0/reference#list-bulkcharges
func (*DefaultBulkChargeService) ListN ¶
func (s *DefaultBulkChargeService) ListN(ctx context.Context, count, offset int) (*BulkChargeBatchList, error)
ListN returns a list of bulkcharges For more details see https://developers.paystack.co/v1.0/reference#list-bulkcharges
func (*DefaultBulkChargeService) PauseBulkCharge ¶
func (s *DefaultBulkChargeService) PauseBulkCharge(ctx context.Context, batchCode string) (response.Response, error)
PauseBulkCharge stops processing a batch For more details see https://developers.paystack.co/v1.0/reference#pause-bulk-charge-batch
func (*DefaultBulkChargeService) ResumeBulkCharge ¶
func (s *DefaultBulkChargeService) ResumeBulkCharge(ctx context.Context, batchCode string) (response.Response, error)
ResumeBulkCharge stops processing a batch For more details see https://developers.paystack.co/v1.0/reference#resume-bulk-charge-batch
type Service ¶
type Service interface {
Initiate(ctx context.Context, req *BulkChargeRequest) (*BulkChargeBatch, error)
List(ctx context.Context) (*BulkChargeBatchList, error)
ListN(ctx context.Context, count, offset int) (*BulkChargeBatchList, error)
Get(ctx context.Context, idCode string) (*BulkChargeBatch, error)
GetBatchCharges(ctx context.Context, idCode string) (response.Response, error)
PauseBulkCharge(ctx context.Context, batchCode string) (response.Response, error)
ResumeBulkCharge(ctx context.Context, batchCode string) (response.Response, error)
}