Skip to content

Commit a6d0ca1

Browse files
committed
feat(subs): is custom logic
1 parent b457b75 commit a6d0ca1

26 files changed

+1040
-634
lines changed

api/api.gen.go

Lines changed: 317 additions & 305 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/client/go/client.gen.go

Lines changed: 324 additions & 312 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/client/javascript/src/client/schemas.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7058,6 +7058,10 @@ export interface components {
70587058
customerId: string
70597059
/** @description The plan of the subscription. */
70607060
plan?: components['schemas']['PlanReference']
7061+
/** @description Whether the subscription is custom. A subscription is custom if
7062+
* - it was customized at creation (not based on a plan, has no PlanReference)
7063+
* - or if it has been edited (even if eventually edited back to it's original form) */
7064+
isCustom: boolean
70617065
/**
70627066
* Currency
70637067
* @description The currency code of the subscription.
@@ -7176,6 +7180,10 @@ export interface components {
71767180
customerId: string
71777181
/** @description The plan of the subscription. */
71787182
plan?: components['schemas']['PlanReference']
7183+
/** @description Whether the subscription is custom. A subscription is custom if
7184+
* - it was customized at creation (not based on a plan, has no PlanReference)
7185+
* - or if it has been edited (even if eventually edited back to it's original form) */
7186+
isCustom: boolean
71797187
/**
71807188
* Currency
71817189
* @description The currency code of the subscription.

api/openapi.cloud.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15363,6 +15363,7 @@ components:
1536315363
- activeFrom
1536415364
- status
1536515365
- customerId
15366+
- isCustom
1536615367
- currency
1536715368
properties:
1536815369
id:
@@ -15439,6 +15440,12 @@ components:
1543915440
allOf:
1544015441
- $ref: '#/components/schemas/PlanReference'
1544115442
description: The plan of the subscription.
15443+
isCustom:
15444+
type: boolean
15445+
description: |-
15446+
Whether the subscription is custom. A subscription is custom if
15447+
- it was customized at creation (not based on a plan, has no PlanReference)
15448+
- or if it has been edited (even if eventually edited back to it's original form)
1544215449
currency:
1544315450
allOf:
1544415451
- $ref: '#/components/schemas/CurrencyCode'
@@ -15534,6 +15541,7 @@ components:
1553415541
- activeFrom
1553515542
- status
1553615543
- customerId
15544+
- isCustom
1553715545
- currency
1553815546
- phases
1553915547
properties:
@@ -15607,6 +15615,12 @@ components:
1560715615
allOf:
1560815616
- $ref: '#/components/schemas/PlanReference'
1560915617
description: The plan of the subscription.
15618+
isCustom:
15619+
type: boolean
15620+
description: |-
15621+
Whether the subscription is custom. A subscription is custom if
15622+
- it was customized at creation (not based on a plan, has no PlanReference)
15623+
- or if it has been edited (even if eventually edited back to it's original form)
1561015624
currency:
1561115625
allOf:
1561215626
- $ref: '#/components/schemas/CurrencyCode'

api/openapi.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15607,6 +15607,7 @@ components:
1560715607
- activeFrom
1560815608
- status
1560915609
- customerId
15610+
- isCustom
1561015611
- currency
1561115612
properties:
1561215613
id:
@@ -15683,6 +15684,12 @@ components:
1568315684
allOf:
1568415685
- $ref: '#/components/schemas/PlanReference'
1568515686
description: The plan of the subscription.
15687+
isCustom:
15688+
type: boolean
15689+
description: |-
15690+
Whether the subscription is custom. A subscription is custom if
15691+
- it was customized at creation (not based on a plan, has no PlanReference)
15692+
- or if it has been edited (even if eventually edited back to it's original form)
1568615693
currency:
1568715694
allOf:
1568815695
- $ref: '#/components/schemas/CurrencyCode'
@@ -15778,6 +15785,7 @@ components:
1577815785
- activeFrom
1577915786
- status
1578015787
- customerId
15788+
- isCustom
1578115789
- currency
1578215790
- phases
1578315791
properties:
@@ -15851,6 +15859,12 @@ components:
1585115859
allOf:
1585215860
- $ref: '#/components/schemas/PlanReference'
1585315861
description: The plan of the subscription.
15862+
isCustom:
15863+
type: boolean
15864+
description: |-
15865+
Whether the subscription is custom. A subscription is custom if
15866+
- it was customized at creation (not based on a plan, has no PlanReference)
15867+
- or if it has been edited (even if eventually edited back to it's original form)
1585415868
currency:
1585515869
allOf:
1585615870
- $ref: '#/components/schemas/CurrencyCode'

api/spec/src/productcatalog/subscription.tsp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@ model Subscription {
9696
*/
9797
plan?: PlanReference;
9898

99+
/**
100+
* Whether the subscription is custom. A subscription is custom if
101+
* - it was customized at creation (not based on a plan, has no PlanReference)
102+
* - or if it has been edited (even if eventually edited back to it's original form)
103+
*/
104+
isCustom: boolean;
105+
99106
/**
100107
* The currency code of the subscription.
101108
* Will be revised once we add multi currency support.

openmeter/ent/db/migrate/schema.go

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openmeter/ent/db/mutation.go

Lines changed: 74 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openmeter/ent/db/setorclear.go

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openmeter/ent/db/subscription.go

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openmeter/ent/db/subscription/subscription.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)