Skip to content

Latest commit

 

History

History
88 lines (68 loc) · 5.04 KB

CurrencyApi.md

File metadata and controls

88 lines (68 loc) · 5.04 KB

CurrencyApi

All URIs are relative to https://api.billingo.hu/v3

Method HTTP request Description
getConversionRate GET /currencies Get currencies exchange rate.

getConversionRate

ConversationRate getConversionRate(from, to, date)

Get currencies exchange rate.

Return with the exchange value of given currencies.

Example

// Import classes:
import com.clientapi.billingo.invoker.ApiClient;
import com.clientapi.billingo.invoker.ApiException;
import com.clientapi.billingo.invoker.Configuration;
import com.clientapi.billingo.invoker.auth.*;
import com.clientapi.billingo.invoker.models.*;
import com.clientapi.billingo.api.CurrencyApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.billingo.hu/v3");
    
    // Configure API key authorization: api_key
    ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
    api_key.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //api_key.setApiKeyPrefix("Token");

    CurrencyApi apiInstance = new CurrencyApi(defaultClient);
    Currency from = Currency.fromValue("AED"); // Currency | 
    Currency to = Currency.fromValue("AED"); // Currency | 
    LocalDate date = LocalDate.now(); // LocalDate | 
    try {
      ConversationRate result = apiInstance.getConversionRate(from, to, date);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CurrencyApi#getConversionRate");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
from Currency [enum: AED, AUD, BGN, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HRK, HUF, IDR, ILS, INR, ISK, JPY, KRW, MXN, MYR, NOK, NZD, PHP, PLN, RON, RSD, RUB, SEK, SGD, THB, TRY, UAH, USD, ZAR]
to Currency [enum: AED, AUD, BGN, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HRK, HUF, IDR, ILS, INR, ISK, JPY, KRW, MXN, MYR, NOK, NZD, PHP, PLN, RON, RSD, RUB, SEK, SGD, THB, TRY, UAH, USD, ZAR]
date LocalDate [optional]

Return type

ConversationRate

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Currencies exchange rate returned. * X-RateLimit-Limit - Request limit per minute.
* X-RateLimit-Remaining - The number of requests left for the time window.
* X-RateLimit-Reset - The timestamp at which the current rate limit window resets.
* Retry-After - How many seconds you have to wait before making new request.
400 The request is malformed. * X-RateLimit-Limit - Request limit per minute.
* X-RateLimit-Remaining - The number of requests left for the time window.
* X-RateLimit-Reset - The timestamp at which the current rate limit window resets.
* Retry-After - How many seconds you have to wait before making new request.
401 Authorization information is missing or invalid. * X-RateLimit-Limit - Request limit per minute.
* X-RateLimit-Remaining - The number of requests left for the time window.
* X-RateLimit-Reset - The timestamp at which the current rate limit window resets.
* Retry-After - How many seconds you have to wait before making new request.
402 Authenticated user doesn't have subscription. -
422 Validation errors occured. * X-RateLimit-Limit - Request limit per minute.
* X-RateLimit-Remaining - The number of requests left for the time window.
* X-RateLimit-Reset - The timestamp at which the current rate limit window resets.
* Retry-After - How many seconds you have to wait before making new request.
429 Too many requests * X-RateLimit-Limit - Request limit per minute.
* X-RateLimit-Remaining - The number of requests left for the time window.
* X-RateLimit-Reset - The timestamp at which the current rate limit window resets.
* Retry-After - How many seconds you have to wait before making new request.
500 Internal server error. * X-RateLimit-Limit - Request limit per minute.
* X-RateLimit-Remaining - The number of requests left for the time window.
* X-RateLimit-Reset - The timestamp at which the current rate limit window resets.
* Retry-After - How many seconds you have to wait before making new request.