pub struct CheckoutApi { /* private fields */ }
Expand description
The Checkout API lets developers create and delete Square-hosted checkout links.
Implementations§
Source§impl CheckoutApi
impl CheckoutApi
Sourcepub fn new(square_client: SquareClient) -> Self
pub fn new(square_client: SquareClient) -> Self
Instantiates a new CheckoutApi
Sourcepub async fn retrieve_location_settings(
&self,
location_id: impl AsRef<str>,
) -> Result<RetrieveLocationSettingsResponse, SquareApiError>
pub async fn retrieve_location_settings( &self, location_id: impl AsRef<str>, ) -> Result<RetrieveLocationSettingsResponse, SquareApiError>
Retrieves the location-level settings for a Square-hosted checkout page. Permissions:MERCHANT_PROFILE_READ
Sourcepub async fn update_location_settings(
&self,
location_id: impl AsRef<str>,
body: &UpdateLocationSettingsRequest,
) -> Result<UpdateLocationSettingsResponse, SquareApiError>
pub async fn update_location_settings( &self, location_id: impl AsRef<str>, body: &UpdateLocationSettingsRequest, ) -> Result<UpdateLocationSettingsResponse, SquareApiError>
Updates the location-level settings for a Square-hosted checkout page. Permissions:MERCHANT_PROFILE_WRITE, MERCHANT_PROFILE_READ
Sourcepub async fn retrieve_merchant_settings(
&self,
) -> Result<RetrieveMerchantSettingsResponse, SquareApiError>
pub async fn retrieve_merchant_settings( &self, ) -> Result<RetrieveMerchantSettingsResponse, SquareApiError>
Retrieves the merchant-level settings for a Square-hosted checkout page. Permissions:PAYMENT_METHODS_READ, MERCHANT_PROFILE_READ
Sourcepub async fn update_merchant_settings(
&self,
body: &UpdateMerchantSettingsRequest,
) -> Result<UpdateMerchantSettingsResponse, SquareApiError>
pub async fn update_merchant_settings( &self, body: &UpdateMerchantSettingsRequest, ) -> Result<UpdateMerchantSettingsResponse, SquareApiError>
Updates the merchant-level settings for a Square-hosted checkout page. Permissions:MERCHANT_PROFILE_WRITE, PAYMENT_METHODS_READ, MERCHANT_PROFILE_READ
Sourcepub async fn list_payment_links(
&self,
params: &ListPaymentLinksParameters,
) -> Result<ListPaymentLinkResponse, SquareApiError>
pub async fn list_payment_links( &self, params: &ListPaymentLinksParameters, ) -> Result<ListPaymentLinkResponse, SquareApiError>
Lists all payment links. Permissions:ORDERS_READ
Sourcepub async fn create_payment_link(
&self,
body: &CreatePaymentLinkRequest,
) -> Result<CreatePaymentLinkResponse, SquareApiError>
pub async fn create_payment_link( &self, body: &CreatePaymentLinkRequest, ) -> Result<CreatePaymentLinkResponse, SquareApiError>
Creates a Square-hosted checkout page.
Applications can share the resulting payment link with their buyer to pay for goods and services.
Sourcepub async fn delete_payment_link(
&self,
id: impl AsRef<str>,
) -> Result<DeletePaymentLinkResponse, SquareApiError>
pub async fn delete_payment_link( &self, id: impl AsRef<str>, ) -> Result<DeletePaymentLinkResponse, SquareApiError>
Deletes a payment link.
Sourcepub async fn retrieve_payment_link(
&self,
id: impl AsRef<str>,
) -> Result<RetrievePaymentLinkResponse, SquareApiError>
pub async fn retrieve_payment_link( &self, id: impl AsRef<str>, ) -> Result<RetrievePaymentLinkResponse, SquareApiError>
Retrieves a payment link. Permissions:ORDERS_READ
Sourcepub async fn update_payment_link(
&self,
id: impl AsRef<str>,
body: &UpdatePaymentLinkRequest,
) -> Result<UpdatePaymentLinkResponse, SquareApiError>
pub async fn update_payment_link( &self, id: impl AsRef<str>, body: &UpdatePaymentLinkRequest, ) -> Result<UpdatePaymentLinkResponse, SquareApiError>
Updates a payment link.
You can update the payment_link fields such as description, checkout_options, and pre_populated_data. You cannot update other fields such as the order_id, version, URL, or timestamp field. Permissions:PAYMENTS_WRITE, ORDERS_READ, ORDERS_WRITE