Futures
public class Futures
Combine bindings.
-
Creates 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. -
Gets 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. -
Lists beneficiary accounts for a user.
Declaration
Swift
public func listBeneficiaries(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. -
Updates 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. -
Deletes 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.
-
Creates a remittance quote for a beneficiary.
Declaration
Swift
public func createQuote(token: String, walletUuid: String, data: CreateQuoteRequest) -> Future<Quote, EventError>
Parameters
token
The token to authenticate the SDK.
walletUuid
The unique uuid of a wallet.
data
A
CreateQuoteRequest
data model.Return Value
A
Future
object. -
Creates a remittance transaction to a beneficiary.
Declaration
Swift
public func createRemittance(token: String, walletUuid: String, data: CreateRemittanceRequest) -> Future<Remittance, EventError>
Parameters
token
The token to authenticate the SDK.
walletUuid
The unique uuid of a wallet.
data
A
CreateRemittanceRequest
data model.Return Value
A
Future
object. -
List cash pickup cities.
Declaration
Swift
public func listCashPickupCities(token: String, query: CashPickupCitiesQuery) -> Future<[CashPickupCity], EventError>
Parameters
token
The token to authenticate the SDK.
query
The query to filter the retrieved cash pickup cities.
Return Value
A
Future
object. -
List cash pickup locations.
Declaration
Swift
public func listCashPickupLocations(token: String, query: CashPickupLocationsQuery) -> Future<[CashPickupLocation], EventError>
Parameters
token
The token to authenticate the SDK.
query
The query to filter the retrieved cash pickup locations.
Return Value
A
Future
object. -
Get cash pickup location.
Declaration
Swift
public func getCashPickupLocation(token: String, locationUuid: String) -> Future<CashPickupLocation, EventError>
Parameters
token
The token to authenticate the SDK.
locationUuid
The unique uuid of a location.
Return Value
A
Future
object.
-
Create a payout method.
Declaration
Swift
public func createPayoutMethod(token: String, beneficiaryUuid: String, data: CreatePayoutMethodRequest) -> Future<PayoutMethod, EventError>
Parameters
token
The token to authenticate the SDK.
beneficiaryUuid
The uuid of the beneficiary.
data
A
CreatePayoutMethodRequest
data model.Return Value
A
Future
object. -
List payout methods.
Declaration
Swift
public func listPayoutMethods(token: String, beneficiaryUuid: String, limit: UInt? = nil, offset: UInt? = nil) -> Future<[PayoutMethod], EventError>
Parameters
token
The token to authenticate the SDK.
beneficiaryUuid
The uuid of the beneficiary.
limit
The number of items per page. Optional.
offset
Start after offset amount of records. Optional.
Return Value
A
Future
object. -
Get a payout method.
Declaration
Swift
public func getPayoutMethod(token: String, payoutMethodUuid: String) -> Future<PayoutMethod, EventError>
Parameters
token
The token to authenticate the SDK.
payoutMethodUuid
The uuid of the payout method
Return Value
A
Future
object. -
Update a payout method.
Declaration
Swift
public func updatePayoutMethod(token: String, payoutMethodUuid: String, data: UpdatePayoutMethodRequest) -> Future<PayoutMethod, EventError>
Parameters
token
The token to authenticate the SDK.
payoutMethodUuid
The uuid of the payout method
data
A
UpdatePayoutMethodRequest
data model.Return Value
A
Future
object. -
Delete a payout method.
Declaration
Swift
public func deletePayoutMethod(token: String, payoutMethodUuid: String) -> Future<Bool, EventError>
Parameters
token
The token to authenticate the SDK.
payoutMethodUuid
The uuid of the payout method.
Return Value
A
Future
object.