Skip to content

Commit 4053982

Browse files
committed
Updated Java project to use MDES Digital Enablement 1.2.9 and OpenAPI Generator 4.1.0 (Part 2)
1 parent 5e027d1 commit 4053982

38 files changed

Lines changed: 698 additions & 472 deletions

.gitignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,13 @@
1616
**/obj
1717
**/bin
1818
**/*.nuget.cache
19-
**/*.nuget.props
19+
**/*.nuget.props
20+
21+
#
22+
# Java
23+
#
24+
**/.travis.yml
25+
**/.idea
26+
**/target
27+
**/.gradle
28+
**/build

java/src/main/java/org/openapitools/client/ApiException.java renamed to java/src/main/java/com/mastercard/developer/mdes_digital_enablement_client/ApiException.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*
22
* MDES for Merchants
3-
* The MDES APIs are designed as RPC style stateless web services where each API endpoint represents an operation to be performed. All request and response payloads are sent in the JSON (JavaScript Object Notation) data-interchange format. Each endpoint in the API specifies the HTTP Method used to access it. All strings in request and response objects are to be UTF-8 encoded. Each API URI includes the major and minor version of API that it conforms to. This will allow multiple concurrent versions of the API to be deployed simultaneously.
3+
* The MDES APIs are designed as RPC style stateless web services where each API endpoint represents an operation to be performed. All request and response payloads are sent in the JSON (JavaScript Object Notation) data-interchange format. Each endpoint in the API specifies the HTTP Method used to access it. All strings in request and response objects are to be UTF-8 encoded. Each API URI includes the major and minor version of API that it conforms to. This will allow multiple concurrent versions of the API to be deployed simultaneously. <br> __Authentication__ Mastercard uses OAuth 1.0a with body hash extension for authenticating the API clients. This requires every request that you send to Mastercard to be signed with an RSA private key. A private-public RSA key pair must be generated consisting of: <br> 1 . A private key for the OAuth signature for API requests. It is recommended to keep the private key in a password-protected or hardware keystore. <br> 2. A public key is shared with Mastercard during the project setup process through either a certificate signing request (CSR) or the API Key Generator. Mastercard will use the public key to verify the OAuth signature that is provided on every API call.<br> An OAUTH1.0a signer library is available on [GitHub](https://github.com/Mastercard/oauth1-signer-java) <br> __Encryption__<br> All communications between Issuer web service and the Mastercard gateway is encrypted using TLS. <br> __Additional Encryption of Sensitive Data__ In addition to the OAuth authentication, when using MDES Digital Enablement Service, any PCI sensitive and all account holder Personally Identifiable Information (PII) data must be encrypted. This requirement applies to the API fields containing encryptedData. Sensitive data is encrypted using a symmetric session (one-time-use) key. The symmetric session key is then wrapped with an RSA Public Key supplied by Mastercard during API setup phase (the Customer Encryption Key). <br> Java Client Encryption Library available on [GitHub](https://github.com/Mastercard/client-encryption-java)
44
*
5-
* The version of the OpenAPI document: 1.2.7
5+
* The version of the OpenAPI document: 1.2.9
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -11,12 +11,12 @@
1111
*/
1212

1313

14-
package org.openapitools.client;
14+
package com.mastercard.developer.mdes_digital_enablement_client;
1515

1616
import java.util.Map;
1717
import java.util.List;
1818

19-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-07-25T13:48:59.971+02:00[Europe/Rome]")
19+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-08-16T09:54:27.990+01:00[Europe/London]")
2020
public class ApiException extends Exception {
2121
private int code = 0;
2222
private Map<String, List<String>> responseHeaders = null;
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* MDES for Merchants
3+
* The MDES APIs are designed as RPC style stateless web services where each API endpoint represents an operation to be performed. All request and response payloads are sent in the JSON (JavaScript Object Notation) data-interchange format. Each endpoint in the API specifies the HTTP Method used to access it. All strings in request and response objects are to be UTF-8 encoded. Each API URI includes the major and minor version of API that it conforms to. This will allow multiple concurrent versions of the API to be deployed simultaneously. <br> __Authentication__ Mastercard uses OAuth 1.0a with body hash extension for authenticating the API clients. This requires every request that you send to Mastercard to be signed with an RSA private key. A private-public RSA key pair must be generated consisting of: <br> 1 . A private key for the OAuth signature for API requests. It is recommended to keep the private key in a password-protected or hardware keystore. <br> 2. A public key is shared with Mastercard during the project setup process through either a certificate signing request (CSR) or the API Key Generator. Mastercard will use the public key to verify the OAuth signature that is provided on every API call.<br> An OAUTH1.0a signer library is available on [GitHub](https://github.com/Mastercard/oauth1-signer-java) <br> __Encryption__<br> All communications between Issuer web service and the Mastercard gateway is encrypted using TLS. <br> __Additional Encryption of Sensitive Data__ In addition to the OAuth authentication, when using MDES Digital Enablement Service, any PCI sensitive and all account holder Personally Identifiable Information (PII) data must be encrypted. This requirement applies to the API fields containing encryptedData. Sensitive data is encrypted using a symmetric session (one-time-use) key. The symmetric session key is then wrapped with an RSA Public Key supplied by Mastercard during API setup phase (the Customer Encryption Key). <br> Java Client Encryption Library available on [GitHub](https://github.com/Mastercard/client-encryption-java)
4+
*
5+
* The version of the OpenAPI document: 1.2.9
6+
*
7+
*
8+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9+
* https://openapi-generator.tech
10+
* Do not edit the class manually.
11+
*/
12+
13+
14+
package com.mastercard.developer.mdes_digital_enablement_client;
15+
16+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-08-16T09:54:27.990+01:00[Europe/London]")
17+
public class Configuration {
18+
private static ApiClient defaultApiClient = new ApiClient();
19+
20+
/**
21+
* Get the default API client, which would be used when creating API
22+
* instances without providing an API client.
23+
*
24+
* @return Default API client
25+
*/
26+
public static ApiClient getDefaultApiClient() {
27+
return defaultApiClient;
28+
}
29+
30+
/**
31+
* Set the default API client, which would be used when creating API
32+
* instances without providing an API client.
33+
*
34+
* @param apiClient API client
35+
*/
36+
public static void setDefaultApiClient(ApiClient apiClient) {
37+
defaultApiClient = apiClient;
38+
}
39+
}

java/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java renamed to java/src/main/java/com/mastercard/developer/mdes_digital_enablement_client/auth/ApiKeyAuth.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*
22
* MDES for Merchants
3-
* The MDES APIs are designed as RPC style stateless web services where each API endpoint represents an operation to be performed. All request and response payloads are sent in the JSON (JavaScript Object Notation) data-interchange format. Each endpoint in the API specifies the HTTP Method used to access it. All strings in request and response objects are to be UTF-8 encoded. Each API URI includes the major and minor version of API that it conforms to. This will allow multiple concurrent versions of the API to be deployed simultaneously.
3+
* The MDES APIs are designed as RPC style stateless web services where each API endpoint represents an operation to be performed. All request and response payloads are sent in the JSON (JavaScript Object Notation) data-interchange format. Each endpoint in the API specifies the HTTP Method used to access it. All strings in request and response objects are to be UTF-8 encoded. Each API URI includes the major and minor version of API that it conforms to. This will allow multiple concurrent versions of the API to be deployed simultaneously. <br> __Authentication__ Mastercard uses OAuth 1.0a with body hash extension for authenticating the API clients. This requires every request that you send to Mastercard to be signed with an RSA private key. A private-public RSA key pair must be generated consisting of: <br> 1 . A private key for the OAuth signature for API requests. It is recommended to keep the private key in a password-protected or hardware keystore. <br> 2. A public key is shared with Mastercard during the project setup process through either a certificate signing request (CSR) or the API Key Generator. Mastercard will use the public key to verify the OAuth signature that is provided on every API call.<br> An OAUTH1.0a signer library is available on [GitHub](https://github.com/Mastercard/oauth1-signer-java) <br> __Encryption__<br> All communications between Issuer web service and the Mastercard gateway is encrypted using TLS. <br> __Additional Encryption of Sensitive Data__ In addition to the OAuth authentication, when using MDES Digital Enablement Service, any PCI sensitive and all account holder Personally Identifiable Information (PII) data must be encrypted. This requirement applies to the API fields containing encryptedData. Sensitive data is encrypted using a symmetric session (one-time-use) key. The symmetric session key is then wrapped with an RSA Public Key supplied by Mastercard during API setup phase (the Customer Encryption Key). <br> Java Client Encryption Library available on [GitHub](https://github.com/Mastercard/client-encryption-java)
44
*
5-
* The version of the OpenAPI document: 1.2.7
5+
* The version of the OpenAPI document: 1.2.9
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -11,14 +11,14 @@
1111
*/
1212

1313

14-
package org.openapitools.client.auth;
14+
package com.mastercard.developer.mdes_digital_enablement_client.auth;
1515

16-
import org.openapitools.client.Pair;
16+
import com.mastercard.developer.mdes_digital_enablement_client.Pair;
1717

1818
import java.util.Map;
1919
import java.util.List;
2020

21-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-07-25T13:48:59.971+02:00[Europe/Rome]")
21+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-08-16T09:54:27.990+01:00[Europe/London]")
2222
public class ApiKeyAuth implements Authentication {
2323
private final String location;
2424
private final String paramName;

java/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java renamed to java/src/main/java/com/mastercard/developer/mdes_digital_enablement_client/auth/HttpBearerAuth.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*
22
* MDES for Merchants
3-
* The MDES APIs are designed as RPC style stateless web services where each API endpoint represents an operation to be performed. All request and response payloads are sent in the JSON (JavaScript Object Notation) data-interchange format. Each endpoint in the API specifies the HTTP Method used to access it. All strings in request and response objects are to be UTF-8 encoded. Each API URI includes the major and minor version of API that it conforms to. This will allow multiple concurrent versions of the API to be deployed simultaneously.
3+
* The MDES APIs are designed as RPC style stateless web services where each API endpoint represents an operation to be performed. All request and response payloads are sent in the JSON (JavaScript Object Notation) data-interchange format. Each endpoint in the API specifies the HTTP Method used to access it. All strings in request and response objects are to be UTF-8 encoded. Each API URI includes the major and minor version of API that it conforms to. This will allow multiple concurrent versions of the API to be deployed simultaneously. <br> __Authentication__ Mastercard uses OAuth 1.0a with body hash extension for authenticating the API clients. This requires every request that you send to Mastercard to be signed with an RSA private key. A private-public RSA key pair must be generated consisting of: <br> 1 . A private key for the OAuth signature for API requests. It is recommended to keep the private key in a password-protected or hardware keystore. <br> 2. A public key is shared with Mastercard during the project setup process through either a certificate signing request (CSR) or the API Key Generator. Mastercard will use the public key to verify the OAuth signature that is provided on every API call.<br> An OAUTH1.0a signer library is available on [GitHub](https://github.com/Mastercard/oauth1-signer-java) <br> __Encryption__<br> All communications between Issuer web service and the Mastercard gateway is encrypted using TLS. <br> __Additional Encryption of Sensitive Data__ In addition to the OAuth authentication, when using MDES Digital Enablement Service, any PCI sensitive and all account holder Personally Identifiable Information (PII) data must be encrypted. This requirement applies to the API fields containing encryptedData. Sensitive data is encrypted using a symmetric session (one-time-use) key. The symmetric session key is then wrapped with an RSA Public Key supplied by Mastercard during API setup phase (the Customer Encryption Key). <br> Java Client Encryption Library available on [GitHub](https://github.com/Mastercard/client-encryption-java)
44
*
5-
* The version of the OpenAPI document: 1.2.7
5+
* The version of the OpenAPI document: 1.2.9
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -11,14 +11,14 @@
1111
*/
1212

1313

14-
package org.openapitools.client.auth;
14+
package com.mastercard.developer.mdes_digital_enablement_client.auth;
1515

16-
import org.openapitools.client.Pair;
16+
import com.mastercard.developer.mdes_digital_enablement_client.Pair;
1717

1818
import java.util.Map;
1919
import java.util.List;
2020

21-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-07-25T13:48:59.971+02:00[Europe/Rome]")
21+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-08-16T09:54:27.990+01:00[Europe/London]")
2222
public class HttpBearerAuth implements Authentication {
2323
private final String scheme;
2424
private String bearerToken;

java/src/main/java/org/openapitools/client/model/AccountHolderData.java renamed to java/src/main/java/com/mastercard/developer/mdes_digital_enablement_client/model/AccountHolderData.java

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* MDES for Merchants
33
* The MDES APIs are designed as RPC style stateless web services where each API endpoint represents an operation to be performed. All request and response payloads are sent in the JSON (JavaScript Object Notation) data-interchange format. Each endpoint in the API specifies the HTTP Method used to access it. All strings in request and response objects are to be UTF-8 encoded. Each API URI includes the major and minor version of API that it conforms to. This will allow multiple concurrent versions of the API to be deployed simultaneously. <br> __Authentication__ Mastercard uses OAuth 1.0a with body hash extension for authenticating the API clients. This requires every request that you send to Mastercard to be signed with an RSA private key. A private-public RSA key pair must be generated consisting of: <br> 1 . A private key for the OAuth signature for API requests. It is recommended to keep the private key in a password-protected or hardware keystore. <br> 2. A public key is shared with Mastercard during the project setup process through either a certificate signing request (CSR) or the API Key Generator. Mastercard will use the public key to verify the OAuth signature that is provided on every API call.<br> An OAUTH1.0a signer library is available on [GitHub](https://github.com/Mastercard/oauth1-signer-java) <br> __Encryption__<br> All communications between Issuer web service and the Mastercard gateway is encrypted using TLS. <br> __Additional Encryption of Sensitive Data__ In addition to the OAuth authentication, when using MDES Digital Enablement Service, any PCI sensitive and all account holder Personally Identifiable Information (PII) data must be encrypted. This requirement applies to the API fields containing encryptedData. Sensitive data is encrypted using a symmetric session (one-time-use) key. The symmetric session key is then wrapped with an RSA Public Key supplied by Mastercard during API setup phase (the Customer Encryption Key). <br> Java Client Encryption Library available on [GitHub](https://github.com/Mastercard/client-encryption-java)
44
*
5-
* The version of the OpenAPI document: 1.2.8
5+
* The version of the OpenAPI document: 1.2.9
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -11,7 +11,7 @@
1111
*/
1212

1313

14-
package org.openapitools.client.model;
14+
package com.mastercard.developer.mdes_digital_enablement_client.model;
1515

1616
import java.util.Objects;
1717
import java.util.Arrays;
@@ -20,16 +20,16 @@
2020
import com.google.gson.annotations.SerializedName;
2121
import com.google.gson.stream.JsonReader;
2222
import com.google.gson.stream.JsonWriter;
23+
import com.mastercard.developer.mdes_digital_enablement_client.model.BillingAddress;
24+
import com.mastercard.developer.mdes_digital_enablement_client.model.PhoneNumber;
2325
import io.swagger.annotations.ApiModel;
2426
import io.swagger.annotations.ApiModelProperty;
2527
import java.io.IOException;
26-
import org.openapitools.client.model.BillingAddress;
27-
import org.openapitools.client.model.PhoneNumber;
2828

2929
/**
3030
* AccountHolderData
3131
*/
32-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-07-25T13:46:03.255+02:00[Europe/Rome]")
32+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-08-16T09:54:27.990+01:00[Europe/London]")
3333
public class AccountHolderData {
3434
public static final String SERIALIZED_NAME_ACCOUNT_HOLDER_NAME = "accountHolderName";
3535
@SerializedName(SERIALIZED_NAME_ACCOUNT_HOLDER_NAME)
@@ -57,10 +57,11 @@ public AccountHolderData accountHolderName(String accountHolderName) {
5757
}
5858

5959
/**
60-
* __(OPTIONAL)__ The name of the cardholder&lt;br&gt; __Max Length:27__
60+
* __(OPTIONAL)__ The name of the cardholder in the format LASTNAME/FIRSTNAME or FIRSTNAME LASTNAME&lt;br&gt; __Max Length:27__
6161
* @return accountHolderName
6262
**/
63-
@ApiModelProperty(value = "__(OPTIONAL)__ The name of the cardholder<br> __Max Length:27__ ")
63+
@javax.annotation.Nullable
64+
@ApiModelProperty(value = "__(OPTIONAL)__ The name of the cardholder in the format LASTNAME/FIRSTNAME or FIRSTNAME LASTNAME<br> __Max Length:27__ ")
6465
public String getAccountHolderName() {
6566
return accountHolderName;
6667
}
@@ -78,6 +79,7 @@ public AccountHolderData accountHolderAddress(BillingAddress accountHolderAddres
7879
* Get accountHolderAddress
7980
* @return accountHolderAddress
8081
**/
82+
@javax.annotation.Nullable
8183
@ApiModelProperty(value = "")
8284
public BillingAddress getAccountHolderAddress() {
8385
return accountHolderAddress;
@@ -96,6 +98,7 @@ public AccountHolderData consumerIdentifier(String consumerIdentifier) {
9698
* __(OPTIONAL)__ Customer Identifier that may be required in some regions.&lt;br&gt; __Max Length:88__
9799
* @return consumerIdentifier
98100
**/
101+
@javax.annotation.Nullable
99102
@ApiModelProperty(value = "__(OPTIONAL)__ Customer Identifier that may be required in some regions.<br> __Max Length:88__ ")
100103
public String getConsumerIdentifier() {
101104
return consumerIdentifier;
@@ -114,6 +117,7 @@ public AccountHolderData accountHolderEmailAddress(String accountHolderEmailAddr
114117
* __(OPTIONAL)__ The e-mail address of the Account Holder&lt;br&gt; __Max Length: 320__
115118
* @return accountHolderEmailAddress
116119
**/
120+
@javax.annotation.Nullable
117121
@ApiModelProperty(value = "__(OPTIONAL)__ The e-mail address of the Account Holder<br> __Max Length: 320__ ")
118122
public String getAccountHolderEmailAddress() {
119123
return accountHolderEmailAddress;
@@ -132,6 +136,7 @@ public AccountHolderData accountHolderMobilePhoneNumber(PhoneNumber accountHolde
132136
* Get accountHolderMobilePhoneNumber
133137
* @return accountHolderMobilePhoneNumber
134138
**/
139+
@javax.annotation.Nullable
135140
@ApiModelProperty(value = "")
136141
public PhoneNumber getAccountHolderMobilePhoneNumber() {
137142
return accountHolderMobilePhoneNumber;

0 commit comments

Comments
 (0)