diff --git a/README.md b/README.md index 438e475..6ce9897 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Add this dependency to your project's POM: io.conekta ct-conekta-java - 6.1.2 + 6.1.3 compile ``` @@ -57,7 +57,7 @@ Add this dependency to your project's build file: } dependencies { - implementation "io.conekta:ct-conekta-java:6.1.2" + implementation "io.conekta:ct-conekta-java:6.1.3" } ``` @@ -71,7 +71,7 @@ mvn clean package Then manually install the following JARs: -- `target/ct-conekta-java-6.1.2.jar` +- `target/ct-conekta-java-6.1.3.jar` - `target/lib/*.jar` ## Usage diff --git a/VERSION b/VERSION index 5e32542..88d06f1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.1.2 +6.1.3 diff --git a/api/openapi.yaml b/api/openapi.yaml index eb8df3e..a59e8ba 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -12300,6 +12300,7 @@ components: expires_at: 1656634070 store_name: OXXO reference: 98000013217610 + customer_ip_address: 0.0.0.0 object: charge description: Payment from order status: paid @@ -12362,6 +12363,7 @@ components: type: card token_id: tok_2897348234 payment_source_id: src_2tLkkyfMPh6v7pFry + customer_ip_address: 0.0.0.0 reference_id: string currency: MXN customer_info: @@ -14481,6 +14483,11 @@ components: format: int64 nullable: true type: integer + canceled_reason: + description: Reason for cancellation. This field appears when the subscription + status is 'canceled'. + example: user_cancelation + type: string card_id: example: src_2tKcHxhTz7xU5SymL type: string @@ -15190,7 +15197,7 @@ components: type: string return_url: description: Indicates the redirection callback upon completion of the 3DS2 - flow. + flow. Do not use this parameter if your order has a checkout parameter example: https://my-website.com format: uri type: string @@ -15447,6 +15454,9 @@ components: format: int8 type: integer type: array + three_ds_mode: + description: "Indicates the 3DS2 mode for the order, either smart or strict." + type: string name: description: Reason for charge example: Payment Link Name 1594138857 @@ -15889,6 +15899,9 @@ components: store_name: example: OXXO type: string + customer_ip_address: + example: 0.0.0.0 + type: string title: charge_data_payment_method_cash_response type: object payment_method_card: @@ -15938,6 +15951,11 @@ components: description: Name of the cardholder example: Fulanito Perez type: string + customer_ip_address: + description: Optional field used to capture the customer's IP address + for fraud prevention and security monitoring purposes + example: 0.0.0.0 + type: string title: charge_data_payment_method_card_response type: object payment_method_bank_transfer: @@ -15994,6 +16012,9 @@ components: tracking_code: nullable: true type: string + customer_ip_address: + example: 0.0.0.0 + type: string title: charge_data_payment_method_bank_transfer_response type: object company_payout_destination_response: @@ -16215,6 +16236,11 @@ components: description: Card number example: "4242424242424242" type: string + customer_ip_address: + description: Optional field used to capture the customer's IP address + for fraud prevention and security monitoring purposes + example: 0.0.0.0 + type: string required: - cvc - exp_month @@ -17729,11 +17755,21 @@ components: payment_source_id: example: src_2tLkkyfMPh6v7pFry type: string + cvc: + description: "Optional, It is a value that allows identifying the security\ + \ code of the card. Only for PCI merchants" + example: "123" + type: string contract_id: description: Optional id sent to indicate the bank contract for recurrent card charges. example: S781317595 type: string + customer_ip_address: + description: Optional field used to capture the customer's IP address for + fraud prevention and security monitoring purposes + example: 0.0.0.0 + type: string required: - type title: payment_method_general_request diff --git a/config-java.json b/config-java.json index 93a0e69..c6273ce 100644 --- a/config-java.json +++ b/config-java.json @@ -6,7 +6,7 @@ "developerOrganization": "Conekta, Inc.", "developerOrganizationUrl": "https://www.conekta.io", "artifactUrl": "https://developers.conekta.com/", - "artifactVersion": "6.1.2", + "artifactVersion": "6.1.3", "modelPackage": "com.conekta.model", "licenseName": "MIT License", "invokerPackage": "com.conekta", @@ -36,6 +36,6 @@ "disallowAdditionalPropertiesIfNotPresent": true, "useOneOfDiscriminatorLookup": true, "serializationLibrary": "jackson", - "httpUserAgent": "Conekta/v2 JavaBindings/6.1.2", + "httpUserAgent": "Conekta/v2 JavaBindings/6.1.3", "openApiNullable" : false } \ No newline at end of file diff --git a/docs/Checkout.md b/docs/Checkout.md index f969c56..4888169 100644 --- a/docs/Checkout.md +++ b/docs/Checkout.md @@ -12,6 +12,7 @@ It is a sub-resource of the Order model that can be stipulated in order to confi |**expiresAt** | **Long** | It is the time when the link will expire. It is expressed in seconds since the Unix epoch. The valid range is from 2 to 365 days (the valid range will be taken from the next day of the creation date at 00:01 hrs) | | |**monthlyInstallmentsEnabled** | **Boolean** | This flag allows you to specify if months without interest will be active. | [optional] | |**monthlyInstallmentsOptions** | **List<Integer>** | This field allows you to specify the number of months without interest. | [optional] | +|**threeDsMode** | **String** | Indicates the 3DS2 mode for the order, either smart or strict. | [optional] | |**name** | **String** | Reason for charge | | |**needsShippingContact** | **Boolean** | This flag allows you to fill in the shipping information at checkout. | [optional] | |**onDemandEnabled** | **Boolean** | This flag allows you to specify if the link will be on demand. | [optional] | diff --git a/docs/OrderRequest.md b/docs/OrderRequest.md index 7a6d27c..da03561 100644 --- a/docs/OrderRequest.md +++ b/docs/OrderRequest.md @@ -19,7 +19,7 @@ a order |**needsShippingContact** | **Boolean** | Allows you to fill out the shipping information at checkout | [optional] | |**preAuthorize** | **Boolean** | Indicates whether the order charges must be preauthorized | [optional] | |**processingMode** | **String** | Indicates the processing mode for the order, either ecommerce, recurrent or validation. | [optional] | -|**returnUrl** | **URI** | Indicates the redirection callback upon completion of the 3DS2 flow. | [optional] | +|**returnUrl** | **URI** | Indicates the redirection callback upon completion of the 3DS2 flow. Do not use this parameter if your order has a checkout parameter | [optional] | |**shippingContact** | [**CustomerShippingContacts**](CustomerShippingContacts.md) | | [optional] | |**shippingLines** | [**List<ShippingRequest>**](ShippingRequest.md) | List of [shipping costs](https://developers.conekta.com/v2.1.0/reference/orderscreateshipping). If the online store offers digital products. | [optional] | |**taxLines** | [**List<OrderTaxRequest>**](OrderTaxRequest.md) | List of [taxes](https://developers.conekta.com/v2.1.0/reference/orderscreatetaxes) that are applied to the order. | [optional] | diff --git a/docs/PaymentMethodBankTransfer.md b/docs/PaymentMethodBankTransfer.md index ee40ebb..ea31d1d 100644 --- a/docs/PaymentMethodBankTransfer.md +++ b/docs/PaymentMethodBankTransfer.md @@ -25,6 +25,7 @@ |**receivingAccountTaxId** | **String** | | [optional] | |**referenceNumber** | **String** | | [optional] | |**trackingCode** | **String** | | [optional] | +|**customerIpAddress** | **String** | | [optional] | diff --git a/docs/PaymentMethodCard.md b/docs/PaymentMethodCard.md index 469ecc3..4d9b664 100644 --- a/docs/PaymentMethodCard.md +++ b/docs/PaymentMethodCard.md @@ -20,6 +20,7 @@ |**issuer** | **String** | Issuer of the card | [optional] | |**last4** | **String** | Last 4 digits of the card | [optional] | |**name** | **String** | Name of the cardholder | [optional] | +|**customerIpAddress** | **String** | Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes | [optional] | diff --git a/docs/PaymentMethodCardRequest.md b/docs/PaymentMethodCardRequest.md index 97423d2..cb22bb5 100644 --- a/docs/PaymentMethodCardRequest.md +++ b/docs/PaymentMethodCardRequest.md @@ -13,6 +13,7 @@ |**expYear** | **String** | Card expiration year | | |**name** | **String** | Cardholder name | | |**number** | **String** | Card number | | +|**customerIpAddress** | **String** | Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes | [optional] | diff --git a/docs/PaymentMethodCash.md b/docs/PaymentMethodCash.md index 1b49dd2..863689d 100644 --- a/docs/PaymentMethodCash.md +++ b/docs/PaymentMethodCash.md @@ -17,6 +17,7 @@ |**serviceName** | **String** | | [optional] | |**store** | **String** | | [optional] | |**storeName** | **String** | | [optional] | +|**customerIpAddress** | **String** | | [optional] | diff --git a/docs/PaymentMethodGeneralRequest.md b/docs/PaymentMethodGeneralRequest.md index d2ba40f..166cac3 100644 --- a/docs/PaymentMethodGeneralRequest.md +++ b/docs/PaymentMethodGeneralRequest.md @@ -13,7 +13,9 @@ Payment method used in the charge. Go to the [payment methods](https://developer |**type** | **String** | Type of payment method | | |**tokenId** | **String** | | [optional] | |**paymentSourceId** | **String** | | [optional] | +|**cvc** | **String** | Optional, It is a value that allows identifying the security code of the card. Only for PCI merchants | [optional] | |**contractId** | **String** | Optional id sent to indicate the bank contract for recurrent card charges. | [optional] | +|**customerIpAddress** | **String** | Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes | [optional] | diff --git a/docs/SubscriptionResponse.md b/docs/SubscriptionResponse.md index 3525787..43f4524 100644 --- a/docs/SubscriptionResponse.md +++ b/docs/SubscriptionResponse.md @@ -11,6 +11,7 @@ subscription model |**billingCycleStart** | **Long** | | [optional] | |**billingCycleEnd** | **Long** | | [optional] | |**canceledAt** | **Long** | | [optional] | +|**canceledReason** | **String** | Reason for cancellation. This field appears when the subscription status is 'canceled'. | [optional] | |**cardId** | **String** | | [optional] | |**chargeId** | **String** | | [optional] | |**createdAt** | **Long** | | [optional] | diff --git a/pom.xml b/pom.xml index 7e83407..9b7a2c6 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ ct-conekta-java jar ct-conekta-java - 6.1.2 + 6.1.3 https://developers.conekta.com/ This is a java library that allows interaction with https://api.conekta.io API. diff --git a/src/main/java/com/conekta/ApiClient.java b/src/main/java/com/conekta/ApiClient.java index e9f7b84..9b981f3 100644 --- a/src/main/java/com/conekta/ApiClient.java +++ b/src/main/java/com/conekta/ApiClient.java @@ -86,7 +86,7 @@ public class ApiClient extends JavaTimeFormatter { private JSONObject getConektaUserAgent() { JSONObject userAgent = new JSONObject(); - userAgent.put("bindings_version", "6.1.2"); + userAgent.put("bindings_version", "6.1.3"); userAgent.put("lang", "java"); userAgent.put("lang_version", System.getProperty("java.version")); userAgent.put("publisher", "conekta"); @@ -138,7 +138,7 @@ public ApiClient(Map authMap) { this.dateFormat = new RFC3339DateFormat(); // Set default User-Agent. - setUserAgent("Conekta/v2 JavaBindings/6.1.2"); + setUserAgent("Conekta/v2 JavaBindings/6.1.3"); // Setup authentications (key: authentication name, value: authentication). authentications = new HashMap<>(); diff --git a/src/main/java/com/conekta/Configuration.java b/src/main/java/com/conekta/Configuration.java index b662aba..5a5234b 100644 --- a/src/main/java/com/conekta/Configuration.java +++ b/src/main/java/com/conekta/Configuration.java @@ -15,7 +15,7 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0") public class Configuration { - public static final String VERSION = "6.1.2"; + public static final String VERSION = "6.1.3"; private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/com/conekta/model/Checkout.java b/src/main/java/com/conekta/model/Checkout.java index ed5a85c..1f7f6ae 100644 --- a/src/main/java/com/conekta/model/Checkout.java +++ b/src/main/java/com/conekta/model/Checkout.java @@ -37,6 +37,7 @@ Checkout.JSON_PROPERTY_EXPIRES_AT, Checkout.JSON_PROPERTY_MONTHLY_INSTALLMENTS_ENABLED, Checkout.JSON_PROPERTY_MONTHLY_INSTALLMENTS_OPTIONS, + Checkout.JSON_PROPERTY_THREE_DS_MODE, Checkout.JSON_PROPERTY_NAME, Checkout.JSON_PROPERTY_NEEDS_SHIPPING_CONTACT, Checkout.JSON_PROPERTY_ON_DEMAND_ENABLED, @@ -60,6 +61,9 @@ public class Checkout { public static final String JSON_PROPERTY_MONTHLY_INSTALLMENTS_OPTIONS = "monthly_installments_options"; private List monthlyInstallmentsOptions = new ArrayList<>(); + public static final String JSON_PROPERTY_THREE_DS_MODE = "three_ds_mode"; + private String threeDsMode; + public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -200,6 +204,31 @@ public void setMonthlyInstallmentsOptions(List monthlyInstallmentsOptio } + public Checkout threeDsMode(String threeDsMode) { + this.threeDsMode = threeDsMode; + return this; + } + + /** + * Indicates the 3DS2 mode for the order, either smart or strict. + * @return threeDsMode + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_THREE_DS_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getThreeDsMode() { + return threeDsMode; + } + + + @JsonProperty(JSON_PROPERTY_THREE_DS_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setThreeDsMode(String threeDsMode) { + this.threeDsMode = threeDsMode; + } + + public Checkout name(String name) { this.name = name; return this; @@ -391,6 +420,7 @@ public boolean equals(Object o) { Objects.equals(this.expiresAt, checkout.expiresAt) && Objects.equals(this.monthlyInstallmentsEnabled, checkout.monthlyInstallmentsEnabled) && Objects.equals(this.monthlyInstallmentsOptions, checkout.monthlyInstallmentsOptions) && + Objects.equals(this.threeDsMode, checkout.threeDsMode) && Objects.equals(this.name, checkout.name) && Objects.equals(this.needsShippingContact, checkout.needsShippingContact) && Objects.equals(this.onDemandEnabled, checkout.onDemandEnabled) && @@ -402,7 +432,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(allowedPaymentMethods, expiresAt, monthlyInstallmentsEnabled, monthlyInstallmentsOptions, name, needsShippingContact, onDemandEnabled, orderTemplate, paymentsLimitCount, recurrent, type); + return Objects.hash(allowedPaymentMethods, expiresAt, monthlyInstallmentsEnabled, monthlyInstallmentsOptions, threeDsMode, name, needsShippingContact, onDemandEnabled, orderTemplate, paymentsLimitCount, recurrent, type); } @Override @@ -413,6 +443,7 @@ public String toString() { sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); sb.append(" monthlyInstallmentsEnabled: ").append(toIndentedString(monthlyInstallmentsEnabled)).append("\n"); sb.append(" monthlyInstallmentsOptions: ").append(toIndentedString(monthlyInstallmentsOptions)).append("\n"); + sb.append(" threeDsMode: ").append(toIndentedString(threeDsMode)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" needsShippingContact: ").append(toIndentedString(needsShippingContact)).append("\n"); sb.append(" onDemandEnabled: ").append(toIndentedString(onDemandEnabled)).append("\n"); diff --git a/src/main/java/com/conekta/model/OrderRequest.java b/src/main/java/com/conekta/model/OrderRequest.java index 1dd4767..1ebe5c5 100644 --- a/src/main/java/com/conekta/model/OrderRequest.java +++ b/src/main/java/com/conekta/model/OrderRequest.java @@ -428,7 +428,7 @@ public OrderRequest returnUrl(URI returnUrl) { } /** - * Indicates the redirection callback upon completion of the 3DS2 flow. + * Indicates the redirection callback upon completion of the 3DS2 flow. Do not use this parameter if your order has a checkout parameter * @return returnUrl **/ @javax.annotation.Nullable diff --git a/src/main/java/com/conekta/model/PaymentMethodBankTransfer.java b/src/main/java/com/conekta/model/PaymentMethodBankTransfer.java index 4b964b6..96f2222 100644 --- a/src/main/java/com/conekta/model/PaymentMethodBankTransfer.java +++ b/src/main/java/com/conekta/model/PaymentMethodBankTransfer.java @@ -49,7 +49,8 @@ PaymentMethodBankTransfer.JSON_PROPERTY_RECEIVING_ACCOUNT_BANK, PaymentMethodBankTransfer.JSON_PROPERTY_RECEIVING_ACCOUNT_TAX_ID, PaymentMethodBankTransfer.JSON_PROPERTY_REFERENCE_NUMBER, - PaymentMethodBankTransfer.JSON_PROPERTY_TRACKING_CODE + PaymentMethodBankTransfer.JSON_PROPERTY_TRACKING_CODE, + PaymentMethodBankTransfer.JSON_PROPERTY_CUSTOMER_IP_ADDRESS }) @JsonTypeName("payment_method_bank_transfer") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0") @@ -108,6 +109,9 @@ public class PaymentMethodBankTransfer { public static final String JSON_PROPERTY_TRACKING_CODE = "tracking_code"; private String trackingCode; + public static final String JSON_PROPERTY_CUSTOMER_IP_ADDRESS = "customer_ip_address"; + private String customerIpAddress; + public PaymentMethodBankTransfer() { } @@ -569,6 +573,31 @@ public void setTrackingCode(String trackingCode) { } + public PaymentMethodBankTransfer customerIpAddress(String customerIpAddress) { + this.customerIpAddress = customerIpAddress; + return this; + } + + /** + * Get customerIpAddress + * @return customerIpAddress + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_IP_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerIpAddress() { + return customerIpAddress; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER_IP_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerIpAddress(String customerIpAddress) { + this.customerIpAddress = customerIpAddress; + } + + /** * Return true if this payment_method_bank_transfer object is equal to o. */ @@ -598,12 +627,13 @@ public boolean equals(Object o) { Objects.equals(this.receivingAccountBank, paymentMethodBankTransfer.receivingAccountBank) && Objects.equals(this.receivingAccountTaxId, paymentMethodBankTransfer.receivingAccountTaxId) && Objects.equals(this.referenceNumber, paymentMethodBankTransfer.referenceNumber) && - Objects.equals(this.trackingCode, paymentMethodBankTransfer.trackingCode); + Objects.equals(this.trackingCode, paymentMethodBankTransfer.trackingCode) && + Objects.equals(this.customerIpAddress, paymentMethodBankTransfer.customerIpAddress); } @Override public int hashCode() { - return Objects.hash(type, _object, bank, clabe, description, executedAt, expiresAt, issuingAccountBank, issuingAccountNumber, issuingAccountHolderName, issuingAccountTaxId, paymentAttempts, receivingAccountHolderName, receivingAccountNumber, receivingAccountBank, receivingAccountTaxId, referenceNumber, trackingCode); + return Objects.hash(type, _object, bank, clabe, description, executedAt, expiresAt, issuingAccountBank, issuingAccountNumber, issuingAccountHolderName, issuingAccountTaxId, paymentAttempts, receivingAccountHolderName, receivingAccountNumber, receivingAccountBank, receivingAccountTaxId, referenceNumber, trackingCode, customerIpAddress); } @Override @@ -628,6 +658,7 @@ public String toString() { sb.append(" receivingAccountTaxId: ").append(toIndentedString(receivingAccountTaxId)).append("\n"); sb.append(" referenceNumber: ").append(toIndentedString(referenceNumber)).append("\n"); sb.append(" trackingCode: ").append(toIndentedString(trackingCode)).append("\n"); + sb.append(" customerIpAddress: ").append(toIndentedString(customerIpAddress)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/conekta/model/PaymentMethodCard.java b/src/main/java/com/conekta/model/PaymentMethodCard.java index 55fc785..887211f 100644 --- a/src/main/java/com/conekta/model/PaymentMethodCard.java +++ b/src/main/java/com/conekta/model/PaymentMethodCard.java @@ -44,7 +44,8 @@ PaymentMethodCard.JSON_PROPERTY_FRAUD_INDICATORS, PaymentMethodCard.JSON_PROPERTY_ISSUER, PaymentMethodCard.JSON_PROPERTY_LAST4, - PaymentMethodCard.JSON_PROPERTY_NAME + PaymentMethodCard.JSON_PROPERTY_NAME, + PaymentMethodCard.JSON_PROPERTY_CUSTOMER_IP_ADDRESS }) @JsonTypeName("payment_method_card") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0") @@ -88,6 +89,9 @@ public class PaymentMethodCard { public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_CUSTOMER_IP_ADDRESS = "customer_ip_address"; + private String customerIpAddress; + public PaymentMethodCard() { } @@ -424,6 +428,31 @@ public void setName(String name) { } + public PaymentMethodCard customerIpAddress(String customerIpAddress) { + this.customerIpAddress = customerIpAddress; + return this; + } + + /** + * Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes + * @return customerIpAddress + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_IP_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerIpAddress() { + return customerIpAddress; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER_IP_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerIpAddress(String customerIpAddress) { + this.customerIpAddress = customerIpAddress; + } + + /** * Return true if this payment_method_card object is equal to o. */ @@ -448,12 +477,13 @@ public boolean equals(Object o) { Objects.equals(this.fraudIndicators, paymentMethodCard.fraudIndicators) && Objects.equals(this.issuer, paymentMethodCard.issuer) && Objects.equals(this.last4, paymentMethodCard.last4) && - Objects.equals(this.name, paymentMethodCard.name); + Objects.equals(this.name, paymentMethodCard.name) && + Objects.equals(this.customerIpAddress, paymentMethodCard.customerIpAddress); } @Override public int hashCode() { - return Objects.hash(type, _object, accountType, authCode, brand, contractId, country, expMonth, expYear, fraudIndicators, issuer, last4, name); + return Objects.hash(type, _object, accountType, authCode, brand, contractId, country, expMonth, expYear, fraudIndicators, issuer, last4, name, customerIpAddress); } @Override @@ -473,6 +503,7 @@ public String toString() { sb.append(" issuer: ").append(toIndentedString(issuer)).append("\n"); sb.append(" last4: ").append(toIndentedString(last4)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" customerIpAddress: ").append(toIndentedString(customerIpAddress)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/conekta/model/PaymentMethodCardRequest.java b/src/main/java/com/conekta/model/PaymentMethodCardRequest.java index e67163e..bba363c 100644 --- a/src/main/java/com/conekta/model/PaymentMethodCardRequest.java +++ b/src/main/java/com/conekta/model/PaymentMethodCardRequest.java @@ -35,7 +35,8 @@ PaymentMethodCardRequest.JSON_PROPERTY_EXP_MONTH, PaymentMethodCardRequest.JSON_PROPERTY_EXP_YEAR, PaymentMethodCardRequest.JSON_PROPERTY_NAME, - PaymentMethodCardRequest.JSON_PROPERTY_NUMBER + PaymentMethodCardRequest.JSON_PROPERTY_NUMBER, + PaymentMethodCardRequest.JSON_PROPERTY_CUSTOMER_IP_ADDRESS }) @JsonTypeName("payment_method_card_request") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0") @@ -58,6 +59,9 @@ public class PaymentMethodCardRequest { public static final String JSON_PROPERTY_NUMBER = "number"; private String number; + public static final String JSON_PROPERTY_CUSTOMER_IP_ADDRESS = "customer_ip_address"; + private String customerIpAddress; + public PaymentMethodCardRequest() { } @@ -211,6 +215,31 @@ public void setNumber(String number) { } + public PaymentMethodCardRequest customerIpAddress(String customerIpAddress) { + this.customerIpAddress = customerIpAddress; + return this; + } + + /** + * Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes + * @return customerIpAddress + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_IP_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerIpAddress() { + return customerIpAddress; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER_IP_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerIpAddress(String customerIpAddress) { + this.customerIpAddress = customerIpAddress; + } + + /** * Return true if this payment_method_card_request object is equal to o. */ @@ -228,12 +257,13 @@ public boolean equals(Object o) { Objects.equals(this.expMonth, paymentMethodCardRequest.expMonth) && Objects.equals(this.expYear, paymentMethodCardRequest.expYear) && Objects.equals(this.name, paymentMethodCardRequest.name) && - Objects.equals(this.number, paymentMethodCardRequest.number); + Objects.equals(this.number, paymentMethodCardRequest.number) && + Objects.equals(this.customerIpAddress, paymentMethodCardRequest.customerIpAddress); } @Override public int hashCode() { - return Objects.hash(type, cvc, expMonth, expYear, name, number); + return Objects.hash(type, cvc, expMonth, expYear, name, number, customerIpAddress); } @Override @@ -246,6 +276,7 @@ public String toString() { sb.append(" expYear: ").append(toIndentedString(expYear)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" customerIpAddress: ").append(toIndentedString(customerIpAddress)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/conekta/model/PaymentMethodCash.java b/src/main/java/com/conekta/model/PaymentMethodCash.java index 8bcfad0..7f07ed5 100644 --- a/src/main/java/com/conekta/model/PaymentMethodCash.java +++ b/src/main/java/com/conekta/model/PaymentMethodCash.java @@ -39,7 +39,8 @@ PaymentMethodCash.JSON_PROPERTY_EXPIRES_AT, PaymentMethodCash.JSON_PROPERTY_SERVICE_NAME, PaymentMethodCash.JSON_PROPERTY_STORE, - PaymentMethodCash.JSON_PROPERTY_STORE_NAME + PaymentMethodCash.JSON_PROPERTY_STORE_NAME, + PaymentMethodCash.JSON_PROPERTY_CUSTOMER_IP_ADDRESS }) @JsonTypeName("payment_method_cash") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0") @@ -74,6 +75,9 @@ public class PaymentMethodCash { public static final String JSON_PROPERTY_STORE_NAME = "store_name"; private String storeName; + public static final String JSON_PROPERTY_CUSTOMER_IP_ADDRESS = "customer_ip_address"; + private String customerIpAddress; + public PaymentMethodCash() { } @@ -327,6 +331,31 @@ public void setStoreName(String storeName) { } + public PaymentMethodCash customerIpAddress(String customerIpAddress) { + this.customerIpAddress = customerIpAddress; + return this; + } + + /** + * Get customerIpAddress + * @return customerIpAddress + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_IP_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerIpAddress() { + return customerIpAddress; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER_IP_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerIpAddress(String customerIpAddress) { + this.customerIpAddress = customerIpAddress; + } + + /** * Return true if this payment_method_cash object is equal to o. */ @@ -348,12 +377,13 @@ public boolean equals(Object o) { Objects.equals(this.expiresAt, paymentMethodCash.expiresAt) && Objects.equals(this.serviceName, paymentMethodCash.serviceName) && Objects.equals(this.store, paymentMethodCash.store) && - Objects.equals(this.storeName, paymentMethodCash.storeName); + Objects.equals(this.storeName, paymentMethodCash.storeName) && + Objects.equals(this.customerIpAddress, paymentMethodCash.customerIpAddress); } @Override public int hashCode() { - return Objects.hash(type, _object, authCode, cashierId, reference, barcodeUrl, expiresAt, serviceName, store, storeName); + return Objects.hash(type, _object, authCode, cashierId, reference, barcodeUrl, expiresAt, serviceName, store, storeName, customerIpAddress); } @Override @@ -370,6 +400,7 @@ public String toString() { sb.append(" serviceName: ").append(toIndentedString(serviceName)).append("\n"); sb.append(" store: ").append(toIndentedString(store)).append("\n"); sb.append(" storeName: ").append(toIndentedString(storeName)).append("\n"); + sb.append(" customerIpAddress: ").append(toIndentedString(customerIpAddress)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/conekta/model/PaymentMethodGeneralRequest.java b/src/main/java/com/conekta/model/PaymentMethodGeneralRequest.java index b45009d..ff63210 100644 --- a/src/main/java/com/conekta/model/PaymentMethodGeneralRequest.java +++ b/src/main/java/com/conekta/model/PaymentMethodGeneralRequest.java @@ -35,7 +35,9 @@ PaymentMethodGeneralRequest.JSON_PROPERTY_TYPE, PaymentMethodGeneralRequest.JSON_PROPERTY_TOKEN_ID, PaymentMethodGeneralRequest.JSON_PROPERTY_PAYMENT_SOURCE_ID, - PaymentMethodGeneralRequest.JSON_PROPERTY_CONTRACT_ID + PaymentMethodGeneralRequest.JSON_PROPERTY_CVC, + PaymentMethodGeneralRequest.JSON_PROPERTY_CONTRACT_ID, + PaymentMethodGeneralRequest.JSON_PROPERTY_CUSTOMER_IP_ADDRESS }) @JsonTypeName("payment_method_general_request") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0") @@ -55,9 +57,15 @@ public class PaymentMethodGeneralRequest { public static final String JSON_PROPERTY_PAYMENT_SOURCE_ID = "payment_source_id"; private String paymentSourceId; + public static final String JSON_PROPERTY_CVC = "cvc"; + private String cvc; + public static final String JSON_PROPERTY_CONTRACT_ID = "contract_id"; private String contractId; + public static final String JSON_PROPERTY_CUSTOMER_IP_ADDRESS = "customer_ip_address"; + private String customerIpAddress; + public PaymentMethodGeneralRequest() { } @@ -186,6 +194,31 @@ public void setPaymentSourceId(String paymentSourceId) { } + public PaymentMethodGeneralRequest cvc(String cvc) { + this.cvc = cvc; + return this; + } + + /** + * Optional, It is a value that allows identifying the security code of the card. Only for PCI merchants + * @return cvc + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CVC) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCvc() { + return cvc; + } + + + @JsonProperty(JSON_PROPERTY_CVC) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCvc(String cvc) { + this.cvc = cvc; + } + + public PaymentMethodGeneralRequest contractId(String contractId) { this.contractId = contractId; return this; @@ -211,6 +244,31 @@ public void setContractId(String contractId) { } + public PaymentMethodGeneralRequest customerIpAddress(String customerIpAddress) { + this.customerIpAddress = customerIpAddress; + return this; + } + + /** + * Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes + * @return customerIpAddress + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_IP_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerIpAddress() { + return customerIpAddress; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOMER_IP_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerIpAddress(String customerIpAddress) { + this.customerIpAddress = customerIpAddress; + } + + /** * Return true if this payment_method_general_request object is equal to o. */ @@ -228,12 +286,14 @@ public boolean equals(Object o) { Objects.equals(this.type, paymentMethodGeneralRequest.type) && Objects.equals(this.tokenId, paymentMethodGeneralRequest.tokenId) && Objects.equals(this.paymentSourceId, paymentMethodGeneralRequest.paymentSourceId) && - Objects.equals(this.contractId, paymentMethodGeneralRequest.contractId); + Objects.equals(this.cvc, paymentMethodGeneralRequest.cvc) && + Objects.equals(this.contractId, paymentMethodGeneralRequest.contractId) && + Objects.equals(this.customerIpAddress, paymentMethodGeneralRequest.customerIpAddress); } @Override public int hashCode() { - return Objects.hash(expiresAt, monthlyInstallments, type, tokenId, paymentSourceId, contractId); + return Objects.hash(expiresAt, monthlyInstallments, type, tokenId, paymentSourceId, cvc, contractId, customerIpAddress); } @Override @@ -245,7 +305,9 @@ public String toString() { sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" tokenId: ").append(toIndentedString(tokenId)).append("\n"); sb.append(" paymentSourceId: ").append(toIndentedString(paymentSourceId)).append("\n"); + sb.append(" cvc: ").append(toIndentedString(cvc)).append("\n"); sb.append(" contractId: ").append(toIndentedString(contractId)).append("\n"); + sb.append(" customerIpAddress: ").append(toIndentedString(customerIpAddress)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/conekta/model/SubscriptionResponse.java b/src/main/java/com/conekta/model/SubscriptionResponse.java index 55ed007..571b862 100644 --- a/src/main/java/com/conekta/model/SubscriptionResponse.java +++ b/src/main/java/com/conekta/model/SubscriptionResponse.java @@ -33,6 +33,7 @@ SubscriptionResponse.JSON_PROPERTY_BILLING_CYCLE_START, SubscriptionResponse.JSON_PROPERTY_BILLING_CYCLE_END, SubscriptionResponse.JSON_PROPERTY_CANCELED_AT, + SubscriptionResponse.JSON_PROPERTY_CANCELED_REASON, SubscriptionResponse.JSON_PROPERTY_CARD_ID, SubscriptionResponse.JSON_PROPERTY_CHARGE_ID, SubscriptionResponse.JSON_PROPERTY_CREATED_AT, @@ -60,6 +61,9 @@ public class SubscriptionResponse { public static final String JSON_PROPERTY_CANCELED_AT = "canceled_at"; private Long canceledAt; + public static final String JSON_PROPERTY_CANCELED_REASON = "canceled_reason"; + private String canceledReason; + public static final String JSON_PROPERTY_CARD_ID = "card_id"; private String cardId; @@ -180,6 +184,31 @@ public void setCanceledAt(Long canceledAt) { } + public SubscriptionResponse canceledReason(String canceledReason) { + this.canceledReason = canceledReason; + return this; + } + + /** + * Reason for cancellation. This field appears when the subscription status is 'canceled'. + * @return canceledReason + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CANCELED_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCanceledReason() { + return canceledReason; + } + + + @JsonProperty(JSON_PROPERTY_CANCELED_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCanceledReason(String canceledReason) { + this.canceledReason = canceledReason; + } + + public SubscriptionResponse cardId(String cardId) { this.cardId = cardId; return this; @@ -545,6 +574,7 @@ public boolean equals(Object o) { return Objects.equals(this.billingCycleStart, subscriptionResponse.billingCycleStart) && Objects.equals(this.billingCycleEnd, subscriptionResponse.billingCycleEnd) && Objects.equals(this.canceledAt, subscriptionResponse.canceledAt) && + Objects.equals(this.canceledReason, subscriptionResponse.canceledReason) && Objects.equals(this.cardId, subscriptionResponse.cardId) && Objects.equals(this.chargeId, subscriptionResponse.chargeId) && Objects.equals(this.createdAt, subscriptionResponse.createdAt) && @@ -563,7 +593,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(billingCycleStart, billingCycleEnd, canceledAt, cardId, chargeId, createdAt, customerCustomReference, customerId, id, lastBillingCycleOrderId, _object, pausedAt, planId, status, subscriptionStart, trialStart, trialEnd); + return Objects.hash(billingCycleStart, billingCycleEnd, canceledAt, canceledReason, cardId, chargeId, createdAt, customerCustomReference, customerId, id, lastBillingCycleOrderId, _object, pausedAt, planId, status, subscriptionStart, trialStart, trialEnd); } @Override @@ -573,6 +603,7 @@ public String toString() { sb.append(" billingCycleStart: ").append(toIndentedString(billingCycleStart)).append("\n"); sb.append(" billingCycleEnd: ").append(toIndentedString(billingCycleEnd)).append("\n"); sb.append(" canceledAt: ").append(toIndentedString(canceledAt)).append("\n"); + sb.append(" canceledReason: ").append(toIndentedString(canceledReason)).append("\n"); sb.append(" cardId: ").append(toIndentedString(cardId)).append("\n"); sb.append(" chargeId: ").append(toIndentedString(chargeId)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");