diff --git a/README.md b/README.md index 6dd5c4c38..0eefccd41 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,11 @@ The API Reference Guide provides examples of what information is needed for a pa To learn more about how to use CyberSource's REST API SDKs, please use [Developer Center REST API SDKs](https://developer.cybersource.com/hello-world/rest-api-sdks.html) . +## Security Guidance + +* It is strongly recommended to use HTTPS for any proxy servers in your environment to protect secrets during transit. + + ### Example using Sample Code Application * Add the [CyberSource REST client as a dependency](https://github.com/CyberSource/cybersource-rest-samples-java/blob/a34f25a384e1fa982f5bb336225e3e37ca3e245d/pom.xml#L20C3-L24C16) in your java project. diff --git a/docs/CommerceSolutionsProductsTokenManagementConfigurationInformationConfigurations.md b/docs/CommerceSolutionsProductsTokenManagementConfigurationInformationConfigurations.md index 152b68a0e..744815c9f 100644 --- a/docs/CommerceSolutionsProductsTokenManagementConfigurationInformationConfigurations.md +++ b/docs/CommerceSolutionsProductsTokenManagementConfigurationInformationConfigurations.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **parentProfileId** | **String** | Specify the Vault ID to which transacting MID needs to be assigned.Provide Vault ID as seen on EBC Vault management page. If not provided , transacting MID will be assigned to the existing default Vault at merchant's level. If there are no Vaults at merchant level , a new Vault will be created and transacting MID will be assigned to it. | [optional] **vault** | [**CommerceSolutionsProductsTokenManagementConfigurationInformationConfigurationsVault**](CommerceSolutionsProductsTokenManagementConfigurationInformationConfigurationsVault.md) | | [optional] +**networkTokenEnrollment** | [**NetworkTokenEnrollment**](NetworkTokenEnrollment.md) | | [optional] diff --git a/docs/GenerateCaptureContextRequest.md b/docs/GenerateCaptureContextRequest.md index 0c96ff38d..59b0e99e0 100644 --- a/docs/GenerateCaptureContextRequest.md +++ b/docs/GenerateCaptureContextRequest.md @@ -6,8 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **clientVersion** | **String** | Specify the version of Microform that you want to use. | [optional] **targetOrigins** | **List<String>** | The [target origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) of the website on which you will be launching Microform is defined by the scheme (protocol), hostname (domain) and port number (if used). You must use https://hostname (unless you use http://localhost) Wildcards are NOT supported. Ensure that subdomains are included. Any valid top-level domain is supported (e.g. .com, .co.uk, .gov.br etc) Examples: - https://example.com - https://subdomain.example.com - https://example.com:8080<br><br> If you are embedding within multiple nested iframes you need to specify the origins of all the browser contexts used, for example: targetOrigins: [ \"https://example.com\", \"https://basket.example.com\", \"https://ecom.example.com\" ] | [optional] -**allowedCardNetworks** | **List<String>** | The list of card networks you want to use for this Microform transaction. Microform currently supports the following card networks: - VISA - MASTERCARD - AMEX - CARNET - CARTESBANCAIRES - CUP - DINERSCLUB - DISCOVER - EFTPOS - ELO - JCB - JCREW - MADA - MAESTRO - MEEZA **Important:** - When integrating Microform (Accept Card) at least one card network should be specified in the allowedCardNetworks field in the capture context request. - When integrating Microform (Accept Check) the allowedCardNetworks field is not required in the capture context request. - When integrating both Microform (Accept Card) and Microform (Accept Check) at least one card network should be specified in the allowedCardNetworks field in the capture context request. | [optional] +**allowedCardNetworks** | **List<String>** | The list of card networks you want to use for this Microform transaction. Microform currently supports the following card networks: - VISA - MASTERCARD - AMEX - CARNET - CARTESBANCAIRES - CUP - DINERSCLUB - DISCOVER - EFTPOS - ELO - JCB - JCREW - MADA - MAESTRO - MEEZA **Important:** - When integrating Microform (Card) at least one card network should be specified in the allowedCardNetworks field in the capture context request. - When integrating Microform (ACH/Echeck) the allowedCardNetworks field is not required in the capture context request. - When integrating both Microform (Card) and Microform (ACH/Echeck) at least one card network should be specified in the allowedCardNetworks field in the capture context request. | [optional] **allowedPaymentTypes** | **List<String>** | The payment types that are allowed for the merchant. Possible values when launching Microform: - CARD - CHECK <br><br> | [optional] +**transientTokenResponseOptions** | [**Microformv2sessionsTransientTokenResponseOptions**](Microformv2sessionsTransientTokenResponseOptions.md) | | [optional] diff --git a/docs/GenerateUnifiedCheckoutCaptureContextRequest.md b/docs/GenerateUnifiedCheckoutCaptureContextRequest.md index 75ce3f1fa..13ea0d3de 100644 --- a/docs/GenerateUnifiedCheckoutCaptureContextRequest.md +++ b/docs/GenerateUnifiedCheckoutCaptureContextRequest.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **locale** | **String** | Localization of the User experience conforming to the ISO 639-1 language standards and two-character ISO Standard Country Code. Please refer to list of [supported locales through Unified Checkout](https://developer.cybersource.com/docs/cybs/en-us/unified-checkout/developer/all/rest/unified-checkout/uc-appendix-languages.html) | [optional] **captureMandate** | [**Upv1capturecontextsCaptureMandate**](Upv1capturecontextsCaptureMandate.md) | | [optional] **orderInformation** | [**Upv1capturecontextsOrderInformation**](Upv1capturecontextsOrderInformation.md) | | [optional] +**transientTokenResponseOptions** | [**Microformv2sessionsTransientTokenResponseOptions**](Microformv2sessionsTransientTokenResponseOptions.md) | | [optional] diff --git a/docs/Microformv2sessionsTransientTokenResponseOptions.md b/docs/Microformv2sessionsTransientTokenResponseOptions.md new file mode 100644 index 000000000..47607dfbf --- /dev/null +++ b/docs/Microformv2sessionsTransientTokenResponseOptions.md @@ -0,0 +1,10 @@ + +# Microformv2sessionsTransientTokenResponseOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**includeCardPrefix** | **Boolean** | Use the transientTokenResponseOptions.includeCardPrefix field to choose your preferred card number prefix length: 6-digit, 8-digit, or no card number prefix. Possible values: - True - False<br><br> To select the type of card number prefix: - No field included: A 6-digit prefix is returned (default) - True: An 8-digit prefix is returned - False: No prefix is returned<br><br> The following conditions apply: - 8-digit card number prefixes only apply to Discover, JCB, Mastercard, UnionPay, and Visa brands with 16-digit card numbers or more. - Any card with less than 16-digit numbers will return a 6-digit prefix even when the transientTokenResponseOptions.includeCardPrefix field is set to true. - Any card brand other than Discover, JCB, Mastercard, UnionPay, or Visa will return a 6-digit prefix even when the transientTokenResponseOptions.includeCardPrefix field is set to true. - If any card brand is co-branded with Discover, JCB, Mastercard, UnionPay, or Visa, an 8-digit prefix will be returned if the transientTokenResponseOptions.includeCardPrefix field is set to true.<br><br> **Important:** If your application does NOT require a card number prefix for routing or identification purposes, set the transientTokenResponseOptions.includeCardPrefix field to False. This will minimize your personal data exposure. | [optional] + + + diff --git a/docs/NetworkTokenEnrollment.md b/docs/NetworkTokenEnrollment.md new file mode 100644 index 000000000..6c1cc72fd --- /dev/null +++ b/docs/NetworkTokenEnrollment.md @@ -0,0 +1,11 @@ + +# NetworkTokenEnrollment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**businessInformation** | [**TmsBusinessInformation**](TmsBusinessInformation.md) | | [optional] +**networkTokenServices** | [**NetworkTokenServicesEnablement**](NetworkTokenServicesEnablement.md) | | [optional] + + + diff --git a/docs/NetworkTokenServicesEnablement.md b/docs/NetworkTokenServicesEnablement.md new file mode 100644 index 000000000..afa47e6fb --- /dev/null +++ b/docs/NetworkTokenServicesEnablement.md @@ -0,0 +1,11 @@ + +# NetworkTokenServicesEnablement + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**visaTokenService** | [**NetworkTokenServicesEnablementVisaTokenService**](NetworkTokenServicesEnablementVisaTokenService.md) | | [optional] +**mastercardDigitalEnablementService** | [**NetworkTokenServicesEnablementMastercardDigitalEnablementService**](NetworkTokenServicesEnablementMastercardDigitalEnablementService.md) | | [optional] + + + diff --git a/docs/NetworkTokenServicesEnablementMastercardDigitalEnablementService.md b/docs/NetworkTokenServicesEnablementMastercardDigitalEnablementService.md new file mode 100644 index 000000000..5b8e9f252 --- /dev/null +++ b/docs/NetworkTokenServicesEnablementMastercardDigitalEnablementService.md @@ -0,0 +1,10 @@ + +# NetworkTokenServicesEnablementMastercardDigitalEnablementService + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enrollment** | **Boolean** | Indicates if an enrollment to create a TRID for the MasterCard card association should be attempted | [optional] + + + diff --git a/docs/NetworkTokenServicesEnablementVisaTokenService.md b/docs/NetworkTokenServicesEnablementVisaTokenService.md new file mode 100644 index 000000000..2f69cc81b --- /dev/null +++ b/docs/NetworkTokenServicesEnablementVisaTokenService.md @@ -0,0 +1,10 @@ + +# NetworkTokenServicesEnablementVisaTokenService + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enrollment** | **Boolean** | Indicates if an enrollment to create a TRID for the Visa card association should be attempted | [optional] + + + diff --git a/docs/TmsBusinessInformation.md b/docs/TmsBusinessInformation.md new file mode 100644 index 000000000..9f84e3031 --- /dev/null +++ b/docs/TmsBusinessInformation.md @@ -0,0 +1,16 @@ + +# TmsBusinessInformation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Name of the network token merchant. | [optional] +**doingBusinessAs** | **String** | Name the network token merchant does business as | [optional] +**address** | [**TmsBusinessInformationAddress**](TmsBusinessInformationAddress.md) | | [optional] +**websiteUrl** | **String** | Website of network token merchant. | [optional] +**businessIdentificationType** | **String** | The Identifier associated with the business type; required unless both acquirerId and acquirerMerchantId are provided. | [optional] +**businessIdentificationValue** | **String** | The value associated with the business identifier type; required unless both acquirerId and acquirerMerchantId are provided. | [optional] +**acquirer** | [**TmsBusinessInformationAcquirer**](TmsBusinessInformationAcquirer.md) | | [optional] + + + diff --git a/docs/TmsBusinessInformationAcquirer.md b/docs/TmsBusinessInformationAcquirer.md new file mode 100644 index 000000000..91883d5b5 --- /dev/null +++ b/docs/TmsBusinessInformationAcquirer.md @@ -0,0 +1,11 @@ + +# TmsBusinessInformationAcquirer + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**acquirerId** | **String** | Acquirer ID; required unless both businessIdentificationType and businessIdentificationValue are provided. | [optional] +**acquirerMerchantId** | **String** | Acquirer merchant ID; required unless both businessIdentificationType and businessIdentificationValue are provided. | [optional] + + + diff --git a/docs/TmsBusinessInformationAddress.md b/docs/TmsBusinessInformationAddress.md new file mode 100644 index 000000000..58aa4f884 --- /dev/null +++ b/docs/TmsBusinessInformationAddress.md @@ -0,0 +1,11 @@ + +# TmsBusinessInformationAddress + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**country** | **String** | Country of network token merchant. | [optional] +**locality** | **String** | City of network token merchant. | [optional] + + + diff --git a/docs/Upv1capturecontextsCaptureMandate.md b/docs/Upv1capturecontextsCaptureMandate.md index e70509c6a..6f4bab9a4 100644 --- a/docs/Upv1capturecontextsCaptureMandate.md +++ b/docs/Upv1capturecontextsCaptureMandate.md @@ -10,6 +10,8 @@ Name | Type | Description | Notes **requestShipping** | **Boolean** | Configure Unified Checkout to capture customer shipping details. Possible values: - True - False | [optional] **shipToCountries** | **List<String>** | List of countries available to ship to. Use the two-character ISO Standard Country Codes. | [optional] **showAcceptedNetworkIcons** | **Boolean** | Configure Unified Checkout to display the list of accepted card networks beneath the payment button Possible values: - True - False | [optional] +**requestSaveCard** | **Boolean** | Configure Unified Checkout to display the \"Save card for future use\" checkbox.<br> Configurable check box that will show in a Manual card entry flow to allow a Cardholder to give consent to store their manually entered credential with the Merchant that they are paying.<br> Applicable when manually entering the details and not enrolling in Click to Pay. Possible values: - True - False<br><br> **Use Cases:** **Offer consumers option to save their card in Unified Checkout:** - Include the captureMandate.requestSaveCard field in the capture context request and set it to true. - When set to true, this will show a checkbox with the message 'Save card for future use' in Unified Checkout. - When selected this provides a response in both the Transient Token and Get Credentials API response.<br><br> **Do not offer consumers the option to save their card in Unified Checkout:** - Include the captureMandate.requestSaveCard field in the capture context request and set it to false OR omit the field from the capture context request. - When set to false, the save card option is not shown to consumers when manually entering card details. | [optional] +**comboCard** | **Boolean** | Configure Unified Checkout to display combo card at checkout.<br> A combo debit/credit card is a single card that functions both as a Debit/Credit card. Unified Checkout / Click to Pay Drop-in UI allows the Cardholder to choose whether they would like the transaction to be paid for using either debit or credit card. **Important:** This is applicable to Visa cards only. Possible values: - True - False<br><br> **Use Cases:** **Offer Combo Card at Checkout:** - Include the captureMandate.comboCard field in the capture context request and set it to true. - When set to true, Combo Card selection is shown at checkout <br><br> **Do not offer Combo Card at Checkout:** - Include the captureMandate.comboCard field in the capture context request and set it to false OR omit the field from the capture context request. - The Combo Card selection is not shown at checkout. | [optional] diff --git a/generator/cybersource-rest-spec.json b/generator/cybersource-rest-spec.json index 8671afd97..e494a3c61 100644 --- a/generator/cybersource-rest-spec.json +++ b/generator/cybersource-rest-spec.json @@ -68404,7 +68404,7 @@ "items": { "type": "string" }, - "description": "The list of card networks you want to use for this Microform transaction.\n\nMicroform currently supports the following card networks:\n- VISA\n- MASTERCARD\n- AMEX\n- CARNET\n- CARTESBANCAIRES\n- CUP\n- DINERSCLUB\n- DISCOVER\n- EFTPOS\n- ELO\n- JCB\n- JCREW\n- MADA\n- MAESTRO\n- MEEZA\n\n**Important:** \n - When integrating Microform (Accept Card) at least one card network should be specified in the allowedCardNetworks field in the capture context request.\n - When integrating Microform (Accept Check) the allowedCardNetworks field is not required in the capture context request.\n - When integrating both Microform (Accept Card) and Microform (Accept Check) at least one card network should be specified in the allowedCardNetworks field in the capture context request.\n" + "description": "The list of card networks you want to use for this Microform transaction.\n\nMicroform currently supports the following card networks:\n- VISA\n- MASTERCARD\n- AMEX\n- CARNET\n- CARTESBANCAIRES\n- CUP\n- DINERSCLUB\n- DISCOVER\n- EFTPOS\n- ELO\n- JCB\n- JCREW\n- MADA\n- MAESTRO\n- MEEZA\n\n**Important:** \n - When integrating Microform (Card) at least one card network should be specified in the allowedCardNetworks field in the capture context request.\n - When integrating Microform (ACH/Echeck) the allowedCardNetworks field is not required in the capture context request.\n - When integrating both Microform (Card) and Microform (ACH/Echeck) at least one card network should be specified in the allowedCardNetworks field in the capture context request.\n" }, "allowedPaymentTypes": { "type": "array", @@ -68412,6 +68412,15 @@ "type": "string" }, "description": "The payment types that are allowed for the merchant. \n\nPossible values when launching Microform:\n- CARD\n- CHECK

\n" + }, + "transientTokenResponseOptions": { + "type": "object", + "properties": { + "includeCardPrefix": { + "type": "boolean", + "description": "Use the transientTokenResponseOptions.includeCardPrefix field to choose your preferred card number prefix length: 6-digit, 8-digit, or no card number prefix.\n\nPossible values:\n- True\n- False

\n\nTo select the type of card number prefix:\n- No field included: A 6-digit prefix is returned (default)\n- True: An 8-digit prefix is returned\n- False: No prefix is returned

\n\nThe following conditions apply:\n- 8-digit card number prefixes only apply to Discover, JCB, Mastercard, UnionPay, and Visa brands with 16-digit card numbers or more.\n- Any card with less than 16-digit numbers will return a 6-digit prefix even when the transientTokenResponseOptions.includeCardPrefix field is set to true.\n- Any card brand other than Discover, JCB, Mastercard, UnionPay, or Visa will return a 6-digit prefix even when the transientTokenResponseOptions.includeCardPrefix field is set to true.\n- If any card brand is co-branded with Discover, JCB, Mastercard, UnionPay, or Visa, an 8-digit prefix will be returned if the transientTokenResponseOptions.includeCardPrefix field is set to true.

\n\n**Important:** \nIf your application does NOT require a card number prefix for routing or identification purposes, set the transientTokenResponseOptions.includeCardPrefix field to False. This will minimize your personal data exposure.\n" + } + } } } } @@ -68419,7 +68428,7 @@ ], "x-example": { "example0": { - "summary": "Generate Capture Context (Accept Card)", + "summary": "Generate Capture Context (Card)", "value": { "clientVersion": "v2", "targetOrigins": [ @@ -68448,7 +68457,7 @@ } }, "example1": { - "summary": "Generate Capture Context (Accept Check)", + "summary": "Generate Capture Context (ACH/Echeck)", "value": { "clientVersion": "v2", "targetOrigins": [ @@ -68458,6 +68467,38 @@ "CHECK" ] } + }, + "example2": { + "summary": "Generate Capture Context (Card - Opt-out of receiving card number prefix)", + "value": { + "clientVersion": "v2", + "targetOrigins": [ + "https://www.test.com" + ], + "allowedCardNetworks": [ + "VISA", + "MASTERCARD", + "AMEX", + "CARNET", + "CARTESBANCAIRES", + "CUP", + "DINERSCLUB", + "DISCOVER", + "EFTPOS", + "ELO", + "JCB", + "JCREW", + "MADA", + "MAESTRO", + "MEEZA" + ], + "allowedPaymentTypes": [ + "CARD" + ], + "transientTokenResponseOptions": { + "includeCardPrefix": false + } + } } }, "responses": { @@ -107428,6 +107469,110 @@ } } } + }, + "networkTokenEnrollment": { + "title": "networkTokenEnrollment", + "type": "object", + "properties": { + "businessInformation": { + "title": "tmsBusinessInformation", + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 60, + "minLength": 1, + "pattern": "^[0-9a-zA-Z _\\-\\+\\.\\*\\\"/'&\\,\\(\\)!$;:?@\\#\u00a1-\uffff]+$", + "description": "Name of the network token merchant.", + "example": "NetworkTokenMerchant" + }, + "doingBusinessAs": { + "type": "string", + "maxLength": 60, + "pattern": "^[0-9a-zA-Z _\\-\\+\\.\\*\\\"/'&\\,\\(\\)!$;:?@\\#\u00a1-\uffff]+$", + "description": "Name the network token merchant does business as", + "example": "NetworkTokenCo1" + }, + "address": { + "type": "object", + "properties": { + "country": { + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^[\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u01ffa-zA-Z0-9().\\-_#,;/@$:!% ]{1,}$", + "description": "Country of network token merchant.", + "example": "US" + }, + "locality": { + "type": "string", + "maxLength": 50, + "minLength": 1, + "pattern": "^[0-9a-zA-Z _\\-\u00a1-\uffff]+$", + "description": "City of network token merchant.", + "example": "ORMOND BEACH" + } + } + }, + "websiteUrl": { + "type": "string", + "maxLength": 100, + "pattern": "\\b((?:https?://|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\".,<>?\u00c2\u00ab\u00c2\u00bb\u00e2\u20ac\u0153\u00e2\u20ac.\u00e2\u20ac\u02dc\u00e2\u20ac\u2122]))", + "description": "Website of network token merchant.", + "example": "https://www.NetworkTokenMerchant.com" + }, + "businessIdentificationType": { + "type": "string", + "description": "The Identifier associated with the business type; required unless both acquirerId and acquirerMerchantId are provided.\n", + "maxLength": 15 + }, + "businessIdentificationValue": { + "type": "string", + "description": "The value associated with the business identifier type; required unless both acquirerId and acquirerMerchantId are provided.\n", + "maxLength": 25 + }, + "acquirer": { + "type": "object", + "properties": { + "acquirerId": { + "type": "string", + "description": "Acquirer ID; required unless both businessIdentificationType and businessIdentificationValue are provided.\n", + "maxLength": 15 + }, + "acquirerMerchantId": { + "type": "string", + "description": "Acquirer merchant ID; required unless both businessIdentificationType and businessIdentificationValue are provided.\n", + "maxLength": 25 + } + } + } + } + }, + "networkTokenServices": { + "title": "NetworkTokenServicesEnablement", + "type": "object", + "properties": { + "visaTokenService": { + "type": "object", + "properties": { + "enrollment": { + "type": "boolean", + "description": "Indicates if an enrollment to create a TRID for the Visa card association should be attempted" + } + } + }, + "mastercardDigitalEnablementService": { + "type": "object", + "properties": { + "enrollment": { + "type": "boolean", + "description": "Indicates if an enrollment to create a TRID for the MasterCard card association should be attempted" + } + } + } + } + } + } } } } @@ -111323,6 +111468,109 @@ } } } + }, + "example12": { + "summary": "Merchant Boarding with TMS and Network Token TRID Enrollment (Production Only)", + "value": { + "organizationInformation": { + "parentOrganizationId": "apitester00", + "type": "MERCHANT", + "configurable": "true", + "businessInformation": { + "name": "StuartWickedFastEatz", + "address": { + "country": "US", + "address1": "123456 SandMarket", + "locality": "ORMOND BEACH", + "administrativeArea": "FL", + "postalCode": "32176" + }, + "websiteUrl": "https://www.NetworkTokenMerchant.com", + "businessContact": { + "firstName": "Token", + "lastName": "Man", + "phoneNumber": "6574567813", + "email": "networktokenman@visa.com" + } + } + }, + "productInformation": { + "selectedProducts": { + "commerceSolutions": { + "tokenManagement": { + "subscriptionInformation": { + "enabled": true + }, + "configurationInformation": { + "configurations": { + "vault": { + "defaultTokenType": "CUSTOMER", + "location": "GDC", + "tokenFormats": { + "customer": "32_HEX", + "paymentInstrument": "32_HEX", + "instrumentIdentifierCard": "19_DIGIT_LAST_4", + "instrumentIdentifierBankAccount": "32_HEX" + }, + "sensitivePrivileges": { + "cardNumberMaskingFormat": "FIRST_6_LAST_4" + }, + "networkTokenServices": { + "visaTokenService": { + "enableService": true, + "enableTransactionalTokens": true + }, + "mastercardDigitalEnablementService": { + "enableService": true, + "enableTransactionalTokens": true + }, + "americanExpressTokenService": { + "enableService": true, + "enableTransactionalTokens": true, + "tokenRequestorId": "12345678912", + "seNumber": "9876543212" + }, + "notifications": { + "enabled": true + }, + "paymentCredentials": { + "enabled": true + }, + "synchronousProvisioning": { + "enabled": false + } + } + }, + "networkTokenEnrollment": { + "businessInformation": { + "name": "NetworkTokenMerchant", + "doingBusinessAs": "NetworkTokenCo1", + "address": { + "country": "US", + "locality": "ORMOND BEACH" + }, + "websiteUrl": "https://www.NetworkTokenMerchant.com", + "acquirer": { + "acquirerId": "40010052242", + "acquirerMerchantId": "MerchantOrgID" + } + }, + "networkTokenServices": { + "visaTokenService": { + "enrollment": true + }, + "mastercardDigitalEnablementService": { + "enrollment": true + } + } + } + } + } + } + } + } + } + } } } } @@ -115856,6 +116104,110 @@ } } } + }, + "networkTokenEnrollment": { + "title": "networkTokenEnrollment", + "type": "object", + "properties": { + "businessInformation": { + "title": "tmsBusinessInformation", + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 60, + "minLength": 1, + "pattern": "^[0-9a-zA-Z _\\-\\+\\.\\*\\\"/'&\\,\\(\\)!$;:?@\\#\u00a1-\uffff]+$", + "description": "Name of the network token merchant.", + "example": "NetworkTokenMerchant" + }, + "doingBusinessAs": { + "type": "string", + "maxLength": 60, + "pattern": "^[0-9a-zA-Z _\\-\\+\\.\\*\\\"/'&\\,\\(\\)!$;:?@\\#\u00a1-\uffff]+$", + "description": "Name the network token merchant does business as", + "example": "NetworkTokenCo1" + }, + "address": { + "type": "object", + "properties": { + "country": { + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^[\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u01ffa-zA-Z0-9().\\-_#,;/@$:!% ]{1,}$", + "description": "Country of network token merchant.", + "example": "US" + }, + "locality": { + "type": "string", + "maxLength": 50, + "minLength": 1, + "pattern": "^[0-9a-zA-Z _\\-\u00a1-\uffff]+$", + "description": "City of network token merchant.", + "example": "ORMOND BEACH" + } + } + }, + "websiteUrl": { + "type": "string", + "maxLength": 100, + "pattern": "\\b((?:https?://|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\".,<>?\u00c2\u00ab\u00c2\u00bb\u00e2\u20ac\u0153\u00e2\u20ac.\u00e2\u20ac\u02dc\u00e2\u20ac\u2122]))", + "description": "Website of network token merchant.", + "example": "https://www.NetworkTokenMerchant.com" + }, + "businessIdentificationType": { + "type": "string", + "description": "The Identifier associated with the business type; required unless both acquirerId and acquirerMerchantId are provided.\n", + "maxLength": 15 + }, + "businessIdentificationValue": { + "type": "string", + "description": "The value associated with the business identifier type; required unless both acquirerId and acquirerMerchantId are provided.\n", + "maxLength": 25 + }, + "acquirer": { + "type": "object", + "properties": { + "acquirerId": { + "type": "string", + "description": "Acquirer ID; required unless both businessIdentificationType and businessIdentificationValue are provided.\n", + "maxLength": 15 + }, + "acquirerMerchantId": { + "type": "string", + "description": "Acquirer merchant ID; required unless both businessIdentificationType and businessIdentificationValue are provided.\n", + "maxLength": 25 + } + } + } + } + }, + "networkTokenServices": { + "title": "NetworkTokenServicesEnablement", + "type": "object", + "properties": { + "visaTokenService": { + "type": "object", + "properties": { + "enrollment": { + "type": "boolean", + "description": "Indicates if an enrollment to create a TRID for the Visa card association should be attempted" + } + } + }, + "mastercardDigitalEnablementService": { + "type": "object", + "properties": { + "enrollment": { + "type": "boolean", + "description": "Indicates if an enrollment to create a TRID for the MasterCard card association should be attempted" + } + } + } + } + } + } } } } @@ -120330,7 +120682,7 @@ "properties": { "clientVersion": { "type": "string", - "example": 0.22, + "example": "0.24", "maxLength": 60, "description": "Specify the version of Unified Checkout that you want to use." }, @@ -120405,6 +120757,14 @@ "showAcceptedNetworkIcons": { "type": "boolean", "description": "Configure Unified Checkout to display the list of accepted card networks beneath the payment button\n\nPossible values:\n- True\n- False\n" + }, + "requestSaveCard": { + "type": "boolean", + "description": "Configure Unified Checkout to display the \"Save card for future use\" checkbox.
\n\nConfigurable check box that will show in a Manual card entry flow to allow a Cardholder to give consent to store their manually entered credential with the Merchant that they are paying.
\nApplicable when manually entering the details and not enrolling in Click to Pay.\n\nPossible values:\n - True \n - False

\n\n**Use Cases:**\n\n**Offer consumers option to save their card in Unified Checkout:** \n- Include the captureMandate.requestSaveCard field in the capture context request and set it to true.\n- When set to true, this will show a checkbox with the message 'Save card for future use' in Unified Checkout.\n- When selected this provides a response in both the Transient Token and Get Credentials API response.

\n\n**Do not offer consumers the option to save their card in Unified Checkout:** \n- Include the captureMandate.requestSaveCard field in the capture context request and set it to false OR omit the field from the capture context request.\n- When set to false, the save card option is not shown to consumers when manually entering card details.\n" + }, + "comboCard": { + "type": "boolean", + "description": "Configure Unified Checkout to display combo card at checkout.
\n\nA combo debit/credit card is a single card that functions both as a Debit/Credit card. \nUnified Checkout / Click to Pay Drop-in UI allows the Cardholder to choose whether they would like the transaction to be paid for using either debit or credit card.\n**Important:** This is applicable to Visa cards only.\n\nPossible values:\n- True \n- False

\n\n**Use Cases:**\n\n**Offer Combo Card at Checkout:** \n- Include the captureMandate.comboCard field in the capture context request and set it to true.\n- When set to true, Combo Card selection is shown at checkout

\n\n**Do not offer Combo Card at Checkout:** \n- Include the captureMandate.comboCard field in the capture context request and set it to false OR omit the field from the capture context request.\n- The Combo Card selection is not shown at checkout.\n" } } }, @@ -120684,6 +121044,15 @@ } } } + }, + "transientTokenResponseOptions": { + "type": "object", + "properties": { + "includeCardPrefix": { + "type": "boolean", + "description": "Use the transientTokenResponseOptions.includeCardPrefix field to choose your preferred card number prefix length: 6-digit, 8-digit, or no card number prefix.\n\nPossible values:\n- True\n- False

\n\nTo select the type of card number prefix:\n- No field included: A 6-digit prefix is returned (default)\n- True: An 8-digit prefix is returned\n- False: No prefix is returned

\n\nThe following conditions apply:\n- 8-digit card number prefixes only apply to Discover, JCB, Mastercard, UnionPay, and Visa brands with 16-digit card numbers or more.\n- Any card with less than 16-digit numbers will return a 6-digit prefix even when the transientTokenResponseOptions.includeCardPrefix field is set to true.\n- Any card brand other than Discover, JCB, Mastercard, UnionPay, or Visa will return a 6-digit prefix even when the transientTokenResponseOptions.includeCardPrefix field is set to true.\n- If any card brand is co-branded with Discover, JCB, Mastercard, UnionPay, or Visa, an 8-digit prefix will be returned if the transientTokenResponseOptions.includeCardPrefix field is set to true.

\n\n**Important:** \nIf your application does NOT require a card number prefix for routing or identification purposes, set the transientTokenResponseOptions.includeCardPrefix field to False. This will minimize your personal data exposure.\n" + } + } } } } @@ -120693,7 +121062,7 @@ "example0": { "summary": "Generate Unified Checkout Capture Context", "value": { - "clientVersion": "0.23", + "clientVersion": "0.24", "targetOrigins": [ "https://yourCheckoutPage.com" ], @@ -120743,10 +121112,66 @@ } } }, - "example3": { + "example1": { + "summary": "Generate Unified Checkout Capture Context (Opt-out of receiving card number prefix)", + "value": { + "clientVersion": "0.24", + "targetOrigins": [ + "https://yourCheckoutPage.com" + ], + "allowedCardNetworks": [ + "VISA", + "MASTERCARD", + "AMEX", + "CARNET", + "CARTESBANCAIRES", + "CUP", + "DINERSCLUB", + "DISCOVER", + "EFTPOS", + "ELO", + "JCB", + "JCREW", + "MADA", + "MAESTRO", + "MEEZA" + ], + "allowedPaymentTypes": [ + "APPLEPAY", + "CHECK", + "CLICKTOPAY", + "GOOGLEPAY", + "PANENTRY", + "PAZE" + ], + "country": "US", + "locale": "en_US", + "captureMandate": { + "billingType": "FULL", + "requestEmail": true, + "requestPhone": true, + "requestShipping": true, + "shipToCountries": [ + "US", + "GB" + ], + "showAcceptedNetworkIcons": true + }, + "orderInformation": { + "amountDetails": { + "totalAmount": "21.00", + "currency": "USD" + } + }, + "transientTokenResponseOptions": { + "includeCardPrefix": false + } + } + }, + "example2": { "summary": "Generate Unified Checkout Capture Context passing Billing & Shipping", "value": { - "clientVersion": "0.23", + "clientVersion": "0.24", "targetOrigins": [ "https://yourCheckoutPage.com" ], @@ -120843,10 +121268,10 @@ } } }, - "example4": { + "example3": { "summary": "Generate Capture Context For Click To Pay Drop-In UI", "value": { - "clientVersion": "0.23", + "clientVersion": "0.24", "targetOrigins": [ "https://yourCheckoutPage.com" ], diff --git a/git_push.sh b/git_push.sh index ed374619b..ae01b182a 100644 --- a/git_push.sh +++ b/git_push.sh @@ -36,7 +36,7 @@ git_remote=`git remote` if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git else git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git diff --git a/pom.xml b/pom.xml index 6ab619a4b..b636eec75 100644 --- a/pom.xml +++ b/pom.xml @@ -274,7 +274,7 @@ com.cybersource AuthenticationSdk - 0.0.34 + 0.0.35 @@ -285,7 +285,7 @@ 1.9.0 1.5.18 4.12.0 - 2.10.1 + 2.12.1 2.12.5 1.0.0 4.13.2 diff --git a/src/main/java/Model/CommerceSolutionsProductsTokenManagementConfigurationInformationConfigurations.java b/src/main/java/Model/CommerceSolutionsProductsTokenManagementConfigurationInformationConfigurations.java index 9a827a55d..74bf0beae 100644 --- a/src/main/java/Model/CommerceSolutionsProductsTokenManagementConfigurationInformationConfigurations.java +++ b/src/main/java/Model/CommerceSolutionsProductsTokenManagementConfigurationInformationConfigurations.java @@ -16,6 +16,7 @@ import java.util.Objects; import java.util.Arrays; import Model.CommerceSolutionsProductsTokenManagementConfigurationInformationConfigurationsVault; +import Model.NetworkTokenEnrollment; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -36,6 +37,9 @@ public class CommerceSolutionsProductsTokenManagementConfigurationInformationCon @SerializedName("vault") private CommerceSolutionsProductsTokenManagementConfigurationInformationConfigurationsVault vault = null; + @SerializedName("networkTokenEnrollment") + private NetworkTokenEnrollment networkTokenEnrollment = null; + public CommerceSolutionsProductsTokenManagementConfigurationInformationConfigurations parentProfileId(String parentProfileId) { this.parentProfileId = parentProfileId; return this; @@ -72,6 +76,24 @@ public void setVault(CommerceSolutionsProductsTokenManagementConfigurationInform this.vault = vault; } + public CommerceSolutionsProductsTokenManagementConfigurationInformationConfigurations networkTokenEnrollment(NetworkTokenEnrollment networkTokenEnrollment) { + this.networkTokenEnrollment = networkTokenEnrollment; + return this; + } + + /** + * Get networkTokenEnrollment + * @return networkTokenEnrollment + **/ + @ApiModelProperty(value = "") + public NetworkTokenEnrollment getNetworkTokenEnrollment() { + return networkTokenEnrollment; + } + + public void setNetworkTokenEnrollment(NetworkTokenEnrollment networkTokenEnrollment) { + this.networkTokenEnrollment = networkTokenEnrollment; + } + @Override public boolean equals(java.lang.Object o) { @@ -83,12 +105,13 @@ public boolean equals(java.lang.Object o) { } CommerceSolutionsProductsTokenManagementConfigurationInformationConfigurations commerceSolutionsProductsTokenManagementConfigurationInformationConfigurations = (CommerceSolutionsProductsTokenManagementConfigurationInformationConfigurations) o; return Objects.equals(this.parentProfileId, commerceSolutionsProductsTokenManagementConfigurationInformationConfigurations.parentProfileId) && - Objects.equals(this.vault, commerceSolutionsProductsTokenManagementConfigurationInformationConfigurations.vault); + Objects.equals(this.vault, commerceSolutionsProductsTokenManagementConfigurationInformationConfigurations.vault) && + Objects.equals(this.networkTokenEnrollment, commerceSolutionsProductsTokenManagementConfigurationInformationConfigurations.networkTokenEnrollment); } @Override public int hashCode() { - return Objects.hash(parentProfileId, vault); + return Objects.hash(parentProfileId, vault, networkTokenEnrollment); } @@ -99,6 +122,7 @@ public String toString() { if (parentProfileId != null) sb.append(" parentProfileId: ").append(toIndentedString(parentProfileId)).append("\n"); if (vault != null) sb.append(" vault: ").append(toIndentedString(vault)).append("\n"); + if (networkTokenEnrollment != null) sb.append(" networkTokenEnrollment: ").append(toIndentedString(networkTokenEnrollment)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/Model/GenerateCaptureContextRequest.java b/src/main/java/Model/GenerateCaptureContextRequest.java index e6052f04d..8fa9200e5 100644 --- a/src/main/java/Model/GenerateCaptureContextRequest.java +++ b/src/main/java/Model/GenerateCaptureContextRequest.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import Model.Microformv2sessionsTransientTokenResponseOptions; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,6 +45,9 @@ public class GenerateCaptureContextRequest { @SerializedName("allowedPaymentTypes") private List allowedPaymentTypes = null; + @SerializedName("transientTokenResponseOptions") + private Microformv2sessionsTransientTokenResponseOptions transientTokenResponseOptions = null; + public GenerateCaptureContextRequest clientVersion(String clientVersion) { this.clientVersion = clientVersion; return this; @@ -102,10 +106,10 @@ public GenerateCaptureContextRequest addAllowedCardNetworksItem(String allowedCa } /** - * The list of card networks you want to use for this Microform transaction. Microform currently supports the following card networks: - VISA - MASTERCARD - AMEX - CARNET - CARTESBANCAIRES - CUP - DINERSCLUB - DISCOVER - EFTPOS - ELO - JCB - JCREW - MADA - MAESTRO - MEEZA **Important:** - When integrating Microform (Accept Card) at least one card network should be specified in the allowedCardNetworks field in the capture context request. - When integrating Microform (Accept Check) the allowedCardNetworks field is not required in the capture context request. - When integrating both Microform (Accept Card) and Microform (Accept Check) at least one card network should be specified in the allowedCardNetworks field in the capture context request. + * The list of card networks you want to use for this Microform transaction. Microform currently supports the following card networks: - VISA - MASTERCARD - AMEX - CARNET - CARTESBANCAIRES - CUP - DINERSCLUB - DISCOVER - EFTPOS - ELO - JCB - JCREW - MADA - MAESTRO - MEEZA **Important:** - When integrating Microform (Card) at least one card network should be specified in the allowedCardNetworks field in the capture context request. - When integrating Microform (ACH/Echeck) the allowedCardNetworks field is not required in the capture context request. - When integrating both Microform (Card) and Microform (ACH/Echeck) at least one card network should be specified in the allowedCardNetworks field in the capture context request. * @return allowedCardNetworks **/ - @ApiModelProperty(value = "The list of card networks you want to use for this Microform transaction. Microform currently supports the following card networks: - VISA - MASTERCARD - AMEX - CARNET - CARTESBANCAIRES - CUP - DINERSCLUB - DISCOVER - EFTPOS - ELO - JCB - JCREW - MADA - MAESTRO - MEEZA **Important:** - When integrating Microform (Accept Card) at least one card network should be specified in the allowedCardNetworks field in the capture context request. - When integrating Microform (Accept Check) the allowedCardNetworks field is not required in the capture context request. - When integrating both Microform (Accept Card) and Microform (Accept Check) at least one card network should be specified in the allowedCardNetworks field in the capture context request. ") + @ApiModelProperty(value = "The list of card networks you want to use for this Microform transaction. Microform currently supports the following card networks: - VISA - MASTERCARD - AMEX - CARNET - CARTESBANCAIRES - CUP - DINERSCLUB - DISCOVER - EFTPOS - ELO - JCB - JCREW - MADA - MAESTRO - MEEZA **Important:** - When integrating Microform (Card) at least one card network should be specified in the allowedCardNetworks field in the capture context request. - When integrating Microform (ACH/Echeck) the allowedCardNetworks field is not required in the capture context request. - When integrating both Microform (Card) and Microform (ACH/Echeck) at least one card network should be specified in the allowedCardNetworks field in the capture context request. ") public List getAllowedCardNetworks() { return allowedCardNetworks; } @@ -140,6 +144,24 @@ public void setAllowedPaymentTypes(List allowedPaymentTypes) { this.allowedPaymentTypes = allowedPaymentTypes; } + public GenerateCaptureContextRequest transientTokenResponseOptions(Microformv2sessionsTransientTokenResponseOptions transientTokenResponseOptions) { + this.transientTokenResponseOptions = transientTokenResponseOptions; + return this; + } + + /** + * Get transientTokenResponseOptions + * @return transientTokenResponseOptions + **/ + @ApiModelProperty(value = "") + public Microformv2sessionsTransientTokenResponseOptions getTransientTokenResponseOptions() { + return transientTokenResponseOptions; + } + + public void setTransientTokenResponseOptions(Microformv2sessionsTransientTokenResponseOptions transientTokenResponseOptions) { + this.transientTokenResponseOptions = transientTokenResponseOptions; + } + @Override public boolean equals(java.lang.Object o) { @@ -153,12 +175,13 @@ public boolean equals(java.lang.Object o) { return Objects.equals(this.clientVersion, generateCaptureContextRequest.clientVersion) && Objects.equals(this.targetOrigins, generateCaptureContextRequest.targetOrigins) && Objects.equals(this.allowedCardNetworks, generateCaptureContextRequest.allowedCardNetworks) && - Objects.equals(this.allowedPaymentTypes, generateCaptureContextRequest.allowedPaymentTypes); + Objects.equals(this.allowedPaymentTypes, generateCaptureContextRequest.allowedPaymentTypes) && + Objects.equals(this.transientTokenResponseOptions, generateCaptureContextRequest.transientTokenResponseOptions); } @Override public int hashCode() { - return Objects.hash(clientVersion, targetOrigins, allowedCardNetworks, allowedPaymentTypes); + return Objects.hash(clientVersion, targetOrigins, allowedCardNetworks, allowedPaymentTypes, transientTokenResponseOptions); } @@ -171,6 +194,7 @@ public String toString() { if (targetOrigins != null) sb.append(" targetOrigins: ").append(toIndentedString(targetOrigins)).append("\n"); if (allowedCardNetworks != null) sb.append(" allowedCardNetworks: ").append(toIndentedString(allowedCardNetworks)).append("\n"); if (allowedPaymentTypes != null) sb.append(" allowedPaymentTypes: ").append(toIndentedString(allowedPaymentTypes)).append("\n"); + if (transientTokenResponseOptions != null) sb.append(" transientTokenResponseOptions: ").append(toIndentedString(transientTokenResponseOptions)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/Model/GenerateUnifiedCheckoutCaptureContextRequest.java b/src/main/java/Model/GenerateUnifiedCheckoutCaptureContextRequest.java index bc25560c4..73965994d 100644 --- a/src/main/java/Model/GenerateUnifiedCheckoutCaptureContextRequest.java +++ b/src/main/java/Model/GenerateUnifiedCheckoutCaptureContextRequest.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Arrays; +import Model.Microformv2sessionsTransientTokenResponseOptions; import Model.Upv1capturecontextsCaptureMandate; import Model.Upv1capturecontextsOrderInformation; import com.google.gson.TypeAdapter; @@ -57,6 +58,9 @@ public class GenerateUnifiedCheckoutCaptureContextRequest { @SerializedName("orderInformation") private Upv1capturecontextsOrderInformation orderInformation = null; + @SerializedName("transientTokenResponseOptions") + private Microformv2sessionsTransientTokenResponseOptions transientTokenResponseOptions = null; + public GenerateUnifiedCheckoutCaptureContextRequest clientVersion(String clientVersion) { this.clientVersion = clientVersion; return this; @@ -66,7 +70,7 @@ public GenerateUnifiedCheckoutCaptureContextRequest clientVersion(String clientV * Specify the version of Unified Checkout that you want to use. * @return clientVersion **/ - @ApiModelProperty(example = "0.22", value = "Specify the version of Unified Checkout that you want to use.") + @ApiModelProperty(example = "0.24", value = "Specify the version of Unified Checkout that you want to use.") public String getClientVersion() { return clientVersion; } @@ -225,6 +229,24 @@ public void setOrderInformation(Upv1capturecontextsOrderInformation orderInforma this.orderInformation = orderInformation; } + public GenerateUnifiedCheckoutCaptureContextRequest transientTokenResponseOptions(Microformv2sessionsTransientTokenResponseOptions transientTokenResponseOptions) { + this.transientTokenResponseOptions = transientTokenResponseOptions; + return this; + } + + /** + * Get transientTokenResponseOptions + * @return transientTokenResponseOptions + **/ + @ApiModelProperty(value = "") + public Microformv2sessionsTransientTokenResponseOptions getTransientTokenResponseOptions() { + return transientTokenResponseOptions; + } + + public void setTransientTokenResponseOptions(Microformv2sessionsTransientTokenResponseOptions transientTokenResponseOptions) { + this.transientTokenResponseOptions = transientTokenResponseOptions; + } + @Override public boolean equals(java.lang.Object o) { @@ -242,12 +264,13 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.country, generateUnifiedCheckoutCaptureContextRequest.country) && Objects.equals(this.locale, generateUnifiedCheckoutCaptureContextRequest.locale) && Objects.equals(this.captureMandate, generateUnifiedCheckoutCaptureContextRequest.captureMandate) && - Objects.equals(this.orderInformation, generateUnifiedCheckoutCaptureContextRequest.orderInformation); + Objects.equals(this.orderInformation, generateUnifiedCheckoutCaptureContextRequest.orderInformation) && + Objects.equals(this.transientTokenResponseOptions, generateUnifiedCheckoutCaptureContextRequest.transientTokenResponseOptions); } @Override public int hashCode() { - return Objects.hash(clientVersion, targetOrigins, allowedCardNetworks, allowedPaymentTypes, country, locale, captureMandate, orderInformation); + return Objects.hash(clientVersion, targetOrigins, allowedCardNetworks, allowedPaymentTypes, country, locale, captureMandate, orderInformation, transientTokenResponseOptions); } @@ -264,6 +287,7 @@ public String toString() { if (locale != null) sb.append(" locale: ").append(toIndentedString(locale)).append("\n"); if (captureMandate != null) sb.append(" captureMandate: ").append(toIndentedString(captureMandate)).append("\n"); if (orderInformation != null) sb.append(" orderInformation: ").append(toIndentedString(orderInformation)).append("\n"); + if (transientTokenResponseOptions != null) sb.append(" transientTokenResponseOptions: ").append(toIndentedString(transientTokenResponseOptions)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/Model/Microformv2sessionsTransientTokenResponseOptions.java b/src/main/java/Model/Microformv2sessionsTransientTokenResponseOptions.java new file mode 100644 index 000000000..a9db87635 --- /dev/null +++ b/src/main/java/Model/Microformv2sessionsTransientTokenResponseOptions.java @@ -0,0 +1,94 @@ +/* + * CyberSource Merged Spec + * All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package Model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Microformv2sessionsTransientTokenResponseOptions + */ + +public class Microformv2sessionsTransientTokenResponseOptions { + @SerializedName("includeCardPrefix") + private Boolean includeCardPrefix = null; + + public Microformv2sessionsTransientTokenResponseOptions includeCardPrefix(Boolean includeCardPrefix) { + this.includeCardPrefix = includeCardPrefix; + return this; + } + + /** + * Use the transientTokenResponseOptions.includeCardPrefix field to choose your preferred card number prefix length: 6-digit, 8-digit, or no card number prefix. Possible values: - True - False<br><br> To select the type of card number prefix: - No field included: A 6-digit prefix is returned (default) - True: An 8-digit prefix is returned - False: No prefix is returned<br><br> The following conditions apply: - 8-digit card number prefixes only apply to Discover, JCB, Mastercard, UnionPay, and Visa brands with 16-digit card numbers or more. - Any card with less than 16-digit numbers will return a 6-digit prefix even when the transientTokenResponseOptions.includeCardPrefix field is set to true. - Any card brand other than Discover, JCB, Mastercard, UnionPay, or Visa will return a 6-digit prefix even when the transientTokenResponseOptions.includeCardPrefix field is set to true. - If any card brand is co-branded with Discover, JCB, Mastercard, UnionPay, or Visa, an 8-digit prefix will be returned if the transientTokenResponseOptions.includeCardPrefix field is set to true.<br><br> **Important:** If your application does NOT require a card number prefix for routing or identification purposes, set the transientTokenResponseOptions.includeCardPrefix field to False. This will minimize your personal data exposure. + * @return includeCardPrefix + **/ + @ApiModelProperty(value = "Use the transientTokenResponseOptions.includeCardPrefix field to choose your preferred card number prefix length: 6-digit, 8-digit, or no card number prefix. Possible values: - True - False

To select the type of card number prefix: - No field included: A 6-digit prefix is returned (default) - True: An 8-digit prefix is returned - False: No prefix is returned

The following conditions apply: - 8-digit card number prefixes only apply to Discover, JCB, Mastercard, UnionPay, and Visa brands with 16-digit card numbers or more. - Any card with less than 16-digit numbers will return a 6-digit prefix even when the transientTokenResponseOptions.includeCardPrefix field is set to true. - Any card brand other than Discover, JCB, Mastercard, UnionPay, or Visa will return a 6-digit prefix even when the transientTokenResponseOptions.includeCardPrefix field is set to true. - If any card brand is co-branded with Discover, JCB, Mastercard, UnionPay, or Visa, an 8-digit prefix will be returned if the transientTokenResponseOptions.includeCardPrefix field is set to true.

**Important:** If your application does NOT require a card number prefix for routing or identification purposes, set the transientTokenResponseOptions.includeCardPrefix field to False. This will minimize your personal data exposure. ") + public Boolean IncludeCardPrefix() { + return includeCardPrefix; + } + + public void setIncludeCardPrefix(Boolean includeCardPrefix) { + this.includeCardPrefix = includeCardPrefix; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Microformv2sessionsTransientTokenResponseOptions microformv2sessionsTransientTokenResponseOptions = (Microformv2sessionsTransientTokenResponseOptions) o; + return Objects.equals(this.includeCardPrefix, microformv2sessionsTransientTokenResponseOptions.includeCardPrefix); + } + + @Override + public int hashCode() { + return Objects.hash(includeCardPrefix); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Microformv2sessionsTransientTokenResponseOptions {\n"); + + if (includeCardPrefix != null) sb.append(" includeCardPrefix: ").append(toIndentedString(includeCardPrefix)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + // return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/Model/NetworkTokenEnrollment.java b/src/main/java/Model/NetworkTokenEnrollment.java new file mode 100644 index 000000000..17aaa8745 --- /dev/null +++ b/src/main/java/Model/NetworkTokenEnrollment.java @@ -0,0 +1,119 @@ +/* + * CyberSource Merged Spec + * All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package Model; + +import java.util.Objects; +import java.util.Arrays; +import Model.NetworkTokenServicesEnablement; +import Model.TmsBusinessInformation; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * NetworkTokenEnrollment + */ + +public class NetworkTokenEnrollment { + @SerializedName("businessInformation") + private TmsBusinessInformation businessInformation = null; + + @SerializedName("networkTokenServices") + private NetworkTokenServicesEnablement networkTokenServices = null; + + public NetworkTokenEnrollment businessInformation(TmsBusinessInformation businessInformation) { + this.businessInformation = businessInformation; + return this; + } + + /** + * Get businessInformation + * @return businessInformation + **/ + @ApiModelProperty(value = "") + public TmsBusinessInformation getBusinessInformation() { + return businessInformation; + } + + public void setBusinessInformation(TmsBusinessInformation businessInformation) { + this.businessInformation = businessInformation; + } + + public NetworkTokenEnrollment networkTokenServices(NetworkTokenServicesEnablement networkTokenServices) { + this.networkTokenServices = networkTokenServices; + return this; + } + + /** + * Get networkTokenServices + * @return networkTokenServices + **/ + @ApiModelProperty(value = "") + public NetworkTokenServicesEnablement getNetworkTokenServices() { + return networkTokenServices; + } + + public void setNetworkTokenServices(NetworkTokenServicesEnablement networkTokenServices) { + this.networkTokenServices = networkTokenServices; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NetworkTokenEnrollment networkTokenEnrollment = (NetworkTokenEnrollment) o; + return Objects.equals(this.businessInformation, networkTokenEnrollment.businessInformation) && + Objects.equals(this.networkTokenServices, networkTokenEnrollment.networkTokenServices); + } + + @Override + public int hashCode() { + return Objects.hash(businessInformation, networkTokenServices); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NetworkTokenEnrollment {\n"); + + if (businessInformation != null) sb.append(" businessInformation: ").append(toIndentedString(businessInformation)).append("\n"); + if (networkTokenServices != null) sb.append(" networkTokenServices: ").append(toIndentedString(networkTokenServices)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + // return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/Model/NetworkTokenServicesEnablement.java b/src/main/java/Model/NetworkTokenServicesEnablement.java new file mode 100644 index 000000000..7d40b63af --- /dev/null +++ b/src/main/java/Model/NetworkTokenServicesEnablement.java @@ -0,0 +1,119 @@ +/* + * CyberSource Merged Spec + * All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package Model; + +import java.util.Objects; +import java.util.Arrays; +import Model.NetworkTokenServicesEnablementMastercardDigitalEnablementService; +import Model.NetworkTokenServicesEnablementVisaTokenService; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * NetworkTokenServicesEnablement + */ + +public class NetworkTokenServicesEnablement { + @SerializedName("visaTokenService") + private NetworkTokenServicesEnablementVisaTokenService visaTokenService = null; + + @SerializedName("mastercardDigitalEnablementService") + private NetworkTokenServicesEnablementMastercardDigitalEnablementService mastercardDigitalEnablementService = null; + + public NetworkTokenServicesEnablement visaTokenService(NetworkTokenServicesEnablementVisaTokenService visaTokenService) { + this.visaTokenService = visaTokenService; + return this; + } + + /** + * Get visaTokenService + * @return visaTokenService + **/ + @ApiModelProperty(value = "") + public NetworkTokenServicesEnablementVisaTokenService getVisaTokenService() { + return visaTokenService; + } + + public void setVisaTokenService(NetworkTokenServicesEnablementVisaTokenService visaTokenService) { + this.visaTokenService = visaTokenService; + } + + public NetworkTokenServicesEnablement mastercardDigitalEnablementService(NetworkTokenServicesEnablementMastercardDigitalEnablementService mastercardDigitalEnablementService) { + this.mastercardDigitalEnablementService = mastercardDigitalEnablementService; + return this; + } + + /** + * Get mastercardDigitalEnablementService + * @return mastercardDigitalEnablementService + **/ + @ApiModelProperty(value = "") + public NetworkTokenServicesEnablementMastercardDigitalEnablementService getMastercardDigitalEnablementService() { + return mastercardDigitalEnablementService; + } + + public void setMastercardDigitalEnablementService(NetworkTokenServicesEnablementMastercardDigitalEnablementService mastercardDigitalEnablementService) { + this.mastercardDigitalEnablementService = mastercardDigitalEnablementService; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NetworkTokenServicesEnablement networkTokenServicesEnablement = (NetworkTokenServicesEnablement) o; + return Objects.equals(this.visaTokenService, networkTokenServicesEnablement.visaTokenService) && + Objects.equals(this.mastercardDigitalEnablementService, networkTokenServicesEnablement.mastercardDigitalEnablementService); + } + + @Override + public int hashCode() { + return Objects.hash(visaTokenService, mastercardDigitalEnablementService); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NetworkTokenServicesEnablement {\n"); + + if (visaTokenService != null) sb.append(" visaTokenService: ").append(toIndentedString(visaTokenService)).append("\n"); + if (mastercardDigitalEnablementService != null) sb.append(" mastercardDigitalEnablementService: ").append(toIndentedString(mastercardDigitalEnablementService)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + // return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/Model/NetworkTokenServicesEnablementMastercardDigitalEnablementService.java b/src/main/java/Model/NetworkTokenServicesEnablementMastercardDigitalEnablementService.java new file mode 100644 index 000000000..8d233fd59 --- /dev/null +++ b/src/main/java/Model/NetworkTokenServicesEnablementMastercardDigitalEnablementService.java @@ -0,0 +1,94 @@ +/* + * CyberSource Merged Spec + * All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package Model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * NetworkTokenServicesEnablementMastercardDigitalEnablementService + */ + +public class NetworkTokenServicesEnablementMastercardDigitalEnablementService { + @SerializedName("enrollment") + private Boolean enrollment = null; + + public NetworkTokenServicesEnablementMastercardDigitalEnablementService enrollment(Boolean enrollment) { + this.enrollment = enrollment; + return this; + } + + /** + * Indicates if an enrollment to create a TRID for the MasterCard card association should be attempted + * @return enrollment + **/ + @ApiModelProperty(value = "Indicates if an enrollment to create a TRID for the MasterCard card association should be attempted") + public Boolean Enrollment() { + return enrollment; + } + + public void setEnrollment(Boolean enrollment) { + this.enrollment = enrollment; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NetworkTokenServicesEnablementMastercardDigitalEnablementService networkTokenServicesEnablementMastercardDigitalEnablementService = (NetworkTokenServicesEnablementMastercardDigitalEnablementService) o; + return Objects.equals(this.enrollment, networkTokenServicesEnablementMastercardDigitalEnablementService.enrollment); + } + + @Override + public int hashCode() { + return Objects.hash(enrollment); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NetworkTokenServicesEnablementMastercardDigitalEnablementService {\n"); + + if (enrollment != null) sb.append(" enrollment: ").append(toIndentedString(enrollment)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + // return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/Model/NetworkTokenServicesEnablementVisaTokenService.java b/src/main/java/Model/NetworkTokenServicesEnablementVisaTokenService.java new file mode 100644 index 000000000..8bac9b9e9 --- /dev/null +++ b/src/main/java/Model/NetworkTokenServicesEnablementVisaTokenService.java @@ -0,0 +1,94 @@ +/* + * CyberSource Merged Spec + * All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package Model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * NetworkTokenServicesEnablementVisaTokenService + */ + +public class NetworkTokenServicesEnablementVisaTokenService { + @SerializedName("enrollment") + private Boolean enrollment = null; + + public NetworkTokenServicesEnablementVisaTokenService enrollment(Boolean enrollment) { + this.enrollment = enrollment; + return this; + } + + /** + * Indicates if an enrollment to create a TRID for the Visa card association should be attempted + * @return enrollment + **/ + @ApiModelProperty(value = "Indicates if an enrollment to create a TRID for the Visa card association should be attempted") + public Boolean Enrollment() { + return enrollment; + } + + public void setEnrollment(Boolean enrollment) { + this.enrollment = enrollment; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NetworkTokenServicesEnablementVisaTokenService networkTokenServicesEnablementVisaTokenService = (NetworkTokenServicesEnablementVisaTokenService) o; + return Objects.equals(this.enrollment, networkTokenServicesEnablementVisaTokenService.enrollment); + } + + @Override + public int hashCode() { + return Objects.hash(enrollment); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NetworkTokenServicesEnablementVisaTokenService {\n"); + + if (enrollment != null) sb.append(" enrollment: ").append(toIndentedString(enrollment)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + // return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/Model/TmsBusinessInformation.java b/src/main/java/Model/TmsBusinessInformation.java new file mode 100644 index 000000000..8acfe1a2e --- /dev/null +++ b/src/main/java/Model/TmsBusinessInformation.java @@ -0,0 +1,234 @@ +/* + * CyberSource Merged Spec + * All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package Model; + +import java.util.Objects; +import java.util.Arrays; +import Model.TmsBusinessInformationAcquirer; +import Model.TmsBusinessInformationAddress; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * TmsBusinessInformation + */ + +public class TmsBusinessInformation { + @SerializedName("name") + private String name = null; + + @SerializedName("doingBusinessAs") + private String doingBusinessAs = null; + + @SerializedName("address") + private TmsBusinessInformationAddress address = null; + + @SerializedName("websiteUrl") + private String websiteUrl = null; + + @SerializedName("businessIdentificationType") + private String businessIdentificationType = null; + + @SerializedName("businessIdentificationValue") + private String businessIdentificationValue = null; + + @SerializedName("acquirer") + private TmsBusinessInformationAcquirer acquirer = null; + + public TmsBusinessInformation name(String name) { + this.name = name; + return this; + } + + /** + * Name of the network token merchant. + * @return name + **/ + @ApiModelProperty(example = "NetworkTokenMerchant", value = "Name of the network token merchant.") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public TmsBusinessInformation doingBusinessAs(String doingBusinessAs) { + this.doingBusinessAs = doingBusinessAs; + return this; + } + + /** + * Name the network token merchant does business as + * @return doingBusinessAs + **/ + @ApiModelProperty(example = "NetworkTokenCo1", value = "Name the network token merchant does business as") + public String getDoingBusinessAs() { + return doingBusinessAs; + } + + public void setDoingBusinessAs(String doingBusinessAs) { + this.doingBusinessAs = doingBusinessAs; + } + + public TmsBusinessInformation address(TmsBusinessInformationAddress address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @ApiModelProperty(value = "") + public TmsBusinessInformationAddress getAddress() { + return address; + } + + public void setAddress(TmsBusinessInformationAddress address) { + this.address = address; + } + + public TmsBusinessInformation websiteUrl(String websiteUrl) { + this.websiteUrl = websiteUrl; + return this; + } + + /** + * Website of network token merchant. + * @return websiteUrl + **/ + @ApiModelProperty(example = "https://www.NetworkTokenMerchant.com", value = "Website of network token merchant.") + public String getWebsiteUrl() { + return websiteUrl; + } + + public void setWebsiteUrl(String websiteUrl) { + this.websiteUrl = websiteUrl; + } + + public TmsBusinessInformation businessIdentificationType(String businessIdentificationType) { + this.businessIdentificationType = businessIdentificationType; + return this; + } + + /** + * The Identifier associated with the business type; required unless both acquirerId and acquirerMerchantId are provided. + * @return businessIdentificationType + **/ + @ApiModelProperty(value = "The Identifier associated with the business type; required unless both acquirerId and acquirerMerchantId are provided. ") + public String getBusinessIdentificationType() { + return businessIdentificationType; + } + + public void setBusinessIdentificationType(String businessIdentificationType) { + this.businessIdentificationType = businessIdentificationType; + } + + public TmsBusinessInformation businessIdentificationValue(String businessIdentificationValue) { + this.businessIdentificationValue = businessIdentificationValue; + return this; + } + + /** + * The value associated with the business identifier type; required unless both acquirerId and acquirerMerchantId are provided. + * @return businessIdentificationValue + **/ + @ApiModelProperty(value = "The value associated with the business identifier type; required unless both acquirerId and acquirerMerchantId are provided. ") + public String getBusinessIdentificationValue() { + return businessIdentificationValue; + } + + public void setBusinessIdentificationValue(String businessIdentificationValue) { + this.businessIdentificationValue = businessIdentificationValue; + } + + public TmsBusinessInformation acquirer(TmsBusinessInformationAcquirer acquirer) { + this.acquirer = acquirer; + return this; + } + + /** + * Get acquirer + * @return acquirer + **/ + @ApiModelProperty(value = "") + public TmsBusinessInformationAcquirer getAcquirer() { + return acquirer; + } + + public void setAcquirer(TmsBusinessInformationAcquirer acquirer) { + this.acquirer = acquirer; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TmsBusinessInformation tmsBusinessInformation = (TmsBusinessInformation) o; + return Objects.equals(this.name, tmsBusinessInformation.name) && + Objects.equals(this.doingBusinessAs, tmsBusinessInformation.doingBusinessAs) && + Objects.equals(this.address, tmsBusinessInformation.address) && + Objects.equals(this.websiteUrl, tmsBusinessInformation.websiteUrl) && + Objects.equals(this.businessIdentificationType, tmsBusinessInformation.businessIdentificationType) && + Objects.equals(this.businessIdentificationValue, tmsBusinessInformation.businessIdentificationValue) && + Objects.equals(this.acquirer, tmsBusinessInformation.acquirer); + } + + @Override + public int hashCode() { + return Objects.hash(name, doingBusinessAs, address, websiteUrl, businessIdentificationType, businessIdentificationValue, acquirer); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TmsBusinessInformation {\n"); + + if (name != null) sb.append(" name: ").append(toIndentedString(name)).append("\n"); + if (doingBusinessAs != null) sb.append(" doingBusinessAs: ").append(toIndentedString(doingBusinessAs)).append("\n"); + if (address != null) sb.append(" address: ").append(toIndentedString(address)).append("\n"); + if (websiteUrl != null) sb.append(" websiteUrl: ").append(toIndentedString(websiteUrl)).append("\n"); + if (businessIdentificationType != null) sb.append(" businessIdentificationType: ").append(toIndentedString(businessIdentificationType)).append("\n"); + if (businessIdentificationValue != null) sb.append(" businessIdentificationValue: ").append(toIndentedString(businessIdentificationValue)).append("\n"); + if (acquirer != null) sb.append(" acquirer: ").append(toIndentedString(acquirer)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + // return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/Model/TmsBusinessInformationAcquirer.java b/src/main/java/Model/TmsBusinessInformationAcquirer.java new file mode 100644 index 000000000..037dea596 --- /dev/null +++ b/src/main/java/Model/TmsBusinessInformationAcquirer.java @@ -0,0 +1,117 @@ +/* + * CyberSource Merged Spec + * All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package Model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * TmsBusinessInformationAcquirer + */ + +public class TmsBusinessInformationAcquirer { + @SerializedName("acquirerId") + private String acquirerId = null; + + @SerializedName("acquirerMerchantId") + private String acquirerMerchantId = null; + + public TmsBusinessInformationAcquirer acquirerId(String acquirerId) { + this.acquirerId = acquirerId; + return this; + } + + /** + * Acquirer ID; required unless both businessIdentificationType and businessIdentificationValue are provided. + * @return acquirerId + **/ + @ApiModelProperty(value = "Acquirer ID; required unless both businessIdentificationType and businessIdentificationValue are provided. ") + public String getAcquirerId() { + return acquirerId; + } + + public void setAcquirerId(String acquirerId) { + this.acquirerId = acquirerId; + } + + public TmsBusinessInformationAcquirer acquirerMerchantId(String acquirerMerchantId) { + this.acquirerMerchantId = acquirerMerchantId; + return this; + } + + /** + * Acquirer merchant ID; required unless both businessIdentificationType and businessIdentificationValue are provided. + * @return acquirerMerchantId + **/ + @ApiModelProperty(value = "Acquirer merchant ID; required unless both businessIdentificationType and businessIdentificationValue are provided. ") + public String getAcquirerMerchantId() { + return acquirerMerchantId; + } + + public void setAcquirerMerchantId(String acquirerMerchantId) { + this.acquirerMerchantId = acquirerMerchantId; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TmsBusinessInformationAcquirer tmsBusinessInformationAcquirer = (TmsBusinessInformationAcquirer) o; + return Objects.equals(this.acquirerId, tmsBusinessInformationAcquirer.acquirerId) && + Objects.equals(this.acquirerMerchantId, tmsBusinessInformationAcquirer.acquirerMerchantId); + } + + @Override + public int hashCode() { + return Objects.hash(acquirerId, acquirerMerchantId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TmsBusinessInformationAcquirer {\n"); + + if (acquirerId != null) sb.append(" acquirerId: ").append(toIndentedString(acquirerId)).append("\n"); + if (acquirerMerchantId != null) sb.append(" acquirerMerchantId: ").append(toIndentedString(acquirerMerchantId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + // return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/Model/TmsBusinessInformationAddress.java b/src/main/java/Model/TmsBusinessInformationAddress.java new file mode 100644 index 000000000..a0f9ea20f --- /dev/null +++ b/src/main/java/Model/TmsBusinessInformationAddress.java @@ -0,0 +1,117 @@ +/* + * CyberSource Merged Spec + * All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html + * + * OpenAPI spec version: 0.0.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package Model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * TmsBusinessInformationAddress + */ + +public class TmsBusinessInformationAddress { + @SerializedName("country") + private String country = null; + + @SerializedName("locality") + private String locality = null; + + public TmsBusinessInformationAddress country(String country) { + this.country = country; + return this; + } + + /** + * Country of network token merchant. + * @return country + **/ + @ApiModelProperty(example = "US", value = "Country of network token merchant.") + public String getCountry() { + return country; + } + + public void setCountry(String country) { + this.country = country; + } + + public TmsBusinessInformationAddress locality(String locality) { + this.locality = locality; + return this; + } + + /** + * City of network token merchant. + * @return locality + **/ + @ApiModelProperty(example = "ORMOND BEACH", value = "City of network token merchant.") + public String getLocality() { + return locality; + } + + public void setLocality(String locality) { + this.locality = locality; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TmsBusinessInformationAddress tmsBusinessInformationAddress = (TmsBusinessInformationAddress) o; + return Objects.equals(this.country, tmsBusinessInformationAddress.country) && + Objects.equals(this.locality, tmsBusinessInformationAddress.locality); + } + + @Override + public int hashCode() { + return Objects.hash(country, locality); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TmsBusinessInformationAddress {\n"); + + if (country != null) sb.append(" country: ").append(toIndentedString(country)).append("\n"); + if (locality != null) sb.append(" locality: ").append(toIndentedString(locality)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + // return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/Model/Upv1capturecontextsCaptureMandate.java b/src/main/java/Model/Upv1capturecontextsCaptureMandate.java index f8b917289..b5eeb9657 100644 --- a/src/main/java/Model/Upv1capturecontextsCaptureMandate.java +++ b/src/main/java/Model/Upv1capturecontextsCaptureMandate.java @@ -49,6 +49,12 @@ public class Upv1capturecontextsCaptureMandate { @SerializedName("showAcceptedNetworkIcons") private Boolean showAcceptedNetworkIcons = null; + @SerializedName("requestSaveCard") + private Boolean requestSaveCard = null; + + @SerializedName("comboCard") + private Boolean comboCard = null; + public Upv1capturecontextsCaptureMandate billingType(String billingType) { this.billingType = billingType; return this; @@ -165,6 +171,42 @@ public void setShowAcceptedNetworkIcons(Boolean showAcceptedNetworkIcons) { this.showAcceptedNetworkIcons = showAcceptedNetworkIcons; } + public Upv1capturecontextsCaptureMandate requestSaveCard(Boolean requestSaveCard) { + this.requestSaveCard = requestSaveCard; + return this; + } + + /** + * Configure Unified Checkout to display the \"Save card for future use\" checkbox.<br> Configurable check box that will show in a Manual card entry flow to allow a Cardholder to give consent to store their manually entered credential with the Merchant that they are paying.<br> Applicable when manually entering the details and not enrolling in Click to Pay. Possible values: - True - False<br><br> **Use Cases:** **Offer consumers option to save their card in Unified Checkout:** - Include the captureMandate.requestSaveCard field in the capture context request and set it to true. - When set to true, this will show a checkbox with the message 'Save card for future use' in Unified Checkout. - When selected this provides a response in both the Transient Token and Get Credentials API response.<br><br> **Do not offer consumers the option to save their card in Unified Checkout:** - Include the captureMandate.requestSaveCard field in the capture context request and set it to false OR omit the field from the capture context request. - When set to false, the save card option is not shown to consumers when manually entering card details. + * @return requestSaveCard + **/ + @ApiModelProperty(value = "Configure Unified Checkout to display the \"Save card for future use\" checkbox.
Configurable check box that will show in a Manual card entry flow to allow a Cardholder to give consent to store their manually entered credential with the Merchant that they are paying.
Applicable when manually entering the details and not enrolling in Click to Pay. Possible values: - True - False

**Use Cases:** **Offer consumers option to save their card in Unified Checkout:** - Include the captureMandate.requestSaveCard field in the capture context request and set it to true. - When set to true, this will show a checkbox with the message 'Save card for future use' in Unified Checkout. - When selected this provides a response in both the Transient Token and Get Credentials API response.

**Do not offer consumers the option to save their card in Unified Checkout:** - Include the captureMandate.requestSaveCard field in the capture context request and set it to false OR omit the field from the capture context request. - When set to false, the save card option is not shown to consumers when manually entering card details. ") + public Boolean RequestSaveCard() { + return requestSaveCard; + } + + public void setRequestSaveCard(Boolean requestSaveCard) { + this.requestSaveCard = requestSaveCard; + } + + public Upv1capturecontextsCaptureMandate comboCard(Boolean comboCard) { + this.comboCard = comboCard; + return this; + } + + /** + * Configure Unified Checkout to display combo card at checkout.<br> A combo debit/credit card is a single card that functions both as a Debit/Credit card. Unified Checkout / Click to Pay Drop-in UI allows the Cardholder to choose whether they would like the transaction to be paid for using either debit or credit card. **Important:** This is applicable to Visa cards only. Possible values: - True - False<br><br> **Use Cases:** **Offer Combo Card at Checkout:** - Include the captureMandate.comboCard field in the capture context request and set it to true. - When set to true, Combo Card selection is shown at checkout <br><br> **Do not offer Combo Card at Checkout:** - Include the captureMandate.comboCard field in the capture context request and set it to false OR omit the field from the capture context request. - The Combo Card selection is not shown at checkout. + * @return comboCard + **/ + @ApiModelProperty(value = "Configure Unified Checkout to display combo card at checkout.
A combo debit/credit card is a single card that functions both as a Debit/Credit card. Unified Checkout / Click to Pay Drop-in UI allows the Cardholder to choose whether they would like the transaction to be paid for using either debit or credit card. **Important:** This is applicable to Visa cards only. Possible values: - True - False

**Use Cases:** **Offer Combo Card at Checkout:** - Include the captureMandate.comboCard field in the capture context request and set it to true. - When set to true, Combo Card selection is shown at checkout

**Do not offer Combo Card at Checkout:** - Include the captureMandate.comboCard field in the capture context request and set it to false OR omit the field from the capture context request. - The Combo Card selection is not shown at checkout. ") + public Boolean ComboCard() { + return comboCard; + } + + public void setComboCard(Boolean comboCard) { + this.comboCard = comboCard; + } + @Override public boolean equals(java.lang.Object o) { @@ -180,12 +222,14 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.requestPhone, upv1capturecontextsCaptureMandate.requestPhone) && Objects.equals(this.requestShipping, upv1capturecontextsCaptureMandate.requestShipping) && Objects.equals(this.shipToCountries, upv1capturecontextsCaptureMandate.shipToCountries) && - Objects.equals(this.showAcceptedNetworkIcons, upv1capturecontextsCaptureMandate.showAcceptedNetworkIcons); + Objects.equals(this.showAcceptedNetworkIcons, upv1capturecontextsCaptureMandate.showAcceptedNetworkIcons) && + Objects.equals(this.requestSaveCard, upv1capturecontextsCaptureMandate.requestSaveCard) && + Objects.equals(this.comboCard, upv1capturecontextsCaptureMandate.comboCard); } @Override public int hashCode() { - return Objects.hash(billingType, requestEmail, requestPhone, requestShipping, shipToCountries, showAcceptedNetworkIcons); + return Objects.hash(billingType, requestEmail, requestPhone, requestShipping, shipToCountries, showAcceptedNetworkIcons, requestSaveCard, comboCard); } @@ -200,6 +244,8 @@ public String toString() { if (requestShipping != null) sb.append(" requestShipping: ").append(toIndentedString(requestShipping)).append("\n"); if (shipToCountries != null) sb.append(" shipToCountries: ").append(toIndentedString(shipToCountries)).append("\n"); if (showAcceptedNetworkIcons != null) sb.append(" showAcceptedNetworkIcons: ").append(toIndentedString(showAcceptedNetworkIcons)).append("\n"); + if (requestSaveCard != null) sb.append(" requestSaveCard: ").append(toIndentedString(requestSaveCard)).append("\n"); + if (comboCard != null) sb.append(" comboCard: ").append(toIndentedString(comboCard)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/utilities/JWEResponse/JWEUtility.java b/src/main/java/utilities/JWEResponse/JWEUtility.java index 12778faa6..1304668b4 100644 --- a/src/main/java/utilities/JWEResponse/JWEUtility.java +++ b/src/main/java/utilities/JWEResponse/JWEUtility.java @@ -1,17 +1,25 @@ package utilities.JWEResponse; import com.cybersource.authsdk.core.MerchantConfig; +import com.nimbusds.jose.JOSEException; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import utilities.JWEResponse.JWEException.JWEException; import java.io.IOException; import java.security.NoSuchAlgorithmException; +import java.security.PrivateKey; import java.text.ParseException; public class JWEUtility { private static final Logger logger = LogManager.getLogger(JWEUtility.class); + /** + * This method has been marked as Deprecated and will be removed in coming releases. + * + * @deprecated use {@link #decryptJWEResponse(PrivateKey, String)} instead. + */ + @Deprecated public static String decryptJWEResponse(String encodedResponse, MerchantConfig merchantConfig) throws JWEException { try { return com.cybersource.authsdk.util.JWEUtility.decryptJWEUsingPEM(merchantConfig, encodedResponse); @@ -30,4 +38,19 @@ public static String decryptJWEResponse(String encodedResponse, MerchantConfig m throw new JWEException("Exception occurred while decrypting the response", exception); } } + + public static String decryptJWEResponse(PrivateKey privateKey, String encodedResponse) throws JWEException { + try { + return com.cybersource.authsdk.util.JWEUtility.decryptJWEUsingPrivateKey(privateKey, encodedResponse); + } catch (ParseException exception) { + logger.error("ParseException: Unparsable decrypted response", exception); + throw new JWEException("Unparsable decrypted response", exception); + } catch (JOSEException exception) { + logger.error("JOSEException: Could not able to decrypt the JWE response", exception); + throw new JWEException("Could not able to decrypt the JWE response", exception); + } catch (Exception exception) { + logger.error("JWE internal SDK exception", exception); + throw new JWEException("Exception occurred while decrypting the response", exception); + } + } }