STPConnectAccountParams
@interface STPConnectAccountParams : NSObject <STPFormEncodable>
Parameters for creating a Connect Account token.
-
Optional boolean indicating that the Terms Of Service were shown to the user & the user accepted them.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSNumber *tosShownAndAccepted;
Swift
var tosShownAndAccepted: NSNumber? { get }
-
Required property with information about the legal entity for this account.
At least one field in the legalEntity must have a value, otherwise the create token call will fail.
Declaration
Objective-C
@property (nonatomic, readonly) STPLegalEntityParams *_Nonnull legalEntity;
Swift
var legalEntity: STPLegalEntityParams { get }
-
Unavailable
Cannot be directly instantiated
STPConnectAccountParams
cannot be directly instantiated, useinitWithTosShownAndAccepted:legalEntity:
orinitWithLegalEntity:
Declaration
Objective-C
- (nonnull instancetype)init;
-
Initialize
STPConnectAccountParams
with tosShownAndAccepted = YESThis method cannot be called with
wasAccepted == NO
, guarded by aNSParameterAssert()
.Use this init method if you want to set the
tosShownAndAccepted
parameter. If you don’t, use theinitWithLegalEntity:
version instead.Declaration
Objective-C
- (nonnull instancetype) initWithTosShownAndAccepted:(BOOL)wasAccepted legalEntity:(nonnull STPLegalEntityParams *)legalEntity;
Swift
init(tosShownAndAccepted wasAccepted: Bool, legalEntity: STPLegalEntityParams)
Parameters
wasAccepted
Must be YES, but only if the user was shown & accepted the ToS
legalEntity
data about the legal entity
-
Initialize
STPConnectAccountParams
with theSTPLegalEntityParams
provided.This init method cannot change the
tosShownAndAccepted
parameter. UseinitWithTosShownAndAccepted:legalEntity:
instead if you need to do that.These two init methods exist to avoid the (slightly awkward) NSNumber box that would be needed around
tosShownAndAccepted
if it was optional/nullable, and to enforce that it is either nil or YES.Declaration
Objective-C
- (nonnull instancetype)initWithLegalEntity: (nonnull STPLegalEntityParams *)legalEntity;
Swift
init(legalEntity: STPLegalEntityParams)
Parameters
legalEntity
data to send to Stripe about the legal entity