use of com.ingenico.connect.gateway.sdk.java.domain.riskassessments.RiskAssessmentBankAccount 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.domain.riskassessments.RiskAssessmentBankAccount in project connect-sdk-java by Ingenico-ePayments.
the class RiskAssessmentsTest method test.
/**
* Smoke test for risk assessments service.
*/
@Test
public void test() throws URISyntaxException, IOException {
RiskAssessmentBankAccount body = new RiskAssessmentBankAccount();
BankAccountBban bankAccountBban = new BankAccountBban();
bankAccountBban.setCountryCode("DE");
bankAccountBban.setAccountNumber("0532013000");
bankAccountBban.setBankCode("37040044");
body.setBankAccountBban(bankAccountBban);
OrderRiskAssessment order = new OrderRiskAssessment();
AmountOfMoney amountOfMoney = new AmountOfMoney();
amountOfMoney.setAmount(100L);
amountOfMoney.setCurrencyCode("EUR");
order.setAmountOfMoney(amountOfMoney);
CustomerRiskAssessment customer = new CustomerRiskAssessment();
customer.setLocale("en_GB");
order.setCustomer(customer);
body.setOrder(order);
Client client = getClient();
try {
RiskAssessmentResponse riskAssessmentResponse = client.merchant("8500").riskassessments().bankaccounts(body);
Assert.assertTrue(riskAssessmentResponse.getResults().size() > 0);
} finally {
client.close();
}
}
Aggregations