pub struct TerminalEndpoints<T: HttpClient + Default> { /* private fields */ }Expand description
A struct to hold all the functions of the terminal API endpoint
Implementations§
Source§impl<T: HttpClient + Default> TerminalEndpoints<T>
 
impl<T: HttpClient + Default> TerminalEndpoints<T>
Sourcepub async fn send_event(
    &self,
    terminal_id: String,
    event_request: EventRequest,
) -> PaystackResult<SendEventResponseData>
 
pub async fn send_event( &self, terminal_id: String, event_request: EventRequest, ) -> PaystackResult<SendEventResponseData>
Send an event from your application to the Paystack Terminal
§Arguments
- terminal_id- The ID of the Terminal the event should be sent to
- event_request- Struct containing the information of the event to send to the terminal. Created with EventRequestBuilder
§Returns
A Result containing the send event response data or an error
Sourcepub async fn fetch_event_status(
    &self,
    terminal_id: String,
    event_id: String,
) -> PaystackResult<FetchEventStatusResponseData>
 
pub async fn fetch_event_status( &self, terminal_id: String, event_id: String, ) -> PaystackResult<FetchEventStatusResponseData>
Sourcepub async fn fetch_terminal_status(
    &self,
    terminal_id: String,
) -> PaystackResult<FetchTerminalStatusResponseData>
 
pub async fn fetch_terminal_status( &self, terminal_id: String, ) -> PaystackResult<FetchTerminalStatusResponseData>
Sourcepub async fn list_terminals(
    &self,
    per_page: Option<i32>,
) -> PaystackResult<Vec<TerminalData>>
 
pub async fn list_terminals( &self, per_page: Option<i32>, ) -> PaystackResult<Vec<TerminalData>>
Sourcepub async fn fetch_terminal(
    &self,
    terminal_id: String,
) -> PaystackResult<TerminalData>
 
pub async fn fetch_terminal( &self, terminal_id: String, ) -> PaystackResult<TerminalData>
Sourcepub async fn update_terminal(
    &self,
    terminal_id: String,
    update_request: UpdateTerminalRequest,
) -> PaystackResult<PhantomData<String>>
 
pub async fn update_terminal( &self, terminal_id: String, update_request: UpdateTerminalRequest, ) -> PaystackResult<PhantomData<String>>
Update the details of a Terminal
§Arguments
- terminal_id- The ID of the Terminal to update
- update_request- The request data to update the terminal. Created with UpdateTerminalRequestBuilder
§Returns
A Result containing the response or an error. The generic String type is ignored since response has no data field
Sourcepub async fn commission_terminal(
    &self,
    serial_number: String,
) -> PaystackResult<PhantomData<String>>
 
pub async fn commission_terminal( &self, serial_number: String, ) -> PaystackResult<PhantomData<String>>
Sourcepub async fn decommission_terminal(
    &self,
    serial_number: String,
) -> PaystackResult<PhantomData<String>>
 
pub async fn decommission_terminal( &self, serial_number: String, ) -> PaystackResult<PhantomData<String>>
Trait Implementations§
Source§impl<T: Clone + HttpClient + Default> Clone for TerminalEndpoints<T>
 
impl<T: Clone + HttpClient + Default> Clone for TerminalEndpoints<T>
Source§fn clone(&self) -> TerminalEndpoints<T>
 
fn clone(&self) -> TerminalEndpoints<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 TerminalEndpoints<T>
impl<T> RefUnwindSafe for TerminalEndpoints<T>where
    T: RefUnwindSafe,
impl<T> Send for TerminalEndpoints<T>where
    T: Sync,
impl<T> Sync for TerminalEndpoints<T>where
    T: Sync,
impl<T> Unpin for TerminalEndpoints<T>
impl<T> UnwindSafe for TerminalEndpoints<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