{"lexicon":1,"id":"money.atmosphere.discountCode","defs":{"main":{"type":"record","description":"Customer-facing redemption code for a money.atmosphere.discount. ATM stores code records privately and never publishes code strings.","key":"any","record":{"type":"object","required":["discount","code","createdAt"],"properties":{"discount":{"type":"ref","ref":"com.atproto.repo.strongRef","description":"StrongRef to the money.atmosphere.discount this code redeems."},"code":{"type":"string","maxLength":64,"description":"Customer-facing code. Case-insensitive in Stripe; ATM accepts letters, digits, and dashes."},"name":{"type":"string","maxGraphemes":100,"maxLength":1000},"restrictions":{"type":"object","properties":{"firstTimeTransaction":{"type":"boolean","description":"Stripe-compatible first-time transaction restriction."},"minimumAmount":{"type":"object","required":["currency","unitAmount"],"properties":{"currency":{"type":"string","minLength":3,"maxLength":3,"description":"Lowercase ISO 4217 alphabetic code. Chargeability is enforced separately by the configured processor allowlist. Asset-denominated value uses the money.atmosphere.payment.defs value union, never this field."},"unitAmount":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Minimum payment amount in the smallest currency unit."}}},"maxPerCustomer":{"type":"integer","minimum":1,"description":"Most uses one purchaser can make of this code across purchases, counted like maxRedemptions."}}},"maxRedemptions":{"type":"integer","minimum":1},"validFrom":{"type":"string","format":"datetime","description":"When the code starts to apply. Absent means it applies from creation."},"redeemBy":{"type":"string","format":"datetime"},"disabled":{"type":"boolean"},"createdAt":{"type":"string","format":"datetime"},"updatedAt":{"type":"string","format":"datetime"}}}}}}