changedOutput schema / properties / data / properties / couponSnapshot / anyOf
Previous value: -[
- {
- "additionalProperties": false,
- "properties": {
- "amountOff": {
- "name": "The fixed amount to subtract from the total. Cannot be combined with `percentOff` for the same coupon.",
- "type": [
- "number",
- "null"
- ]
- },
- "appliesToSetupFee": {
- "description": "Whether the coupon discount applies to the setup fee, if any.",
- "type": [
- "boolean",
- "null"
- ]
- },
- "code": {
- "name": "The coupon code that the customer entered to receive the discount. E.g. `BLACKFRIDAY`.",
- "type": [
- "string",
- "null"
- ]
- },
- "currency": {
- "name": "The currency code for the coupon. Must match the subscription currency. Required if `amountOff` is set.",
- "type": [
- "string",
- "null"
- ]
- },
- "deleted": {
- "name": "Whether the coupon is deleted.",
- "type": [
- "boolean",
- "null"
- ]
- },
- "duration": {
- "anyOf": [
- {
- "enum": [
- "once",
- "repeating",
- "forever"
- ],
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "name": "The duration of the coupon discount. `once` means the discount applies to the first invoice only. `repeating` means the discount applies for a fixed number of billing periods, as specified by `durationInMonths`. `forever` means the discount applies to all invoices until the subscription is canceled."
- },
- "durationInMonths": {
- "name": "If `duration` is `repeating`, the number of billing periods that the discount applies for.",
- "type": [
- "number",
- "null"
- ]
- },
- "label": {
- "name": "Label for the coupon, such as \"20% off\" or \"$10 off\". This is the label displayed in the dashboard. Not seen by customers.",
- "type": [
- "string",
- "null"
- ]
- },
- "maxRedemptions": {
- "name": "The maximum number of times the coupon can be redeemed. A coupon can be redeemed by the same customer multiple times.",
- "type": [
- "number",
- "null"
- ]
- },
- "pageIds": {
- "anyOf": [
- {
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- {
- "type": "null"
- }
- ],
- "name": "The list of page IDs to which the coupon applies."
- },
- "percentOff": {
- "name": "The percentage to subtract from the total. Cannot be combined with `amountOff` for the same coupon.",
- "type": [
- "number",
- "null"
- ]
- },
- "redeemBy": {
- "anyOf": [
- {
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "name": "The date and time when the coupon expires."
- },
- "timesRedeemed": {
- "name": "The number of times the coupon has been redeemed.",
- "type": [
- "number",
- "null"
- ]
- }
- },
- "type": "object"
- },
- {
- "type": "null"
- }
-]New value: +[
+ {
+ "additionalProperties": false,
+ "properties": {
+ "amountOff": {
+ "name": "The fixed amount to subtract from the total. Cannot be combined with `percentOff` for the same coupon.",
+ "type": [
+ "number",
+ "null"
+ ]
+ },
+ "appliesToSetupFee": {
+ "description": "Whether the coupon discount applies to the setup fee, if any.",
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "code": {
+ "name": "The coupon code that the customer entered to receive the discount. E.g. `BLACKFRIDAY`.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "currency": {
+ "name": "The currency code for the coupon. Must match the subscription currency. Required if `amountOff` is set.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "deleted": {
+ "name": "Whether the coupon is deleted.",
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "duration": {
+ "anyOf": [
+ {
+ "enum": [
+ "once",
+ "repeating",
+ "forever"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "name": "The duration of the coupon discount. `once` means the discount applies to the first invoice only. `repeating` means the discount applies for a fixed number of billing periods, as specified by `durationInMonths`. `forever` means the discount applies to all invoices until the subscription is canceled."
+ },
+ "durationInMonths": {
+ "name": "If `duration` is `repeating`, the number of billing periods that the discount applies for.",
+ "type": [
+ "number",
+ "null"
+ ]
+ },
+ "label": {
+ "name": "Label for the coupon, such as \"20% off\" or \"$10 off\". This is the label displayed in the dashboard. Not seen by customers.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "maxRedemptions": {
+ "name": "The maximum number of times the coupon can be redeemed. A coupon can be redeemed by the same customer multiple times.",
+ "type": [
+ "number",
+ "null"
+ ]
+ },
+ "pageIds": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "deprecated": true,
+ "description": "Deprecated: what a coupon covers is now its `rules`; read them from the coupon (`couponId`). The pages the coupon was limited to when the subscription was bought.",
+ "name": "The list of page IDs to which the coupon applies."
+ },
+ "percentOff": {
+ "name": "The percentage to subtract from the total. Cannot be combined with `amountOff` for the same coupon.",
+ "type": [
+ "number",
+ "null"
+ ]
+ },
+ "redeemBy": {
+ "anyOf": [
+ {
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "name": "The date and time when the coupon expires."
+ },
+ "timesRedeemed": {
+ "name": "The number of times the coupon has been redeemed.",
+ "type": [
+ "number",
+ "null"
+ ]
+ }
+ },
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+]