Futures

class Futures

Combine bindings.

Beneficiary

  • Create a beneficiary for a user account.

    Declaration

    Swift

    public func createBeneficiary(token: String,
                                  accountUuid: String,
                                  beneficiaryData: CreateBeneficiaryRequest) -> Future<Beneficiary, EventError>

    Parameters

    token

    The token to authenticate the SDK.

    accountUuid

    The user account uuid value.

    beneficiaryData

    A CreateBeneficiaryRequest data model.

    Return Value

    A Future object.

  • Get a beneficiary account for a user.

    Declaration

    Swift

    public func getBeneficiary(token: String,
                               accountUuid: String,
                               beneficiaryUuid: String) -> Future<Beneficiary, EventError>

    Parameters

    token

    The token to authenticate the SDK.

    accountUuid

    The user account uuid value.

    beneficiaryUuid

    The uuid of the beneficiary.

    Return Value

    A Future object.

  • Get all beneficiary accounts for a user.

    Declaration

    Swift

    public func getBeneficiaries(token: String,
                                 accountUuid: String,
                                 limit: UInt? = nil,
                                 offset: UInt? = nil,
                                 type: String? = nil) -> Future<[Beneficiary], EventError>

    Parameters

    token

    The token to authenticate the SDK.

    accountUuid

    The user account uuid value.

    limit

    The number of items per page. Optional.

    offset

    Start after offset amount of records. Optional.

    type

    The beneficiaries type. Can be expressed by BeneficiaryType cases. Optional.

    Return Value

    A Future object.

  • Update a beneficiary account for a user.

    Declaration

    Swift

    public func updateBeneficiary(token: String,
                                  accountUuid: String,
                                  beneficiaryUuid: String,
                                  beneficiaryData: UpdateBeneficiaryRequest) -> Future<Beneficiary, EventError>

    Parameters

    token

    The token to authenticate the SDK.

    accountUuid

    The uuid of the account.

    beneficiaryUuid

    The uuid of the beneficiary.

    beneficiaryData

    A UpdateBeneficiaryRequest data model with the data updated.

    Return Value

    A Future object.

  • Delete a beneficiary account for a user.

    Declaration

    Swift

    public func deleteBeneficiary(token: String,
                                  accountUuid: String,
                                  beneficiaryUuid: String) -> Future<Bool, EventError>

    Parameters

    token

    The token to authenticate the SDK.

    accountUuid

    The uuid of the account.

    beneficiaryUuid

    The uuid of the beneficiary.

    Return Value

    A Future object.

Global Payments