pub struct Checkout<'a> { /* private fields */ }Implementations§
Source§impl<'a> Checkout<'a>
impl<'a> Checkout<'a>
Sourcepub async fn create_checkout(
self,
location_id: String,
create_order_request: CreateOrderRequestWrapper,
) -> Result<SquareResponse, SquareError>
pub async fn create_checkout( self, location_id: String, create_order_request: CreateOrderRequestWrapper, ) -> Result<SquareResponse, SquareError>
Link a checkout id to a checkout page in order to redirect customers
§Arguments:
location_id- The id of the location you would like to link to the checkout page.create_order_request- The request body of the create_checkout call wrapped in a CreateOrderRequestWrapper.
Sourcepub async fn list(
self,
search_query: Option<Vec<(String, String)>>,
) -> Result<SquareResponse, SquareError>
pub async fn list( self, search_query: Option<Vec<(String, String)>>, ) -> Result<SquareResponse, SquareError>
Lists all payment links registered at the Square API.
§Arguments:
search_query- The parameters restricting the listing of payment links. They are build through the ListPaymentLinksSearchQueryBuilder and in vector form.
Sourcepub async fn create(
self,
payment_link: CreatePaymentLinkWrapper,
) -> Result<SquareResponse, SquareError>
pub async fn create( self, payment_link: CreatePaymentLinkWrapper, ) -> Result<SquareResponse, SquareError>
Creates a Square-hosted checkout page. Applications can share the resulting payment link with their buyer to pay for goods and services.
§Arguments:
payment_link- The body of the quest, holding the details of the payment link that is being added. This body is wrapped by a CreatePaymentLinkWrapper. The payment link must contain at least one Order or QuickPay object.
Sourcepub async fn delete(
self,
payment_link: String,
) -> Result<SquareResponse, SquareError>
pub async fn delete( self, payment_link: String, ) -> Result<SquareResponse, SquareError>
Sourcepub async fn retrieve(
self,
link_id: String,
) -> Result<SquareResponse, SquareError>
pub async fn retrieve( self, link_id: String, ) -> Result<SquareResponse, SquareError>
Retrieves a payment link from the Square API.
§Arguments:
link_id- The id of the payment link to delete.
Sourcepub async fn update(
self,
link_id: String,
payment_link: UpdatePaymentLinkWrapper,
) -> Result<SquareResponse, SquareError>
pub async fn update( self, link_id: String, payment_link: UpdatePaymentLinkWrapper, ) -> Result<SquareResponse, SquareError>
Updates a payment link at the Square API.
§Arguments:
link_id- The id of the payment link to update.payment_link- The updated PaymentLink.
Auto Trait Implementations§
impl<'a> Freeze for Checkout<'a>
impl<'a> RefUnwindSafe for Checkout<'a>
impl<'a> Send for Checkout<'a>
impl<'a> Sync for Checkout<'a>
impl<'a> Unpin for Checkout<'a>
impl<'a> UnwindSafe for Checkout<'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