@@ -75,6 +75,20 @@ public class Account extends APIResource implements HasId, MetadataStore<Account
75
75
@ Deprecated
76
76
List <String > currenciesSupported ;
77
77
78
+ @ Deprecated
79
+ public static AccountCollection all (Map <String , Object > params )
80
+ throws AuthenticationException , InvalidRequestException ,
81
+ APIConnectionException , CardException , APIException {
82
+ return list (params , null );
83
+ }
84
+
85
+ @ Deprecated
86
+ public static AccountCollection all (Map <String , Object > params , RequestOptions options )
87
+ throws AuthenticationException , InvalidRequestException ,
88
+ APIConnectionException , CardException , APIException {
89
+ return list (params , options );
90
+ }
91
+
78
92
public static Account create (Map <String , Object > params )
79
93
throws AuthenticationException , InvalidRequestException ,
80
94
APIConnectionException , CardException , APIException {
@@ -87,6 +101,31 @@ public static Account create(Map<String, Object> params, RequestOptions options)
87
101
return request (RequestMethod .POST , classURL (Account .class ), params , Account .class , options );
88
102
}
89
103
104
+ public DeletedAccount delete ()
105
+ throws AuthenticationException , InvalidRequestException ,
106
+ APIConnectionException , CardException , APIException {
107
+ return delete (null , (RequestOptions ) null );
108
+ }
109
+
110
+ public DeletedAccount delete (RequestOptions options )
111
+ throws AuthenticationException , InvalidRequestException ,
112
+ APIConnectionException , CardException , APIException {
113
+ return delete (null , options );
114
+ }
115
+
116
+ public DeletedAccount delete (Map <String , Object > params )
117
+ throws AuthenticationException , InvalidRequestException ,
118
+ APIConnectionException , CardException , APIException {
119
+ return delete (params , null );
120
+ }
121
+
122
+ public DeletedAccount delete (Map <String , Object > params , RequestOptions options )
123
+ throws AuthenticationException , InvalidRequestException ,
124
+ APIConnectionException , CardException , APIException {
125
+ return request (RequestMethod .DELETE , instanceURL (Account .class , this .id ), params ,
126
+ DeletedAccount .class , options );
127
+ }
128
+
90
129
public static AccountCollection list (Map <String , Object > params )
91
130
throws AuthenticationException , InvalidRequestException ,
92
131
APIConnectionException , CardException , APIException {
@@ -99,18 +138,17 @@ public static AccountCollection list(Map<String, Object> params, RequestOptions
99
138
return requestCollection (classURL (Account .class ), params , AccountCollection .class , options );
100
139
}
101
140
102
- @ Deprecated
103
- public static AccountCollection all (Map <String , Object > params )
141
+ public Account reject (Map <String , Object > params )
104
142
throws AuthenticationException , InvalidRequestException ,
105
143
APIConnectionException , CardException , APIException {
106
- return list (params , null );
144
+ return reject (params , null );
107
145
}
108
146
109
- @ Deprecated
110
- public static AccountCollection all (Map <String , Object > params , RequestOptions options )
147
+ public Account reject (Map <String , Object > params , RequestOptions options )
111
148
throws AuthenticationException , InvalidRequestException ,
112
149
APIConnectionException , CardException , APIException {
113
- return list (params , options );
150
+ return request (RequestMethod .POST , String .format ("%s/reject" ,
151
+ instanceURL (Account .class , this .getId ())), params , Account .class , options );
114
152
}
115
153
116
154
public static Account retrieve ()
@@ -119,6 +157,12 @@ public static Account retrieve()
119
157
return retrieve ((RequestOptions ) null );
120
158
}
121
159
160
+ public static Account retrieve (RequestOptions options )
161
+ throws AuthenticationException , InvalidRequestException ,
162
+ APIConnectionException , CardException , APIException {
163
+ return request (RequestMethod .GET , singleClassURL (Account .class ), null , Account .class , options );
164
+ }
165
+
122
166
/**
123
167
* In order to preserve backwards-compatibility, this method does two things.
124
168
* If the parameter looks like an API key (starts with sk_), retrieve the
@@ -136,12 +180,6 @@ public static Account retrieve(String apiKeyOrAccountId)
136
180
}
137
181
}
138
182
139
- public static Account retrieve (RequestOptions options )
140
- throws AuthenticationException , InvalidRequestException ,
141
- APIConnectionException , CardException , APIException {
142
- return request (RequestMethod .GET , singleClassURL (Account .class ), null , Account .class , options );
143
- }
144
-
145
183
public static Account retrieve (String id , RequestOptions options )
146
184
throws AuthenticationException , InvalidRequestException ,
147
185
APIConnectionException , CardException , APIException {
@@ -170,44 +208,6 @@ public Account update(Map<String, Object> params, RequestOptions options)
170
208
options );
171
209
}
172
210
173
- public DeletedAccount delete ()
174
- throws AuthenticationException , InvalidRequestException ,
175
- APIConnectionException , CardException , APIException {
176
- return delete (null , (RequestOptions ) null );
177
- }
178
-
179
- public DeletedAccount delete (RequestOptions options )
180
- throws AuthenticationException , InvalidRequestException ,
181
- APIConnectionException , CardException , APIException {
182
- return delete (null , options );
183
- }
184
-
185
- public DeletedAccount delete (Map <String , Object > params )
186
- throws AuthenticationException , InvalidRequestException ,
187
- APIConnectionException , CardException , APIException {
188
- return delete (params , null );
189
- }
190
-
191
- public DeletedAccount delete (Map <String , Object > params , RequestOptions options )
192
- throws AuthenticationException , InvalidRequestException ,
193
- APIConnectionException , CardException , APIException {
194
- return request (RequestMethod .DELETE , instanceURL (Account .class , this .id ), params ,
195
- DeletedAccount .class , options );
196
- }
197
-
198
- public Account reject (Map <String , Object > params )
199
- throws AuthenticationException , InvalidRequestException ,
200
- APIConnectionException , CardException , APIException {
201
- return reject (params , null );
202
- }
203
-
204
- public Account reject (Map <String , Object > params , RequestOptions options )
205
- throws AuthenticationException , InvalidRequestException ,
206
- APIConnectionException , CardException , APIException {
207
- return request (RequestMethod .POST , String .format ("%s/reject" ,
208
- instanceURL (Account .class , this .getId ())), params , Account .class , options );
209
- }
210
-
211
211
@ Getter
212
212
@ Setter
213
213
@ EqualsAndHashCode (callSuper = false )
0 commit comments