Struct square_api_client::api::RefundsApi
source · pub struct RefundsApi { /* private fields */ }
Expand description
Manage and issue refunds for payments made to Square sellers.
Implementations§
source§impl RefundsApi
impl RefundsApi
pub fn new(config: Configuration, client: HttpClient) -> Self
sourcepub async fn list_payment_refunds(
&self,
params: &ListPaymentRefundsParameters
) -> Result<ListPaymentRefundsResponse, ApiError>
pub async fn list_payment_refunds(
&self,
params: &ListPaymentRefundsParameters
) -> Result<ListPaymentRefundsResponse, ApiError>
Retrieves a list of refunds for the account making the request.
Results are eventually consistent, and new refunds or changes to refunds might take several seconds to appear.
The maximum results per page is 100.
sourcepub async fn refund_payment(
&self,
body: &RefundPaymentRequest
) -> Result<RefundPaymentResponse, ApiError>
pub async fn refund_payment(
&self,
body: &RefundPaymentRequest
) -> Result<RefundPaymentResponse, ApiError>
Refunds a payment.
You can refund the entire payment amount or a portion of it. You can use this endpoint to refund a card payment or record a refund of a cash or external payment. For more information, see Refund Payment.
sourcepub async fn get_payment_refund(
&self,
refund_id: &str
) -> Result<GetPaymentRefundResponse, ApiError>
pub async fn get_payment_refund(
&self,
refund_id: &str
) -> Result<GetPaymentRefundResponse, ApiError>
Retrieves a specific refund using the refund_id
.