Skip to content

Commit 0f42774

Browse files
committed
Currency api changes
Signed-off-by: Vishal Rana <[email protected]>
1 parent 1aac59c commit 0f42774

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

currency.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ type (
2121
}
2222
)
2323

24-
func (c *Currency) Convert(from, to string, amount float64) (*CurrencyConvertResponse, *APIError) {
24+
func (c *Currency) Convert(amount float64, from, to string) (*CurrencyConvertResponse, *APIError) {
2525
res := new(CurrencyConvertResponse)
2626
err := new(APIError)
2727
r, e := c.resty.R().
2828
SetQueryParams(map[string]string{
29+
"value": strconv.FormatFloat(amount, 'f', -1, 64),
2930
"from": from,
3031
"to": to,
31-
"value": strconv.FormatFloat(amount, 'f', -1, 64),
3232
}).
3333
SetResult(res).
3434
SetError(err).

0 commit comments

Comments
 (0)