Builder

public final class Builder

A helper class to build the HyperwalletPayPalAccount instance.

  • Creates a new instance of the HyperwalletPayPalAccount based on the required parameter to update PayPal account.

    Declaration

    Swift

    public init(token: String)

    Parameters

    token

    The PayPal account token.

  • Creates a new instance of the HyperwalletPayPalAccount based on the required parameters to create PayPal account.

    Declaration

    Swift

    public init(transferMethodCountry: String, transferMethodCurrency: String, transferMethodProfileType: String)

    Parameters

    transferMethodCountry

    The PayPal account country.

    transferMethodCurrency

    The PayPal account currency.

    transferMethodProfileType

    The bank account holder’s profile type, e.g. INDIVIDUAL or BUSINESS

  • Sets the email address

    Declaration

    Swift

    public func email(_ email: String) -> Builder

    Parameters

    email

    The email address user want to create a PayPal account

    Return Value

    a self HyperwalletPayPalAccount.Builder instance.

  • Sets the bank account holder’s profile type.

    Declaration

    Swift

    public func profileType(_ profileType: String) -> Builder

    Parameters

    profileType

    The bank account holder’s profile type, e.g. INDIVIDUAL or BUSINESS

    Return Value

    a self HyperwalletBankAccount.Builder instance.

  • Builds a new instance of the HyperwalletPayPalAccount.

    Declaration

    Swift

    public func build() -> HyperwalletPayPalAccount

    Return Value

    a new instance of the HyperwalletPayPalAccount.