Skip to content

Commit

Permalink
Codegen for openapi v183
Browse files Browse the repository at this point in the history
  • Loading branch information
kamil-stripe committed Aug 18, 2022
1 parent 8760b08 commit 1dce619
Show file tree
Hide file tree
Showing 116 changed files with 7,689 additions and 5,676 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
@@ -1 +1 @@
v178
v183
437 changes: 222 additions & 215 deletions src/main/java/com/stripe/model/Account.java

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions src/main/java/com/stripe/model/AccountLink.java
Expand Up @@ -12,6 +12,13 @@
import lombok.Getter;
import lombok.Setter;

/**
* Account Links are the means by which a Connect platform grants a connected account permission to
* access Stripe-hosted applications, such as Connect Onboarding.
*
* <p>Related guide: <a href="https://stripe.com/docs/connect/connect-onboarding">Connect
* Onboarding</a>.
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
104 changes: 52 additions & 52 deletions src/main/java/com/stripe/model/ApplePayDomain.java
Expand Up @@ -49,31 +49,6 @@ public class ApplePayDomain extends ApiResource implements HasId {
@SerializedName("object")
String object;

/** List apple pay domains. */
public static ApplePayDomainCollection list(Map<String, Object> params) throws StripeException {
return list(params, (RequestOptions) null);
}

/** List apple pay domains. */
public static ApplePayDomainCollection list(Map<String, Object> params, RequestOptions options)
throws StripeException {
String url = String.format("%s%s", Stripe.getApiBase(), "/v1/apple_pay/domains");
return ApiResource.requestCollection(url, params, ApplePayDomainCollection.class, options);
}

/** List apple pay domains. */
public static ApplePayDomainCollection list(ApplePayDomainListParams params)
throws StripeException {
return list(params, (RequestOptions) null);
}

/** List apple pay domains. */
public static ApplePayDomainCollection list(
ApplePayDomainListParams params, RequestOptions options) throws StripeException {
String url = String.format("%s%s", Stripe.getApiBase(), "/v1/apple_pay/domains");
return ApiResource.requestCollection(url, params, ApplePayDomainCollection.class, options);
}

/** Create an apple pay domain. */
public static ApplePayDomain create(Map<String, Object> params) throws StripeException {
return create(params, (RequestOptions) null);
Expand All @@ -100,6 +75,58 @@ public static ApplePayDomain create(ApplePayDomainCreateParams params, RequestOp
ApiResource.RequestMethod.POST, url, params, ApplePayDomain.class, options);
}

/** Delete an apple pay domain. */
public ApplePayDomain delete() throws StripeException {
return delete((Map<String, Object>) null, (RequestOptions) null);
}

/** Delete an apple pay domain. */
public ApplePayDomain delete(RequestOptions options) throws StripeException {
return delete((Map<String, Object>) null, options);
}

/** Delete an apple pay domain. */
public ApplePayDomain delete(Map<String, Object> params) throws StripeException {
return delete(params, (RequestOptions) null);
}

/** Delete an apple pay domain. */
public ApplePayDomain delete(Map<String, Object> params, RequestOptions options)
throws StripeException {
String url =
String.format(
"%s%s",
Stripe.getApiBase(),
String.format("/v1/apple_pay/domains/%s", ApiResource.urlEncodeId(this.getId())));
return ApiResource.request(
ApiResource.RequestMethod.DELETE, url, params, ApplePayDomain.class, options);
}

/** List apple pay domains. */
public static ApplePayDomainCollection list(Map<String, Object> params) throws StripeException {
return list(params, (RequestOptions) null);
}

/** List apple pay domains. */
public static ApplePayDomainCollection list(Map<String, Object> params, RequestOptions options)
throws StripeException {
String url = String.format("%s%s", Stripe.getApiBase(), "/v1/apple_pay/domains");
return ApiResource.requestCollection(url, params, ApplePayDomainCollection.class, options);
}

/** List apple pay domains. */
public static ApplePayDomainCollection list(ApplePayDomainListParams params)
throws StripeException {
return list(params, (RequestOptions) null);
}

/** List apple pay domains. */
public static ApplePayDomainCollection list(
ApplePayDomainListParams params, RequestOptions options) throws StripeException {
String url = String.format("%s%s", Stripe.getApiBase(), "/v1/apple_pay/domains");
return ApiResource.requestCollection(url, params, ApplePayDomainCollection.class, options);
}

/** Retrieve an apple pay domain. */
public static ApplePayDomain retrieve(String domain) throws StripeException {
return retrieve(domain, (Map<String, Object>) null, (RequestOptions) null);
Expand Down Expand Up @@ -135,31 +162,4 @@ public static ApplePayDomain retrieve(
return ApiResource.request(
ApiResource.RequestMethod.GET, url, params, ApplePayDomain.class, options);
}

/** Delete an apple pay domain. */
public ApplePayDomain delete() throws StripeException {
return delete((Map<String, Object>) null, (RequestOptions) null);
}

/** Delete an apple pay domain. */
public ApplePayDomain delete(RequestOptions options) throws StripeException {
return delete((Map<String, Object>) null, options);
}

/** Delete an apple pay domain. */
public ApplePayDomain delete(Map<String, Object> params) throws StripeException {
return delete(params, (RequestOptions) null);
}

/** Delete an apple pay domain. */
public ApplePayDomain delete(Map<String, Object> params, RequestOptions options)
throws StripeException {
String url =
String.format(
"%s%s",
Stripe.getApiBase(),
String.format("/v1/apple_pay/domains/%s", ApiResource.urlEncodeId(this.getId())));
return ApiResource.request(
ApiResource.RequestMethod.DELETE, url, params, ApplePayDomain.class, options);
}
}
14 changes: 14 additions & 0 deletions src/main/java/com/stripe/model/Balance.java
Expand Up @@ -13,6 +13,20 @@
import lombok.Getter;
import lombok.Setter;

/**
* This is an object representing your Stripe balance. You can retrieve it to see the balance
* currently on your Stripe account.
*
* <p>You can also retrieve the balance history, which contains a list of <a
* href="https://stripe.com/docs/reporting/balance-transaction-types">transactions</a> that
* contributed to the balance (charges, payouts, and so forth).
*
* <p>The available and pending amounts for each currency are broken down further by payment source
* types.
*
* <p>Related guide: <a href="https://stripe.com/docs/connect/account-balances">Understanding
* Connect Account Balances</a>.
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/com/stripe/model/BalanceTransaction.java
Expand Up @@ -15,6 +15,13 @@
import lombok.Getter;
import lombok.Setter;

/**
* Balance transactions represent funds moving through your Stripe account. They're created for
* every type of transaction that comes into or flows out of your Stripe account balance.
*
* <p>Related guide: <a href="https://stripe.com/docs/reports/balance-transaction-types">Balance
* Transaction Types</a>.
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/com/stripe/model/BankAccount.java
Expand Up @@ -16,6 +16,17 @@
import lombok.Getter;
import lombok.Setter;

/**
* These bank accounts are payment methods on {@code Customer} objects.
*
* <p>On the other hand <a href="https://stripe.com/docs/api#external_accounts">External
* Accounts</a> are transfer destinations on {@code Account} objects for <a
* href="https://stripe.com/docs/connect/custom-accounts">Custom accounts</a>. They can be bank
* accounts or debit cards as well, and are documented in the links above.
*
* <p>Related guide: <a href="https://stripe.com/docs/payments/bank-debits-transfers">Bank Debits
* and Transfers</a>.
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/com/stripe/model/Capability.java
Expand Up @@ -13,6 +13,12 @@
import lombok.Getter;
import lombok.Setter;

/**
* This is an object representing a capability for a Stripe account.
*
* <p>Related guide: <a href="https://stripe.com/docs/connect/account-capabilities">Account
* capabilities</a>.
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/com/stripe/model/Card.java
Expand Up @@ -15,6 +15,12 @@
import lombok.Getter;
import lombok.Setter;

/**
* You can store multiple cards on a customer in order to charge the customer later. You can also
* store multiple debit cards on a recipient in order to transfer to those cards later.
*
* <p>Related guide: <a href="https://stripe.com/docs/sources/cards">Card Payments with Sources</a>.
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
151 changes: 151 additions & 0 deletions src/main/java/com/stripe/model/CashBalance.java
Expand Up @@ -13,6 +13,11 @@
import lombok.Getter;
import lombok.Setter;

/**
* A customer's {@code Cash balance} represents real funds. Customers can add funds to their cash
* balance by sending a bank transfer. These funds can be used for payment and can eventually be
* paid out to your bank account.
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down Expand Up @@ -119,6 +124,39 @@ public CashBalance update(CashBalanceUpdateParams params, RequestOptions options
ApiResource.RequestMethod.POST, url, params, CashBalance.class, options);
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class AppliedToPaymentTransaction extends StripeObject {
/**
* The <a href="https://stripe.com/docs/api/payment_intents/object">Payment Intent</a> that
* funds were applied to.
*/
@SerializedName("payment_intent")
@Getter(lombok.AccessLevel.NONE)
@Setter(lombok.AccessLevel.NONE)
ExpandableField<PaymentIntent> paymentIntent;

/** Get ID of expandable {@code paymentIntent} object. */
public String getPaymentIntent() {
return (this.paymentIntent != null) ? this.paymentIntent.getId() : null;
}

public void setPaymentIntent(String id) {
this.paymentIntent = ApiResource.setExpandableFieldId(id, this.paymentIntent);
}

/** Get expanded {@code paymentIntent}. */
public PaymentIntent getPaymentIntentObject() {
return (this.paymentIntent != null) ? this.paymentIntent.getExpanded() : null;
}

public void setPaymentIntentObject(PaymentIntent expandableObject) {
this.paymentIntent =
new ExpandableField<PaymentIntent>(expandableObject.getId(), expandableObject);
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand All @@ -131,4 +169,117 @@ public static class BalanceSettings extends StripeObject {
@SerializedName("reconciliation_mode")
String reconciliationMode;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class FundedTransaction extends StripeObject {
@SerializedName("bank_transfer")
BankTransfer bankTransfer;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class BankTransfer extends StripeObject {
@SerializedName("eu_bank_transfer")
EuBankTransfer euBankTransfer;

/** The user-supplied reference field on the bank transfer. */
@SerializedName("reference")
String reference;

/**
* The funding method type used to fund the customer balance. Permitted values include: {@code
* eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer}, or {@code
* mx_bank_transfer}.
*
* <p>One of {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer}, or
* {@code mx_bank_transfer}.
*/
@SerializedName("type")
String type;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class EuBankTransfer extends StripeObject {
/** The BIC of the bank of the sender of the funding. */
@SerializedName("bic")
String bic;

/** The last 4 digits of the IBAN of the sender of the funding. */
@SerializedName("iban_last4")
String ibanLast4;

/** The full name of the sender, as supplied by the sending bank. */
@SerializedName("sender_name")
String senderName;
}
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class RefundedFromPaymentTransaction extends StripeObject {
/**
* The <a href="https://stripe.com/docs/api/refunds/object">Refund</a> that moved these funds
* into the customer's cash balance.
*/
@SerializedName("refund")
@Getter(lombok.AccessLevel.NONE)
@Setter(lombok.AccessLevel.NONE)
ExpandableField<Refund> refund;

/** Get ID of expandable {@code refund} object. */
public String getRefund() {
return (this.refund != null) ? this.refund.getId() : null;
}

public void setRefund(String id) {
this.refund = ApiResource.setExpandableFieldId(id, this.refund);
}

/** Get expanded {@code refund}. */
public Refund getRefundObject() {
return (this.refund != null) ? this.refund.getExpanded() : null;
}

public void setRefundObject(Refund expandableObject) {
this.refund = new ExpandableField<Refund>(expandableObject.getId(), expandableObject);
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class UnappliedFromPaymentTransaction extends StripeObject {
/**
* The <a href="https://stripe.com/docs/api/payment_intents/object">Payment Intent</a> that
* funds were unapplied from.
*/
@SerializedName("payment_intent")
@Getter(lombok.AccessLevel.NONE)
@Setter(lombok.AccessLevel.NONE)
ExpandableField<PaymentIntent> paymentIntent;

/** Get ID of expandable {@code paymentIntent} object. */
public String getPaymentIntent() {
return (this.paymentIntent != null) ? this.paymentIntent.getId() : null;
}

public void setPaymentIntent(String id) {
this.paymentIntent = ApiResource.setExpandableFieldId(id, this.paymentIntent);
}

/** Get expanded {@code paymentIntent}. */
public PaymentIntent getPaymentIntentObject() {
return (this.paymentIntent != null) ? this.paymentIntent.getExpanded() : null;
}

public void setPaymentIntentObject(PaymentIntent expandableObject) {
this.paymentIntent =
new ExpandableField<PaymentIntent>(expandableObject.getId(), expandableObject);
}
}
}

0 comments on commit 1dce619

Please sign in to comment.