Skip to content

Commit

Permalink
adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
odetolataiwo committed Jul 27, 2023
1 parent 21fa89f commit 6b4401b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ type RemoteCalls interface {
GetVirtualAccountByBVN(ctx context.Context, bvn string) (*model.VirtualAccount, error)
GetVirtualAccountTransaction(ctx context.Context, txID string) (*model.Transaction, error)

GetBillVendors(ctx context.Context, category string) (*[]model.Vendor, error)
GetBillVendors(ctx context.Context, category string) ([]*model.Vendor, error)
GetBillVendorByID(ctx context.Context, vendorID string) (*model.Vendor, error)
GetBillProducts(ctx context.Context, vendorID, category *string) (*[]model.Product, error)
GetBillProducts(ctx context.Context, vendorID, category *string) ([]*model.Product, error)
GetBillProductByID(ctx context.Context, productID string) (*model.Product, error)
RunCustomerLookup(ctx context.Context, customerID string, productID string) (*model.Product, error)
CreateBill(ctx context.Context, request model.CreateBillRequest) (*model.CreateBillResponse, error)
GetBillByID(ctx context.Context, id string) (*model.BillData, error)
GetBillByReference(ctx context.Context, reference string) (*model.BillData, error)
GetAllBills(ctx context.Context, request model.GetAllBillsRequest) (*[]model.BillData, error)
GetAllBills(ctx context.Context, request model.GetAllBillsRequest) ([]*model.BillData, error)
}

// Call object
Expand Down
12 changes: 6 additions & 6 deletions api/bill.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
)

// GetBillVendors makes the request to get bill vendors
func (c *Call) GetBillVendors(ctx context.Context, category string) (*[]model.Vendor, error) {
response := &[]model.Vendor{}
func (c *Call) GetBillVendors(ctx context.Context, category string) ([]*model.Vendor, error) {
var response []*model.Vendor

path := "/bills/vendors"

Expand Down Expand Up @@ -42,8 +42,8 @@ func (c *Call) GetBillVendorByID(ctx context.Context, vendorID string) (*model.V
}

// GetBillProducts makes the request to get products
func (c *Call) GetBillProducts(ctx context.Context, vendorID, category *string) (*[]model.Product, error) {
response := &[]model.Product{}
func (c *Call) GetBillProducts(ctx context.Context, vendorID, category *string) ([]*model.Product, error) {
var response []*model.Product

path := "/bills/products"
params := url.Values{}
Expand Down Expand Up @@ -137,9 +137,9 @@ func (c *Call) GetBillByReference(ctx context.Context, reference string) (*model
}

// GetAllBills makes the request to get all bills
func (c *Call) GetAllBills(ctx context.Context, request model.GetAllBillsRequest) (*[]model.BillData, error) {
func (c *Call) GetAllBills(ctx context.Context, request model.GetAllBillsRequest) ([]*model.BillData, error) {

response := &[]model.BillData{}
var response []*model.BillData

path := "/bills"

Expand Down

0 comments on commit 6b4401b

Please sign in to comment.