Polar::Api::Refunds
API client for refunds operations
Constants
Log = ::Log.for(self)
Constructors
new(client : Client)
Creates a new Refunds instance
@param client [Client] The Polar API client instance
Instance methods
Create Refund
Create a refund.
Scopes: refunds:write
Endpoint: POST /v1/refunds/
Parameters:
body(required): Request body as Polar::Models::RefundCreate
Returns: Polar::Models::Refund
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
list(id : String | Nil = nil, organization_id : String | Nil = nil, order_id : String | Nil = nil, subscription_id : String | Nil = nil, customer_id : String | Nil = nil, succeeded : String | Nil = nil, page : Int32 | Nil = nil, limit : Int32 | Nil = nil, sorting : String | Nil = nil) : Polar::Models::ListResource(Polar::Models::Refund)
List Refunds
List products.
Scopes: refunds:read refunds:write
Endpoint: GET /v1/refunds/
Parameters:
id(optional): Filter by refund ID.organization_id(optional): Filter by organization ID.order_id(optional): Filter by order ID.subscription_id(optional): Filter by subscription ID.customer_id(optional): Filter by customer ID.succeeded(optional): Filter by succeeded.page(optional): Page number, defaults to 1.limit(optional): Size of a page, defaults to 10. Maximum is 100.sorting(optional): Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign - before the criteria name to sort by descending order.
Returns: Polar::Models::ListResource(Polar::Models::Refund)
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors