Skip to content

Commit 7ef9a9d

Browse files
committed
Add RakutenPay
1 parent 98910b5 commit 7ef9a9d

File tree

1 file changed

+290
-0
lines changed

1 file changed

+290
-0
lines changed
Lines changed: 290 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,290 @@
1+
/*
2+
* Adyen Checkout API
3+
*
4+
* The version of the OpenAPI document: 71
5+
*
6+
*
7+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8+
* https://openapi-generator.tech
9+
* Do not edit the class manually.
10+
*/
11+
12+
13+
package com.adyen.model.checkout;
14+
15+
import java.util.Objects;
16+
import java.util.Map;
17+
import java.util.HashMap;
18+
import com.fasterxml.jackson.annotation.JsonInclude;
19+
import com.fasterxml.jackson.annotation.JsonProperty;
20+
import com.fasterxml.jackson.annotation.JsonCreator;
21+
import com.fasterxml.jackson.annotation.JsonTypeName;
22+
import com.fasterxml.jackson.annotation.JsonValue;
23+
import java.util.Arrays;
24+
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
25+
import com.fasterxml.jackson.core.JsonProcessingException;
26+
27+
28+
/**
29+
* RakutenPayDetails
30+
*/
31+
@JsonPropertyOrder({
32+
RakutenPayDetails.JSON_PROPERTY_CHECKOUT_ATTEMPT_ID,
33+
RakutenPayDetails.JSON_PROPERTY_RECURRING_DETAIL_REFERENCE,
34+
RakutenPayDetails.JSON_PROPERTY_STORED_PAYMENT_METHOD_ID,
35+
RakutenPayDetails.JSON_PROPERTY_TYPE
36+
})
37+
38+
public class RakutenPayDetails {
39+
public static final String JSON_PROPERTY_CHECKOUT_ATTEMPT_ID = "checkoutAttemptId";
40+
private String checkoutAttemptId;
41+
42+
public static final String JSON_PROPERTY_RECURRING_DETAIL_REFERENCE = "recurringDetailReference";
43+
@Deprecated // deprecated since Adyen Checkout API v49: Use `storedPaymentMethodId` instead.
44+
private String recurringDetailReference;
45+
46+
public static final String JSON_PROPERTY_STORED_PAYMENT_METHOD_ID = "storedPaymentMethodId";
47+
private String storedPaymentMethodId;
48+
49+
/**
50+
* **rakutenpay**
51+
*/
52+
public enum TypeEnum {
53+
RAKUTENPAY(String.valueOf("rakutenpay"));
54+
55+
private String value;
56+
57+
TypeEnum(String value) {
58+
this.value = value;
59+
}
60+
61+
@JsonValue
62+
public String getValue() {
63+
return value;
64+
}
65+
66+
@Override
67+
public String toString() {
68+
return String.valueOf(value);
69+
}
70+
71+
@JsonCreator
72+
public static TypeEnum fromValue(String value) {
73+
for (TypeEnum b : TypeEnum.values()) {
74+
if (b.value.equals(value)) {
75+
return b;
76+
}
77+
}
78+
throw new IllegalArgumentException("Unexpected value '" + value + "'");
79+
}
80+
}
81+
82+
public static final String JSON_PROPERTY_TYPE = "type";
83+
private TypeEnum type = TypeEnum.RAKUTENPAY;
84+
85+
public RakutenPayDetails() {
86+
}
87+
88+
/**
89+
* The checkout attempt identifier.
90+
*
91+
* @param checkoutAttemptId
92+
* @return the current {@code RakutenPayDetails} instance, allowing for method chaining
93+
*/
94+
public RakutenPayDetails checkoutAttemptId(String checkoutAttemptId) {
95+
this.checkoutAttemptId = checkoutAttemptId;
96+
return this;
97+
}
98+
99+
/**
100+
* The checkout attempt identifier.
101+
* @return checkoutAttemptId
102+
*/
103+
@JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
104+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
105+
public String getCheckoutAttemptId() {
106+
return checkoutAttemptId;
107+
}
108+
109+
/**
110+
* The checkout attempt identifier.
111+
*
112+
* @param checkoutAttemptId
113+
*/
114+
@JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
115+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
116+
public void setCheckoutAttemptId(String checkoutAttemptId) {
117+
this.checkoutAttemptId = checkoutAttemptId;
118+
}
119+
120+
/**
121+
* This is the `recurringDetailReference` returned in the response when you created the token.
122+
*
123+
* @param recurringDetailReference
124+
* @return the current {@code RakutenPayDetails} instance, allowing for method chaining
125+
*
126+
* @deprecated since Adyen Checkout API v49
127+
* Use `storedPaymentMethodId` instead.
128+
*/
129+
@Deprecated // deprecated since Adyen Checkout API v49: Use `storedPaymentMethodId` instead.
130+
public RakutenPayDetails recurringDetailReference(String recurringDetailReference) {
131+
this.recurringDetailReference = recurringDetailReference;
132+
return this;
133+
}
134+
135+
/**
136+
* This is the `recurringDetailReference` returned in the response when you created the token.
137+
* @return recurringDetailReference
138+
* @deprecated // deprecated since Adyen Checkout API v49: Use `storedPaymentMethodId` instead.
139+
*/
140+
@Deprecated // deprecated since Adyen Checkout API v49: Use `storedPaymentMethodId` instead.
141+
@JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
142+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
143+
public String getRecurringDetailReference() {
144+
return recurringDetailReference;
145+
}
146+
147+
/**
148+
* This is the `recurringDetailReference` returned in the response when you created the token.
149+
*
150+
* @param recurringDetailReference
151+
*
152+
* @deprecated since Adyen Checkout API v49
153+
* Use `storedPaymentMethodId` instead.
154+
*/
155+
@Deprecated // deprecated since Adyen Checkout API v49: Use `storedPaymentMethodId` instead.
156+
@JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
157+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
158+
public void setRecurringDetailReference(String recurringDetailReference) {
159+
this.recurringDetailReference = recurringDetailReference;
160+
}
161+
162+
/**
163+
* This is the `recurringDetailReference` returned in the response when you created the token.
164+
*
165+
* @param storedPaymentMethodId
166+
* @return the current {@code RakutenPayDetails} instance, allowing for method chaining
167+
*/
168+
public RakutenPayDetails storedPaymentMethodId(String storedPaymentMethodId) {
169+
this.storedPaymentMethodId = storedPaymentMethodId;
170+
return this;
171+
}
172+
173+
/**
174+
* This is the `recurringDetailReference` returned in the response when you created the token.
175+
* @return storedPaymentMethodId
176+
*/
177+
@JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID)
178+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
179+
public String getStoredPaymentMethodId() {
180+
return storedPaymentMethodId;
181+
}
182+
183+
/**
184+
* This is the `recurringDetailReference` returned in the response when you created the token.
185+
*
186+
* @param storedPaymentMethodId
187+
*/
188+
@JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID)
189+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
190+
public void setStoredPaymentMethodId(String storedPaymentMethodId) {
191+
this.storedPaymentMethodId = storedPaymentMethodId;
192+
}
193+
194+
/**
195+
* **rakutenpay**
196+
*
197+
* @param type
198+
* @return the current {@code RakutenPayDetails} instance, allowing for method chaining
199+
*/
200+
public RakutenPayDetails type(TypeEnum type) {
201+
this.type = type;
202+
return this;
203+
}
204+
205+
/**
206+
* **rakutenpay**
207+
* @return type
208+
*/
209+
@JsonProperty(JSON_PROPERTY_TYPE)
210+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
211+
public TypeEnum getType() {
212+
return type;
213+
}
214+
215+
/**
216+
* **rakutenpay**
217+
*
218+
* @param type
219+
*/
220+
@JsonProperty(JSON_PROPERTY_TYPE)
221+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
222+
public void setType(TypeEnum type) {
223+
this.type = type;
224+
}
225+
226+
/**
227+
* Return true if this RakutenPayDetails object is equal to o.
228+
*/
229+
@Override
230+
public boolean equals(Object o) {
231+
if (this == o) {
232+
return true;
233+
}
234+
if (o == null || getClass() != o.getClass()) {
235+
return false;
236+
}
237+
RakutenPayDetails rakutenPayDetails = (RakutenPayDetails) o;
238+
return Objects.equals(this.checkoutAttemptId, rakutenPayDetails.checkoutAttemptId) &&
239+
Objects.equals(this.recurringDetailReference, rakutenPayDetails.recurringDetailReference) &&
240+
Objects.equals(this.storedPaymentMethodId, rakutenPayDetails.storedPaymentMethodId) &&
241+
Objects.equals(this.type, rakutenPayDetails.type);
242+
}
243+
244+
@Override
245+
public int hashCode() {
246+
return Objects.hash(checkoutAttemptId, recurringDetailReference, storedPaymentMethodId, type);
247+
}
248+
249+
@Override
250+
public String toString() {
251+
StringBuilder sb = new StringBuilder();
252+
sb.append("class RakutenPayDetails {\n");
253+
sb.append(" checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n");
254+
sb.append(" recurringDetailReference: ").append(toIndentedString(recurringDetailReference)).append("\n");
255+
sb.append(" storedPaymentMethodId: ").append(toIndentedString(storedPaymentMethodId)).append("\n");
256+
sb.append(" type: ").append(toIndentedString(type)).append("\n");
257+
sb.append("}");
258+
return sb.toString();
259+
}
260+
261+
/**
262+
* Convert the given object to string with each line indented by 4 spaces
263+
* (except the first line).
264+
*/
265+
private String toIndentedString(Object o) {
266+
if (o == null) {
267+
return "null";
268+
}
269+
return o.toString().replace("\n", "\n ");
270+
}
271+
272+
/**
273+
* Create an instance of RakutenPayDetails given an JSON string
274+
*
275+
* @param jsonString JSON string
276+
* @return An instance of RakutenPayDetails
277+
* @throws JsonProcessingException if the JSON string is invalid with respect to RakutenPayDetails
278+
*/
279+
public static RakutenPayDetails fromJson(String jsonString) throws JsonProcessingException {
280+
return JSON.getMapper().readValue(jsonString, RakutenPayDetails.class);
281+
}
282+
/**
283+
* Convert an instance of RakutenPayDetails to an JSON string
284+
*
285+
* @return JSON string
286+
*/
287+
public String toJson() throws JsonProcessingException {
288+
return JSON.getMapper().writeValueAsString(this);
289+
}
290+
}

0 commit comments

Comments
 (0)