Skip to content

Latest commit

 

History

History
60 lines (55 loc) · 6.69 KB

benefitgrant.md

File metadata and controls

60 lines (55 loc) · 6.69 KB

BenefitGrant

Example Usage

import { BenefitGrant } from "@polar-sh/sdk/models/components/benefitgrant.js";

let value: BenefitGrant = {
  createdAt: new Date("2024-02-23T09:47:56.049Z"),
  modifiedAt: new Date("2025-09-13T22:07:14.068Z"),
  id: "<value>",
  isGranted: false,
  isRevoked: false,
  subscriptionId: "<value>",
  orderId: "<value>",
  customerId: "<value>",
  benefitId: "<value>",
  customer: {
    id: "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
    createdAt: new Date("2024-05-23T17:55:06.576Z"),
    modifiedAt: new Date("2025-04-01T01:42:54.310Z"),
    metadata: {
      "key": "<value>",
    },
    externalId: "usr_1337",
    email: "[email protected]",
    emailVerified: true,
    name: "John Doe",
    billingAddress: {
      country: "FR",
    },
    taxId: [
      "911144442",
      "us_ein",
    ],
    organizationId: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
    deletedAt: new Date("2023-03-15T17:48:12.709Z"),
    avatarUrl: "https://www.gravatar.com/avatar/xxx?d=blank",
  },
  properties: {},
};

Fields

Field Type Required Description
createdAt Date ✔️ Creation timestamp of the object.
modifiedAt Date ✔️ Last modification timestamp of the object.
id string ✔️ The ID of the grant.
grantedAt Date The timestamp when the benefit was granted. If None, the benefit is not granted.
isGranted boolean ✔️ Whether the benefit is granted.
revokedAt Date The timestamp when the benefit was revoked. If None, the benefit is not revoked.
isRevoked boolean ✔️ Whether the benefit is revoked.
subscriptionId string ✔️ The ID of the subscription that granted this benefit.
orderId string ✔️ The ID of the order that granted this benefit.
customerId string ✔️ The ID of the customer concerned by this grant.
benefitId string ✔️ The ID of the benefit concerned by this grant.
customer components.Customer ✔️ A customer in an organization.
properties components.Properties ✔️ N/A