Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
68065dff88008f079e79eb1ef0add5e261b416e1
9d9eb64ed1c8a7adcdcc153fc393b864deedc180
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2176
v2182
161 changes: 161 additions & 0 deletions src/main/java/com/stripe/model/AccountSignals.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
// File generated from our OpenAPI spec
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.AccountSignalsRetrieveParams;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

/**
* The Account Signals API provides risk related signals that can be used to better manage risks.
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public class AccountSignals extends ApiResource {
/** The account for which the signals belong to. */
@SerializedName("account")
String account;

/** The delinquency signal of the account. */
@SerializedName("delinquency")
Delinquency delinquency;

/**
* Has the value {@code true} if the object exists in live mode or the value {@code false} if the
* object exists in test mode.
*/
@SerializedName("livemode")
Boolean livemode;

/**
* String representing the object's type. Objects of the same type share the same value.
*
* <p>Equal to {@code account_signals}.
*/
@SerializedName("object")
String object;

/** Retrieves the account’s Signal objects. */
public static AccountSignals retrieve(String accountId) throws StripeException {
return retrieve(accountId, (Map<String, Object>) null, (RequestOptions) null);
}

/** Retrieves the account’s Signal objects. */
public static AccountSignals retrieve(String accountId, RequestOptions options)
throws StripeException {
return retrieve(accountId, (Map<String, Object>) null, options);
}

/** Retrieves the account’s Signal objects. */
public static AccountSignals retrieve(
String accountId, Map<String, Object> params, RequestOptions options) throws StripeException {
String path = String.format("/v1/accounts/%s/signals", ApiResource.urlEncodeId(accountId));
ApiRequest request =
new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
return getGlobalResponseGetter().request(request, AccountSignals.class);
}

/** Retrieves the account’s Signal objects. */
public static AccountSignals retrieve(
String accountId, AccountSignalsRetrieveParams params, RequestOptions options)
throws StripeException {
String path = String.format("/v1/accounts/%s/signals", ApiResource.urlEncodeId(accountId));
ApiResource.checkNullTypedParams(path, params);
ApiRequest request =
new ApiRequest(
BaseAddress.API,
ApiResource.RequestMethod.GET,
path,
ApiRequestParams.paramsToMap(params),
options);
return getGlobalResponseGetter().request(request, AccountSignals.class);
}

/**
* For more details about Delinquency, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Delinquency extends StripeObject {
/** Time at which the signal was evaluated, measured in seconds since the Unix epoch. */
@SerializedName("evaluated_at")
Long evaluatedAt;

/**
* Array of objects representing individual factors that contributed to the calculated
* probability of delinquency.
*/
@SerializedName("indicators")
List<AccountSignals.Delinquency.Indicator> indicators;

/** The probability of delinquency. Can be between 0.00 and 100.00 */
@SerializedName("probability")
BigDecimal probability;

/**
* Categorical assessment of the delinquency risk based on probability.
*
* <p>One of {@code elevated}, {@code highest}, {@code low}, {@code normal}, {@code
* not_assessed}, or {@code unknown}.
*/
@SerializedName("risk_level")
String riskLevel;

/** Unique identifier for the delinquency signal. */
@SerializedName("signal_id")
String signalId;

/**
* For more details about Indicator, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Indicator extends StripeObject {
/** A brief explanation of how this indicator contributed to the delinquency probability. */
@SerializedName("description")
String description;

/**
* The effect this indicator had on the overall risk level.
*
* <p>One of {@code decrease}, {@code neutral}, {@code slight_increase}, or {@code
* strong_increase}.
*/
@SerializedName("impact")
String impact;

/**
* The name of the specific indicator used in the risk assessment.
*
* <p>One of {@code account_balance}, {@code aov}, {@code charge_concentration}, {@code
* dispute_window}, {@code disputes}, {@code duplicates}, {@code exposure}, {@code
* firmographic}, {@code lifetime_metrics}, {@code payment_processing}, {@code
* payment_volume}, {@code payouts}, {@code refunds}, {@code tenure}, or {@code transfers}.
*/
@SerializedName("indicator")
String indicator;
}
}

@Override
public void setResponseGetter(StripeResponseGetter responseGetter) {
super.setResponseGetter(responseGetter);
trySetResponseGetter(delinquency, responseGetter);
}
}
25 changes: 25 additions & 0 deletions src/main/java/com/stripe/model/ApplicationFee.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ public class ApplicationFee extends ApiResource implements BalanceTransactionSou
@SerializedName("fee_source")
FeeSource feeSource;

/**
* Polymorphic funding source of the application fee. Includes the type and details of the funding
* source.
*/
@SerializedName("funding_source")
FundingSource fundingSource;

/** Unique identifier for the object. */
@Getter(onMethod_ = {@Override})
@SerializedName("id")
Expand Down Expand Up @@ -338,6 +345,23 @@ public static class FeeSource extends StripeObject {
String type;
}

/**
* For more details about FundingSource, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class FundingSource extends StripeObject {
/** The invoice ID associated with this funding source, if applicable. */
@SerializedName("invoice")
String invoice;

/** The type of funding source. */
@SerializedName("type")
String type;
}

@Override
public void setResponseGetter(StripeResponseGetter responseGetter) {
super.setResponseGetter(responseGetter);
Expand All @@ -346,6 +370,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
trySetResponseGetter(balanceTransaction, responseGetter);
trySetResponseGetter(charge, responseGetter);
trySetResponseGetter(feeSource, responseGetter);
trySetResponseGetter(fundingSource, responseGetter);
trySetResponseGetter(originatingTransaction, responseGetter);
trySetResponseGetter(refunds, responseGetter);
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/stripe/model/EventDataClassLookup.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public final class EventDataClassLookup {
classLookup.put("account_link", com.stripe.model.AccountLink.class);
classLookup.put("account_notice", com.stripe.model.AccountNotice.class);
classLookup.put("account_session", com.stripe.model.AccountSession.class);
classLookup.put("account_signals", com.stripe.model.AccountSignals.class);
classLookup.put("apple_pay_domain", com.stripe.model.ApplePayDomain.class);
classLookup.put("application", com.stripe.model.Application.class);
classLookup.put("application_fee", com.stripe.model.ApplicationFee.class);
Expand Down
59 changes: 59 additions & 0 deletions src/main/java/com/stripe/model/billing/AlertTriggered.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
@Setter
@EqualsAndHashCode(callSuper = false)
public class AlertTriggered extends StripeObject {
/** The aggregation period for which this alert triggered. */
@SerializedName("aggregation_period")
AggregationPeriod aggregationPeriod;

/**
* A billing alert is a resource that notifies you when a certain usage threshold on a meter is
* crossed. For example, you might create a billing alert to notify you when a certain user made
Expand Down Expand Up @@ -40,6 +44,13 @@ public class AlertTriggered extends StripeObject {
@SerializedName("external_customer_id")
String externalCustomerId;

/**
* Populated specifically for spend alerts to notify merchants which group_by entity has the
* exceeded spend.
*/
@SerializedName("group_by")
GroupBy groupBy;

/**
* Has the value {@code true} if the object exists in live mode or the value {@code false} if the
* object exists in test mode.
Expand All @@ -55,7 +66,55 @@ public class AlertTriggered extends StripeObject {
@SerializedName("object")
String object;

/** Timestamp at which the threshold was crossed. */
@SerializedName("triggered_at")
Long triggeredAt;

/** The value triggering the alert. */
@SerializedName("value")
BigDecimal value;

/**
* For more details about AggregationPeriod, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class AggregationPeriod extends StripeObject {
/** End time of the aggregation period. */
@SerializedName("ends_at")
Long endsAt;

/** Start time of the aggregation period. */
@SerializedName("starts_at")
Long startsAt;
}

/**
* For more details about GroupBy, please refer to the <a href="https://docs.stripe.com/api">API
* Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class GroupBy extends StripeObject {
/** The billing cadence ID, populated when type is {@code billing_cadence}. */
@SerializedName("billing_cadence")
String billingCadence;

/**
* The pricing plan subscription ID, populated when type is {@code pricing_plan_subscription}.
*/
@SerializedName("pricing_plan_subscription")
String pricingPlanSubscription;

/**
* The type of grouping used for this alert notification
*
* <p>One of {@code billing_cadence}, or {@code pricing_plan_subscription}.
*/
@SerializedName("type")
String type;
}
}
10 changes: 4 additions & 6 deletions src/main/java/com/stripe/model/tax/CalculationLineItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,10 @@ public class CalculationLineItem extends StripeObject implements HasId {
String object;

/**
* A tax location for a line item that acts as a performance location. This indicates that the
* line item might be taxed at the place where it is being performed at. This is helpful for
* events or other services being performed at non-customer addresses like venues or offices. This
* can be left empty for tax codes that do not require a tax location. For tax codes where the
* location requirement is &quot;optional&quot;, this would override the customer address in most
* use cases.
* Indicates the line item represents a performance where the venue location might determine the
* tax, not the customer address. Leave empty if the tax code doesn't require a tax location. If
* you provide this value for tax codes with an {@code optional} location requirement, it
* overrides the customer address.
*/
@SerializedName("performance_location")
String performanceLocation;
Expand Down
28 changes: 26 additions & 2 deletions src/main/java/com/stripe/param/AccountLinkCreateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,14 @@ public Builder setType(AccountLinkCreateParams.Type type) {
@Getter
@EqualsAndHashCode(callSuper = false)
public static class CollectionOptions {
/**
* Specifies whether the platform collects external account information from connected accounts
* during Connect Onboarding. When set to {@code false}, external account collection is skipped.
* Defaults to {@code true}.
*/
@SerializedName("external_account_collection")
Boolean externalAccountCollection;

/**
* Map of extra parameters for custom features not available in this client library. The content
* in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
Expand All @@ -262,7 +270,11 @@ public static class CollectionOptions {
FutureRequirements futureRequirements;

private CollectionOptions(
Map<String, Object> extraParams, Fields fields, FutureRequirements futureRequirements) {
Boolean externalAccountCollection,
Map<String, Object> extraParams,
Fields fields,
FutureRequirements futureRequirements) {
this.externalAccountCollection = externalAccountCollection;
this.extraParams = extraParams;
this.fields = fields;
this.futureRequirements = futureRequirements;
Expand All @@ -273,6 +285,8 @@ public static Builder builder() {
}

public static class Builder {
private Boolean externalAccountCollection;

private Map<String, Object> extraParams;

private Fields fields;
Expand All @@ -282,7 +296,17 @@ public static class Builder {
/** Finalize and obtain parameter instance from this builder. */
public AccountLinkCreateParams.CollectionOptions build() {
return new AccountLinkCreateParams.CollectionOptions(
this.extraParams, this.fields, this.futureRequirements);
this.externalAccountCollection, this.extraParams, this.fields, this.futureRequirements);
}

/**
* Specifies whether the platform collects external account information from connected
* accounts during Connect Onboarding. When set to {@code false}, external account collection
* is skipped. Defaults to {@code true}.
*/
public Builder setExternalAccountCollection(Boolean externalAccountCollection) {
this.externalAccountCollection = externalAccountCollection;
return this;
}

/**
Expand Down
Loading