pub struct NoahClient { /* private fields */ }Expand description
Main client for interacting with the Noah API
Implementations§
Source§impl NoahClient
impl NoahClient
Sourcepub async fn get_balances(
&self,
page_size: Option<u32>,
page_token: Option<&str>,
) -> Result<GetBalancesResponse>
pub async fn get_balances( &self, page_size: Option<u32>, page_token: Option<&str>, ) -> Result<GetBalancesResponse>
Get balances (async)
Source§impl NoahClient
impl NoahClient
Sourcepub async fn get_channels_sell(
&self,
params: GetChannelsSellParams<'_>,
) -> Result<GetChannelsResponse>
pub async fn get_channels_sell( &self, params: GetChannelsSellParams<'_>, ) -> Result<GetChannelsResponse>
Get channels for selling crypto (async)
Sourcepub async fn get_channel(
&self,
channel_id: &ChannelID,
crypto_currency: &CryptoCurrencyCode,
fiat_amount: Option<&PositiveDecimal>,
customer_id: Option<&CustomerID>,
) -> Result<Channel>
pub async fn get_channel( &self, channel_id: &ChannelID, crypto_currency: &CryptoCurrencyCode, fiat_amount: Option<&PositiveDecimal>, customer_id: Option<&CustomerID>, ) -> Result<Channel>
Get channel by ID (async)
Sourcepub async fn get_channels_sell_countries(
&self,
customer_id: Option<&CustomerID>,
) -> Result<ChannelsCountriesResponse>
pub async fn get_channels_sell_countries( &self, customer_id: Option<&CustomerID>, ) -> Result<ChannelsCountriesResponse>
Get countries for sell channels (async)
Source§impl NoahClient
impl NoahClient
Sourcepub async fn create_crypto_payin_session(
&self,
request: &CryptoPayinRequest,
) -> Result<CheckoutSessionResponse>
pub async fn create_crypto_payin_session( &self, request: &CryptoPayinRequest, ) -> Result<CheckoutSessionResponse>
Create crypto payin session (async)
Sourcepub async fn create_fiat_payin_session(
&self,
request: &FiatPayinRequest,
) -> Result<CheckoutSessionResponse>
pub async fn create_fiat_payin_session( &self, request: &FiatPayinRequest, ) -> Result<CheckoutSessionResponse>
Create fiat payin session (async)
Sourcepub async fn create_fiat_payout_session(
&self,
request: &FiatPayoutRequest,
) -> Result<CheckoutSessionResponse>
pub async fn create_fiat_payout_session( &self, request: &FiatPayoutRequest, ) -> Result<CheckoutSessionResponse>
Create fiat payout session (async)
Source§impl NoahClient
impl NoahClient
Sourcepub async fn get_customer(&self, customer_id: &CustomerID) -> Result<Customer>
pub async fn get_customer(&self, customer_id: &CustomerID) -> Result<Customer>
Get customer by ID (async)
Sourcepub async fn create_or_update_customer(
&self,
customer_id: &CustomerID,
customer: &CustomerInput,
) -> Result<()>
pub async fn create_or_update_customer( &self, customer_id: &CustomerID, customer: &CustomerInput, ) -> Result<()>
Create or update customer (async)
Sourcepub async fn get_customers(
&self,
page_size: Option<u32>,
page_token: Option<&str>,
sort_direction: Option<&SortDirection>,
) -> Result<GetCustomersResponse>
pub async fn get_customers( &self, page_size: Option<u32>, page_token: Option<&str>, sort_direction: Option<&SortDirection>, ) -> Result<GetCustomersResponse>
Get customers (async)
Source§impl NoahClient
impl NoahClient
Sourcepub async fn create_onboarding_session(
&self,
customer_id: &CustomerID,
request: &HostedOnboardingRequest,
) -> Result<HostedSessionResponse>
pub async fn create_onboarding_session( &self, customer_id: &CustomerID, request: &HostedOnboardingRequest, ) -> Result<HostedSessionResponse>
Create onboarding session (async)
Sourcepub async fn prefill_onboarding(
&self,
customer_id: &CustomerID,
request: &PrefillOnboardingRequest,
) -> Result<()>
pub async fn prefill_onboarding( &self, customer_id: &CustomerID, request: &PrefillOnboardingRequest, ) -> Result<()>
Prefill customer details (async)
Sourcepub async fn get_document_upload_url(
&self,
customer_id: &CustomerID,
document_type: &str,
country_code: &CountryCode,
side: Option<&str>,
associate_id: Option<&str>,
) -> Result<PrefillDocumentUploadURLResponse>
pub async fn get_document_upload_url( &self, customer_id: &CustomerID, document_type: &str, country_code: &CountryCode, side: Option<&str>, associate_id: Option<&str>, ) -> Result<PrefillDocumentUploadURLResponse>
Get document upload URL (async)
Source§impl NoahClient
impl NoahClient
Sourcepub async fn get_payment_methods(
&self,
customer_id: &CustomerID,
page_size: Option<u32>,
page_token: Option<&str>,
) -> Result<GetPaymentMethodsResponse>
pub async fn get_payment_methods( &self, customer_id: &CustomerID, page_size: Option<u32>, page_token: Option<&str>, ) -> Result<GetPaymentMethodsResponse>
Get payment methods (async)
Source§impl NoahClient
impl NoahClient
Sourcepub async fn get_transactions(
&self,
page_size: Option<u32>,
page_token: Option<&str>,
sort_direction: Option<&SortDirection>,
) -> Result<GetTransactionsResponse>
pub async fn get_transactions( &self, page_size: Option<u32>, page_token: Option<&str>, sort_direction: Option<&SortDirection>, ) -> Result<GetTransactionsResponse>
Get transactions (async)
Sourcepub async fn get_transaction(&self, transaction_id: &str) -> Result<Transaction>
pub async fn get_transaction(&self, transaction_id: &str) -> Result<Transaction>
Get transaction by ID (async)
Sourcepub async fn prepare_sell(
&self,
request: &PrepareSellRequest,
) -> Result<PrepareSellResponse>
pub async fn prepare_sell( &self, request: &PrepareSellRequest, ) -> Result<PrepareSellResponse>
Prepare sell transaction (async)
Sourcepub async fn sell(&self, request: &SellRequest) -> Result<SellResponse>
pub async fn sell(&self, request: &SellRequest) -> Result<SellResponse>
Create sell transaction (async)
Source§impl NoahClient
impl NoahClient
Sourcepub async fn create_bank_deposit_to_onchain_address_workflow(
&self,
request: &BankDepositToOnchainAddressRequest,
) -> Result<BankDepositToOnchainAddressResponse>
pub async fn create_bank_deposit_to_onchain_address_workflow( &self, request: &BankDepositToOnchainAddressRequest, ) -> Result<BankDepositToOnchainAddressResponse>
Create bank deposit to onchain address workflow (async)
Source§impl NoahClient
impl NoahClient
Sourcepub fn new(config: Config, auth_config: AuthConfig) -> Result<Self>
pub fn new(config: Config, auth_config: AuthConfig) -> Result<Self>
Create a new client with the given configuration
Sourcepub async fn get<T: DeserializeOwned>(&self, path: &str) -> Result<T>
pub async fn get<T: DeserializeOwned>(&self, path: &str) -> Result<T>
Make an async GET request
Trait Implementations§
Source§impl Clone for NoahClient
impl Clone for NoahClient
Source§fn clone(&self) -> NoahClient
fn clone(&self) -> NoahClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NoahClient
impl !RefUnwindSafe for NoahClient
impl Send for NoahClient
impl Sync for NoahClient
impl Unpin for NoahClient
impl !UnwindSafe for NoahClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more