Eversend Rust SDK
[Experimental] Rust SDK for interacting with the Eversend API.
Table of Contents
Installation
Or add the following to your Cargo.toml:
[]
= "0.1"
Initialization
use ;
let eversend_client = new;
You can get your clientId and clientSecret from the settings section in the dashboard
Usage
Wallets
Get all wallets
let wallets = eversend_client
.wallets
.get_wallets
.await?;
Get one wallet
use WalletId;
let wallet = eversend_client
.wallets
.get_wallet
.await?;
Transactions
Get all transactions
use ;
let transactions = eversend_client
.transactions
.get_transactions
.await?;
Get one transaction
use GetTransactionParams;
let transaction = eversend_client
.transactions
.get_transaction
.await?;
Exchange
To exchange from one wallet to another, you first have to generate a quotation. This returns a token with a 30s timeout that you can use to make the exchange.
Get exchange quotation
use WalletId;
use CreateQuotationParams;
let quotation = eversend_client
.exchange
.create_quotation
.await?;
Exchange currency
use CreateExchangeParams;
let exchange = eversend_client
.exchange
.create_exchange
.await?;
Beneficiaries
Get beneficiaries
use GetBeneficiariesParams;
let beneficiaries = eversend_client
.beneficiaries
.get_beneficiaries
.await?;
The page
and limit
parameters default to 1
and 10
respectively.
Get single beneficiary
let beneficiary = eversend_client
.beneficiaries
.get_beneficiary
.await?;
Create a beneficiary
use CreateBeneficaryParams;
let response = eversend_client
.beneficiaries
.create_beneficiary;
Delete a beneficiary
let response = eversend_client
.beneficiaries
.delete_beneficiary
.await?;
Collections
Get collection fees
use ;
let fees = eversend_client
.collections
.get_collection_fees
.await?;
Get collection OTP
Required when initiating mobile money collections
use GetCollectionOtpParams;
let otp = eversend_client
.collections
.get_collection_otp
.await?;
Initiate Mobile Money collection
use GetMobileMoneyCollectionParams;
let collection = eversend_client
.collections
.get_mobile_money_collection
.await?;
Payouts
Get delivery countries
let countries = eversend_client
.payouts
.get_delivery_countries
.await?;
Get delivery banks
let banks = eversend_client
.payouts
.get_delivery_banks
.await?;
Get payout quotation (Momo and Bank)
use CreateMomoAndBankPayoutQuotationParams;
let quotation = eversend_client
.payouts
.create_momo_and_bank_payout_quotation
.await?;
Get payout quotation (Eversend)
use CreateEversendPayoutQuotationParams;
let quotation = eversend_client
.payouts
.create_eversend_payout_quotation
.await?;
Create Momo payout transaction
use CreateMomoPayoutTransactionParams;
let transaction = eversend_client
.payouts
.create_momo_payout_transaction
.await?;
Create Bank payout transaction
use CreateBankPayoutTransactionParams;
let transaction = eversend_client
.payouts
.create_bank_payout_transaction
.await?;
Create Beneficiary payout transaction
use CreateBeneficiaryPayoutTransactionParams;
let transaction = eversend_client
.payouts
.create_beneficiary_payout_transaction
.await?;
Create Eversend payout transaction
use CreateEversendPayoutTransactionParams;
let transaction = eversend_client
.payouts
.create_eversend_payout_transaction
.await?;
Contributing
Contributions are welcome. For more info please read the Contribution Guideline.