{"lexicon":1,"id":"money.atmosphere.membership.updateTier","defs":{"main":{"type":"procedure","description":"Update a money.atmosphere.membership.tier record ATM authored in the creator's repo (the record CID rotates). The creator is derived from the tier strongRef's repo authority; the calling app must hold the same creator consent as createTier. The tier's parent program is immutable; set archived to retire the tier.","input":{"encoding":"application/json","schema":{"type":"object","required":["environment","tier"],"properties":{"environment":{"type":"string","knownValues":["test","live"],"maxLength":8},"tier":{"type":"ref","ref":"com.atproto.repo.strongRef","description":"The money.atmosphere.membership.tier record to update."},"title":{"type":"string","minLength":1,"maxGraphemes":100,"maxLength":1000},"description":{"type":"string","maxGraphemes":1000,"maxLength":10000},"benefits":{"type":"array","maxLength":24,"items":{"type":"ref","ref":"#benefit"}},"product":{"type":"ref","ref":"com.atproto.repo.strongRef"},"price":{"type":"ref","ref":"com.atproto.repo.strongRef"},"unitAmount":{"type":"integer","minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"rank":{"type":"integer","minimum":0},"sortOrder":{"type":"integer","minimum":0},"archived":{"type":"boolean"},"recipientAssertionJwt":{"type":"string","maxLength":8192}}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["tier"],"properties":{"tier":{"type":"ref","ref":"com.atproto.repo.strongRef"}}}},"errors":[{"name":"AppEnvironmentNotConfigured","description":"The app environment is not configured in ATM."},{"name":"NotAuthorized","description":"The calling app is not authorized to manage memberships for this creator."},{"name":"MembershipTierNotFound","description":"ATM could not load that membership tier record."},{"name":"RecordVersionConflict","description":"The record changed since the supplied strongRef cid was read (compare-and-swap failed). Re-read the record and retry the update."},{"name":"MembershipCreatorAuthorizationRequired","description":"ATM holds no live grant to write to the creator's repo; the creator must re-authorize."},{"name":"InvalidMembershipEntitlement","description":"A supplied product/price is not a valid membership listing in the creator's repo."},{"name":"WriteFailed","description":"ATM could not write the membership tier record."}]},"benefit":{"type":"object","required":["label"],"properties":{"kind":{"type":"string","maxLength":80},"label":{"type":"string","minLength":1,"maxGraphemes":120,"maxLength":1200}}}}}