25
25
import com .fasterxml .jackson .annotation .JsonTypeName ;
26
26
import com .fasterxml .jackson .annotation .JsonValue ;
27
27
import java .util .Arrays ;
28
- import unit .java .sdk .model .CheckPayment ;
28
+ import unit .java .sdk .model .CreateCheckPaymentAttributes ;
29
+ import unit .java .sdk .model .CreateCheckPaymentRelationships ;
29
30
import com .fasterxml .jackson .annotation .JsonPropertyOrder ;
30
31
31
32
32
33
/**
33
34
* CreateCheckPayment
34
35
*/
35
36
@ JsonPropertyOrder ({
36
- CreateCheckPayment .JSON_PROPERTY_DATA
37
+ CreateCheckPayment .JSON_PROPERTY_TYPE ,
38
+ CreateCheckPayment .JSON_PROPERTY_ATTRIBUTES ,
39
+ CreateCheckPayment .JSON_PROPERTY_RELATIONSHIPS
37
40
})
38
41
@ jakarta .annotation .Generated (value = "org.openapitools.codegen.languages.JavaClientCodegen" )
39
42
public class CreateCheckPayment {
40
- public static final String JSON_PROPERTY_DATA = "data" ;
41
- private CheckPayment data ;
43
+ public static final String JSON_PROPERTY_TYPE = "type" ;
44
+ private String type = "checkPayment" ;
45
+
46
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes" ;
47
+ private CreateCheckPaymentAttributes attributes ;
48
+
49
+ public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships" ;
50
+ private CreateCheckPaymentRelationships relationships ;
42
51
43
52
public CreateCheckPayment () {
44
53
}
45
54
46
- public CreateCheckPayment data (CheckPayment data ) {
47
- this .data = data ;
55
+ public CreateCheckPayment type (String type ) {
56
+ this .type = type ;
57
+ return this ;
58
+ }
59
+
60
+ /**
61
+ * Get type
62
+ * @return type
63
+ **/
64
+ @ jakarta .annotation .Nonnull
65
+ @ JsonProperty (JSON_PROPERTY_TYPE )
66
+ @ JsonInclude (value = JsonInclude .Include .ALWAYS )
67
+
68
+ public String getType () {
69
+ return type ;
70
+ }
71
+
72
+
73
+ @ JsonProperty (JSON_PROPERTY_TYPE )
74
+ @ JsonInclude (value = JsonInclude .Include .ALWAYS )
75
+ public void setType (String type ) {
76
+ this .type = type ;
77
+ }
78
+
79
+
80
+ public CreateCheckPayment attributes (CreateCheckPaymentAttributes attributes ) {
81
+ this .attributes = attributes ;
82
+ return this ;
83
+ }
84
+
85
+ /**
86
+ * Get attributes
87
+ * @return attributes
88
+ **/
89
+ @ jakarta .annotation .Nonnull
90
+ @ JsonProperty (JSON_PROPERTY_ATTRIBUTES )
91
+ @ JsonInclude (value = JsonInclude .Include .ALWAYS )
92
+
93
+ public CreateCheckPaymentAttributes getAttributes () {
94
+ return attributes ;
95
+ }
96
+
97
+
98
+ @ JsonProperty (JSON_PROPERTY_ATTRIBUTES )
99
+ @ JsonInclude (value = JsonInclude .Include .ALWAYS )
100
+ public void setAttributes (CreateCheckPaymentAttributes attributes ) {
101
+ this .attributes = attributes ;
102
+ }
103
+
104
+
105
+ public CreateCheckPayment relationships (CreateCheckPaymentRelationships relationships ) {
106
+ this .relationships = relationships ;
48
107
return this ;
49
108
}
50
109
51
110
/**
52
- * Get data
53
- * @return data
111
+ * Get relationships
112
+ * @return relationships
54
113
**/
55
114
@ jakarta .annotation .Nonnull
56
- @ JsonProperty (JSON_PROPERTY_DATA )
115
+ @ JsonProperty (JSON_PROPERTY_RELATIONSHIPS )
57
116
@ JsonInclude (value = JsonInclude .Include .ALWAYS )
58
117
59
- public CheckPayment getData () {
60
- return data ;
118
+ public CreateCheckPaymentRelationships getRelationships () {
119
+ return relationships ;
61
120
}
62
121
63
122
64
- @ JsonProperty (JSON_PROPERTY_DATA )
123
+ @ JsonProperty (JSON_PROPERTY_RELATIONSHIPS )
65
124
@ JsonInclude (value = JsonInclude .Include .ALWAYS )
66
- public void setData ( CheckPayment data ) {
67
- this .data = data ;
125
+ public void setRelationships ( CreateCheckPaymentRelationships relationships ) {
126
+ this .relationships = relationships ;
68
127
}
69
128
70
129
@@ -80,19 +139,23 @@ public boolean equals(Object o) {
80
139
return false ;
81
140
}
82
141
CreateCheckPayment createCheckPayment = (CreateCheckPayment ) o ;
83
- return Objects .equals (this .data , createCheckPayment .data );
142
+ return Objects .equals (this .type , createCheckPayment .type ) &&
143
+ Objects .equals (this .attributes , createCheckPayment .attributes ) &&
144
+ Objects .equals (this .relationships , createCheckPayment .relationships );
84
145
}
85
146
86
147
@ Override
87
148
public int hashCode () {
88
- return Objects .hash (data );
149
+ return Objects .hash (type , attributes , relationships );
89
150
}
90
151
91
152
@ Override
92
153
public String toString () {
93
154
StringBuilder sb = new StringBuilder ();
94
155
sb .append ("class CreateCheckPayment {\n " );
95
- sb .append (" data: " ).append (toIndentedString (data )).append ("\n " );
156
+ sb .append (" type: " ).append (toIndentedString (type )).append ("\n " );
157
+ sb .append (" attributes: " ).append (toIndentedString (attributes )).append ("\n " );
158
+ sb .append (" relationships: " ).append (toIndentedString (relationships )).append ("\n " );
96
159
sb .append ("}" );
97
160
return sb .toString ();
98
161
}
@@ -140,9 +203,19 @@ public String toUrlQueryString(String prefix) {
140
203
141
204
StringJoiner joiner = new StringJoiner ("&" );
142
205
143
- // add `data` to the URL query string
144
- if (getData () != null ) {
145
- joiner .add (getData ().toUrlQueryString (prefix + "data" + suffix ));
206
+ // add `type` to the URL query string
207
+ if (getType () != null ) {
208
+ joiner .add (String .format ("%stype%s=%s" , prefix , suffix , URLEncoder .encode (String .valueOf (getType ()), StandardCharsets .UTF_8 ).replaceAll ("\\ +" , "%20" )));
209
+ }
210
+
211
+ // add `attributes` to the URL query string
212
+ if (getAttributes () != null ) {
213
+ joiner .add (getAttributes ().toUrlQueryString (prefix + "attributes" + suffix ));
214
+ }
215
+
216
+ // add `relationships` to the URL query string
217
+ if (getRelationships () != null ) {
218
+ joiner .add (getRelationships ().toUrlQueryString (prefix + "relationships" + suffix ));
146
219
}
147
220
148
221
return joiner .toString ();
0 commit comments