Skip to content

Subscription IsCustom #2414

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
634 changes: 323 additions & 311 deletions api/api.gen.go

Large diffs are not rendered by default.

646 changes: 329 additions & 317 deletions api/client/go/client.gen.go

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions api/client/javascript/src/client/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7163,6 +7163,10 @@ export interface components {
customerId: string
/** @description The plan of the subscription. */
plan?: components['schemas']['PlanReference']
/** @description Whether the subscription is custom. A subscription is custom if
* - it was customized at creation (not based on a plan, has no PlanReference)
* - or if it has been edited (even if eventually edited back to it's original form) */
isCustom: boolean
/**
* Currency
* @description The currency code of the subscription.
Expand Down Expand Up @@ -7281,6 +7285,10 @@ export interface components {
customerId: string
/** @description The plan of the subscription. */
plan?: components['schemas']['PlanReference']
/** @description Whether the subscription is custom. A subscription is custom if
* - it was customized at creation (not based on a plan, has no PlanReference)
* - or if it has been edited (even if eventually edited back to it's original form) */
isCustom: boolean
/**
* Currency
* @description The currency code of the subscription.
Expand Down
14 changes: 14 additions & 0 deletions api/openapi.cloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15656,6 +15656,7 @@ components:
- activeFrom
- status
- customerId
- isCustom
- currency
properties:
id:
Expand Down Expand Up @@ -15732,6 +15733,12 @@ components:
allOf:
- $ref: '#/components/schemas/PlanReference'
description: The plan of the subscription.
isCustom:
type: boolean
description: |-
Whether the subscription is custom. A subscription is custom if
- it was customized at creation (not based on a plan, has no PlanReference)
- or if it has been edited (even if eventually edited back to it's original form)
currency:
allOf:
- $ref: '#/components/schemas/CurrencyCode'
Expand Down Expand Up @@ -15827,6 +15834,7 @@ components:
- activeFrom
- status
- customerId
- isCustom
- currency
- phases
properties:
Expand Down Expand Up @@ -15900,6 +15908,12 @@ components:
allOf:
- $ref: '#/components/schemas/PlanReference'
description: The plan of the subscription.
isCustom:
type: boolean
description: |-
Whether the subscription is custom. A subscription is custom if
- it was customized at creation (not based on a plan, has no PlanReference)
- or if it has been edited (even if eventually edited back to it's original form)
currency:
allOf:
- $ref: '#/components/schemas/CurrencyCode'
Expand Down
14 changes: 14 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15971,6 +15971,7 @@ components:
- activeFrom
- status
- customerId
- isCustom
- currency
properties:
id:
Expand Down Expand Up @@ -16047,6 +16048,12 @@ components:
allOf:
- $ref: '#/components/schemas/PlanReference'
description: The plan of the subscription.
isCustom:
type: boolean
description: |-
Whether the subscription is custom. A subscription is custom if
- it was customized at creation (not based on a plan, has no PlanReference)
- or if it has been edited (even if eventually edited back to it's original form)
currency:
allOf:
- $ref: '#/components/schemas/CurrencyCode'
Expand Down Expand Up @@ -16142,6 +16149,7 @@ components:
- activeFrom
- status
- customerId
- isCustom
- currency
- phases
properties:
Expand Down Expand Up @@ -16215,6 +16223,12 @@ components:
allOf:
- $ref: '#/components/schemas/PlanReference'
description: The plan of the subscription.
isCustom:
type: boolean
description: |-
Whether the subscription is custom. A subscription is custom if
- it was customized at creation (not based on a plan, has no PlanReference)
- or if it has been edited (even if eventually edited back to it's original form)
currency:
allOf:
- $ref: '#/components/schemas/CurrencyCode'
Expand Down
7 changes: 7 additions & 0 deletions api/spec/src/productcatalog/subscription.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,13 @@ model Subscription {
*/
plan?: PlanReference;

/**
* Whether the subscription is custom. A subscription is custom if
* - it was customized at creation (not based on a plan, has no PlanReference)
* - or if it has been edited (even if eventually edited back to it's original form)
*/
isCustom: boolean;

/**
* The currency code of the subscription.
* Will be revised once we add multi currency support.
Expand Down
7 changes: 4 additions & 3 deletions openmeter/ent/db/migrate/schema.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 74 additions & 1 deletion openmeter/ent/db/mutation.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions openmeter/ent/db/setorclear.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 15 additions & 1 deletion openmeter/ent/db/subscription.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions openmeter/ent/db/subscription/subscription.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading