Skip to content

Commit

Permalink
Update generated code for v1301
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Oct 16, 2024
1 parent 555ecac commit 1ff5f66
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1,226 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1300
v1301
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,7 @@
package com.stripe.model;

import com.google.gson.annotations.SerializedName;
import com.stripe.exception.StripeException;
import com.stripe.net.ApiRequest;
import com.stripe.net.ApiRequestParams;
import com.stripe.net.ApiResource;
import com.stripe.net.BaseAddress;
import com.stripe.net.RequestOptions;
import com.stripe.net.StripeResponseGetter;
import com.stripe.param.CustomerCashBalanceTransactionCreateParams;
import java.util.Map;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
Expand All @@ -24,7 +16,7 @@
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public class CustomerCashBalanceTransaction extends ApiResource
public class CustomerCashBalanceTransaction extends StripeObject
implements BalanceTransactionSource {
@SerializedName("adjusted_for_overdraft")
AdjustedForOverdraft adjustedForOverdraft;
Expand Down Expand Up @@ -428,69 +420,4 @@ public void setPaymentIntentObject(PaymentIntent expandableObject) {
new ExpandableField<PaymentIntent>(expandableObject.getId(), expandableObject);
}
}

public static class TestHelpers {
private TestHelpers() {}

/**
* Simulate various customer cash balance side-effects by creating synthetic cash balance
* transactions in testmode.
*/
public static CustomerCashBalanceTransaction create(Map<String, Object> params)
throws StripeException {
return create(params, (RequestOptions) null);
}

/**
* Simulate various customer cash balance side-effects by creating synthetic cash balance
* transactions in testmode.
*/
public static CustomerCashBalanceTransaction create(
Map<String, Object> params, RequestOptions options) throws StripeException {
String path = "/v1/test_helpers/customer_cash_balance_transactions";
ApiRequest request =
new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
return getGlobalResponseGetter().request(request, CustomerCashBalanceTransaction.class);
}

/**
* Simulate various customer cash balance side-effects by creating synthetic cash balance
* transactions in testmode.
*/
public static CustomerCashBalanceTransaction create(
CustomerCashBalanceTransactionCreateParams params) throws StripeException {
return create(params, (RequestOptions) null);
}

/**
* Simulate various customer cash balance side-effects by creating synthetic cash balance
* transactions in testmode.
*/
public static CustomerCashBalanceTransaction create(
CustomerCashBalanceTransactionCreateParams params, RequestOptions options)
throws StripeException {
String path = "/v1/test_helpers/customer_cash_balance_transactions";
ApiResource.checkNullTypedParams(path, params);
ApiRequest request =
new ApiRequest(
BaseAddress.API,
ApiResource.RequestMethod.POST,
path,
ApiRequestParams.paramsToMap(params),
options);
return getGlobalResponseGetter().request(request, CustomerCashBalanceTransaction.class);
}
}

@Override
public void setResponseGetter(StripeResponseGetter responseGetter) {
super.setResponseGetter(responseGetter);
trySetResponseGetter(adjustedForOverdraft, responseGetter);
trySetResponseGetter(appliedToPayment, responseGetter);
trySetResponseGetter(customer, responseGetter);
trySetResponseGetter(funded, responseGetter);
trySetResponseGetter(refundedFromPayment, responseGetter);
trySetResponseGetter(transferredToBalance, responseGetter);
trySetResponseGetter(unappliedFromPayment, responseGetter);
}
}
Loading

0 comments on commit 1ff5f66

Please sign in to comment.