Skip to content

Commit db473dc

Browse files
committed
Currency value to amount
Signed-off-by: Vishal Rana <[email protected]>
1 parent cb1de45 commit db473dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

currency.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type (
1111
}
1212

1313
CurrencyConvertResponse struct {
14-
Value float64 `json:"value"`
14+
Amount float64 `json:"amount"`
1515
UpdatedAt time.Time `json:"updated_at"`
1616
}
1717

@@ -21,14 +21,14 @@ type (
2121
}
2222
)
2323

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

0 commit comments

Comments
 (0)