Skip to content

Commit

Permalink
fix: mccy decode
Browse files Browse the repository at this point in the history
  • Loading branch information
brokeyourbike committed Apr 19, 2024
1 parent fd9bff1 commit e533111
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 12 deletions.
2 changes: 0 additions & 2 deletions accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ func (c *client) CreateAccount(ctx context.Context, payload CreateAccountPayload

req.ExpectStatus(http.StatusCreated)
req.DecodeTo(&data)

return data, c.do(ctx, req)
}

Expand Down Expand Up @@ -166,7 +165,6 @@ func (c *client) FetchVirtualAccountsFor(ctx context.Context, accountID uuid.UUI
req.AddQueryParam("pageSize", strconv.Itoa(pageSize))
req.ExpectStatus(http.StatusOK)
req.DecodeTo(&data)

return data, c.do(ctx, req)
}

Expand Down
5 changes: 0 additions & 5 deletions mccy_accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ func (c *client) FetchMCCYVirtualAccount(ctx context.Context, virtualAccountID u

req.ExpectStatus(http.StatusOK)
req.DecodeTo(&data)

return data, c.do(ctx, req)
}

Expand All @@ -300,7 +299,6 @@ func (c *client) FetchMCCYVirtualAccounts(ctx context.Context, pageNum int, page
req.AddQueryParam("pageSize", strconv.Itoa(pageSize))
req.ExpectStatus(http.StatusOK)
req.DecodeTo(&data)

return data, c.do(ctx, req)
}

Expand All @@ -319,7 +317,6 @@ func (c *client) CreateMCCYVirtualAccount(ctx context.Context, payload CreateMCC

req.ExpectStatus(http.StatusCreated)
req.DecodeTo(&data)

return data, c.do(ctx, req)
}

Expand All @@ -335,7 +332,6 @@ func (c *client) UpdateMCCYVirtualAccount(ctx context.Context, virtualAccountID

req.ExpectStatus(http.StatusOK)
req.DecodeTo(&data)

return data, c.do(ctx, req)
}

Expand All @@ -353,7 +349,6 @@ func (c *client) UpdateMCCYVirtualAccountStatus(ctx context.Context, virtualAcco

req.ExpectStatus(http.StatusOK)
req.DecodeTo(&data)

return data, c.do(ctx, req)
}

Expand Down
3 changes: 3 additions & 0 deletions mccy_transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ func (c *client) InitiateMCCYInboundPayment(ctx context.Context, accountUniqueID
}

req.ExpectStatus(http.StatusCreated)
req.DecodeTo(&data)
return data, c.do(ctx, req)
}

Expand Down Expand Up @@ -327,6 +328,7 @@ func (c *client) FetchMCCYTransactionsForAccount(ctx context.Context, accountID
params.ApplyFor(req)
req.AddQueryParam("currency", currency)
req.ExpectStatus(http.StatusOK)
req.DecodeTo(&data)
return data, c.do(ctx, req)
}

Expand All @@ -339,5 +341,6 @@ func (c *client) FetchMCCYTransactionsForVirtualAccount(ctx context.Context, vir
params.ApplyFor(req)
req.AddQueryParam("currency", currency)
req.ExpectStatus(http.StatusOK)
req.DecodeTo(&data)
return data, c.do(ctx, req)
}
2 changes: 0 additions & 2 deletions rate.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ func (c *client) FetchMarketrate(ctx context.Context, params MarketrateParams) (

req.ExpectStatus(http.StatusOK)
req.DecodeTo(&data)

return data, c.do(ctx, req)
}

Expand All @@ -65,6 +64,5 @@ func (c *client) Negotiate(ctx context.Context) (data NegotiateResponse, err err

req.ExpectStatus(http.StatusOK)
req.DecodeTo(&data)

return data, c.do(ctx, req)
}
3 changes: 0 additions & 3 deletions transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ func (c *client) InitiateFPSTransactions(ctx context.Context, payload CreateTran

req.ExpectStatus(http.StatusAccepted)
req.DecodeTo(&data)

return data, c.do(ctx, req)
}

Expand Down Expand Up @@ -241,7 +240,6 @@ func (c *client) InitiateCHAPSPayment(ctx context.Context, payload CreateCHAPSPa

req.ExpectStatus(http.StatusAccepted)
req.DecodeTo(&data)

return data, c.do(ctx, req)
}

Expand Down Expand Up @@ -328,7 +326,6 @@ func (c *client) InitiateFPSPaymentOriginatedOverseas(ctx context.Context, paylo

req.ExpectStatus(http.StatusAccepted)
req.DecodeTo(&data)

return data, c.do(ctx, req)
}

Expand Down

0 comments on commit e533111

Please sign in to comment.