struct

Polar::Models::DiscountFixedRepeatDurationCreate

Inherits JSON::Serializable < Struct < Value < Object

Model representing a DiscountFixedRepeatDurationCreate

This struct is auto-generated from the Polar.sh OpenAPI specification. It uses JSON::Serializable for automatic JSON parsing and serialization.

Constructors

new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

amount

Fixed amount to discount from the invoice total.

Source
code

Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API.

Source
currency

The currency. Currently, only usd is supported.

Source
duration
Source
duration_in_months

Number of months the discount should be applied.

For this to work on yearly pricing, you should multiply this by 12. For example, to apply the discount for 2 years, set this to 24.

Source
ends_at

Optional timestamp after which the discount is no longer redeemable.

Source
max_redemptions

Optional maximum number of times the discount can be redeemed.

Source
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.

Source
name

Name of the discount. Will be displayed to the customer when the discount is applied.

Source
organization_id

The ID of the organization owning the discount. Required unless you use an organization token.

Source
products
Source
starts_at

Optional timestamp after which the discount is redeemable.

Source
type

Type of the discount.

Source