All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.GBSEcom.simple.CurrencyConversionApi Maven / Gradle / Ivy

Go to download

Java SDK to be used with a First Data Gateway account. This SDK has been created and packaged to offer the easiest way to integrate your application into the First Data Gateway. This SDK gives you the ability to run transactions such as sales, preauthorizations, postauthorizations, credits, voids, and returns; transaction inquiries; setting up scheduled payments and much more.

There is a newer version: 1.15.0
Show newest version
package com.github.GBSEcom.simple;

import com.github.GBSEcom.client.ApiException;
import com.github.GBSEcom.model.ExchangeRateRequest;
import com.github.GBSEcom.model.ExchangeRateResponse;

public interface CurrencyConversionApi {
	ExchangeRateResponse getExchangeRate(ExchangeRateRequest payload, String region);
	ExchangeRateResponse getExchangeRate(ExchangeRateRequest payload);
}

class CurrencyConversionApiImpl extends ApiWrapper implements CurrencyConversionApi {
	public CurrencyConversionApiImpl(final ClientContext context) {
		super(context, com.github.GBSEcom.api.CurrencyConversionApi::new);
	}

	public ExchangeRateResponse getExchangeRate(final ExchangeRateRequest payload, final String region) throws ApiException {
		final ClientHeaders headers = genHeaders(payload);
		return getClient().getExchangeRate(
			headers.getContentType(),
			headers.getClientRequestId(),
			headers.getApiKey(),
			headers.getTimestamp(),
			payload,
			headers.getMessageSignature(),
			region
		);
	}

	public ExchangeRateResponse getExchangeRate(final ExchangeRateRequest payload) throws ApiException {
		return getExchangeRate(payload, getDefaultRegion());
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy