@flexprice/sdk 2.1.38 → 2.1.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/docs/sdk/models/analytics-view-definition.md +1 -0
  2. package/docs/sdk/models/create-customer-portal-session-request.md +17 -0
  3. package/docs/sdk/models/family.md +17 -0
  4. package/docs/sdk/models/invoice-billing-reason.md +2 -2
  5. package/docs/sdk/models/metric.md +2 -2
  6. package/docs/sdk/models/modify-subscription-params.md +6 -5
  7. package/docs/sdk/models/modify-subscription-type.md +2 -2
  8. package/docs/sdk/models/pause-subscription-request-request.md +19 -0
  9. package/docs/sdk/models/pause-subscription-request.md +19 -0
  10. package/docs/sdk/models/pause-subscription-response.md +127 -0
  11. package/docs/sdk/models/portal-session-response.md +17 -0
  12. package/docs/sdk/models/resume-subscription-request-request.md +19 -0
  13. package/docs/sdk/models/resume-subscription-request.md +18 -0
  14. package/docs/sdk/models/resume-subscription-response.md +127 -0
  15. package/docs/sdk/models/shape.md +2 -2
  16. package/docs/sdk/models/subscription-pause-response.md +35 -0
  17. package/docs/sdks/analytics/README.md +6 -6
  18. package/docs/sdks/customers/README.md +72 -0
  19. package/docs/sdks/subscriptions/README.md +146 -0
  20. package/esm/funcs/customers-create-customer-portal-session.d.ts +17 -0
  21. package/esm/funcs/customers-create-customer-portal-session.d.ts.map +1 -0
  22. package/esm/funcs/customers-create-customer-portal-session.js +91 -0
  23. package/esm/funcs/customers-create-customer-portal-session.js.map +1 -0
  24. package/esm/funcs/subscriptions-pause-subscription.d.ts +17 -0
  25. package/esm/funcs/subscriptions-pause-subscription.d.ts.map +1 -0
  26. package/esm/funcs/subscriptions-pause-subscription.js +93 -0
  27. package/esm/funcs/subscriptions-pause-subscription.js.map +1 -0
  28. package/esm/funcs/subscriptions-resume-subscription.d.ts +17 -0
  29. package/esm/funcs/subscriptions-resume-subscription.d.ts.map +1 -0
  30. package/esm/funcs/subscriptions-resume-subscription.js +93 -0
  31. package/esm/funcs/subscriptions-resume-subscription.js.map +1 -0
  32. package/esm/lib/config.d.ts +2 -2
  33. package/esm/lib/config.js +2 -2
  34. package/esm/sdk/customers.d.ts +7 -0
  35. package/esm/sdk/customers.d.ts.map +1 -1
  36. package/esm/sdk/customers.js +10 -0
  37. package/esm/sdk/customers.js.map +1 -1
  38. package/esm/sdk/models/analytics-view-definition.d.ts +3 -0
  39. package/esm/sdk/models/analytics-view-definition.d.ts.map +1 -1
  40. package/esm/sdk/models/analytics-view-definition.js +3 -0
  41. package/esm/sdk/models/analytics-view-definition.js.map +1 -1
  42. package/esm/sdk/models/create-customer-portal-session-op.d.ts +15 -0
  43. package/esm/sdk/models/create-customer-portal-session-op.d.ts.map +1 -0
  44. package/esm/sdk/models/create-customer-portal-session-op.js +17 -0
  45. package/esm/sdk/models/create-customer-portal-session-op.js.map +1 -0
  46. package/esm/sdk/models/family.d.ts +12 -0
  47. package/esm/sdk/models/family.d.ts.map +1 -0
  48. package/esm/sdk/models/family.js +15 -0
  49. package/esm/sdk/models/family.js.map +1 -0
  50. package/esm/sdk/models/index.d.ts +10 -0
  51. package/esm/sdk/models/index.d.ts.map +1 -1
  52. package/esm/sdk/models/index.js +10 -0
  53. package/esm/sdk/models/index.js.map +1 -1
  54. package/esm/sdk/models/invoice-billing-reason.d.ts +2 -0
  55. package/esm/sdk/models/invoice-billing-reason.d.ts.map +1 -1
  56. package/esm/sdk/models/invoice-billing-reason.js +2 -0
  57. package/esm/sdk/models/invoice-billing-reason.js.map +1 -1
  58. package/esm/sdk/models/metric.d.ts +1 -0
  59. package/esm/sdk/models/metric.d.ts.map +1 -1
  60. package/esm/sdk/models/metric.js +1 -0
  61. package/esm/sdk/models/metric.js.map +1 -1
  62. package/esm/sdk/models/modify-subscription-params.d.ts +5 -0
  63. package/esm/sdk/models/modify-subscription-params.d.ts.map +1 -1
  64. package/esm/sdk/models/modify-subscription-params.js +2 -0
  65. package/esm/sdk/models/modify-subscription-params.js.map +1 -1
  66. package/esm/sdk/models/modify-subscription-type.d.ts +1 -0
  67. package/esm/sdk/models/modify-subscription-type.d.ts.map +1 -1
  68. package/esm/sdk/models/modify-subscription-type.js +1 -0
  69. package/esm/sdk/models/modify-subscription-type.js.map +1 -1
  70. package/esm/sdk/models/pause-subscription-op.d.ts +21 -0
  71. package/esm/sdk/models/pause-subscription-op.d.ts.map +1 -0
  72. package/esm/sdk/models/pause-subscription-op.js +14 -0
  73. package/esm/sdk/models/pause-subscription-op.js.map +1 -0
  74. package/esm/sdk/models/pause-subscription-request.d.ts +37 -0
  75. package/esm/sdk/models/pause-subscription-request.d.ts.map +1 -0
  76. package/esm/sdk/models/pause-subscription-request.js +20 -0
  77. package/esm/sdk/models/pause-subscription-request.js.map +1 -0
  78. package/esm/sdk/models/pause-subscription-response.d.ts +19 -0
  79. package/esm/sdk/models/pause-subscription-response.d.ts.map +1 -0
  80. package/esm/sdk/models/pause-subscription-response.js +17 -0
  81. package/esm/sdk/models/pause-subscription-response.js.map +1 -0
  82. package/esm/sdk/models/portal-session-response.d.ts +12 -0
  83. package/esm/sdk/models/portal-session-response.d.ts.map +1 -0
  84. package/esm/sdk/models/portal-session-response.js +21 -0
  85. package/esm/sdk/models/portal-session-response.js.map +1 -0
  86. package/esm/sdk/models/resume-subscription-op.d.ts +21 -0
  87. package/esm/sdk/models/resume-subscription-op.d.ts.map +1 -0
  88. package/esm/sdk/models/resume-subscription-op.js +14 -0
  89. package/esm/sdk/models/resume-subscription-op.js.map +1 -0
  90. package/esm/sdk/models/resume-subscription-request.d.ts +28 -0
  91. package/esm/sdk/models/resume-subscription-request.d.ts.map +1 -0
  92. package/esm/sdk/models/resume-subscription-request.js +19 -0
  93. package/esm/sdk/models/resume-subscription-request.js.map +1 -0
  94. package/esm/sdk/models/resume-subscription-response.d.ts +19 -0
  95. package/esm/sdk/models/resume-subscription-response.d.ts.map +1 -0
  96. package/esm/sdk/models/resume-subscription-response.js +17 -0
  97. package/esm/sdk/models/resume-subscription-response.js.map +1 -0
  98. package/esm/sdk/models/shape.d.ts +1 -0
  99. package/esm/sdk/models/shape.d.ts.map +1 -1
  100. package/esm/sdk/models/shape.js +1 -0
  101. package/esm/sdk/models/shape.js.map +1 -1
  102. package/esm/sdk/models/subscription-pause-response.d.ts +64 -0
  103. package/esm/sdk/models/subscription-pause-response.d.ts.map +1 -0
  104. package/esm/sdk/models/subscription-pause-response.js +55 -0
  105. package/esm/sdk/models/subscription-pause-response.js.map +1 -0
  106. package/esm/sdk/subscriptions.d.ts +14 -0
  107. package/esm/sdk/subscriptions.d.ts.map +1 -1
  108. package/esm/sdk/subscriptions.js +20 -0
  109. package/esm/sdk/subscriptions.js.map +1 -1
  110. package/jsr.json +1 -1
  111. package/package.json +1 -1
  112. package/src/funcs/customers-create-customer-portal-session.ts +182 -0
  113. package/src/funcs/subscriptions-pause-subscription.ts +187 -0
  114. package/src/funcs/subscriptions-resume-subscription.ts +187 -0
  115. package/src/lib/config.ts +2 -2
  116. package/src/sdk/customers.ts +18 -0
  117. package/src/sdk/models/analytics-view-definition.ts +9 -0
  118. package/src/sdk/models/create-customer-portal-session-op.ts +43 -0
  119. package/src/sdk/models/family.ts +20 -0
  120. package/src/sdk/models/index.ts +10 -0
  121. package/src/sdk/models/invoice-billing-reason.ts +2 -0
  122. package/src/sdk/models/metric.ts +1 -0
  123. package/src/sdk/models/modify-subscription-params.ts +7 -0
  124. package/src/sdk/models/modify-subscription-type.ts +1 -0
  125. package/src/sdk/models/pause-subscription-op.ts +46 -0
  126. package/src/sdk/models/pause-subscription-request.ts +64 -0
  127. package/src/sdk/models/pause-subscription-response.ts +47 -0
  128. package/src/sdk/models/portal-session-response.ts +43 -0
  129. package/src/sdk/models/resume-subscription-op.ts +46 -0
  130. package/src/sdk/models/resume-subscription-request.ts +54 -0
  131. package/src/sdk/models/resume-subscription-response.ts +47 -0
  132. package/src/sdk/models/shape.ts +1 -0
  133. package/src/sdk/models/subscription-pause-response.ts +123 -0
  134. package/src/sdk/subscriptions.ts +40 -0
@@ -18,6 +18,7 @@ let value: AnalyticsViewDefinition = {
18
18
  | Field | Type | Required | Description |
19
19
  | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
20
20
  | `dimensions` | *string*[] | :heavy_minus_sign: | N/A |
21
+ | `family` | [models.Family](../../sdk/models/family.md) | :heavy_minus_sign: | N/A |
21
22
  | `filters` | [models.AnalyticsFilter](../../sdk/models/analytics-filter.md)[] | :heavy_minus_sign: | N/A |
22
23
  | `limit` | *number* | :heavy_minus_sign: | N/A |
23
24
  | `metrics` | [models.Metric](../../sdk/models/metric.md)[] | :heavy_check_mark: | N/A |
@@ -0,0 +1,17 @@
1
+ # CreateCustomerPortalSessionRequest
2
+
3
+ ## Example Usage
4
+
5
+ ```typescript
6
+ import { CreateCustomerPortalSessionRequest } from "@flexprice/sdk/sdk/models";
7
+
8
+ let value: CreateCustomerPortalSessionRequest = {
9
+ externalId: "<id>",
10
+ };
11
+ ```
12
+
13
+ ## Fields
14
+
15
+ | Field | Type | Required | Description |
16
+ | -------------------- | -------------------- | -------------------- | -------------------- |
17
+ | `externalId` | *string* | :heavy_check_mark: | Customer external ID |
@@ -0,0 +1,17 @@
1
+ # Family
2
+
3
+ ## Example Usage
4
+
5
+ ```typescript
6
+ import { Family } from "@flexprice/sdk/sdk/models";
7
+
8
+ let value: Family = "usage";
9
+
10
+ // Open enum: unrecognized values are captured as Unrecognized<string>
11
+ ```
12
+
13
+ ## Values
14
+
15
+ ```typescript
16
+ "usage" | "billing" | Unrecognized<string>
17
+ ```
@@ -5,11 +5,11 @@
5
5
  ```typescript
6
6
  import { InvoiceBillingReason } from "@flexprice/sdk/sdk/models";
7
7
 
8
- let value: InvoiceBillingReason = "SUBSCRIPTION_UPDATE";
8
+ let value: InvoiceBillingReason = "SUBSCRIPTION_TRIAL_END";
9
9
  ```
10
10
 
11
11
  ## Values
12
12
 
13
13
  ```typescript
14
- "SUBSCRIPTION_CREATE" | "SUBSCRIPTION_CYCLE" | "SUBSCRIPTION_UPDATE" | "SUBSCRIPTION_TRIAL_END" | "SUBSCRIPTION_TRIAL_START" | "PRORATION" | "MANUAL" | "AUTO_INVOICE_THRESHOLD" | "WALLET_AUTO_TOPUP"
14
+ "SUBSCRIPTION_CREATE" | "SUBSCRIPTION_CYCLE" | "SUBSCRIPTION_UPDATE" | "SUBSCRIPTION_TRIAL_END" | "SUBSCRIPTION_TRIAL_START" | "PRORATION" | "MANUAL" | "AUTO_INVOICE_THRESHOLD" | "WALLET_AUTO_TOPUP" | "SUBSCRIPTION_PAUSED" | "SUBSCRIPTION_RESUME"
15
15
  ```
@@ -5,7 +5,7 @@
5
5
  ```typescript
6
6
  import { Metric } from "@flexprice/sdk/sdk/models";
7
7
 
8
- let value: Metric = "event_count";
8
+ let value: Metric = "invoice_total";
9
9
 
10
10
  // Open enum: unrecognized values are captured as Unrecognized<string>
11
11
  ```
@@ -13,5 +13,5 @@ let value: Metric = "event_count";
13
13
  ## Values
14
14
 
15
15
  ```typescript
16
- "usage_quantity" | "event_count" | Unrecognized<string>
16
+ "usage_quantity" | "event_count" | "invoice_total" | Unrecognized<string>
17
17
  ```
@@ -10,8 +10,9 @@ let value: ModifySubscriptionParams = {};
10
10
 
11
11
  ## Fields
12
12
 
13
- | Field | Type | Required | Description |
14
- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
15
- | `lineItemModifications` | [models.ModifySubscriptionLineItem](../../sdk/models/modify-subscription-line-item.md)[] | :heavy_minus_sign: | N/A |
16
- | `modifyType` | [models.ModifySubscriptionType](../../sdk/models/modify-subscription-type.md) | :heavy_minus_sign: | N/A |
17
- | `subscriptionId` | *string* | :heavy_minus_sign: | N/A |
13
+ | Field | Type | Required | Description |
14
+ | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
15
+ | `lineItemModifications` | [models.ModifySubscriptionLineItem](../../sdk/models/modify-subscription-line-item.md)[] | :heavy_minus_sign: | N/A |
16
+ | `modifyType` | [models.ModifySubscriptionType](../../sdk/models/modify-subscription-type.md) | :heavy_minus_sign: | N/A |
17
+ | `subscriptionId` | *string* | :heavy_minus_sign: | N/A |
18
+ | `trialEndAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | TrialEndAt is where a trial_end checkout starts the first paid period. |
@@ -5,11 +5,11 @@
5
5
  ```typescript
6
6
  import { ModifySubscriptionType } from "@flexprice/sdk/sdk/models";
7
7
 
8
- let value: ModifySubscriptionType = "line_item_change";
8
+ let value: ModifySubscriptionType = "trial_end";
9
9
  ```
10
10
 
11
11
  ## Values
12
12
 
13
13
  ```typescript
14
- "quantity_change" | "line_item_change"
14
+ "quantity_change" | "line_item_change" | "trial_end"
15
15
  ```
@@ -0,0 +1,19 @@
1
+ # PauseSubscriptionRequestRequest
2
+
3
+ ## Example Usage
4
+
5
+ ```typescript
6
+ import { PauseSubscriptionRequestRequest } from "@flexprice/sdk/sdk/models";
7
+
8
+ let value: PauseSubscriptionRequestRequest = {
9
+ id: "<id>",
10
+ body: {},
11
+ };
12
+ ```
13
+
14
+ ## Fields
15
+
16
+ | Field | Type | Required | Description |
17
+ | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
18
+ | `id` | *string* | :heavy_check_mark: | Subscription ID |
19
+ | `body` | [models.PauseSubscriptionRequest](../../sdk/models/pause-subscription-request.md) | :heavy_check_mark: | Pause subscription request |
@@ -0,0 +1,19 @@
1
+ # PauseSubscriptionRequest
2
+
3
+ Pauses an active subscription now. Usage and arrear fixed charges up to the pause are billed on a closing invoice.
4
+
5
+ ## Example Usage
6
+
7
+ ```typescript
8
+ import { PauseSubscriptionRequest } from "@flexprice/sdk/sdk/models";
9
+
10
+ let value: PauseSubscriptionRequest = {};
11
+ ```
12
+
13
+ ## Fields
14
+
15
+ | Field | Type | Required | Description |
16
+ | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
17
+ | `metadata` | Record<string, *string*> | :heavy_minus_sign: | Metadata stored on the pause<br/>@Example {"requested_by": "customer", "channel": "support_ticket"} |
18
+ | `prorationBehavior` | [models.ProrationBehavior](../../sdk/models/proration-behavior.md) | :heavy_minus_sign: | N/A |
19
+ | `reason` | *string* | :heavy_minus_sign: | Reason for pausing the subscription<br/>@Description Optional reason for the pause. Maximum 255 characters<br/>@Example "Customer requested temporary suspension" |
@@ -0,0 +1,127 @@
1
+ # PauseSubscriptionResponse
2
+
3
+ The paused subscription and its pause
4
+
5
+ ## Example Usage
6
+
7
+ ```typescript
8
+ import { PauseSubscriptionResponse } from "@flexprice/sdk/sdk/models";
9
+
10
+ let value: PauseSubscriptionResponse = {
11
+ subscription: {
12
+ couponAssociations: [
13
+ {
14
+ subscriptionLineItem: {
15
+ price: {
16
+ addon: {
17
+ prices: [
18
+ {
19
+ addon: {},
20
+ meter: {
21
+ createdAt: new Date("2024-03-20T15:04:05Z"),
22
+ eventName: "api_request",
23
+ id: "550e8400-e29b-41d4-a716-446655440000",
24
+ name: "API Usage Meter",
25
+ status: "published",
26
+ tenantId: "tenant123",
27
+ updatedAt: new Date("2024-03-20T15:04:05Z"),
28
+ },
29
+ plan: {},
30
+ },
31
+ ],
32
+ },
33
+ meter: {
34
+ createdAt: new Date("2024-03-20T15:04:05Z"),
35
+ eventName: "api_request",
36
+ id: "550e8400-e29b-41d4-a716-446655440000",
37
+ name: "API Usage Meter",
38
+ status: "published",
39
+ tenantId: "tenant123",
40
+ updatedAt: new Date("2024-03-20T15:04:05Z"),
41
+ },
42
+ plan: {},
43
+ },
44
+ },
45
+ },
46
+ ],
47
+ entitlements: [
48
+ {
49
+ feature: {
50
+ meter: {
51
+ createdAt: new Date("2024-03-20T15:04:05Z"),
52
+ eventName: "api_request",
53
+ id: "550e8400-e29b-41d4-a716-446655440000",
54
+ name: "API Usage Meter",
55
+ status: "published",
56
+ tenantId: "tenant123",
57
+ updatedAt: new Date("2024-03-20T15:04:05Z"),
58
+ },
59
+ },
60
+ },
61
+ ],
62
+ latestInvoice: {
63
+ subscription: {
64
+ couponAssociations: [
65
+ {
66
+ subscriptionLineItem: {
67
+ price: {
68
+ addon: {
69
+ prices: [
70
+ {
71
+ addon: {},
72
+ meter: {
73
+ createdAt: new Date("2024-03-20T15:04:05Z"),
74
+ eventName: "api_request",
75
+ id: "550e8400-e29b-41d4-a716-446655440000",
76
+ name: "API Usage Meter",
77
+ status: "published",
78
+ tenantId: "tenant123",
79
+ updatedAt: new Date("2024-03-20T15:04:05Z"),
80
+ },
81
+ plan: {},
82
+ },
83
+ ],
84
+ },
85
+ meter: {
86
+ createdAt: new Date("2024-03-20T15:04:05Z"),
87
+ eventName: "api_request",
88
+ id: "550e8400-e29b-41d4-a716-446655440000",
89
+ name: "API Usage Meter",
90
+ status: "published",
91
+ tenantId: "tenant123",
92
+ updatedAt: new Date("2024-03-20T15:04:05Z"),
93
+ },
94
+ plan: {},
95
+ },
96
+ },
97
+ },
98
+ ],
99
+ entitlements: [
100
+ {
101
+ feature: {
102
+ meter: {
103
+ createdAt: new Date("2024-03-20T15:04:05Z"),
104
+ eventName: "api_request",
105
+ id: "550e8400-e29b-41d4-a716-446655440000",
106
+ name: "API Usage Meter",
107
+ status: "published",
108
+ tenantId: "tenant123",
109
+ updatedAt: new Date("2024-03-20T15:04:05Z"),
110
+ },
111
+ },
112
+ },
113
+ ],
114
+ plan: {},
115
+ },
116
+ },
117
+ plan: {},
118
+ },
119
+ };
120
+ ```
121
+
122
+ ## Fields
123
+
124
+ | Field | Type | Required | Description |
125
+ | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
126
+ | `pause` | [models.SubscriptionPauseResponse](../../sdk/models/subscription-pause-response.md) | :heavy_minus_sign: | Response object containing subscription pause information |
127
+ | `subscription` | [models.SubscriptionResponse](../../sdk/models/subscription-response.md) | :heavy_minus_sign: | N/A |
@@ -0,0 +1,17 @@
1
+ # PortalSessionResponse
2
+
3
+ ## Example Usage
4
+
5
+ ```typescript
6
+ import { PortalSessionResponse } from "@flexprice/sdk/sdk/models";
7
+
8
+ let value: PortalSessionResponse = {};
9
+ ```
10
+
11
+ ## Fields
12
+
13
+ | Field | Type | Required | Description |
14
+ | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
15
+ | `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A |
16
+ | `token` | *string* | :heavy_minus_sign: | N/A |
17
+ | `url` | *string* | :heavy_minus_sign: | N/A |
@@ -0,0 +1,19 @@
1
+ # ResumeSubscriptionRequestRequest
2
+
3
+ ## Example Usage
4
+
5
+ ```typescript
6
+ import { ResumeSubscriptionRequestRequest } from "@flexprice/sdk/sdk/models";
7
+
8
+ let value: ResumeSubscriptionRequestRequest = {
9
+ id: "<id>",
10
+ body: {},
11
+ };
12
+ ```
13
+
14
+ ## Fields
15
+
16
+ | Field | Type | Required | Description |
17
+ | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
18
+ | `id` | *string* | :heavy_check_mark: | Subscription ID |
19
+ | `body` | [models.ResumeSubscriptionRequest](../../sdk/models/resume-subscription-request.md) | :heavy_check_mark: | Resume subscription request |
@@ -0,0 +1,18 @@
1
+ # ResumeSubscriptionRequest
2
+
3
+ Resumes a paused subscription now. The billing anchor is kept, so the first period runs from the resume time to the next billing date.
4
+
5
+ ## Example Usage
6
+
7
+ ```typescript
8
+ import { ResumeSubscriptionRequest } from "@flexprice/sdk/sdk/models";
9
+
10
+ let value: ResumeSubscriptionRequest = {};
11
+ ```
12
+
13
+ ## Fields
14
+
15
+ | Field | Type | Required | Description |
16
+ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
17
+ | `metadata` | Record<string, *string*> | :heavy_minus_sign: | Metadata merged into the pause<br/>@Example {"resumed_by": "admin"} |
18
+ | `prorationBehavior` | [models.ProrationBehavior](../../sdk/models/proration-behavior.md) | :heavy_minus_sign: | N/A |
@@ -0,0 +1,127 @@
1
+ # ResumeSubscriptionResponse
2
+
3
+ The resumed subscription and the pause it ended
4
+
5
+ ## Example Usage
6
+
7
+ ```typescript
8
+ import { ResumeSubscriptionResponse } from "@flexprice/sdk/sdk/models";
9
+
10
+ let value: ResumeSubscriptionResponse = {
11
+ subscription: {
12
+ couponAssociations: [
13
+ {
14
+ subscriptionLineItem: {
15
+ price: {
16
+ addon: {
17
+ prices: [
18
+ {
19
+ addon: {},
20
+ meter: {
21
+ createdAt: new Date("2024-03-20T15:04:05Z"),
22
+ eventName: "api_request",
23
+ id: "550e8400-e29b-41d4-a716-446655440000",
24
+ name: "API Usage Meter",
25
+ status: "published",
26
+ tenantId: "tenant123",
27
+ updatedAt: new Date("2024-03-20T15:04:05Z"),
28
+ },
29
+ plan: {},
30
+ },
31
+ ],
32
+ },
33
+ meter: {
34
+ createdAt: new Date("2024-03-20T15:04:05Z"),
35
+ eventName: "api_request",
36
+ id: "550e8400-e29b-41d4-a716-446655440000",
37
+ name: "API Usage Meter",
38
+ status: "published",
39
+ tenantId: "tenant123",
40
+ updatedAt: new Date("2024-03-20T15:04:05Z"),
41
+ },
42
+ plan: {},
43
+ },
44
+ },
45
+ },
46
+ ],
47
+ entitlements: [
48
+ {
49
+ feature: {
50
+ meter: {
51
+ createdAt: new Date("2024-03-20T15:04:05Z"),
52
+ eventName: "api_request",
53
+ id: "550e8400-e29b-41d4-a716-446655440000",
54
+ name: "API Usage Meter",
55
+ status: "published",
56
+ tenantId: "tenant123",
57
+ updatedAt: new Date("2024-03-20T15:04:05Z"),
58
+ },
59
+ },
60
+ },
61
+ ],
62
+ latestInvoice: {
63
+ subscription: {
64
+ couponAssociations: [
65
+ {
66
+ subscriptionLineItem: {
67
+ price: {
68
+ addon: {
69
+ prices: [
70
+ {
71
+ addon: {},
72
+ meter: {
73
+ createdAt: new Date("2024-03-20T15:04:05Z"),
74
+ eventName: "api_request",
75
+ id: "550e8400-e29b-41d4-a716-446655440000",
76
+ name: "API Usage Meter",
77
+ status: "published",
78
+ tenantId: "tenant123",
79
+ updatedAt: new Date("2024-03-20T15:04:05Z"),
80
+ },
81
+ plan: {},
82
+ },
83
+ ],
84
+ },
85
+ meter: {
86
+ createdAt: new Date("2024-03-20T15:04:05Z"),
87
+ eventName: "api_request",
88
+ id: "550e8400-e29b-41d4-a716-446655440000",
89
+ name: "API Usage Meter",
90
+ status: "published",
91
+ tenantId: "tenant123",
92
+ updatedAt: new Date("2024-03-20T15:04:05Z"),
93
+ },
94
+ plan: {},
95
+ },
96
+ },
97
+ },
98
+ ],
99
+ entitlements: [
100
+ {
101
+ feature: {
102
+ meter: {
103
+ createdAt: new Date("2024-03-20T15:04:05Z"),
104
+ eventName: "api_request",
105
+ id: "550e8400-e29b-41d4-a716-446655440000",
106
+ name: "API Usage Meter",
107
+ status: "published",
108
+ tenantId: "tenant123",
109
+ updatedAt: new Date("2024-03-20T15:04:05Z"),
110
+ },
111
+ },
112
+ },
113
+ ],
114
+ plan: {},
115
+ },
116
+ },
117
+ plan: {},
118
+ },
119
+ };
120
+ ```
121
+
122
+ ## Fields
123
+
124
+ | Field | Type | Required | Description |
125
+ | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
126
+ | `pause` | [models.SubscriptionPauseResponse](../../sdk/models/subscription-pause-response.md) | :heavy_minus_sign: | Response object containing subscription pause information |
127
+ | `subscription` | [models.SubscriptionResponse](../../sdk/models/subscription-response.md) | :heavy_minus_sign: | N/A |
@@ -5,7 +5,7 @@
5
5
  ```typescript
6
6
  import { Shape } from "@flexprice/sdk/sdk/models";
7
7
 
8
- let value: Shape = "breakdown";
8
+ let value: Shape = "scalar";
9
9
 
10
10
  // Open enum: unrecognized values are captured as Unrecognized<string>
11
11
  ```
@@ -13,5 +13,5 @@ let value: Shape = "breakdown";
13
13
  ## Values
14
14
 
15
15
  ```typescript
16
- "timeseries" | "breakdown" | Unrecognized<string>
16
+ "timeseries" | "breakdown" | "scalar" | Unrecognized<string>
17
17
  ```
@@ -0,0 +1,35 @@
1
+ # SubscriptionPauseResponse
2
+
3
+ Response object containing subscription pause information
4
+
5
+ ## Example Usage
6
+
7
+ ```typescript
8
+ import { SubscriptionPauseResponse } from "@flexprice/sdk/sdk/models";
9
+
10
+ let value: SubscriptionPauseResponse = {};
11
+ ```
12
+
13
+ ## Fields
14
+
15
+ | Field | Type | Required | Description |
16
+ | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
17
+ | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A |
18
+ | `createdBy` | *string* | :heavy_minus_sign: | N/A |
19
+ | `environmentId` | *string* | :heavy_minus_sign: | EnvironmentID is the environment identifier for the pause |
20
+ | `id` | *string* | :heavy_minus_sign: | ID is the unique identifier for the subscription pause |
21
+ | `metadata` | Record<string, *string*> | :heavy_minus_sign: | N/A |
22
+ | `originalPeriodEnd` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | OriginalPeriodEnd is the end of the billing period when the pause was created |
23
+ | `originalPeriodStart` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | OriginalPeriodStart is the start of the billing period when the pause was created |
24
+ | `pauseEnd` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | PauseEnd is when the pause will end (null for indefinite) |
25
+ | `pauseMode` | [models.PauseMode](../../sdk/models/pause-mode.md) | :heavy_minus_sign: | N/A |
26
+ | `pauseStart` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | PauseStart is when the pause actually started |
27
+ | `pauseStatus` | [models.PauseStatus](../../sdk/models/pause-status.md) | :heavy_minus_sign: | N/A |
28
+ | `reason` | *string* | :heavy_minus_sign: | Reason is the reason for pausing |
29
+ | `resumeMode` | [models.ResumeMode](../../sdk/models/resume-mode.md) | :heavy_minus_sign: | N/A |
30
+ | `resumedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | ResumedAt is when the pause was actually ended (if manually resumed) |
31
+ | `status` | [models.Status](../../sdk/models/status.md) | :heavy_minus_sign: | N/A |
32
+ | `subscriptionId` | *string* | :heavy_minus_sign: | SubscriptionID is the identifier for the subscription |
33
+ | `tenantId` | *string* | :heavy_minus_sign: | N/A |
34
+ | `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A |
35
+ | `updatedBy` | *string* | :heavy_minus_sign: | N/A |
@@ -29,7 +29,7 @@ async function run() {
29
29
  metrics: [
30
30
  "usage_quantity",
31
31
  ],
32
- shape: "breakdown",
32
+ shape: "scalar",
33
33
  },
34
34
  });
35
35
 
@@ -59,7 +59,7 @@ async function run() {
59
59
  metrics: [
60
60
  "usage_quantity",
61
61
  ],
62
- shape: "breakdown",
62
+ shape: "scalar",
63
63
  },
64
64
  });
65
65
  if (res.ok) {
@@ -187,9 +187,9 @@ async function run() {
187
187
  const result = await flexprice.analytics.createAnalyticsView({
188
188
  definition: {
189
189
  metrics: [
190
- "event_count",
190
+ "invoice_total",
191
191
  ],
192
- shape: "breakdown",
192
+ shape: "scalar",
193
193
  },
194
194
  name: "<value>",
195
195
  });
@@ -218,9 +218,9 @@ async function run() {
218
218
  const res = await analyticsCreateAnalyticsView(flexprice, {
219
219
  definition: {
220
220
  metrics: [
221
- "event_count",
221
+ "invoice_total",
222
222
  ],
223
- shape: "breakdown",
223
+ shape: "scalar",
224
224
  },
225
225
  name: "<value>",
226
226
  });