1010import com .stripe .net .RequestOptions ;
1111import com .stripe .net .StripeResponseGetter ;
1212import com .stripe .param .PaymentLocationCreateParams ;
13+ import com .stripe .param .PaymentLocationRetrieveParams ;
14+ import com .stripe .param .PaymentLocationUpdateParams ;
1315import java .util .List ;
1416import java .util .Map ;
1517import lombok .EqualsAndHashCode ;
@@ -35,6 +37,10 @@ public class PaymentLocation extends ApiResource implements HasId {
3537 @ SerializedName ("capability_settings" )
3638 CapabilitySettings capabilitySettings ;
3739
40+ /** Always true for a deleted object. */
41+ @ SerializedName ("deleted" )
42+ Boolean deleted ;
43+
3844 /** The display name of the location. */
3945 @ SerializedName ("display_name" )
4046 String displayName ;
@@ -93,6 +99,99 @@ public static PaymentLocation create(PaymentLocationCreateParams params, Request
9399 return getGlobalResponseGetter ().request (request , PaymentLocation .class );
94100 }
95101
102+ /** Delete a Payment Location. */
103+ public PaymentLocation delete () throws StripeException {
104+ return delete ((Map <String , Object >) null , (RequestOptions ) null );
105+ }
106+
107+ /** Delete a Payment Location. */
108+ public PaymentLocation delete (RequestOptions options ) throws StripeException {
109+ return delete ((Map <String , Object >) null , options );
110+ }
111+
112+ /** Delete a Payment Location. */
113+ public PaymentLocation delete (Map <String , Object > params ) throws StripeException {
114+ return delete (params , (RequestOptions ) null );
115+ }
116+
117+ /** Delete a Payment Location. */
118+ public PaymentLocation delete (Map <String , Object > params , RequestOptions options )
119+ throws StripeException {
120+ String path = String .format ("/v1/payment_locations/%s" , ApiResource .urlEncodeId (this .getId ()));
121+ ApiRequest request =
122+ new ApiRequest (BaseAddress .API , ApiResource .RequestMethod .DELETE , path , params , options );
123+ return getResponseGetter ().request (request , PaymentLocation .class );
124+ }
125+
126+ /** Retrieve a Payment Location. */
127+ public static PaymentLocation retrieve (String id ) throws StripeException {
128+ return retrieve (id , (Map <String , Object >) null , (RequestOptions ) null );
129+ }
130+
131+ /** Retrieve a Payment Location. */
132+ public static PaymentLocation retrieve (String id , RequestOptions options ) throws StripeException {
133+ return retrieve (id , (Map <String , Object >) null , options );
134+ }
135+
136+ /** Retrieve a Payment Location. */
137+ public static PaymentLocation retrieve (
138+ String id , Map <String , Object > params , RequestOptions options ) throws StripeException {
139+ String path = String .format ("/v1/payment_locations/%s" , ApiResource .urlEncodeId (id ));
140+ ApiRequest request =
141+ new ApiRequest (BaseAddress .API , ApiResource .RequestMethod .GET , path , params , options );
142+ return getGlobalResponseGetter ().request (request , PaymentLocation .class );
143+ }
144+
145+ /** Retrieve a Payment Location. */
146+ public static PaymentLocation retrieve (
147+ String id , PaymentLocationRetrieveParams params , RequestOptions options )
148+ throws StripeException {
149+ String path = String .format ("/v1/payment_locations/%s" , ApiResource .urlEncodeId (id ));
150+ ApiResource .checkNullTypedParams (path , params );
151+ ApiRequest request =
152+ new ApiRequest (
153+ BaseAddress .API ,
154+ ApiResource .RequestMethod .GET ,
155+ path ,
156+ ApiRequestParams .paramsToMap (params ),
157+ options );
158+ return getGlobalResponseGetter ().request (request , PaymentLocation .class );
159+ }
160+
161+ /** Update a Payment Location. */
162+ public PaymentLocation update (Map <String , Object > params ) throws StripeException {
163+ return update (params , (RequestOptions ) null );
164+ }
165+
166+ /** Update a Payment Location. */
167+ public PaymentLocation update (Map <String , Object > params , RequestOptions options )
168+ throws StripeException {
169+ String path = String .format ("/v1/payment_locations/%s" , ApiResource .urlEncodeId (this .getId ()));
170+ ApiRequest request =
171+ new ApiRequest (BaseAddress .API , ApiResource .RequestMethod .POST , path , params , options );
172+ return getResponseGetter ().request (request , PaymentLocation .class );
173+ }
174+
175+ /** Update a Payment Location. */
176+ public PaymentLocation update (PaymentLocationUpdateParams params ) throws StripeException {
177+ return update (params , (RequestOptions ) null );
178+ }
179+
180+ /** Update a Payment Location. */
181+ public PaymentLocation update (PaymentLocationUpdateParams params , RequestOptions options )
182+ throws StripeException {
183+ String path = String .format ("/v1/payment_locations/%s" , ApiResource .urlEncodeId (this .getId ()));
184+ ApiResource .checkNullTypedParams (path , params );
185+ ApiRequest request =
186+ new ApiRequest (
187+ BaseAddress .API ,
188+ ApiResource .RequestMethod .POST ,
189+ path ,
190+ ApiRequestParams .paramsToMap (params ),
191+ options );
192+ return getResponseGetter ().request (request , PaymentLocation .class );
193+ }
194+
96195 /**
97196 * For more details about BusinessRegistration, please refer to the <a
98197 * href="https://docs.stripe.com/api">API Reference.</a>
0 commit comments