SubscriptionUpdateSubscriptionData

March 12, 2025 ยท View on GitHub

Example Usage

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

let value: SubscriptionUpdateSubscriptionData = {
  id: "<id>",
  status: "<value>",
  customerId: "<id>",
  addressId: "<id>",
  currencyCode: "XCD",
  createdAt: new RFCDate("2025-07-15"),
  updatedAt: new RFCDate("2024-02-24"),
  startedAt: new RFCDate("2023-01-28"),
  firstBilledAt: new RFCDate("2025-06-29"),
  nextBilledAt: new RFCDate("2024-12-24"),
  pausedAt: new RFCDate("2023-06-16"),
  canceledAt: new RFCDate("2025-12-27"),
  collectionMode: "<value>",
  billingDetails: {
    paymentTerms: {},
  },
  currentBillingPeriod: {
    startsAt: new RFCDate("2023-04-20"),
    endsAt: new RFCDate("2025-08-08"),
  },
  billingCycle: {
    frequency: 294266,
    interval: "<value>",
  },
  scheduledChange: [
    {
      id: "<id>",
      subscriptionId: "<id>",
      action: "resume",
      effectiveAt: "<value>",
      resumesAt: "<value>",
      status: "scheduled",
    },
  ],
  items: [
    {
      status: "trialing",
      priceId: "<id>",
      quantity: 937865,
      id: "<id>",
      subscriptionId: "<id>",
      recurring: false,
      createdAt: "1729836300049",
      updatedAt: "1741706070066",
      previouslyBilledAt: "<value>",
      nextBilledAt: "<value>",
      trialStartedAt: "<value>",
      trialEndedAt: "<value>",
      price: [
        {
          productId: "<id>",
          type: "custom",
          name: "<value>",
          billingCycle: {
            interval: "year",
            frequency: 7118.71,
          },
          trialPeriod: {
            interval: "day",
            frequency: 3962.23,
          },
          unitPrice: {
            amount: 1674.35,
            currencyCode: "THB",
          },
          status: "archived",
          id: "<id>",
          createdAt: "1738096753593",
          updatedAt: "1741781130490",
        },
      ],
    },
  ],
  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.SubscriptionUpdateSubscriptionSubscriptionsBillingDetails:heavy_check_mark:N/A
currentBillingPeriodoperations.SubscriptionUpdateSubscriptionCurrentBillingPeriod:heavy_check_mark:N/A
billingCycleoperations.SubscriptionUpdateSubscriptionBillingCycle:heavy_check_mark:N/A
scheduledChangeoperations.SubscriptionUpdateSubscriptionScheduledChange[]:heavy_check_mark:N/A
itemsoperations.SubscriptionUpdateSubscriptionSubscriptionsItems[]:heavy_check_mark:N/A
customDataoperations.SubscriptionUpdateSubscriptionSubscriptionsCustomData:heavy_minus_sign:Any valid JSON value
managementUrlsoperations.SubscriptionUpdateSubscriptionManagementUrls:heavy_check_mark:N/A
discountoperations.SubscriptionUpdateSubscriptionDiscount:heavy_minus_sign:N/A