diff --git a/pom.xml b/pom.xml index a9e62dfb7..7fe776e17 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.ingenico.connect.gateway connect-sdk-java - 6.22.0 + 6.23.0 jar connect-sdk-java diff --git a/src/examples/java/com/ingenico/connect/gateway/sdk/java/merchant/payouts/CreatePayoutExample.java b/src/examples/java/com/ingenico/connect/gateway/sdk/java/merchant/payouts/CreatePayoutExample.java index dd7f7fcb6..20459ec8c 100644 --- a/src/examples/java/com/ingenico/connect/gateway/sdk/java/merchant/payouts/CreatePayoutExample.java +++ b/src/examples/java/com/ingenico/connect/gateway/sdk/java/merchant/payouts/CreatePayoutExample.java @@ -25,6 +25,7 @@ import com.ingenico.connect.gateway.sdk.java.domain.payout.PayoutResponse; import com.ingenico.connect.gateway.sdk.java.domain.payout.definitions.BankTransferPayoutMethodSpecificInput; import com.ingenico.connect.gateway.sdk.java.domain.payout.definitions.PayoutCustomer; +import com.ingenico.connect.gateway.sdk.java.domain.payout.definitions.PayoutDetails; import com.ingenico.connect.gateway.sdk.java.domain.payout.definitions.PayoutReferences; import com.ingenico.connect.gateway.sdk.java.domain.payout.definitions.PayoutResult; @@ -34,14 +35,20 @@ public class CreatePayoutExample { public void example() throws URISyntaxException, IOException { Client client = getClient(); try { - AmountOfMoney amountOfMoney = new AmountOfMoney(); - amountOfMoney.setAmount(2345L); - amountOfMoney.setCurrencyCode("EUR"); - BankAccountIban bankAccountIban = new BankAccountIban(); bankAccountIban.setAccountHolderName("Wile E. Coyote"); bankAccountIban.setIban("IT60X0542811101000000123456"); + BankTransferPayoutMethodSpecificInput bankTransferPayoutMethodSpecificInput = new BankTransferPayoutMethodSpecificInput(); + bankTransferPayoutMethodSpecificInput.setBankAccountIban(bankAccountIban); + bankTransferPayoutMethodSpecificInput.setPayoutDate("20150102"); + bankTransferPayoutMethodSpecificInput.setPayoutText("Payout Acme"); + bankTransferPayoutMethodSpecificInput.setSwiftCode("swift"); + + AmountOfMoney amountOfMoney = new AmountOfMoney(); + amountOfMoney.setAmount(2345L); + amountOfMoney.setCurrencyCode("EUR"); + Address address = new Address(); address.setCity("Burbank"); address.setCountryCode("US"); @@ -68,20 +75,17 @@ public void example() throws URISyntaxException, IOException { customer.setContactDetails(contactDetails); customer.setName(name); - BankTransferPayoutMethodSpecificInput bankTransferPayoutMethodSpecificInput = new BankTransferPayoutMethodSpecificInput(); - bankTransferPayoutMethodSpecificInput.setBankAccountIban(bankAccountIban); - bankTransferPayoutMethodSpecificInput.setCustomer(customer); - bankTransferPayoutMethodSpecificInput.setPayoutDate("20150102"); - bankTransferPayoutMethodSpecificInput.setPayoutText("Payout Acme"); - bankTransferPayoutMethodSpecificInput.setSwiftCode("swift"); - PayoutReferences references = new PayoutReferences(); references.setMerchantReference("AcmeOrder001"); + PayoutDetails payoutDetails = new PayoutDetails(); + payoutDetails.setAmountOfMoney(amountOfMoney); + payoutDetails.setCustomer(customer); + payoutDetails.setReferences(references); + CreatePayoutRequest body = new CreatePayoutRequest(); - body.setAmountOfMoney(amountOfMoney); body.setBankTransferPayoutMethodSpecificInput(bankTransferPayoutMethodSpecificInput); - body.setReferences(references); + body.setPayoutDetails(payoutDetails); try { PayoutResponse response = client.merchant("merchantId").payouts().create(body); diff --git a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payment/definitions/Customer.java b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payment/definitions/Customer.java index 8c7b7ae07..8a58a1e1c 100644 --- a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payment/definitions/Customer.java +++ b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payment/definitions/Customer.java @@ -115,6 +115,7 @@ public void setDevice(CustomerDevice value) { *
  • Brazil - Company (CNPJ) with a length of 14 digits *
  • Denmark - Consumer (CPR-nummer or personnummer) with a length of 10 digits *
  • Finland - Consumer (Finnish: henkilötunnus (abbreviated as HETU), Swedish: personbeteckning) with a length of 11 characters + *
  • India - Consumer (PAN) with a length of 10 characters *
  • Norway - Consumer (fødselsnummer) with a length of 11 digits *
  • Sweden - Consumer (personnummer) with a length of 10 or 12 digits * @@ -130,6 +131,7 @@ public String getFiscalNumber() { *
  • Brazil - Company (CNPJ) with a length of 14 digits *
  • Denmark - Consumer (CPR-nummer or personnummer) with a length of 10 digits *
  • Finland - Consumer (Finnish: henkilötunnus (abbreviated as HETU), Swedish: personbeteckning) with a length of 11 characters + *
  • India - Consumer (PAN) with a length of 10 characters *
  • Norway - Consumer (fødselsnummer) with a length of 11 digits *
  • Sweden - Consumer (personnummer) with a length of 10 or 12 digits * diff --git a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payout/CreatePayoutRequest.java b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payout/CreatePayoutRequest.java index ed665c73c..ec6fb1292 100644 --- a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payout/CreatePayoutRequest.java +++ b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payout/CreatePayoutRequest.java @@ -10,6 +10,7 @@ import com.ingenico.connect.gateway.sdk.java.domain.payout.definitions.BankTransferPayoutMethodSpecificInput; import com.ingenico.connect.gateway.sdk.java.domain.payout.definitions.CardPayoutMethodSpecificInput; import com.ingenico.connect.gateway.sdk.java.domain.payout.definitions.PayoutCustomer; +import com.ingenico.connect.gateway.sdk.java.domain.payout.definitions.PayoutDetails; import com.ingenico.connect.gateway.sdk.java.domain.payout.definitions.PayoutReferences; public class CreatePayoutRequest { @@ -28,6 +29,8 @@ public class CreatePayoutRequest { private String payoutDate = null; + private PayoutDetails payoutDetails = null; + private String payoutText = null; private PayoutReferences references = null; @@ -36,14 +39,20 @@ public class CreatePayoutRequest { /** * Object containing amount and ISO currency code attributes + * + * @deprecated Moved to PayoutDetails */ + @Deprecated public AmountOfMoney getAmountOfMoney() { return amountOfMoney; } /** * Object containing amount and ISO currency code attributes + * + * @deprecated Moved to PayoutDetails */ + @Deprecated public void setAmountOfMoney(AmountOfMoney value) { this.amountOfMoney = value; } @@ -119,7 +128,7 @@ public void setCardPayoutMethodSpecificInput(CardPayoutMethodSpecificInput value /** * Object containing the details of the customer. * - * @deprecated Moved to BankTransferPayoutMethodSpecificInput + * @deprecated Moved to PayoutDetails */ @Deprecated public PayoutCustomer getCustomer() { @@ -129,7 +138,7 @@ public PayoutCustomer getCustomer() { /** * Object containing the details of the customer. * - * @deprecated Moved to BankTransferPayoutMethodSpecificInput + * @deprecated Moved to PayoutDetails */ @Deprecated public void setCustomer(PayoutCustomer value) { @@ -158,6 +167,20 @@ public void setPayoutDate(String value) { this.payoutDate = value; } + /** + * Object containing the details for Create Payout Request + */ + public PayoutDetails getPayoutDetails() { + return payoutDetails; + } + + /** + * Object containing the details for Create Payout Request + */ + public void setPayoutDetails(PayoutDetails value) { + this.payoutDetails = value; + } + /** * Text to be printed on the bank account statement of the beneficiary. The maximum allowed length might differ per country. The data will be automatically truncated to the maximum allowed length. * @@ -180,14 +203,20 @@ public void setPayoutText(String value) { /** * Object that holds all reference properties that are linked to this transaction + * + * @deprecated Moved to PayoutDetails */ + @Deprecated public PayoutReferences getReferences() { return references; } /** * Object that holds all reference properties that are linked to this transaction + * + * @deprecated Moved to PayoutDetails */ + @Deprecated public void setReferences(PayoutReferences value) { this.references = value; } diff --git a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payout/definitions/BankTransferPayoutMethodSpecificInput.java b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payout/definitions/BankTransferPayoutMethodSpecificInput.java index 20c59b2d5..895aa9798 100644 --- a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payout/definitions/BankTransferPayoutMethodSpecificInput.java +++ b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payout/definitions/BankTransferPayoutMethodSpecificInput.java @@ -51,14 +51,20 @@ public void setBankAccountIban(BankAccountIban value) { /** * Object containing the details of the customer. + * + * @deprecated Moved to PayoutDetails */ + @Deprecated public PayoutCustomer getCustomer() { return customer; } /** * Object containing the details of the customer. + * + * @deprecated Moved to PayoutDetails */ + @Deprecated public void setCustomer(PayoutCustomer value) { this.customer = value; } diff --git a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payout/definitions/CardPayoutMethodSpecificInput.java b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payout/definitions/CardPayoutMethodSpecificInput.java index fb232cfb0..80854d1e6 100644 --- a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payout/definitions/CardPayoutMethodSpecificInput.java +++ b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payout/definitions/CardPayoutMethodSpecificInput.java @@ -12,6 +12,8 @@ public class CardPayoutMethodSpecificInput extends AbstractPayoutMethodSpecificI private Integer paymentProductId = null; + private PayoutRecipient recipient = null; + private String token = null; /** @@ -44,6 +46,20 @@ public void setPaymentProductId(Integer value) { this.paymentProductId = value; } + /** + * Object containing the details of the recipient of the payout + */ + public PayoutRecipient getRecipient() { + return recipient; + } + + /** + * Object containing the details of the recipient of the payout + */ + public void setRecipient(PayoutRecipient value) { + this.recipient = value; + } + /** * ID of the token that holds previously stored card data. Note that this is only supported for transactions on the Ogone payment engine. */ diff --git a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payout/definitions/PayoutDetails.java b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payout/definitions/PayoutDetails.java new file mode 100644 index 000000000..37a5b1ebc --- /dev/null +++ b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payout/definitions/PayoutDetails.java @@ -0,0 +1,58 @@ +/* + * This class was auto-generated from the API references found at + * https://epayments-api.developer-ingenico.com/s2sapi/v1/ + */ +package com.ingenico.connect.gateway.sdk.java.domain.payout.definitions; + +import com.ingenico.connect.gateway.sdk.java.domain.definitions.AmountOfMoney; + +public class PayoutDetails { + + private AmountOfMoney amountOfMoney = null; + + private PayoutCustomer customer = null; + + private PayoutReferences references = null; + + /** + * Object containing amount and ISO currency code attributes + */ + public AmountOfMoney getAmountOfMoney() { + return amountOfMoney; + } + + /** + * Object containing amount and ISO currency code attributes + */ + public void setAmountOfMoney(AmountOfMoney value) { + this.amountOfMoney = value; + } + + /** + * Object containing the details of the customer. + */ + public PayoutCustomer getCustomer() { + return customer; + } + + /** + * Object containing the details of the customer. + */ + public void setCustomer(PayoutCustomer value) { + this.customer = value; + } + + /** + * Object that holds all reference properties that are linked to this transaction + */ + public PayoutReferences getReferences() { + return references; + } + + /** + * Object that holds all reference properties that are linked to this transaction + */ + public void setReferences(PayoutReferences value) { + this.references = value; + } +} diff --git a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payout/definitions/PayoutRecipient.java b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payout/definitions/PayoutRecipient.java new file mode 100644 index 000000000..3a0e0cf6e --- /dev/null +++ b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payout/definitions/PayoutRecipient.java @@ -0,0 +1,59 @@ +/* + * This class was auto-generated from the API references found at + * https://epayments-api.developer-ingenico.com/s2sapi/v1/ + */ +package com.ingenico.connect.gateway.sdk.java.domain.payout.definitions; + +/** + * Object containing the details of the recipient of the payout + */ +public class PayoutRecipient { + + private String firstName = null; + + private String surname = null; + + private String surnamePrefix = null; + + /** + * Given name(s) or first name(s) of the customer + */ + public String getFirstName() { + return firstName; + } + + /** + * Given name(s) or first name(s) of the customer + */ + public void setFirstName(String value) { + this.firstName = value; + } + + /** + * Surname(s) or last name(s) of the customer + */ + public String getSurname() { + return surname; + } + + /** + * Surname(s) or last name(s) of the customer + */ + public void setSurname(String value) { + this.surname = value; + } + + /** + * Middle name - In between first name and surname - of the customer + */ + public String getSurnamePrefix() { + return surnamePrefix; + } + + /** + * Middle name - In between first name and surname - of the customer + */ + public void setSurnamePrefix(String value) { + this.surnamePrefix = value; + } +} diff --git a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/services/TestConnection.java b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/services/TestConnection.java index 7f42ddde2..7d98532ff 100644 --- a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/services/TestConnection.java +++ b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/services/TestConnection.java @@ -9,14 +9,14 @@ public class TestConnection { private String result = null; /** - * OK result on the connection to GC + * OK result on the connection to the payment engine. */ public String getResult() { return result; } /** - * OK result on the connection to GC + * OK result on the connection to the payment engine. */ public void setResult(String value) { this.result = value; diff --git a/src/main/java/com/ingenico/connect/gateway/sdk/java/MetaDataProvider.java b/src/main/java/com/ingenico/connect/gateway/sdk/java/MetaDataProvider.java index 843a4ff85..c6cfa0fae 100644 --- a/src/main/java/com/ingenico/connect/gateway/sdk/java/MetaDataProvider.java +++ b/src/main/java/com/ingenico/connect/gateway/sdk/java/MetaDataProvider.java @@ -19,7 +19,7 @@ */ public class MetaDataProvider { - private static final String SDK_VERSION = "6.22.0"; + private static final String SDK_VERSION = "6.23.0"; private static final String SERVER_META_INFO_HEADER = "X-GCS-ServerMetaInfo"; static final Set PROHIBITED_HEADERS;