TransferTokenBuilder

@interface TransferTokenBuilder : NSObject

Helper class that builds Transfer Tokens.

  • Member, normally set by create.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) TKMember *member;

    Swift

    var member: TKMember! { get set }
  • Specify member ID of payer account.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) NSString *fromMemberId;

    Swift

    var fromMemberId: String! { get set }
  • Currency string, normally set by create.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) NSString *currency;

    Swift

    var currency: String! { get set }
  • Transfer amount, normally set by create.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) NSDecimalNumber *lifetimeAmount;

    Swift

    var lifetimeAmount: UnsafeMutablePointer<Int32>! { get set }
  • Specify how much redeemer can redeem each time. For example, to enable 12x 10€ payments, set lifetimeAmount to 120, chargeAmount to 10.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) NSDecimalNumber *chargeAmount;

    Swift

    var chargeAmount: UnsafeMutablePointer<Int32>! { get set }
  • Account ID from which to pay.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) NSString *accountId;

    Swift

    var accountId: String! { get set }
  • One-time authorization for payment.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) OauthBankAuthorization *authorization;

    Swift

    var authorization: OauthBankAuthorization! { get set }
  • Expiration time in ms since 1970.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) int64_t expiresAtMs;

    Swift

    var expiresAtMs: Int64 { get set }
  • Effective-at time in ms since 1970.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) int64_t effectiveAtMs;

    Swift

    var effectiveAtMs: Int64 { get set }
  • Redeemer, specified by alias.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) Alias *redeemerAlias;

    Swift

    var redeemerAlias: Alias! { get set }
  • Redeemer, specified by Member ID.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) NSString *redeemerMemberId;

    Swift

    var redeemerMemberId: String! { get set }
  • Ppayer, specified by Alias.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) Alias *fromAlias;

    Swift

    var fromAlias: Alias! { get set }
  • Payee, specified by Alias.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) Alias *toAlias;

    Swift

    var toAlias: Alias! { get set }
  • Payee, specified by Member ID.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) NSString *toMemberId;

    Swift

    var toMemberId: String! { get set }
  • Description.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) NSString *descr;

    Swift

    var descr: String! { get set }
  • Fees, FX.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) Pricing *pricing;

    Swift

    var pricing: Pricing! { get set }
  • Purpose of payment.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) int purposeOfPayment;

    Swift

    var purposeOfPayment: Int32 { get set }
  • Destination bank accounts.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) NSArray<TransferEndpoint *> *destinations;
  • Attachment files.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) NSArray<Attachment *> *attachments;
  • Specify reference ID. If not set, the Token system chooses a random one.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) NSString *refId;

    Swift

    var refId: String! { get set }
  • Set entity redeemer is acting on behalf of.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) TokenPayload_ActingAs *actingAs;

    Swift

    var actingAs: TokenPayload_ActingAs! { get set }
  • If receipt is requested. Default to false.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) BOOL receiptRequested;

    Swift

    var receiptRequested: Bool { get set }
  • Initializes the transfer token builder.

    Declaration

    Objective-C

    - (id)init:(TKMember *)member
        lifetimeAmount:(NSDecimalNumber *)lifetimeAmount
              currency:(NSString *)currency;

    Swift

    init!(_ member: TKMember!, lifetimeAmount: Any!, currency: String!)

    Parameters

    member

    the payer of the token

    lifetimeAmount

    the total lifetime amount of the token

    currency

    the currency of the token

    Return Value

    transfer token builder

  • Executes the request, creating the token. Throws error if external authorization is required.

    Declaration

    Objective-C

    - (Token *)execute;

    Swift

    func execute() -> Token!

    Return Value

    transfer token

  • Executes the request, creating the token, async.

    Declaration

    Objective-C

    - (void)executeAsync:(OnSuccessWithToken)onSuccess onError:(OnError)onError;

    Swift

    func executeAsync(_ onSuccess: @escaping OnSuccessWithToken, onError: @escaping OnError)

    Parameters

    onSuccess

    invoked on success

    onError

    invoked on error