Skip to content

get_currency_rates not working properly #50

@ronval

Description

@ronval

Hi guys im trying to add the ability to get the currency rates that you guys use so my prices are correct for users across countries. BUT when I send a request the response values are always the same even when I change the parameters. It always returns BRL as the set base code. Im not sure why that is happening any help would be great thanks.
TEST 1

Request: Ebanx.do_get_currency_rates(currency_codes:{currency_code:"MXN", currency_base_code:"USD"})
Response: <Ebanx::Response:0x00007fe72a3af1b0 @http_code=200, @raw_response="{"currency_rates":[{"code":"USD","base_code":"BRL","name":"Real to US Dollar","rate":"4.1666"}],"status":"SUCCESS"}", @response={"currency_rates"=>[{"code"=>"USD", "base_code"=>"BRL", "name"=>"Real to US Dollar", "rate"=>"4.1666"}], "status"=>"SUCCESS"}>

TEST 2

Request: Ebanx.do_get_currency_rates(currency_codes:{currency_code:"COP", currency_base_code:"USD"})

Response: #<Ebanx::Response:0x00007fe72a2a4e50 @http_code=200, @raw_response="{"currency_rates":[{"code":"USD","base_code":"BRL","name":"Real to US Dollar","rate":"4.1666"}],"status":"SUCCESS"}", @response={"currency_rates"=>[{"code"=>"USD", "base_code"=>"BRL", "name"=>"Real to US Dollar", "rate"=>"4.1666"}], "status"=>"SUCCESS"}>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions