All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.stripe.model.AccountLink Maven / Gradle / Ivy

There is a newer version: 28.1.0-beta.3
Show newest version
// 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.param.AccountLinkCreateParams;
import java.util.Map;
import lombok.EqualsAndHashCode;
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.
 *
 * 

Related guide: Connect * Onboarding */ @Getter @Setter @EqualsAndHashCode(callSuper = false) public class AccountLink extends ApiResource { /** Time at which the object was created. Measured in seconds since the Unix epoch. */ @SerializedName("created") Long created; /** The timestamp at which this account link will expire. */ @SerializedName("expires_at") Long expiresAt; /** * String representing the object's type. Objects of the same type share the same value. * *

Equal to {@code account_link}. */ @SerializedName("object") String object; /** The URL for the account link. */ @SerializedName("url") String url; /** * Creates an AccountLink object that includes a single-use Stripe URL that the platform can * redirect their user to in order to take them through the Connect Onboarding flow. */ public static AccountLink create(Map params) throws StripeException { return create(params, (RequestOptions) null); } /** * Creates an AccountLink object that includes a single-use Stripe URL that the platform can * redirect their user to in order to take them through the Connect Onboarding flow. */ public static AccountLink create(Map params, RequestOptions options) throws StripeException { String path = "/v1/account_links"; ApiRequest request = new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); return getGlobalResponseGetter().request(request, AccountLink.class); } /** * Creates an AccountLink object that includes a single-use Stripe URL that the platform can * redirect their user to in order to take them through the Connect Onboarding flow. */ public static AccountLink create(AccountLinkCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } /** * Creates an AccountLink object that includes a single-use Stripe URL that the platform can * redirect their user to in order to take them through the Connect Onboarding flow. */ public static AccountLink create(AccountLinkCreateParams params, RequestOptions options) throws StripeException { String path = "/v1/account_links"; ApiResource.checkNullTypedParams(path, params); ApiRequest request = new ApiRequest( BaseAddress.API, ApiResource.RequestMethod.POST, path, ApiRequestParams.paramsToMap(params), options); return getGlobalResponseGetter().request(request, AccountLink.class); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy