Data

March 12, 2025 ยท View on GitHub

Example Usage

import { Data } from "open-billing/models/operations";
import { RFCDate } from "open-billing/types";

let value: Data = {
  id: "<id>",
  status: "<value>",
  customerId: "<id>",
  addressId: "<id>",
  currencyCode: "AZN",
  createdAt: new RFCDate("2024-05-30"),
  updatedAt: new RFCDate("2023-05-07"),
  startedAt: new RFCDate("2024-05-15"),
  firstBilledAt: new RFCDate("2025-12-10"),
  nextBilledAt: new RFCDate("2024-04-09"),
  pausedAt: new RFCDate("2025-07-28"),
  canceledAt: new RFCDate("2023-05-09"),
  collectionMode: "<value>",
  billingDetails: {
    paymentTerms: {},
  },
  currentBillingPeriod: {
    startsAt: new RFCDate("2023-10-25"),
    endsAt: new RFCDate("2024-03-18"),
  },
  billingCycle: {
    frequency: 399812,
    interval: "<value>",
  },
  scheduledChange: [
    {
      id: "<id>",
      subscriptionId: "<id>",
      action: "cancel",
      effectiveAt: "<value>",
      resumesAt: "<value>",
      status: "completed",
    },
  ],
  items: [
    {
      status: "trialing",
      priceId: "<id>",
      quantity: 639187,
      id: "<id>",
      subscriptionId: "<id>",
      recurring: false,
      createdAt: "1722835964483",
      updatedAt: "1741734922649",
      previouslyBilledAt: "<value>",
      nextBilledAt: "<value>",
      trialStartedAt: "<value>",
      trialEndedAt: "<value>",
      price: [
        {
          productId: "<id>",
          type: "custom",
          name: "<value>",
          billingCycle: {
            interval: "day",
            frequency: 8224.07,
          },
          trialPeriod: {
            interval: "month",
            frequency: 7263.43,
          },
          unitPrice: {
            amount: 5369.23,
            currencyCode: "BND",
          },
          status: "active",
          id: "<id>",
          createdAt: "1723031879910",
          updatedAt: "1741725356800",
        },
      ],
    },
  ],
  managementUrls: {
    updatePaymentMethod: "<value>",
    cancel: "<value>",
  },
};

Fields

FieldTypeRequiredDescription
idstring:heavy_check_mark:N/A
statusstring:heavy_check_mark:N/A
customerIdstring:heavy_check_mark:N/A
addressIdstring:heavy_check_mark:N/A
currencyCodestring:heavy_check_mark:N/A
createdAtRFCDate:heavy_check_mark:N/A
updatedAtRFCDate:heavy_check_mark:N/A
startedAtRFCDate:heavy_check_mark:N/A
firstBilledAtRFCDate:heavy_check_mark:N/A
nextBilledAtRFCDate:heavy_check_mark:N/A
pausedAtRFCDate:heavy_check_mark:N/A
canceledAtRFCDate:heavy_check_mark:N/A
collectionModestring:heavy_check_mark:N/A
billingDetailsoperations.SubscriptionCreateBillingDetails:heavy_check_mark:N/A
currentBillingPeriodoperations.SubscriptionCreateCurrentBillingPeriod:heavy_check_mark:N/A
billingCycleoperations.SubscriptionCreateBillingCycle:heavy_check_mark:N/A
scheduledChangeoperations.ScheduledChange[]:heavy_check_mark:N/A
itemsoperations.SubscriptionCreateItems[]:heavy_check_mark:N/A
customDataoperations.SubscriptionCreateCustomData:heavy_minus_sign:Any valid JSON value
managementUrlsoperations.SubscriptionCreateManagementUrls:heavy_check_mark:N/A
discountoperations.SubscriptionCreateDiscount:heavy_minus_sign:N/A