-
Notifications
You must be signed in to change notification settings - Fork 4
Discount_Attributes
An object representing the resources data.
public struct Attributes: Codable
Codable
The ID of the store this discount belongs to.
public let storeId: Int
The name of the discount.
public let name: String
The discount code that can be used at checkout.
public let code: String
The amount of discount to apply to the order. Either a fixed amount or a percentage depending on the value of amountType
.
public let amount: Int
The type of the amount. Either percent
or fixed
.
public let amountType: String
Has the value true
if the discount can only be applied to certain products/variants.
public let isLimitedToProducts: Bool
Has the value true
if the discount can only be redeemed a limited number of times.
public let isLimitedRedemptions: Bool
If isLimitedRedemptions
is true
, this is the maximum number of redemptions.
public let maxRedemptions: Int
An ISO-8601 formatted date-time string indicating when the discount is valid from. Can be null if no start date is specified.
public let startsAt: String?
An ISO-8601 formatted date-time string indicating when the discount expires. Can be null if no expiration date is specified.
public let expiresAt: String?
If the discount is applied to a subscription, this specifies how often the discount should be applied. One of once
, repeating
, forever
.
public let duration: String
If duration
is repeating
, this specifies how many months the discount should apply
public let durationInMonths: Int
The status of the discount. Either draft
or published
.
public let status: String
The formatted status of the discount.
public let statusFormatted: String
An ISO-8601 formatted date-time string indicating when the object was created.
public let createdAt: String
An ISO-8601 formatted date-time string indicating when the object was last updated.
public let updatedAt: String
A boolean indicating if the returned subscription object was created within test mode.
public let testMode: Bool
Generated at 2023-03-27T19:40:46+0000 using swift-doc 1.0.0-rc.1.
Types
- ActivateLicense
- ActivateLicense.Instance
- ActivateLicense.LicenseKey
- ActivateLicense.Meta
- Checkout
- Checkout.APIResponse
- Checkout.Attributes
- Checkout.CheckoutData
- Checkout.CheckoutData.BillingAddress
- Checkout.CheckoutOptions
- Checkout.Included
- Checkout.ProductOptions
- Customer
- Customer.APIResponse
- Customer.Attributes
- Customer.Included
- DeactivateLicense
- DeactivateLicense.LicenseKey
- DeactivateLicense.Meta
- Discount
- Discount.APIResponse
- Discount.Attributes
- Discount.Included
- DiscountRedemption
- DiscountRedemption.APIResponse
- DiscountRedemption.Attributes
- DiscountRedemption.Included
- ErrorDetail
- File
- File.APIResponse
- File.Attributes
- File.Included
- LemonSqueezy
- LemonSqueezyAPIDataAndIncluded
- LemonSqueezyAPIDataIncludedAndMeta
- LemonSqueezyAPIError
- LemonSqueezyError
- LicenseKey
- LicenseKey.APIResponse
- LicenseKey.Attributes
- LicenseKey.Included
- LicenseKeyInstance
- LicenseKeyInstance.APIResponse
- LicenseKeyInstance.Attributes
- LicenseKeyInstance.Included
- Meta
- Meta.Page
- Order
- Order.APIResponse
- Order.Attributes
- Order.FirstOrderItem
- Order.Included
- OrderItem
- OrderItem.APIResponse
- OrderItem.Attributes
- OrderItem.Included
- Product
- Product.APIResponse
- Product.Attributes
- Product.Included
- Store
- Store.APIResponse
- Store.Attributes
- Store.Included
- Subscription
- Subscription.APIResponse
- Subscription.Attributes
- Subscription.Included
- Subscription.Pause
- Subscription.Urls
- User
- User.APIResponse
- User.Attributes
- User.Included
- ValidateLicense
- ValidateLicense.Instance
- ValidateLicense.LicenseKey
- ValidateLicense.Meta
- Variant
- Variant.APIResponse
- Variant.Attributes
- Variant.Included
Global Functions
- activateLicense(licenseKey:instanceName:)
- cancelSubscription(_:)
- createCheckout(body:)
- deactivateLicense(licenseKey:instanceId:)
- getCheckout(_:queryItems:)
- getCheckouts(pageNumber:pageSize:queryItems:)
- getCustomer(_:queryItems:)
- getCustomers(pageNumber:pageSize:queryItems:)
- getDiscount(_:queryItems:)
- getDiscountRedemption(_:queryItems:)
- getDiscountRedemptions(pageNumber:pageSize:queryItems:)
- getDiscounts(pageNumber:pageSize:queryItems:)
- getFile(_:queryItems:)
- getFiles(pageNumber:pageSize:queryItems:)
- getLicenseKey(_:queryItems:)
- getLicenseKeyInstance(_:queryItems:)
- getLicenseKeyInstances(pageNumber:pageSize:queryItems:)
- getLicenseKeys(pageNumber:pageSize:queryItems:)
- getMe()
- getOrder(_:queryItems:)
- getOrderItem(_:queryItems:)
- getOrderItems(pageNumber:pageSize:queryItems:)
- getOrders(pageNumber:pageSize:queryItems:)
- getProduct(_:queryItems:)
- getProducts(pageNumber:pageSize:queryItems:)
- getStore(_:queryItems:)
- getStores(pageNumber:pageSize:queryItems:)
- getSubscription(_:queryItems:)
- getSubscriptions(pageNumber:pageSize:queryItems:)
- getVariant(_:queryItems:)
- getVariants(pageNumber:pageSize:queryItems:)
- updateSubscription(_:body:)
- validateLicense(licenseKey:instanceId:)