Builder

public class Builder

A helper class to build the HyperwalletTransfer instance.

  • Creates a new instance of the HyperwalletTransfer.Builder based on the required parameters to create a transfer.

    Declaration

    Swift

    public init(clientTransferId: String, sourceToken: String, destinationToken: String)

    Parameters

    clientTransferId

    A client defined transfer identifier. This is the unique ID assigned to the transfer on your system. Max 50 characters.

    sourceToken

    A token identifying the source of funds. It can be a prepaid card token prefixed with trm- or user token prefixed with usr-.

    destinationToken

    A token identifying where the funds have been sent. It is your merchant account token prefixed with act-.

  • Sets the transfer destination amount.

    Declaration

    Swift

    public func destinationAmount(_ destinationAmount: String?) -> Builder

    Parameters

    destinationAmount

    The payment amount in the specified currency loaded into your merchant account.

    Return Value

    a self HyperwalletTransfer.Builder instance.

  • Sets the transfer destination currency.

    Declaration

    Swift

    public func destinationCurrency(_ destinationCurrency: String?) -> Builder

    Parameters

    destinationCurrency

    The currency of the payment amount loaded into your merchant account in ISO 4217 format.

    Return Value

    a self HyperwalletTransfer.Builder instance.

  • Sets the transfer memo.

    Declaration

    Swift

    public func memo(_ memo: String?) -> Builder

    Parameters

    memo

    An internal memo for the SpendBack transfer (will not be visible to the user making the payment).

    Return Value

    a self HyperwalletTransfer.Builder instance.

  • Sets the transfer notes.

    Declaration

    Swift

    public func notes(_ notes: String?) -> Builder

    Parameters

    notes

    A description for the SpendBack transfer.

    Return Value

    a self HyperwalletTransfer.Builder instance.

  • Sets the transfer source amount.

    Declaration

    Swift

    public func sourceAmount(_ sourceAmount: String?) -> Builder

    Parameters

    sourceAmount

    The payment amount in the specified currency that is debited from the sourceToken.

    Return Value

    a self HyperwalletTransfer.Builder instance.

  • Sets the transfer source currency.

    Declaration

    Swift

    public func sourceCurrency(_ sourceCurrency: String?) -> Builder

    Parameters

    sourceCurrency

    The currency of the payment amount debited from the sourceToken in ISO 4217 format.

    Return Value

    a self HyperwalletTransfer.Builder instance.

  • Declaration

    Swift

    public func build() -> HyperwalletTransfer

    Return Value

    a new instance of the HyperwalletTransfer.