Search documentation of polar_express

# PolarExpress.Schemas.RefundCreate (polar_express v0.1.5)

Copy Markdown View Source

RefundCreate

## Summary

### Types

t()

### Functions

schema_name()

## Types

# t()

    @type t() :: %PolarExpress.Schemas.RefundCreate{
      amount: integer() | nil,
      comment: String.t() | nil,
      metadata:
        %{
          required(String.t()) => String.t() | integer() | float() | boolean() | nil
        }
        | nil,
      order_id: String.t() | nil,
      reason: PolarExpress.Schemas.RefundReason.t() | nil,
      revoke_benefits: boolean() | nil
    }

- `amount` - Amount to refund in cents. Minimum is 1.
- `comment` - An internal comment about the refund. Nullable.
- `metadata` - Key-value object allowing you to store additional information.

The key must be a string with a maximum length of 40 characters. The value must be either:

- A string with a maximum length of 500 characters
- An integer
- A floating-point number
- A boolean

You can store up to 50 key-value pairs.

- `order_id` - Format: uuid4.
- `reason`
- `revoke_benefits` - Should this refund trigger the associated customer benefits to be revoked?

Note: Only allowed in case the `order` is a one-time purchase. Subscriptions automatically revoke customer benefits once the subscription itself is revoked, i.e fully canceled.

## Functions

# schema_name()