Struct paystack::TerminalEndpoints
source · pub struct TerminalEndpoints<'a> { /* private fields */ }
Expand description
A Struct to hold all the functions of the terminal API route
Implementations§
source§impl<'a> TerminalEndpoints<'a>
impl<'a> TerminalEndpoints<'a>
sourcepub fn new(key: &'a str) -> TerminalEndpoints<'a>
pub fn new(key: &'a str) -> TerminalEndpoints<'a>
Constructor for the terminal object
sourcepub async fn send_event(
&self,
terminal_id: &str,
event_body: SendEventBody
) -> PaystackResult<SendEventResponse>
pub async fn send_event( &self, terminal_id: &str, event_body: SendEventBody ) -> PaystackResult<SendEventResponse>
Send an event from your application to the Paystack Terminal
It takes a SendEventBody type as its parameter
sourcepub async fn fetch_event_status(
&self,
terminal_id: &str,
event_id: &str
) -> PaystackResult<FetchEventStatusResponse>
pub async fn fetch_event_status( &self, terminal_id: &str, event_id: &str ) -> PaystackResult<FetchEventStatusResponse>
Check the status of an event sent to the Terminal
- terminal_id: The ID of the Terminal the event was sent to.
- event_id: The ID of the event that was sent to the Terminal.
sourcepub async fn fetch_terminal_status(
&self,
terminal_id: &str
) -> PaystackResult<FetchTerminalStatusResponse>
pub async fn fetch_terminal_status( &self, terminal_id: &str ) -> PaystackResult<FetchTerminalStatusResponse>
Check the availability of a Terminal before sending an event to it
- terminal_id: The ID of the Terminal you want to check
sourcepub async fn fetch_terminal(
&self,
terminal_id: &str
) -> PaystackResult<FetchTerminalResponse>
pub async fn fetch_terminal( &self, terminal_id: &str ) -> PaystackResult<FetchTerminalResponse>
Get the details of a Terminal
- terminal_id: The ID of the Terminal the event was sent to.
sourcepub async fn update_terminal(
&self,
terminal_id: &str,
update_terminal_body: UpdateTerminalBody
) -> PaystackResult<TerminalResponseWithNoData>
pub async fn update_terminal( &self, terminal_id: &str, update_terminal_body: UpdateTerminalBody ) -> PaystackResult<TerminalResponseWithNoData>
Update the details of a Terminal
sourcepub async fn commission_terminal(
&self,
serial_number: &str
) -> PaystackResult<TerminalResponseWithNoData>
pub async fn commission_terminal( &self, serial_number: &str ) -> PaystackResult<TerminalResponseWithNoData>
Activate your debug device by linking it to your integration.
- serial_number: Device Serial Number.
sourcepub async fn decommission_terminal(
&self,
serial_number: &str
) -> PaystackResult<TerminalResponseWithNoData>
pub async fn decommission_terminal( &self, serial_number: &str ) -> PaystackResult<TerminalResponseWithNoData>
Unlink your debug device from your integration
- serial_number: Device Serial Number.
Trait Implementations§
source§impl<'a> Clone for TerminalEndpoints<'a>
impl<'a> Clone for TerminalEndpoints<'a>
source§fn clone(&self) -> TerminalEndpoints<'a>
fn clone(&self) -> TerminalEndpoints<'a>
Returns a copy 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<'a> RefUnwindSafe for TerminalEndpoints<'a>
impl<'a> Send for TerminalEndpoints<'a>
impl<'a> Sync for TerminalEndpoints<'a>
impl<'a> Unpin for TerminalEndpoints<'a>
impl<'a> UnwindSafe for TerminalEndpoints<'a>
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