Skip to content

Commit fccf8e2

Browse files
committed
feat(billing): add subscription end proration mode
1 parent 75d896e commit fccf8e2

41 files changed

Lines changed: 3625 additions & 2925 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

api/api.gen.go

Lines changed: 1298 additions & 1269 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: 1125 additions & 1096 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: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3395,6 +3395,8 @@ export interface components {
33953395
* @default true
33963396
*/
33973397
progressiveBilling?: boolean
3398+
/** @description Controls how subscription-ending shortened service periods are billed. */
3399+
subscriptionEndProrationMode?: components['schemas']['BillingWorkflowInvoicingSubscriptionEndProrationMode']
33983400
/**
33993401
* @description Default tax configuration to apply to the invoices.
34003402
*
@@ -3405,6 +3407,13 @@ export interface components {
34053407
*/
34063408
defaultTaxConfig?: components['schemas']['TaxConfig']
34073409
}
3410+
/**
3411+
* @description Billing workflow subscription end proration mode.
3412+
* @enum {string}
3413+
*/
3414+
BillingWorkflowInvoicingSubscriptionEndProrationMode:
3415+
| 'bill_full_period'
3416+
| 'bill_actual_period'
34083417
/**
34093418
* Workflow payment settings
34103419
* @description BillingWorkflowPaymentSettings represents the payment settings for a billing workflow
@@ -7738,6 +7747,8 @@ export interface components {
77387747
* @example P30D
77397748
*/
77407749
dueAfter?: string
7750+
/** @description Controls how subscription-ending shortened service periods are billed. */
7751+
subscriptionEndProrationMode?: components['schemas']['BillingWorkflowInvoicingSubscriptionEndProrationMode']
77417752
/**
77427753
* @description Default tax configuration to apply to the invoices.
77437754
*
@@ -12499,6 +12510,8 @@ export type BillingWorkflowCreate =
1249912510
components['schemas']['BillingWorkflowCreate']
1250012511
export type BillingWorkflowInvoicingSettings =
1250112512
components['schemas']['BillingWorkflowInvoicingSettings']
12513+
export type BillingWorkflowInvoicingSubscriptionEndProrationMode =
12514+
components['schemas']['BillingWorkflowInvoicingSubscriptionEndProrationMode']
1250212515
export type BillingWorkflowPaymentSettings =
1250312516
components['schemas']['BillingWorkflowPaymentSettings']
1250412517
export type BillingWorkflowTaxSettings =

api/client/javascript/src/zod/index.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5890,6 +5890,13 @@ export const UpdateInvoiceBody = zod
58905890
.describe(
58915891
"The period after which the invoice is due.\nWith some payment solutions it's only applicable for manual collection method.",
58925892
),
5893+
subscriptionEndProrationMode: zod
5894+
.enum(['bill_full_period', 'bill_actual_period'])
5895+
.describe('Billing workflow subscription end proration mode.')
5896+
.optional()
5897+
.describe(
5898+
'Controls how subscription-ending shortened service periods are billed.',
5899+
),
58935900
})
58945901
.describe(
58955902
'InvoiceWorkflowInvoicingSettingsReplaceUpdate represents the update model for the invoicing settings of an invoice workflow.',
@@ -6531,6 +6538,13 @@ export const CreateBillingProfileBody = zod
65316538
.describe(
65326539
'Should progressive billing be allowed for this workflow?',
65336540
),
6541+
subscriptionEndProrationMode: zod
6542+
.enum(['bill_full_period', 'bill_actual_period'])
6543+
.describe('Billing workflow subscription end proration mode.')
6544+
.optional()
6545+
.describe(
6546+
'Controls how subscription-ending shortened service periods are billed.',
6547+
),
65346548
})
65356549
.describe(
65366550
'BillingWorkflowInvoicingSettings represents the invoice settings for a billing workflow',
@@ -6952,6 +6966,13 @@ export const UpdateBillingProfileBody = zod
69526966
.describe(
69536967
'Should progressive billing be allowed for this workflow?',
69546968
),
6969+
subscriptionEndProrationMode: zod
6970+
.enum(['bill_full_period', 'bill_actual_period'])
6971+
.describe('Billing workflow subscription end proration mode.')
6972+
.optional()
6973+
.describe(
6974+
'Controls how subscription-ending shortened service periods are billed.',
6975+
),
69556976
})
69566977
.describe(
69576978
'BillingWorkflowInvoicingSettings represents the invoice settings for a billing workflow',

api/client/python/openmeter/_generated/models/__init__.py

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

api/client/python/openmeter/_generated/models/_enums.py

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

api/client/python/openmeter/_generated/models/_models.py

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

api/openapi.cloud.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14167,6 +14167,10 @@ components:
1416714167
type: boolean
1416814168
description: Should progressive billing be allowed for this workflow?
1416914169
default: true
14170+
subscriptionEndProrationMode:
14171+
allOf:
14172+
- $ref: '#/components/schemas/BillingWorkflowInvoicingSubscriptionEndProrationMode'
14173+
description: Controls how subscription-ending shortened service periods are billed.
1417014174
defaultTaxConfig:
1417114175
allOf:
1417214176
- $ref: '#/components/schemas/TaxConfig'
@@ -14179,6 +14183,12 @@ components:
1417914183
fully supported.
1418014184
description: BillingWorkflowInvoicingSettings represents the invoice settings for a billing workflow
1418114185
title: Workflow invoice settings
14186+
BillingWorkflowInvoicingSubscriptionEndProrationMode:
14187+
type: string
14188+
enum:
14189+
- bill_full_period
14190+
- bill_actual_period
14191+
description: Billing workflow subscription end proration mode.
1418214192
BillingWorkflowPaymentSettings:
1418314193
type: object
1418414194
properties:
@@ -19784,6 +19794,10 @@ components:
1978419794
With some payment solutions it's only applicable for manual collection method.
1978519795
example: P30D
1978619796
default: P30D
19797+
subscriptionEndProrationMode:
19798+
allOf:
19799+
- $ref: '#/components/schemas/BillingWorkflowInvoicingSubscriptionEndProrationMode'
19800+
description: Controls how subscription-ending shortened service periods are billed.
1978719801
defaultTaxConfig:
1978819802
allOf:
1978919803
- $ref: '#/components/schemas/TaxConfig'

api/openapi.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14318,6 +14318,10 @@ components:
1431814318
type: boolean
1431914319
description: Should progressive billing be allowed for this workflow?
1432014320
default: true
14321+
subscriptionEndProrationMode:
14322+
allOf:
14323+
- $ref: '#/components/schemas/BillingWorkflowInvoicingSubscriptionEndProrationMode'
14324+
description: Controls how subscription-ending shortened service periods are billed.
1432114325
defaultTaxConfig:
1432214326
allOf:
1432314327
- $ref: '#/components/schemas/TaxConfig'
@@ -14330,6 +14334,12 @@ components:
1433014334
fully supported.
1433114335
description: BillingWorkflowInvoicingSettings represents the invoice settings for a billing workflow
1433214336
title: Workflow invoice settings
14337+
BillingWorkflowInvoicingSubscriptionEndProrationMode:
14338+
type: string
14339+
enum:
14340+
- bill_full_period
14341+
- bill_actual_period
14342+
description: Billing workflow subscription end proration mode.
1433314343
BillingWorkflowLineResolution:
1433414344
type: string
1433514345
enum:
@@ -20482,6 +20492,10 @@ components:
2048220492
With some payment solutions it's only applicable for manual collection method.
2048320493
example: P30D
2048420494
default: P30D
20495+
subscriptionEndProrationMode:
20496+
allOf:
20497+
- $ref: '#/components/schemas/BillingWorkflowInvoicingSubscriptionEndProrationMode'
20498+
description: Controls how subscription-ending shortened service periods are billed.
2048520499
defaultTaxConfig:
2048620500
allOf:
2048720501
- $ref: '#/components/schemas/TaxConfig'

api/spec/packages/aip-client-javascript/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ export type {
6565
FlatFeeDiscounts,
6666
PriceFree,
6767
WorkflowCollectionAlignmentSubscription,
68-
WorkflowInvoicingSettings,
6968
WorkflowPaymentChargeAutomaticallySettings,
7069
WorkflowPaymentSendInvoiceSettings,
7170
LlmCostProvider,
@@ -173,6 +172,7 @@ export type {
173172
AppCatalogItem,
174173
TaxCodeAppMapping,
175174
PartyTaxIdentity,
175+
WorkflowInvoicingSettings,
176176
ListCurrenciesParamsFilter,
177177
CurrencyCustom,
178178
CreateCurrencyCustomRequest,
@@ -289,7 +289,6 @@ export type {
289289
PlanPagePaginatedResponse,
290290
SortQueryInput,
291291
BaseErrorInput,
292-
WorkflowInvoicingSettingsInput,
293292
WorkflowPaymentSendInvoiceSettingsInput,
294293
EventInput,
295294
UnauthorizedInput,
@@ -309,6 +308,7 @@ export type {
309308
CreateCreditGrantPurchaseInput,
310309
RateCardMeteredEntitlementInput,
311310
CreditGrantPurchaseInput,
311+
WorkflowInvoicingSettingsInput,
312312
UnitConfigInput,
313313
GovernanceQueryRequestInput,
314314
IngestedEventInput,

0 commit comments

Comments
 (0)