Search in sources :

Example 1 with BankAccountBban

use of com.ingenico.connect.gateway.sdk.java.domain.definitions.BankAccountBban in project connect-sdk-java by Ingenico-ePayments.

the class CreateTokenExample method example.

@SuppressWarnings("unused")
public void example() throws URISyntaxException, IOException {
    Client client = getClient();
    try {
        Address billingAddress = new Address();
        billingAddress.setAdditionalInfo("Suite II");
        billingAddress.setCity("Monument Valley");
        billingAddress.setCountryCode("US");
        billingAddress.setHouseNumber("1");
        billingAddress.setState("Utah");
        billingAddress.setStreet("Desertroad");
        billingAddress.setZip("84536");
        CompanyInformation companyInformation = new CompanyInformation();
        companyInformation.setName("Acme Labs");
        PersonalNameToken name = new PersonalNameToken();
        name.setFirstName("Wile");
        name.setSurname("Coyote");
        name.setSurnamePrefix("E.");
        PersonalInformationToken personalInformation = new PersonalInformationToken();
        personalInformation.setName(name);
        CustomerToken customer = new CustomerToken();
        customer.setBillingAddress(billingAddress);
        customer.setCompanyInformation(companyInformation);
        customer.setMerchantCustomerId("1234");
        customer.setPersonalInformation(personalInformation);
        BankAccountBban bankAccountBban = new BankAccountBban();
        bankAccountBban.setAccountNumber("000000123456");
        bankAccountBban.setBankCode("05428");
        bankAccountBban.setBranchCode("11101");
        bankAccountBban.setCheckDigit("X");
        bankAccountBban.setCountryCode("IT");
        TokenNonSepaDirectDebitPaymentProduct705SpecificData paymentProduct705SpecificData = new TokenNonSepaDirectDebitPaymentProduct705SpecificData();
        paymentProduct705SpecificData.setAuthorisationId("123456");
        paymentProduct705SpecificData.setBankAccountBban(bankAccountBban);
        MandateNonSepaDirectDebit mandate = new MandateNonSepaDirectDebit();
        mandate.setPaymentProduct705SpecificData(paymentProduct705SpecificData);
        TokenNonSepaDirectDebit nonSepaDirectDebit = new TokenNonSepaDirectDebit();
        nonSepaDirectDebit.setCustomer(customer);
        nonSepaDirectDebit.setMandate(mandate);
        CreateTokenRequest body = new CreateTokenRequest();
        body.setNonSepaDirectDebit(nonSepaDirectDebit);
        body.setPaymentProductId(705);
        CreateTokenResponse response = client.merchant("merchantId").tokens().create(body);
    } finally {
        client.close();
    }
}
Also used : CreateTokenRequest(com.ingenico.connect.gateway.sdk.java.domain.token.CreateTokenRequest) TokenNonSepaDirectDebitPaymentProduct705SpecificData(com.ingenico.connect.gateway.sdk.java.domain.token.definitions.TokenNonSepaDirectDebitPaymentProduct705SpecificData) CompanyInformation(com.ingenico.connect.gateway.sdk.java.domain.definitions.CompanyInformation) Address(com.ingenico.connect.gateway.sdk.java.domain.definitions.Address) PersonalInformationToken(com.ingenico.connect.gateway.sdk.java.domain.token.definitions.PersonalInformationToken) CustomerToken(com.ingenico.connect.gateway.sdk.java.domain.token.definitions.CustomerToken) BankAccountBban(com.ingenico.connect.gateway.sdk.java.domain.definitions.BankAccountBban) MandateNonSepaDirectDebit(com.ingenico.connect.gateway.sdk.java.domain.token.definitions.MandateNonSepaDirectDebit) TokenNonSepaDirectDebit(com.ingenico.connect.gateway.sdk.java.domain.token.definitions.TokenNonSepaDirectDebit) Client(com.ingenico.connect.gateway.sdk.java.Client) CreateTokenResponse(com.ingenico.connect.gateway.sdk.java.domain.token.CreateTokenResponse) PersonalNameToken(com.ingenico.connect.gateway.sdk.java.domain.token.definitions.PersonalNameToken)

Example 2 with BankAccountBban

use of com.ingenico.connect.gateway.sdk.java.domain.definitions.BankAccountBban 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();
    }
}
Also used : Address(com.ingenico.connect.gateway.sdk.java.domain.definitions.Address) RiskAssessmentBankAccount(com.ingenico.connect.gateway.sdk.java.domain.riskassessments.RiskAssessmentBankAccount) BankAccountBban(com.ingenico.connect.gateway.sdk.java.domain.definitions.BankAccountBban) OrderRiskAssessment(com.ingenico.connect.gateway.sdk.java.domain.riskassessments.definitions.OrderRiskAssessment) CustomerRiskAssessment(com.ingenico.connect.gateway.sdk.java.domain.riskassessments.definitions.CustomerRiskAssessment) RiskAssessmentResponse(com.ingenico.connect.gateway.sdk.java.domain.riskassessments.RiskAssessmentResponse) Client(com.ingenico.connect.gateway.sdk.java.Client) AmountOfMoney(com.ingenico.connect.gateway.sdk.java.domain.definitions.AmountOfMoney)

Example 3 with BankAccountBban

use of com.ingenico.connect.gateway.sdk.java.domain.definitions.BankAccountBban 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();
    }
}
Also used : RiskAssessmentBankAccount(com.ingenico.connect.gateway.sdk.java.domain.riskassessments.RiskAssessmentBankAccount) BankAccountBban(com.ingenico.connect.gateway.sdk.java.domain.definitions.BankAccountBban) OrderRiskAssessment(com.ingenico.connect.gateway.sdk.java.domain.riskassessments.definitions.OrderRiskAssessment) CustomerRiskAssessment(com.ingenico.connect.gateway.sdk.java.domain.riskassessments.definitions.CustomerRiskAssessment) RiskAssessmentResponse(com.ingenico.connect.gateway.sdk.java.domain.riskassessments.RiskAssessmentResponse) Client(com.ingenico.connect.gateway.sdk.java.Client) AmountOfMoney(com.ingenico.connect.gateway.sdk.java.domain.definitions.AmountOfMoney) Test(org.junit.Test)

Example 4 with BankAccountBban

use of com.ingenico.connect.gateway.sdk.java.domain.definitions.BankAccountBban in project connect-sdk-java by Ingenico-ePayments.

the class ConvertBankAccountExample 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");
        BankDetailsRequest body = new BankDetailsRequest();
        body.setBankAccountBban(bankAccountBban);
        BankDetailsResponse response = client.merchant("merchantId").services().bankaccount(body);
    } finally {
        client.close();
    }
}
Also used : BankDetailsRequest(com.ingenico.connect.gateway.sdk.java.domain.services.BankDetailsRequest) BankAccountBban(com.ingenico.connect.gateway.sdk.java.domain.definitions.BankAccountBban) Client(com.ingenico.connect.gateway.sdk.java.Client) BankDetailsResponse(com.ingenico.connect.gateway.sdk.java.domain.services.BankDetailsResponse)

Aggregations

Client (com.ingenico.connect.gateway.sdk.java.Client)4 BankAccountBban (com.ingenico.connect.gateway.sdk.java.domain.definitions.BankAccountBban)4 Address (com.ingenico.connect.gateway.sdk.java.domain.definitions.Address)2 AmountOfMoney (com.ingenico.connect.gateway.sdk.java.domain.definitions.AmountOfMoney)2 RiskAssessmentBankAccount (com.ingenico.connect.gateway.sdk.java.domain.riskassessments.RiskAssessmentBankAccount)2 RiskAssessmentResponse (com.ingenico.connect.gateway.sdk.java.domain.riskassessments.RiskAssessmentResponse)2 CustomerRiskAssessment (com.ingenico.connect.gateway.sdk.java.domain.riskassessments.definitions.CustomerRiskAssessment)2 OrderRiskAssessment (com.ingenico.connect.gateway.sdk.java.domain.riskassessments.definitions.OrderRiskAssessment)2 CompanyInformation (com.ingenico.connect.gateway.sdk.java.domain.definitions.CompanyInformation)1 BankDetailsRequest (com.ingenico.connect.gateway.sdk.java.domain.services.BankDetailsRequest)1 BankDetailsResponse (com.ingenico.connect.gateway.sdk.java.domain.services.BankDetailsResponse)1 CreateTokenRequest (com.ingenico.connect.gateway.sdk.java.domain.token.CreateTokenRequest)1 CreateTokenResponse (com.ingenico.connect.gateway.sdk.java.domain.token.CreateTokenResponse)1 CustomerToken (com.ingenico.connect.gateway.sdk.java.domain.token.definitions.CustomerToken)1 MandateNonSepaDirectDebit (com.ingenico.connect.gateway.sdk.java.domain.token.definitions.MandateNonSepaDirectDebit)1 PersonalInformationToken (com.ingenico.connect.gateway.sdk.java.domain.token.definitions.PersonalInformationToken)1 PersonalNameToken (com.ingenico.connect.gateway.sdk.java.domain.token.definitions.PersonalNameToken)1 TokenNonSepaDirectDebit (com.ingenico.connect.gateway.sdk.java.domain.token.definitions.TokenNonSepaDirectDebit)1 TokenNonSepaDirectDebitPaymentProduct705SpecificData (com.ingenico.connect.gateway.sdk.java.domain.token.definitions.TokenNonSepaDirectDebitPaymentProduct705SpecificData)1 Test (org.junit.Test)1