pub struct CustomersEndpoints<T: HttpClient + Default> { /* private fields */ }
Expand description
A struct to hold all the functions of the customers API endpoint
Implementations§
Source§impl<T: HttpClient + Default> CustomersEndpoints<T>
impl<T: HttpClient + Default> CustomersEndpoints<T>
Sourcepub async fn create_customer(
&self,
create_customer_request: CreateCustomerRequest,
) -> PaystackResult<CustomerResponseData>
pub async fn create_customer( &self, create_customer_request: CreateCustomerRequest, ) -> PaystackResult<CustomerResponseData>
Sourcepub async fn list_customers(
&self,
per_page: Option<u8>,
page: Option<u8>,
) -> PaystackResult<Vec<CustomerResponseData>>
pub async fn list_customers( &self, per_page: Option<u8>, page: Option<u8>, ) -> PaystackResult<Vec<CustomerResponseData>>
Sourcepub async fn fetch_customer(
&self,
email_or_code: String,
) -> PaystackResult<CustomerResponseData>
pub async fn fetch_customer( &self, email_or_code: String, ) -> PaystackResult<CustomerResponseData>
Sourcepub async fn update_customer(
&self,
customer_code: String,
update_customer_request: UpdateCustomerRequest,
) -> PaystackResult<CustomerResponseData>
pub async fn update_customer( &self, customer_code: String, update_customer_request: UpdateCustomerRequest, ) -> PaystackResult<CustomerResponseData>
Sourcepub async fn validate_customer(
&self,
customer_code: String,
customer_validation_request: ValidateCustomerRequest,
) -> PaystackResult<PhantomData<String>>
pub async fn validate_customer( &self, customer_code: String, customer_validation_request: ValidateCustomerRequest, ) -> PaystackResult<PhantomData<String>>
Validates a customer’s identity
§Arguments
customer_code
- Email or customer code of customer to be identifiedcustomer_validation_request
- The data to validate the customer with. Should be created with the ValidateCustomerRequestBuilder struct
§Returns
A Result containing the validation response or an error
Sourcepub async fn whitelist_or_blacklist_customer(
&self,
customer_code: String,
risk_action: RiskAction,
) -> PaystackResult<CustomerResponseData>
pub async fn whitelist_or_blacklist_customer( &self, customer_code: String, risk_action: RiskAction, ) -> PaystackResult<CustomerResponseData>
Trait Implementations§
Source§impl<T: Clone + HttpClient + Default> Clone for CustomersEndpoints<T>
impl<T: Clone + HttpClient + Default> Clone for CustomersEndpoints<T>
Source§fn clone(&self) -> CustomersEndpoints<T>
fn clone(&self) -> CustomersEndpoints<T>
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<T> Freeze for CustomersEndpoints<T>
impl<T> RefUnwindSafe for CustomersEndpoints<T>where
T: RefUnwindSafe,
impl<T> Send for CustomersEndpoints<T>where
T: Sync,
impl<T> Sync for CustomersEndpoints<T>where
T: Sync,
impl<T> Unpin for CustomersEndpoints<T>
impl<T> UnwindSafe for CustomersEndpoints<T>where
T: RefUnwindSafe,
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