# PriceResponse

## Example Usage

```typescript
import { PriceResponse } from "@flexprice/sdk/sdk/models";

let value: PriceResponse = {
  addon: {
    prices: [
      {
        addon: {},
        meter: {
          createdAt: new Date("2024-03-20T15:04:05Z"),
          eventName: "api_request",
          id: "550e8400-e29b-41d4-a716-446655440000",
          name: "API Usage Meter",
          status: "published",
          tenantId: "tenant123",
          updatedAt: new Date("2024-03-20T15:04:05Z"),
        },
        plan: {},
      },
    ],
  },
  meter: {
    createdAt: new Date("2024-03-20T15:04:05Z"),
    eventName: "api_request",
    id: "550e8400-e29b-41d4-a716-446655440000",
    name: "API Usage Meter",
    status: "published",
    tenantId: "tenant123",
    updatedAt: new Date("2024-03-20T15:04:05Z"),
  },
  plan: {},
};
```

## Fields

| Field                                                                                                                                                                                                                                                                | Type                                                                                                                                                                                                                                                                 | Required                                                                                                                                                                                                                                                             | Description                                                                                                                                                                                                                                                          |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `addon`                                                                                                                                                                                                                                                              | [models.AddonResponse](../../sdk/models/addon-response.md)                                                                                                                                                                                                           | :heavy_minus_sign:                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                  |
| `amount`                                                                                                                                                                                                                                                             | *string*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | Amount stored in main currency units (e.g., dollars, not cents)<br/>For USD: 12.50 means $12.50                                                                                                                                                                      |
| `billingCadence`                                                                                                                                                                                                                                                     | [models.BillingCadence](../../sdk/models/billing-cadence.md)                                                                                                                                                                                                         | :heavy_minus_sign:                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                  |
| `billingModel`                                                                                                                                                                                                                                                       | [models.BillingModel](../../sdk/models/billing-model.md)                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                  |
| `billingPeriod`                                                                                                                                                                                                                                                      | [models.BillingPeriod](../../sdk/models/billing-period.md)                                                                                                                                                                                                           | :heavy_minus_sign:                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                  |
| `billingPeriodCount`                                                                                                                                                                                                                                                 | *number*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | BillingPeriodCount is the count of the billing period ex 1, 3, 6, 12                                                                                                                                                                                                 |
| `conversionRate`                                                                                                                                                                                                                                                     | *string*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | ConversionRate is the conversion rate of the price unit to the fiat currency                                                                                                                                                                                         |
| `createdAt`                                                                                                                                                                                                                                                          | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)                                                                                                                                                                        | :heavy_minus_sign:                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                  |
| `createdBy`                                                                                                                                                                                                                                                          | *string*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                  |
| `currency`                                                                                                                                                                                                                                                           | *string*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | Currency 3 digit ISO currency code in lowercase ex usd, eur, gbp                                                                                                                                                                                                     |
| `description`                                                                                                                                                                                                                                                        | *string*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | Description of the price                                                                                                                                                                                                                                             |
| `displayAmount`                                                                                                                                                                                                                                                      | *string*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | DisplayAmount is the formatted amount with currency symbol<br/>For USD: $12.50                                                                                                                                                                                       |
| `displayName`                                                                                                                                                                                                                                                        | *string*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | DisplayName is the name of the price                                                                                                                                                                                                                                 |
| `displayPriceUnitAmount`                                                                                                                                                                                                                                             | *string*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | DisplayPriceUnitAmount is the formatted amount of the price unit                                                                                                                                                                                                     |
| `endDate`                                                                                                                                                                                                                                                            | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)                                                                                                                                                                        | :heavy_minus_sign:                                                                                                                                                                                                                                                   | EndDate is the end date of the price                                                                                                                                                                                                                                 |
| `entityId`                                                                                                                                                                                                                                                           | *string*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | EntityID holds the value of the "entity_id" field.                                                                                                                                                                                                                   |
| `entityType`                                                                                                                                                                                                                                                         | [models.PriceEntityType](../../sdk/models/price-entity-type.md)                                                                                                                                                                                                      | :heavy_minus_sign:                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                  |
| `environmentId`                                                                                                                                                                                                                                                      | *string*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | EnvironmentID is the environment identifier for the price                                                                                                                                                                                                            |
| `feature`                                                                                                                                                                                                                                                            | [models.PriceFeatureResponse](../../sdk/models/price-feature-response.md)                                                                                                                                                                                            | :heavy_minus_sign:                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                  |
| `group`                                                                                                                                                                                                                                                              | [models.GroupResponse](../../sdk/models/group-response.md)                                                                                                                                                                                                           | :heavy_minus_sign:                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                  |
| `groupId`                                                                                                                                                                                                                                                            | *string*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | GroupID references the group this price belongs to                                                                                                                                                                                                                   |
| `id`                                                                                                                                                                                                                                                                 | *string*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | ID uuid identifier for the price                                                                                                                                                                                                                                     |
| `invoiceCadence`                                                                                                                                                                                                                                                     | [models.InvoiceCadence](../../sdk/models/invoice-cadence.md)                                                                                                                                                                                                         | :heavy_minus_sign:                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                  |
| `lookupKey`                                                                                                                                                                                                                                                          | *string*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | LookupKey used for looking up the price in the database                                                                                                                                                                                                              |
| `metadata`                                                                                                                                                                                                                                                           | Record<string, *string*>                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                  |
| `meter`                                                                                                                                                                                                                                                              | [models.MeterResponse](../../sdk/models/meter-response.md)                                                                                                                                                                                                           | :heavy_minus_sign:                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                  |
| `meterId`                                                                                                                                                                                                                                                            | *string*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | MeterID is the id of the meter for usage based pricing                                                                                                                                                                                                               |
| `minQuantity`                                                                                                                                                                                                                                                        | *string*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | MinQuantity is the minimum quantity of the price                                                                                                                                                                                                                     |
| `parentPriceId`                                                                                                                                                                                                                                                      | *string*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | ParentPriceID references the root price (always set for price lineage tracking)                                                                                                                                                                                      |
| `plan`                                                                                                                                                                                                                                                               | [models.PlanResponse](../../sdk/models/plan-response.md)                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                  |
| `priceUnit`                                                                                                                                                                                                                                                          | *string*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | PriceUnit is the code of the price unit (e.g., 'btc', 'eth')                                                                                                                                                                                                         |
| `priceUnitAmount`                                                                                                                                                                                                                                                    | *string*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | PriceUnitAmount is the amount of the price unit                                                                                                                                                                                                                      |
| `priceUnitId`                                                                                                                                                                                                                                                        | *string*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | PriceUnitID is the id of the price unit (for CUSTOM type)                                                                                                                                                                                                            |
| `priceUnitTiers`                                                                                                                                                                                                                                                     | [models.PricePriceTier](../../sdk/models/price-price-tier.md)[]                                                                                                                                                                                                      | :heavy_minus_sign:                                                                                                                                                                                                                                                   | PriceUnitTiers are the tiers for the price unit when BillingModel is TIERED                                                                                                                                                                                          |
| `priceUnitType`                                                                                                                                                                                                                                                      | [models.PriceUnitType](../../sdk/models/price-unit-type.md)                                                                                                                                                                                                          | :heavy_minus_sign:                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                  |
| `pricingUnit`                                                                                                                                                                                                                                                        | [models.PriceUnitResponse](../../sdk/models/price-unit-response.md)                                                                                                                                                                                                  | :heavy_minus_sign:                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                  |
| `sequence`                                                                                                                                                                                                                                                           | *number*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | Sequence is the monotonic stamp bumped on every state change that<br/>subscription line items need to react to. Read by the plan-price sync;<br/>set by the database (DEFAULT nextval) on create and by the price<br/>repository on termination / compatibility-affecting edits. |
| `startDate`                                                                                                                                                                                                                                                          | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)                                                                                                                                                                        | :heavy_minus_sign:                                                                                                                                                                                                                                                   | StartDate is the start date of the price                                                                                                                                                                                                                             |
| `status`                                                                                                                                                                                                                                                             | [models.Status](../../sdk/models/status.md)                                                                                                                                                                                                                          | :heavy_minus_sign:                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                  |
| `tenantId`                                                                                                                                                                                                                                                           | *string*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                  |
| `tierMode`                                                                                                                                                                                                                                                           | [models.BillingTier](../../sdk/models/billing-tier.md)                                                                                                                                                                                                               | :heavy_minus_sign:                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                  |
| `tiers`                                                                                                                                                                                                                                                              | [models.PricePriceTier](../../sdk/models/price-price-tier.md)[]                                                                                                                                                                                                      | :heavy_minus_sign:                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                  |
| `transformQuantity`                                                                                                                                                                                                                                                  | [models.PriceJSONBTransformQuantity](../../sdk/models/price-jsonb-transform-quantity.md)                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                  |
| `trialPeriodDays`                                                                                                                                                                                                                                                    | *number*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | TrialPeriodDays is the number of days for the trial period<br/>Note: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)                                                                                                                        |
| `type`                                                                                                                                                                                                                                                               | [models.PriceType](../../sdk/models/price-type.md)                                                                                                                                                                                                                   | :heavy_minus_sign:                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                  |
| `updatedAt`                                                                                                                                                                                                                                                          | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)                                                                                                                                                                        | :heavy_minus_sign:                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                  |
| `updatedBy`                                                                                                                                                                                                                                                          | *string*                                                                                                                                                                                                                                                             | :heavy_minus_sign:                                                                                                                                                                                                                                                   | N/A                                                                                                                                                                                                                                                                  |