You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 813b0fa
Browse filesBrowse the repository at this point in the historyBrowse files
|`client.customers.billing.get`|`GET /openmeter/customers/{customerId}/billing`| Get customer billing data |
295
-
|`client.customers.billing.update`|`PUT /openmeter/customers/{customerId}/billing`| Update customer billing data |
295
+
|`client.customers.billing.update`|`PUT /openmeter/customers/{customerId}/billing`| Update billing data while preserving the current profile selection when billing_profile is omitted or null. Use the dedicated billing profile endpoint to remove the selection. |
296
+
|`client.customers.billing.updateProfile`|`PUT /openmeter/customers/{customerId}/billing/profile`| Set the customer's explicit billing profile selection. Omitting billing_profile or setting it to null removes the selection and uses the current namespace default. |
296
297
|`client.customers.billing.updateAppData`|`PUT /openmeter/customers/{customerId}/billing/app-data`| Update customer billing app data |
297
298
|`client.customers.billing.createStripeCheckoutSession`|`POST /openmeter/customers/{customerId}/billing/stripe/checkout-sessions`| Create a [Stripe Checkout Session](https://docs.stripe.com/payments/checkout) for the customer. Creates a Checkout Session for collecting payment method information from customers. The session operates in "setup" mode, which collects payment details without charging the customer immediately. The collected payment method can be used for future subscription billing. For hosted checkout sessions, redirect customers to the returned URL. For embedded sessions, use the client_secret to initialize Stripe.js in your application. |
298
299
|`client.customers.billing.createStripePortalSession`|`POST /openmeter/customers/{customerId}/billing/stripe/portal-sessions`| Create Stripe Customer Portal Session. Useful to redirect the customer to the Stripe Customer Portal to manage their payment methods, change their billing address and access their invoice history. Only returns URL if the customer billing profile is linked to a stripe app and customer. |
Copy file name to clipboardExpand all lines: api/spec/packages/aip-client-javascript/src/models/schemas.ts
+98-6Lines changed: 98 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -4279,6 +4279,31 @@ export const listPlanAddonsParamsFilter = z
4279
4279
})
4280
4280
.describe('Filter options for listing plan add-ons.')
4281
4281
4282
+
export const upsertCustomerBillingProfileRequest = z
4283
+
.object({
4284
+
billingProfile: profileReference
4285
+
.nullable()
4286
+
.optional()
4287
+
4288
+
.describe(
4289
+
'The billing profile explicitly selected for the customer. Unpinned customers use the current namespace default. Selecting the current default explicitly pins the customer to that profile.',
'The billing profile explicitly selected for the customer. Unpinned customers use the current namespace default. Selecting the current default explicitly pins the customer to that profile.',
4302
+
),
4303
+
effectiveBillingProfile: profileReference,
4304
+
})
4305
+
.describe('Customer billing profile selection.')
4306
+
4282
4307
export const createChargeCostBasis = z
4283
4308
.discriminatedUnion('type', [
4284
4309
createChargeCostBasisDynamic,
@@ -5851,15 +5876,27 @@ export const notificationEventDeliveryStatus = z
5851
5876
5852
5877
export const customerData = z
5853
5878
.object({
5854
-
billingProfile: profileReference.optional(),
5855
-
appData: appCustomerData.optional(),
5879
+
billingProfile: profileReference
5880
+
.nullable()
5881
+
.optional()
5882
+
5883
+
.describe(
5884
+
'The billing profile explicitly selected for the customer. Unpinned customers use the current namespace default. Selecting the current default explicitly pins the customer to that profile.',
5885
+
),
5856
5886
effectiveBillingProfile: profileReference,
5887
+
appData: appCustomerData.optional(),
5857
5888
})
5858
5889
.describe('Billing customer data.')
5859
5890
5860
5891
export const upsertCustomerBillingDataRequest = z
5861
5892
.object({
5862
-
billingProfile: profileReference.optional(),
5893
+
billingProfile: profileReference
5894
+
.nullable()
5895
+
.optional()
5896
+
5897
+
.describe(
5898
+
'The billing profile explicitly selected for the customer. Unpinned customers use the current namespace default. Selecting the current default explicitly pins the customer to that profile.',
@@ -14042,6 +14088,31 @@ export const listPlanAddonsParamsFilterWire = z
14042
14088
})
14043
14089
.describe('Filter options for listing plan add-ons.')
14044
14090
14091
+
export const upsertCustomerBillingProfileRequestWire = z
14092
+
.strictObject({
14093
+
billing_profile: profileReferenceWire
14094
+
.nullable()
14095
+
.optional()
14096
+
14097
+
.describe(
14098
+
'The billing profile explicitly selected for the customer. Unpinned customers use the current namespace default. Selecting the current default explicitly pins the customer to that profile.',
'The billing profile explicitly selected for the customer. Unpinned customers use the current namespace default. Selecting the current default explicitly pins the customer to that profile.',
14111
+
),
14112
+
effective_billing_profile: profileReferenceWire,
14113
+
})
14114
+
.describe('Customer billing profile selection.')
14115
+
14045
14116
export const createChargeCostBasisWire = z
14046
14117
.discriminatedUnion('type', [
14047
14118
createChargeCostBasisDynamicWire,
@@ -15605,15 +15676,27 @@ export const notificationEventDeliveryStatusWire = z
15605
15676
15606
15677
export const customerDataWire = z
15607
15678
.strictObject({
15608
-
billing_profile: profileReferenceWire.optional(),
15609
-
app_data: appCustomerDataWire.optional(),
15679
+
billing_profile: profileReferenceWire
15680
+
.nullable()
15681
+
.optional()
15682
+
15683
+
.describe(
15684
+
'The billing profile explicitly selected for the customer. Unpinned customers use the current namespace default. Selecting the current default explicitly pins the customer to that profile.',
15685
+
),
15610
15686
effective_billing_profile: profileReferenceWire,
15687
+
app_data: appCustomerDataWire.optional(),
15611
15688
})
15612
15689
.describe('Billing customer data.')
15613
15690
15614
15691
export const upsertCustomerBillingDataRequestWire = z
15615
15692
.strictObject({
15616
-
billing_profile: profileReferenceWire.optional(),
15693
+
billing_profile: profileReferenceWire
15694
+
.nullable()
15695
+
.optional()
15696
+
15697
+
.describe(
15698
+
'The billing profile explicitly selected for the customer. Unpinned customers use the current namespace default. Selecting the current default explicitly pins the customer to that profile.',
0 commit comments