use of com.ingenico.connect.gateway.sdk.java.Client in project connect-sdk-java by Ingenico-ePayments.
the class FindRefundsExample method example.
@SuppressWarnings("unused")
public void example() throws URISyntaxException, IOException {
Client client = getClient();
try {
FindRefundsParams query = new FindRefundsParams();
query.setMerchantReference("AcmeOrder0001");
query.setMerchantOrderId(123456L);
query.setOffset(0);
query.setLimit(10);
FindRefundsResponse response = client.merchant("merchantId").refunds().find(query);
} finally {
client.close();
}
}
use of com.ingenico.connect.gateway.sdk.java.Client in project connect-sdk-java by Ingenico-ePayments.
the class RiskAssessmentBankAccountExample method example.
@SuppressWarnings("unused")
public void example() throws URISyntaxException, IOException {
Client client = getClient();
try {
BankAccountBban bankAccountBban = new BankAccountBban();
bankAccountBban.setAccountNumber("0532013000");
bankAccountBban.setBankCode("37040044");
bankAccountBban.setCountryCode("DE");
AmountOfMoney amountOfMoney = new AmountOfMoney();
amountOfMoney.setAmount(100L);
amountOfMoney.setCurrencyCode("EUR");
Address billingAddress = new Address();
billingAddress.setCountryCode("US");
CustomerRiskAssessment customer = new CustomerRiskAssessment();
customer.setBillingAddress(billingAddress);
customer.setLocale("en_US");
OrderRiskAssessment order = new OrderRiskAssessment();
order.setAmountOfMoney(amountOfMoney);
order.setCustomer(customer);
RiskAssessmentBankAccount body = new RiskAssessmentBankAccount();
body.setBankAccountBban(bankAccountBban);
body.setOrder(order);
RiskAssessmentResponse response = client.merchant("merchantId").riskassessments().bankaccounts(body);
} finally {
client.close();
}
}
use of com.ingenico.connect.gateway.sdk.java.Client in project connect-sdk-java by Ingenico-ePayments.
the class ConvertAmountExample method example.
@SuppressWarnings("unused")
public void example() throws URISyntaxException, IOException {
Client client = getClient();
try {
ConvertAmountParams query = new ConvertAmountParams();
query.setSource("EUR");
query.setTarget("USD");
query.setAmount(100L);
ConvertAmount response = client.merchant("merchantId").services().convertAmount(query);
} finally {
client.close();
}
}
use of com.ingenico.connect.gateway.sdk.java.Client in project connect-sdk-java by Ingenico-ePayments.
the class IINDetailsExample method example.
@SuppressWarnings("unused")
public void example() throws URISyntaxException, IOException {
Client client = getClient();
try {
GetIINDetailsRequest body = new GetIINDetailsRequest();
body.setBin("4567350000427977");
GetIINDetailsResponse response = client.merchant("merchantId").services().getIINdetails(body);
} finally {
client.close();
}
}
use of com.ingenico.connect.gateway.sdk.java.Client in project connect-sdk-java by Ingenico-ePayments.
the class CreateSessionExample method example.
@SuppressWarnings("unused")
public void example() throws URISyntaxException, IOException {
Client client = getClient();
try {
List<String> tokens = new ArrayList<String>();
tokens.add("126166b16ed04b3ab85fb06da1d7a167");
tokens.add("226166b16ed04b3ab85fb06da1d7a167");
tokens.add("122c5b4d-dd40-49f0-b7c9-3594212167a9");
tokens.add("326166b16ed04b3ab85fb06da1d7a167");
tokens.add("426166b16ed04b3ab85fb06da1d7a167");
SessionRequest body = new SessionRequest();
body.setTokens(tokens);
SessionResponse response = client.merchant("merchantId").sessions().create(body);
} finally {
client.close();
}
}
Aggregations