Skip to content

Commit 6eeeb90

Browse files
authored
POS Mobile API (#1463)
* Update templates to generate javadoc * Generate PosMobileAPI * Add deprecation
1 parent b48ca0e commit 6eeeb90

File tree

7 files changed

+138
-54
lines changed

7 files changed

+138
-54
lines changed

src/main/java/com/adyen/model/posmobile/AbstractOpenApiSchema.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
package com.adyen.model.posmobile;
1414

1515
import java.util.Objects;
16-
import java.lang.reflect.Type;
1716
import java.util.Map;
1817
import jakarta.ws.rs.core.GenericType;
1918

@@ -22,7 +21,6 @@
2221
/**
2322
* Abstract class for oneOf,anyOf schemas defined in OpenAPI spec
2423
*/
25-
2624
public abstract class AbstractOpenApiSchema {
2725

2826
// store the actual instance of the schema/object
@@ -34,6 +32,11 @@ public abstract class AbstractOpenApiSchema {
3432
// schema type (e.g. oneOf, anyOf)
3533
private final String schemaType;
3634

35+
/**
36+
*
37+
* @param schemaType the schema type
38+
* @param isNullable whether the instance is nullable
39+
*/
3740
public AbstractOpenApiSchema(String schemaType, Boolean isNullable) {
3841
this.schemaType = schemaType;
3942
this.isNullable = isNullable;
@@ -44,7 +47,7 @@ public AbstractOpenApiSchema(String schemaType, Boolean isNullable) {
4447
*
4548
* @return an instance of the actual schema/object
4649
*/
47-
public abstract Map<String, GenericType> getSchemas();
50+
public abstract Map<String, GenericType<?>> getSchemas();
4851

4952
/**
5053
* Get the actual instance
@@ -144,4 +147,4 @@ public Boolean isNullable() {
144147

145148

146149

147-
}
150+
}

src/main/java/com/adyen/model/posmobile/CreateSessionRequest.java

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,14 @@
1313
package com.adyen.model.posmobile;
1414

1515
import java.util.Objects;
16-
import java.util.Arrays;
1716
import java.util.Map;
1817
import java.util.HashMap;
1918
import com.fasterxml.jackson.annotation.JsonInclude;
2019
import com.fasterxml.jackson.annotation.JsonProperty;
2120
import com.fasterxml.jackson.annotation.JsonCreator;
2221
import com.fasterxml.jackson.annotation.JsonTypeName;
2322
import com.fasterxml.jackson.annotation.JsonValue;
24-
import io.swagger.annotations.ApiModel;
25-
import io.swagger.annotations.ApiModelProperty;
23+
import java.util.Arrays;
2624
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
2725
import com.fasterxml.jackson.core.JsonProcessingException;
2826

@@ -52,7 +50,7 @@ public CreateSessionRequest() {
5250
/**
5351
* The unique identifier of your merchant account.
5452
*
55-
* @param merchantAccount
53+
* @param merchantAccount The unique identifier of your merchant account.
5654
* @return the current {@code CreateSessionRequest} instance, allowing for method chaining
5755
*/
5856
public CreateSessionRequest merchantAccount(String merchantAccount) {
@@ -62,9 +60,8 @@ public CreateSessionRequest merchantAccount(String merchantAccount) {
6260

6361
/**
6462
* The unique identifier of your merchant account.
65-
* @return merchantAccount
63+
* @return merchantAccount The unique identifier of your merchant account.
6664
*/
67-
@ApiModelProperty(required = true, value = "The unique identifier of your merchant account.")
6865
@JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT)
6966
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
7067
public String getMerchantAccount() {
@@ -74,8 +71,8 @@ public String getMerchantAccount() {
7471
/**
7572
* The unique identifier of your merchant account.
7673
*
77-
* @param merchantAccount
78-
*/
74+
* @param merchantAccount The unique identifier of your merchant account.
75+
*/
7976
@JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT)
8077
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
8178
public void setMerchantAccount(String merchantAccount) {
@@ -85,7 +82,7 @@ public void setMerchantAccount(String merchantAccount) {
8582
/**
8683
* The setup token provided by the POS Mobile SDK. - When using the Android POS Mobile SDK, obtain the token through the &#x60;AuthenticationService.authenticate(setupToken)&#x60; callback of &#x60;AuthenticationService&#x60;. - When using the iOS POS Mobile SDK, obtain the token through the &#x60;PaymentServiceDelegate.register(with:)&#x60; callback of &#x60;PaymentServiceDelegate&#x60;.
8784
*
88-
* @param setupToken
85+
* @param setupToken The setup token provided by the POS Mobile SDK. - When using the Android POS Mobile SDK, obtain the token through the &#x60;AuthenticationService.authenticate(setupToken)&#x60; callback of &#x60;AuthenticationService&#x60;. - When using the iOS POS Mobile SDK, obtain the token through the &#x60;PaymentServiceDelegate.register(with:)&#x60; callback of &#x60;PaymentServiceDelegate&#x60;.
8986
* @return the current {@code CreateSessionRequest} instance, allowing for method chaining
9087
*/
9188
public CreateSessionRequest setupToken(String setupToken) {
@@ -95,9 +92,8 @@ public CreateSessionRequest setupToken(String setupToken) {
9592

9693
/**
9794
* The setup token provided by the POS Mobile SDK. - When using the Android POS Mobile SDK, obtain the token through the &#x60;AuthenticationService.authenticate(setupToken)&#x60; callback of &#x60;AuthenticationService&#x60;. - When using the iOS POS Mobile SDK, obtain the token through the &#x60;PaymentServiceDelegate.register(with:)&#x60; callback of &#x60;PaymentServiceDelegate&#x60;.
98-
* @return setupToken
95+
* @return setupToken The setup token provided by the POS Mobile SDK. - When using the Android POS Mobile SDK, obtain the token through the &#x60;AuthenticationService.authenticate(setupToken)&#x60; callback of &#x60;AuthenticationService&#x60;. - When using the iOS POS Mobile SDK, obtain the token through the &#x60;PaymentServiceDelegate.register(with:)&#x60; callback of &#x60;PaymentServiceDelegate&#x60;.
9996
*/
100-
@ApiModelProperty(required = true, value = "The setup token provided by the POS Mobile SDK. - When using the Android POS Mobile SDK, obtain the token through the `AuthenticationService.authenticate(setupToken)` callback of `AuthenticationService`. - When using the iOS POS Mobile SDK, obtain the token through the `PaymentServiceDelegate.register(with:)` callback of `PaymentServiceDelegate`.")
10197
@JsonProperty(JSON_PROPERTY_SETUP_TOKEN)
10298
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
10399
public String getSetupToken() {
@@ -107,8 +103,8 @@ public String getSetupToken() {
107103
/**
108104
* The setup token provided by the POS Mobile SDK. - When using the Android POS Mobile SDK, obtain the token through the &#x60;AuthenticationService.authenticate(setupToken)&#x60; callback of &#x60;AuthenticationService&#x60;. - When using the iOS POS Mobile SDK, obtain the token through the &#x60;PaymentServiceDelegate.register(with:)&#x60; callback of &#x60;PaymentServiceDelegate&#x60;.
109105
*
110-
* @param setupToken
111-
*/
106+
* @param setupToken The setup token provided by the POS Mobile SDK. - When using the Android POS Mobile SDK, obtain the token through the &#x60;AuthenticationService.authenticate(setupToken)&#x60; callback of &#x60;AuthenticationService&#x60;. - When using the iOS POS Mobile SDK, obtain the token through the &#x60;PaymentServiceDelegate.register(with:)&#x60; callback of &#x60;PaymentServiceDelegate&#x60;.
107+
*/
112108
@JsonProperty(JSON_PROPERTY_SETUP_TOKEN)
113109
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
114110
public void setSetupToken(String setupToken) {
@@ -118,7 +114,7 @@ public void setSetupToken(String setupToken) {
118114
/**
119115
* The unique identifier of the store that you want to process transactions for.
120116
*
121-
* @param store
117+
* @param store The unique identifier of the store that you want to process transactions for.
122118
* @return the current {@code CreateSessionRequest} instance, allowing for method chaining
123119
*/
124120
public CreateSessionRequest store(String store) {
@@ -128,9 +124,8 @@ public CreateSessionRequest store(String store) {
128124

129125
/**
130126
* The unique identifier of the store that you want to process transactions for.
131-
* @return store
127+
* @return store The unique identifier of the store that you want to process transactions for.
132128
*/
133-
@ApiModelProperty(value = "The unique identifier of the store that you want to process transactions for.")
134129
@JsonProperty(JSON_PROPERTY_STORE)
135130
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
136131
public String getStore() {
@@ -140,8 +135,8 @@ public String getStore() {
140135
/**
141136
* The unique identifier of the store that you want to process transactions for.
142137
*
143-
* @param store
144-
*/
138+
* @param store The unique identifier of the store that you want to process transactions for.
139+
*/
145140
@JsonProperty(JSON_PROPERTY_STORE)
146141
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
147142
public void setStore(String store) {

src/main/java/com/adyen/model/posmobile/CreateSessionResponse.java

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,14 @@
1313
package com.adyen.model.posmobile;
1414

1515
import java.util.Objects;
16-
import java.util.Arrays;
1716
import java.util.Map;
1817
import java.util.HashMap;
1918
import com.fasterxml.jackson.annotation.JsonInclude;
2019
import com.fasterxml.jackson.annotation.JsonProperty;
2120
import com.fasterxml.jackson.annotation.JsonCreator;
2221
import com.fasterxml.jackson.annotation.JsonTypeName;
2322
import com.fasterxml.jackson.annotation.JsonValue;
24-
import io.swagger.annotations.ApiModel;
25-
import io.swagger.annotations.ApiModelProperty;
23+
import java.util.Arrays;
2624
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
2725
import com.fasterxml.jackson.core.JsonProcessingException;
2826

@@ -60,7 +58,7 @@ public CreateSessionResponse() {
6058
/**
6159
* The unique identifier of the session.
6260
*
63-
* @param id
61+
* @param id The unique identifier of the session.
6462
* @return the current {@code CreateSessionResponse} instance, allowing for method chaining
6563
*/
6664
public CreateSessionResponse id(String id) {
@@ -70,9 +68,8 @@ public CreateSessionResponse id(String id) {
7068

7169
/**
7270
* The unique identifier of the session.
73-
* @return id
71+
* @return id The unique identifier of the session.
7472
*/
75-
@ApiModelProperty(value = "The unique identifier of the session.")
7673
@JsonProperty(JSON_PROPERTY_ID)
7774
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
7875
public String getId() {
@@ -82,8 +79,8 @@ public String getId() {
8279
/**
8380
* The unique identifier of the session.
8481
*
85-
* @param id
86-
*/
82+
* @param id The unique identifier of the session.
83+
*/
8784
@JsonProperty(JSON_PROPERTY_ID)
8885
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
8986
public void setId(String id) {
@@ -93,7 +90,7 @@ public void setId(String id) {
9390
/**
9491
* The unique identifier of the SDK installation. If you create the [Terminal API](https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/) transaction request on your backend, use this as the &#x60;POIID&#x60; in the &#x60;MessageHeader&#x60; of the request.
9592
*
96-
* @param installationId
93+
* @param installationId The unique identifier of the SDK installation. If you create the [Terminal API](https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/) transaction request on your backend, use this as the &#x60;POIID&#x60; in the &#x60;MessageHeader&#x60; of the request.
9794
* @return the current {@code CreateSessionResponse} instance, allowing for method chaining
9895
*/
9996
public CreateSessionResponse installationId(String installationId) {
@@ -103,9 +100,8 @@ public CreateSessionResponse installationId(String installationId) {
103100

104101
/**
105102
* The unique identifier of the SDK installation. If you create the [Terminal API](https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/) transaction request on your backend, use this as the &#x60;POIID&#x60; in the &#x60;MessageHeader&#x60; of the request.
106-
* @return installationId
103+
* @return installationId The unique identifier of the SDK installation. If you create the [Terminal API](https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/) transaction request on your backend, use this as the &#x60;POIID&#x60; in the &#x60;MessageHeader&#x60; of the request.
107104
*/
108-
@ApiModelProperty(value = "The unique identifier of the SDK installation. If you create the [Terminal API](https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/) transaction request on your backend, use this as the `POIID` in the `MessageHeader` of the request.")
109105
@JsonProperty(JSON_PROPERTY_INSTALLATION_ID)
110106
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
111107
public String getInstallationId() {
@@ -115,8 +111,8 @@ public String getInstallationId() {
115111
/**
116112
* The unique identifier of the SDK installation. If you create the [Terminal API](https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/) transaction request on your backend, use this as the &#x60;POIID&#x60; in the &#x60;MessageHeader&#x60; of the request.
117113
*
118-
* @param installationId
119-
*/
114+
* @param installationId The unique identifier of the SDK installation. If you create the [Terminal API](https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/) transaction request on your backend, use this as the &#x60;POIID&#x60; in the &#x60;MessageHeader&#x60; of the request.
115+
*/
120116
@JsonProperty(JSON_PROPERTY_INSTALLATION_ID)
121117
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
122118
public void setInstallationId(String installationId) {
@@ -126,7 +122,7 @@ public void setInstallationId(String installationId) {
126122
/**
127123
* The unique identifier of your merchant account.
128124
*
129-
* @param merchantAccount
125+
* @param merchantAccount The unique identifier of your merchant account.
130126
* @return the current {@code CreateSessionResponse} instance, allowing for method chaining
131127
*/
132128
public CreateSessionResponse merchantAccount(String merchantAccount) {
@@ -136,9 +132,8 @@ public CreateSessionResponse merchantAccount(String merchantAccount) {
136132

137133
/**
138134
* The unique identifier of your merchant account.
139-
* @return merchantAccount
135+
* @return merchantAccount The unique identifier of your merchant account.
140136
*/
141-
@ApiModelProperty(value = "The unique identifier of your merchant account.")
142137
@JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT)
143138
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
144139
public String getMerchantAccount() {
@@ -148,8 +143,8 @@ public String getMerchantAccount() {
148143
/**
149144
* The unique identifier of your merchant account.
150145
*
151-
* @param merchantAccount
152-
*/
146+
* @param merchantAccount The unique identifier of your merchant account.
147+
*/
153148
@JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT)
154149
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
155150
public void setMerchantAccount(String merchantAccount) {
@@ -159,7 +154,7 @@ public void setMerchantAccount(String merchantAccount) {
159154
/**
160155
* The data that the SDK uses to authenticate responses from the Adyen payments platform. Pass this value to your POS app.
161156
*
162-
* @param sdkData
157+
* @param sdkData The data that the SDK uses to authenticate responses from the Adyen payments platform. Pass this value to your POS app.
163158
* @return the current {@code CreateSessionResponse} instance, allowing for method chaining
164159
*/
165160
public CreateSessionResponse sdkData(String sdkData) {
@@ -169,9 +164,8 @@ public CreateSessionResponse sdkData(String sdkData) {
169164

170165
/**
171166
* The data that the SDK uses to authenticate responses from the Adyen payments platform. Pass this value to your POS app.
172-
* @return sdkData
167+
* @return sdkData The data that the SDK uses to authenticate responses from the Adyen payments platform. Pass this value to your POS app.
173168
*/
174-
@ApiModelProperty(value = "The data that the SDK uses to authenticate responses from the Adyen payments platform. Pass this value to your POS app.")
175169
@JsonProperty(JSON_PROPERTY_SDK_DATA)
176170
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
177171
public String getSdkData() {
@@ -181,8 +175,8 @@ public String getSdkData() {
181175
/**
182176
* The data that the SDK uses to authenticate responses from the Adyen payments platform. Pass this value to your POS app.
183177
*
184-
* @param sdkData
185-
*/
178+
* @param sdkData The data that the SDK uses to authenticate responses from the Adyen payments platform. Pass this value to your POS app.
179+
*/
186180
@JsonProperty(JSON_PROPERTY_SDK_DATA)
187181
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
188182
public void setSdkData(String sdkData) {
@@ -192,7 +186,7 @@ public void setSdkData(String sdkData) {
192186
/**
193187
* The unique identifier of the store that you want to process transactions for.
194188
*
195-
* @param store
189+
* @param store The unique identifier of the store that you want to process transactions for.
196190
* @return the current {@code CreateSessionResponse} instance, allowing for method chaining
197191
*/
198192
public CreateSessionResponse store(String store) {
@@ -202,9 +196,8 @@ public CreateSessionResponse store(String store) {
202196

203197
/**
204198
* The unique identifier of the store that you want to process transactions for.
205-
* @return store
199+
* @return store The unique identifier of the store that you want to process transactions for.
206200
*/
207-
@ApiModelProperty(value = "The unique identifier of the store that you want to process transactions for.")
208201
@JsonProperty(JSON_PROPERTY_STORE)
209202
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
210203
public String getStore() {
@@ -214,8 +207,8 @@ public String getStore() {
214207
/**
215208
* The unique identifier of the store that you want to process transactions for.
216209
*
217-
* @param store
218-
*/
210+
* @param store The unique identifier of the store that you want to process transactions for.
211+
*/
219212
@JsonProperty(JSON_PROPERTY_STORE)
220213
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
221214
public void setStore(String store) {

src/main/java/com/adyen/service/PosMobileApi.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@
2323
import java.io.IOException;
2424
import java.util.HashMap;
2525
import java.util.Map;
26+
27+
/**
28+
* The service has been moved to a different package 'com.adyen.service.posmobile'
29+
* @deprecated Use instead com.adyen.service.posmobile.PosMobileApi
30+
*
31+
*/
32+
@Deprecated(since = "v37.0.0", forRemoval = true)
2633
public class PosMobileApi extends Service {
2734

2835
public static final String API_VERSION = "68";
@@ -33,6 +40,7 @@ public class PosMobileApi extends Service {
3340
* Default constructor in {@link com.adyen.service package}.
3441
* @param client {@link Client } (required)
3542
*/
43+
@Deprecated(since = "v37.0.0", forRemoval = true)
3644
public PosMobileApi(Client client) {
3745
super(client);
3846
this.baseURL = createBaseURL("https://checkout-test.adyen.com/checkout/possdk/v68");
@@ -44,6 +52,7 @@ public PosMobileApi(Client client) {
4452
* @param client {@link Client } (required)
4553
* @param baseURL {@link String } (required)
4654
*/
55+
@Deprecated(since = "v37.0.0", forRemoval = true)
4756
public PosMobileApi(Client client, String baseURL) {
4857
super(client);
4958
this.baseURL = baseURL;
@@ -56,6 +65,7 @@ public PosMobileApi(Client client, String baseURL) {
5665
* @return {@link CreateSessionResponse }
5766
* @throws ApiException if fails to make API call
5867
*/
68+
@Deprecated(since = "v37.0.0", forRemoval = true)
5969
public CreateSessionResponse createCommunicationSession(CreateSessionRequest createSessionRequest) throws ApiException, IOException {
6070
return createCommunicationSession(createSessionRequest, null);
6171
}
@@ -68,6 +78,7 @@ public CreateSessionResponse createCommunicationSession(CreateSessionRequest cre
6878
* @return {@link CreateSessionResponse }
6979
* @throws ApiException if fails to make API call
7080
*/
81+
@Deprecated(since = "v37.0.0", forRemoval = true)
7182
public CreateSessionResponse createCommunicationSession(CreateSessionRequest createSessionRequest, RequestOptions requestOptions) throws ApiException, IOException {
7283

7384
String requestBody = createSessionRequest.toJson();

0 commit comments

Comments
 (0)