From 56edd93d4860ff4d6f4375213b7d52f3218894e5 Mon Sep 17 00:00:00 2001 From: Ingenico ePayments Date: Mon, 16 Oct 2023 13:31:35 +0200 Subject: [PATCH] Release 6.43.0. --- pom.xml | 2 +- .../GetInstallmentsInfoExample.java | 49 ++++++++++ .../hostedcheckout/definitions/Frequency.java | 44 +++++++++ .../HostedCheckoutSpecificInput.java | 16 ++++ .../definitions/RecurringPaymentsData.java | 44 +++++++++ .../definitions/TrialInformation.java | 94 +++++++++++++++++++ .../definitions/TrialPeriod.java | 44 +++++++++ .../installments/GetInstallmentRequest.java | 80 ++++++++++++++++ .../InstallmentOptionsResponse.java | 32 +++++++ .../definitions/InstallmentDisplayHints.java | 60 ++++++++++++ .../definitions/InstallmentOptions.java | 64 +++++++++++++ .../payment/definitions/Installments.java | 16 ++++ .../sdk/java/merchant/MerchantClient.java | 10 ++ .../installments/InstallmentsClient.java | 84 +++++++++++++++++ .../gateway/sdk/java/MetaDataProvider.java | 2 +- 15 files changed, 639 insertions(+), 2 deletions(-) create mode 100644 src/examples/java/com/ingenico/connect/gateway/sdk/java/merchant/installments/GetInstallmentsInfoExample.java create mode 100644 src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/hostedcheckout/definitions/Frequency.java create mode 100644 src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/hostedcheckout/definitions/RecurringPaymentsData.java create mode 100644 src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/hostedcheckout/definitions/TrialInformation.java create mode 100644 src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/hostedcheckout/definitions/TrialPeriod.java create mode 100644 src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/installments/GetInstallmentRequest.java create mode 100644 src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/installments/InstallmentOptionsResponse.java create mode 100644 src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/installments/definitions/InstallmentDisplayHints.java create mode 100644 src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/installments/definitions/InstallmentOptions.java create mode 100644 src/main/generated/com/ingenico/connect/gateway/sdk/java/merchant/installments/InstallmentsClient.java diff --git a/pom.xml b/pom.xml index 32d3b5fbf..acc3bfce9 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.ingenico.connect.gateway connect-sdk-java - 6.42.0 + 6.43.0 jar connect-sdk-java diff --git a/src/examples/java/com/ingenico/connect/gateway/sdk/java/merchant/installments/GetInstallmentsInfoExample.java b/src/examples/java/com/ingenico/connect/gateway/sdk/java/merchant/installments/GetInstallmentsInfoExample.java new file mode 100644 index 000000000..0ddeebb18 --- /dev/null +++ b/src/examples/java/com/ingenico/connect/gateway/sdk/java/merchant/installments/GetInstallmentsInfoExample.java @@ -0,0 +1,49 @@ +/* + * 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.merchant.installments; + +import java.io.IOException; +import java.net.URISyntaxException; +import java.net.URL; + +import com.ingenico.connect.gateway.sdk.java.Client; +import com.ingenico.connect.gateway.sdk.java.CommunicatorConfiguration; +import com.ingenico.connect.gateway.sdk.java.Factory; +import com.ingenico.connect.gateway.sdk.java.domain.definitions.AmountOfMoney; +import com.ingenico.connect.gateway.sdk.java.domain.installments.GetInstallmentRequest; +import com.ingenico.connect.gateway.sdk.java.domain.installments.InstallmentOptionsResponse; + +public class GetInstallmentsInfoExample { + + @SuppressWarnings("unused") + public void example() throws URISyntaxException, IOException { + Client client = getClient(); + try { + AmountOfMoney amountOfMoney = new AmountOfMoney(); + amountOfMoney.setAmount(123L); + amountOfMoney.setCurrencyCode("EUR"); + + GetInstallmentRequest body = new GetInstallmentRequest(); + body.setAmountOfMoney(amountOfMoney); + body.setBin("123455"); + body.setCountryCode("NL"); + body.setPaymentProductId(123); + + InstallmentOptionsResponse response = client.merchant("merchantId").installments().getInstallmentsInfo(body); + } finally { + client.close(); + } + } + + private Client getClient() throws URISyntaxException { + String apiKeyId = System.getProperty("connect.api.apiKeyId", "someKey"); + String secretApiKey = System.getProperty("connect.api.secretApiKey", "someSecret"); + + URL propertiesUrl = getClass().getResource("/example-configuration.properties"); + CommunicatorConfiguration configuration = Factory.createConfiguration(propertiesUrl.toURI(), apiKeyId, secretApiKey); + return Factory.createClient(configuration); + } +} diff --git a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/hostedcheckout/definitions/Frequency.java b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/hostedcheckout/definitions/Frequency.java new file mode 100644 index 000000000..f478b8f91 --- /dev/null +++ b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/hostedcheckout/definitions/Frequency.java @@ -0,0 +1,44 @@ +/* + * 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.hostedcheckout.definitions; + +/** + * The object containing the frequency and interval between recurring payments. + */ +public class Frequency { + + private String interval = null; + + private Integer intervalFrequency = null; + + /** + * The interval between recurring payments specified as days, weeks, quarters, or years. + */ + public String getInterval() { + return interval; + } + + /** + * The interval between recurring payments specified as days, weeks, quarters, or years. + */ + public void setInterval(String value) { + this.interval = value; + } + + /** + * The number of days, weeks, months, quarters, or years between recurring payments. + */ + public Integer getIntervalFrequency() { + return intervalFrequency; + } + + /** + * The number of days, weeks, months, quarters, or years between recurring payments. + */ + public void setIntervalFrequency(Integer value) { + this.intervalFrequency = value; + } +} diff --git a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/hostedcheckout/definitions/HostedCheckoutSpecificInput.java b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/hostedcheckout/definitions/HostedCheckoutSpecificInput.java index 69b12b765..ff6c50e58 100644 --- a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/hostedcheckout/definitions/HostedCheckoutSpecificInput.java +++ b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/hostedcheckout/definitions/HostedCheckoutSpecificInput.java @@ -13,6 +13,8 @@ public class HostedCheckoutSpecificInput { private PaymentProductFiltersHostedCheckout paymentProductFilters = null; + private RecurringPaymentsData recurringPaymentsData = null; + private Boolean returnCancelState = null; private String returnUrl = null; @@ -73,6 +75,20 @@ public void setPaymentProductFilters(PaymentProductFiltersHostedCheckout value) this.paymentProductFilters = value; } + /** + * The object containing reference data for the text that can be displayed on MyCheckout hosted payment page with subscription information.

Note:

The data in this object is only meant for displaying recurring payments-related data on your checkout page.
You still need to submit all the recurring payment-related data in the corresponding payment product-specific input. (example: cardPaymentMethodSpecificInput.recurring and cardPaymentMethodSpecificInput.isRecurring) + */ + public RecurringPaymentsData getRecurringPaymentsData() { + return recurringPaymentsData; + } + + /** + * The object containing reference data for the text that can be displayed on MyCheckout hosted payment page with subscription information.

Note:

The data in this object is only meant for displaying recurring payments-related data on your checkout page.
You still need to submit all the recurring payment-related data in the corresponding payment product-specific input. (example: cardPaymentMethodSpecificInput.recurring and cardPaymentMethodSpecificInput.isRecurring) + */ + public void setRecurringPaymentsData(RecurringPaymentsData value) { + this.recurringPaymentsData = value; + } + /** * This flag affects the status of a Hosted Checkout when a customer presses the cancel button and is returned to you as a result.
If set to true, then the status will be CANCELLED_BY_CONSUMER. If set to false, then the status will be IN_PROGRESS.
The default value is false. This flag was added to introduce the additional CANCELLED_BY_CONSUMER state as a non-breaking change. */ diff --git a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/hostedcheckout/definitions/RecurringPaymentsData.java b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/hostedcheckout/definitions/RecurringPaymentsData.java new file mode 100644 index 000000000..b4757e7a9 --- /dev/null +++ b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/hostedcheckout/definitions/RecurringPaymentsData.java @@ -0,0 +1,44 @@ +/* + * 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.hostedcheckout.definitions; + +/** + * The object containing reference data for the text that can be displayed on MyCheckout hosted payment page with subscription information.

Note:

The data in this object is only meant for displaying recurring payments-related data on your checkout page.
You still need to submit all the recurring payment-related data in the corresponding payment product-specific input. (example: cardPaymentMethodSpecificInput.recurring and cardPaymentMethodSpecificInput.isRecurring) + */ +public class RecurringPaymentsData { + + private Frequency recurringInterval = null; + + private TrialInformation trialInformation = null; + + /** + * The object containing the frequency and interval between recurring payments. + */ + public Frequency getRecurringInterval() { + return recurringInterval; + } + + /** + * The object containing the frequency and interval between recurring payments. + */ + public void setRecurringInterval(Frequency value) { + this.recurringInterval = value; + } + + /** + * The object containing data of the trial period: no-cost or discounted time-constrained trial subscription period. + */ + public TrialInformation getTrialInformation() { + return trialInformation; + } + + /** + * The object containing data of the trial period: no-cost or discounted time-constrained trial subscription period. + */ + public void setTrialInformation(TrialInformation value) { + this.trialInformation = value; + } +} diff --git a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/hostedcheckout/definitions/TrialInformation.java b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/hostedcheckout/definitions/TrialInformation.java new file mode 100644 index 000000000..2dbbeb444 --- /dev/null +++ b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/hostedcheckout/definitions/TrialInformation.java @@ -0,0 +1,94 @@ +/* + * 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.hostedcheckout.definitions; + +import com.ingenico.connect.gateway.sdk.java.domain.definitions.AmountOfMoney; + +/** + * The object containing data of the trial period: no-cost or discounted time-constrained trial subscription period. + */ +public class TrialInformation { + + private AmountOfMoney amountOfMoneyAfterTrial = null; + + private String endDate = null; + + private Boolean isRecurring = null; + + private TrialPeriod trialPeriod = null; + + private Frequency trialPeriodRecurring = null; + + /** + * The object containing the amount and ISO currency code attributes of money to be paid after the trial period ends.

Note:

The property order.amountOfMoney should be populated with the amount to be paid during or for the trial period (no-cost or discounted time-constrained trial subscription period). + */ + public AmountOfMoney getAmountOfMoneyAfterTrial() { + return amountOfMoneyAfterTrial; + } + + /** + * The object containing the amount and ISO currency code attributes of money to be paid after the trial period ends.

Note:

The property order.amountOfMoney should be populated with the amount to be paid during or for the trial period (no-cost or discounted time-constrained trial subscription period). + */ + public void setAmountOfMoneyAfterTrial(AmountOfMoney value) { + this.amountOfMoneyAfterTrial = value; + } + + /** + * The date that the trial period ends in YYYYMMDD format. + */ + public String getEndDate() { + return endDate; + } + + /** + * The date that the trial period ends in YYYYMMDD format. + */ + public void setEndDate(String value) { + this.endDate = value; + } + + /** + * The property specifying if there will be recurring charges throughout the trial period (when the trial period involves a temporary discounted rate).
True = there will be recurring charges during the trial period
False = there will not be recurring charges during the trial period + */ + public Boolean getIsRecurring() { + return isRecurring; + } + + /** + * The property specifying if there will be recurring charges throughout the trial period (when the trial period involves a temporary discounted rate).
True = there will be recurring charges during the trial period
False = there will not be recurring charges during the trial period + */ + public void setIsRecurring(Boolean value) { + this.isRecurring = value; + } + + /** + * The object containing information on the trial period duration and the interval between payments during that period. + */ + public TrialPeriod getTrialPeriod() { + return trialPeriod; + } + + /** + * The object containing information on the trial period duration and the interval between payments during that period. + */ + public void setTrialPeriod(TrialPeriod value) { + this.trialPeriod = value; + } + + /** + * The object containing the frequency and interval between recurring payments.

Note:

This object should only be populated if the frequency of recurring payments between the trial and regular periods is different.

If you do not populated this object, then the same interval frequency and interval of recurringPaymentsData.recurringInterval will be used + */ + public Frequency getTrialPeriodRecurring() { + return trialPeriodRecurring; + } + + /** + * The object containing the frequency and interval between recurring payments.

Note:

This object should only be populated if the frequency of recurring payments between the trial and regular periods is different.

If you do not populated this object, then the same interval frequency and interval of recurringPaymentsData.recurringInterval will be used + */ + public void setTrialPeriodRecurring(Frequency value) { + this.trialPeriodRecurring = value; + } +} diff --git a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/hostedcheckout/definitions/TrialPeriod.java b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/hostedcheckout/definitions/TrialPeriod.java new file mode 100644 index 000000000..9013c31f2 --- /dev/null +++ b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/hostedcheckout/definitions/TrialPeriod.java @@ -0,0 +1,44 @@ +/* + * 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.hostedcheckout.definitions; + +/** + * The object containing information on the trial period duration and the interval between payments during that period. + */ +public class TrialPeriod { + + private Integer duration = null; + + private String interval = null; + + /** + * The number of days, weeks, months, or years before the trial period ends. + */ + public Integer getDuration() { + return duration; + } + + /** + * The number of days, weeks, months, or years before the trial period ends. + */ + public void setDuration(Integer value) { + this.duration = value; + } + + /** + * The interval for the trial period to finish specified as days, weeks, months, quarters, or years. + */ + public String getInterval() { + return interval; + } + + /** + * The interval for the trial period to finish specified as days, weeks, months, quarters, or years. + */ + public void setInterval(String value) { + this.interval = value; + } +} diff --git a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/installments/GetInstallmentRequest.java b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/installments/GetInstallmentRequest.java new file mode 100644 index 000000000..da37ecd6c --- /dev/null +++ b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/installments/GetInstallmentRequest.java @@ -0,0 +1,80 @@ +/* + * 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.installments; + +import com.ingenico.connect.gateway.sdk.java.domain.definitions.AmountOfMoney; + +/** + * Using the Installment Service API you can ask us to provide you with information related to the available installment options, based on the country, amount and optionally payment productId and bin number. + */ +public class GetInstallmentRequest { + + private AmountOfMoney amountOfMoney = null; + + private String bin = null; + + private String countryCode = null; + + private Integer paymentProductId = 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; + } + + /** + * The first digits of the card number from left to right with a minimum of 6 digits + */ + public String getBin() { + return bin; + } + + /** + * The first digits of the card number from left to right with a minimum of 6 digits + */ + public void setBin(String value) { + this.bin = value; + } + + /** + * ISO 3166-1 alpha-2 country code + */ + public String getCountryCode() { + return countryCode; + } + + /** + * ISO 3166-1 alpha-2 country code + */ + public void setCountryCode(String value) { + this.countryCode = value; + } + + /** + * Payment product identifier
+ * Please see payment products for a full overview of possible values. + */ + public Integer getPaymentProductId() { + return paymentProductId; + } + + /** + * Payment product identifier
+ * Please see payment products for a full overview of possible values. + */ + public void setPaymentProductId(Integer value) { + this.paymentProductId = value; + } +} diff --git a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/installments/InstallmentOptionsResponse.java b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/installments/InstallmentOptionsResponse.java new file mode 100644 index 000000000..18062facc --- /dev/null +++ b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/installments/InstallmentOptionsResponse.java @@ -0,0 +1,32 @@ +/* + * 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.installments; + +import java.util.List; + +import com.ingenico.connect.gateway.sdk.java.domain.installments.definitions.InstallmentOptions; + +/** + * The response contains the details of the installment options + */ +public class InstallmentOptionsResponse { + + private List installmentOptions = null; + + /** + * Array containing installment options their details and characteristics + */ + public List getInstallmentOptions() { + return installmentOptions; + } + + /** + * Array containing installment options their details and characteristics + */ + public void setInstallmentOptions(List value) { + this.installmentOptions = value; + } +} diff --git a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/installments/definitions/InstallmentDisplayHints.java b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/installments/definitions/InstallmentDisplayHints.java new file mode 100644 index 000000000..2efe04126 --- /dev/null +++ b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/installments/definitions/InstallmentDisplayHints.java @@ -0,0 +1,60 @@ +/* + * 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.installments.definitions; + +/** + * Object containing information for the client on how best to display this options + */ +public class InstallmentDisplayHints { + + private Integer displayOrder = null; + + private String label = null; + + private String logo = null; + + /** + * Determines the order in which the installment options should be shown (sorted ascending). In countries like Turkey there are multiple loyalty programs that offer installments + */ + public Integer getDisplayOrder() { + return displayOrder; + } + + /** + * Determines the order in which the installment options should be shown (sorted ascending). In countries like Turkey there are multiple loyalty programs that offer installments + */ + public void setDisplayOrder(Integer value) { + this.displayOrder = value; + } + + /** + * Name of the installment option + */ + public String getLabel() { + return label; + } + + /** + * Name of the installment option + */ + public void setLabel(String value) { + this.label = value; + } + + /** + * Partial URL that you can reference for the image of this installment provider. You can use our server-side resize functionality by appending '?size={{width}}x{{height}}' to the full URL, where width and height are specified in pixels. The resized image will always keep its correct aspect ratio. + */ + public String getLogo() { + return logo; + } + + /** + * Partial URL that you can reference for the image of this installment provider. You can use our server-side resize functionality by appending '?size={{width}}x{{height}}' to the full URL, where width and height are specified in pixels. The resized image will always keep its correct aspect ratio. + */ + public void setLogo(String value) { + this.logo = value; + } +} diff --git a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/installments/definitions/InstallmentOptions.java b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/installments/definitions/InstallmentOptions.java new file mode 100644 index 000000000..68c5480eb --- /dev/null +++ b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/installments/definitions/InstallmentOptions.java @@ -0,0 +1,64 @@ +/* + * 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.installments.definitions; + +import java.util.List; + +import com.ingenico.connect.gateway.sdk.java.domain.payment.definitions.Installments; + +/** + * Array containing installment options their details and characteristics + */ +public class InstallmentOptions { + + private InstallmentDisplayHints displayHints = null; + + private String id = null; + + private List installmentPlans = null; + + /** + * Object containing information for the client on how best to display the installment options + */ + public InstallmentDisplayHints getDisplayHints() { + return displayHints; + } + + /** + * Object containing information for the client on how best to display the installment options + */ + public void setDisplayHints(InstallmentDisplayHints value) { + this.displayHints = value; + } + + /** + * The ID of the installment option in our system + */ + public String getId() { + return id; + } + + /** + * The ID of the installment option in our system + */ + public void setId(String value) { + this.id = value; + } + + /** + * Object containing information about installment plans + */ + public List getInstallmentPlans() { + return installmentPlans; + } + + /** + * Object containing information about installment plans + */ + public void setInstallmentPlans(List value) { + this.installmentPlans = value; + } +} diff --git a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payment/definitions/Installments.java b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payment/definitions/Installments.java index ddccef241..7e8624915 100644 --- a/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payment/definitions/Installments.java +++ b/src/main/generated/com/ingenico/connect/gateway/sdk/java/domain/payment/definitions/Installments.java @@ -14,6 +14,8 @@ public class Installments { private AmountOfMoney amountOfMoneyPerInstallment = null; + private AmountOfMoney amountOfMoneyTotal = null; + private String frequencyOfInstallments = null; private Integer installmentPlanCode = null; @@ -38,6 +40,20 @@ public void setAmountOfMoneyPerInstallment(AmountOfMoney value) { this.amountOfMoneyPerInstallment = value; } + /** + * Object containing the total amount and ISO currency code attributes + */ + public AmountOfMoney getAmountOfMoneyTotal() { + return amountOfMoneyTotal; + } + + /** + * Object containing the total amount and ISO currency code attributes + */ + public void setAmountOfMoneyTotal(AmountOfMoney value) { + this.amountOfMoneyTotal = value; + } + /** * The frequency in which the installments will be collected from the customer. * The possible values are: diff --git a/src/main/generated/com/ingenico/connect/gateway/sdk/java/merchant/MerchantClient.java b/src/main/generated/com/ingenico/connect/gateway/sdk/java/merchant/MerchantClient.java index 17a442e8e..2eb1a0290 100644 --- a/src/main/generated/com/ingenico/connect/gateway/sdk/java/merchant/MerchantClient.java +++ b/src/main/generated/com/ingenico/connect/gateway/sdk/java/merchant/MerchantClient.java @@ -13,6 +13,7 @@ import com.ingenico.connect.gateway.sdk.java.merchant.files.FilesClient; import com.ingenico.connect.gateway.sdk.java.merchant.hostedcheckouts.HostedcheckoutsClient; import com.ingenico.connect.gateway.sdk.java.merchant.hostedmandatemanagements.HostedmandatemanagementsClient; +import com.ingenico.connect.gateway.sdk.java.merchant.installments.InstallmentsClient; import com.ingenico.connect.gateway.sdk.java.merchant.mandates.MandatesClient; import com.ingenico.connect.gateway.sdk.java.merchant.payments.PaymentsClient; import com.ingenico.connect.gateway.sdk.java.merchant.payouts.PayoutsClient; @@ -159,6 +160,15 @@ public SessionsClient sessions() { return new SessionsClient(this, null); } + /** + * Resource /{merchantId}/installments + * + * @return InstallmentsClient + */ + public InstallmentsClient installments() { + return new InstallmentsClient(this, null); + } + /** * Resource /{merchantId}/files * diff --git a/src/main/generated/com/ingenico/connect/gateway/sdk/java/merchant/installments/InstallmentsClient.java b/src/main/generated/com/ingenico/connect/gateway/sdk/java/merchant/installments/InstallmentsClient.java new file mode 100644 index 000000000..39e0d6109 --- /dev/null +++ b/src/main/generated/com/ingenico/connect/gateway/sdk/java/merchant/installments/InstallmentsClient.java @@ -0,0 +1,84 @@ +/* + * 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.merchant.installments; + +import java.util.Map; + +import com.ingenico.connect.gateway.sdk.java.ApiException; +import com.ingenico.connect.gateway.sdk.java.ApiResource; +import com.ingenico.connect.gateway.sdk.java.AuthorizationException; +import com.ingenico.connect.gateway.sdk.java.CallContext; +import com.ingenico.connect.gateway.sdk.java.GlobalCollectException; +import com.ingenico.connect.gateway.sdk.java.IdempotenceException; +import com.ingenico.connect.gateway.sdk.java.ReferenceException; +import com.ingenico.connect.gateway.sdk.java.ResponseException; +import com.ingenico.connect.gateway.sdk.java.ValidationException; +import com.ingenico.connect.gateway.sdk.java.domain.errors.ErrorResponse; +import com.ingenico.connect.gateway.sdk.java.domain.installments.GetInstallmentRequest; +import com.ingenico.connect.gateway.sdk.java.domain.installments.InstallmentOptionsResponse; + +/** + * Installments client. Thread-safe. + */ +public class InstallmentsClient extends ApiResource { + + public InstallmentsClient(ApiResource parent, Map pathContext) { + super(parent, pathContext); + } + + /** + * Resource /{merchantId}/installments/getInstallmentsInfo + * - Get Installment Info + * + * @param body GetInstallmentRequest + * @return InstallmentOptionsResponse + * @throws ValidationException if the request was not correct and couldn't be processed (HTTP status code 400) + * @throws AuthorizationException if the request was not allowed (HTTP status code 403) + * @throws ReferenceException if an object was attempted to be referenced that doesn't exist or has been removed, + * or there was a conflict (HTTP status code 404, 409 or 410) + * @throws GlobalCollectException if something went wrong at the Ingenico ePayments platform, + * the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, + * or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) + * @throws ApiException if the Ingenico ePayments platform returned any other error + */ + public InstallmentOptionsResponse getInstallmentsInfo(GetInstallmentRequest body) { + return getInstallmentsInfo(body, null); + } + + /** + * Resource /{merchantId}/installments/getInstallmentsInfo + * - Get Installment Info + * + * @param body GetInstallmentRequest + * @param context CallContext + * @return InstallmentOptionsResponse + * @throws ValidationException if the request was not correct and couldn't be processed (HTTP status code 400) + * @throws AuthorizationException if the request was not allowed (HTTP status code 403) + * @throws IdempotenceException if an idempotent request caused a conflict (HTTP status code 409) + * @throws ReferenceException if an object was attempted to be referenced that doesn't exist or has been removed, + * or there was a conflict (HTTP status code 404, 409 or 410) + * @throws GlobalCollectException if something went wrong at the Ingenico ePayments platform, + * the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, + * or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) + * @throws ApiException if the Ingenico ePayments platform returned any other error + */ + public InstallmentOptionsResponse getInstallmentsInfo(GetInstallmentRequest body, CallContext context) { + String uri = instantiateUri("/v1/{merchantId}/installments/getInstallmentsInfo", null); + try { + return communicator.post( + uri, + getClientHeaders(), + null, + body, + InstallmentOptionsResponse.class, + context); + } catch (ResponseException e) { + final Class errorType = ErrorResponse.class; + final Object errorObject = communicator.getMarshaller().unmarshal(e.getBody(), errorType); + throw createException(e.getStatusCode(), e.getBody(), errorObject, context); + } + } +} 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 1a67ba027..d1e52f48d 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.42.0"; + private static final String SDK_VERSION = "6.43.0"; private static final String SERVER_META_INFO_HEADER = "X-GCS-ServerMetaInfo"; static final Set PROHIBITED_HEADERS;