askell-mcp 0.1.2 → 0.3.0
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.
- package/README.md +16 -5
- package/package.json +9 -8
- package/spec/openapi-v2.json +435 -49
- package/src/client/response-formatter.ts +113 -32
- package/src/config.ts +36 -27
- package/src/openapi/registry.ts +17 -7
- package/src/resources/register.ts +53 -27
- package/src/server.ts +13 -7
- package/src/tools/analysis.ts +38 -10
- package/src/tools/call.ts +142 -61
- package/src/tools/discovery.ts +9 -5
- package/src/tools/mutation-gate.ts +74 -0
package/spec/openapi-v2.json
CHANGED
|
@@ -1137,6 +1137,161 @@
|
|
|
1137
1137
|
]
|
|
1138
1138
|
}
|
|
1139
1139
|
},
|
|
1140
|
+
"/v2/subscription-contracts/{contractId}/apply-code/": {
|
|
1141
|
+
"post": {
|
|
1142
|
+
"tags": [
|
|
1143
|
+
"V2 Subscription Contracts"
|
|
1144
|
+
],
|
|
1145
|
+
"summary": "Apply a promotion code to a V2 subscription contract",
|
|
1146
|
+
"description": "Validates and redeems a promotion code for the contract, creating an active discount that is applied to subsequent billing runs. A contract can only carry one active discount at a time. Requires a secret key.",
|
|
1147
|
+
"parameters": [
|
|
1148
|
+
{
|
|
1149
|
+
"$ref": "#/components/parameters/V2ContractId"
|
|
1150
|
+
}
|
|
1151
|
+
],
|
|
1152
|
+
"requestBody": {
|
|
1153
|
+
"content": {
|
|
1154
|
+
"application/json": {
|
|
1155
|
+
"schema": {
|
|
1156
|
+
"type": "object",
|
|
1157
|
+
"required": [
|
|
1158
|
+
"promotion_code"
|
|
1159
|
+
],
|
|
1160
|
+
"properties": {
|
|
1161
|
+
"promotion_code": {
|
|
1162
|
+
"type": "string"
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
},
|
|
1168
|
+
"required": true
|
|
1169
|
+
},
|
|
1170
|
+
"responses": {
|
|
1171
|
+
"200": {
|
|
1172
|
+
"description": "Promotion code applied",
|
|
1173
|
+
"content": {
|
|
1174
|
+
"application/json": {
|
|
1175
|
+
"schema": {
|
|
1176
|
+
"type": "object",
|
|
1177
|
+
"properties": {
|
|
1178
|
+
"success": {
|
|
1179
|
+
"type": "boolean"
|
|
1180
|
+
},
|
|
1181
|
+
"message": {
|
|
1182
|
+
"type": "string"
|
|
1183
|
+
},
|
|
1184
|
+
"discount": {
|
|
1185
|
+
"$ref": "#/components/schemas/V2ContractDiscount"
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
},
|
|
1192
|
+
"400": {
|
|
1193
|
+
"$ref": "#/components/responses/V2ValidationError"
|
|
1194
|
+
},
|
|
1195
|
+
"404": {
|
|
1196
|
+
"$ref": "#/components/responses/V2NotFound"
|
|
1197
|
+
}
|
|
1198
|
+
},
|
|
1199
|
+
"security": [
|
|
1200
|
+
{
|
|
1201
|
+
"Secret-Api-Key": []
|
|
1202
|
+
}
|
|
1203
|
+
]
|
|
1204
|
+
}
|
|
1205
|
+
},
|
|
1206
|
+
"/v2/subscription-contracts/{contractId}/discount/": {
|
|
1207
|
+
"get": {
|
|
1208
|
+
"tags": [
|
|
1209
|
+
"V2 Subscription Contracts"
|
|
1210
|
+
],
|
|
1211
|
+
"summary": "Get the active discount for a V2 subscription contract",
|
|
1212
|
+
"description": "Returns the contract's active coupon discount, or null when none is active. Requires a secret key.",
|
|
1213
|
+
"parameters": [
|
|
1214
|
+
{
|
|
1215
|
+
"$ref": "#/components/parameters/V2ContractId"
|
|
1216
|
+
}
|
|
1217
|
+
],
|
|
1218
|
+
"responses": {
|
|
1219
|
+
"200": {
|
|
1220
|
+
"description": "Active discount",
|
|
1221
|
+
"content": {
|
|
1222
|
+
"application/json": {
|
|
1223
|
+
"schema": {
|
|
1224
|
+
"type": "object",
|
|
1225
|
+
"properties": {
|
|
1226
|
+
"discount": {
|
|
1227
|
+
"allOf": [
|
|
1228
|
+
{
|
|
1229
|
+
"$ref": "#/components/schemas/V2ContractDiscount"
|
|
1230
|
+
}
|
|
1231
|
+
],
|
|
1232
|
+
"nullable": true
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
},
|
|
1239
|
+
"404": {
|
|
1240
|
+
"$ref": "#/components/responses/V2NotFound"
|
|
1241
|
+
}
|
|
1242
|
+
},
|
|
1243
|
+
"security": [
|
|
1244
|
+
{
|
|
1245
|
+
"Secret-Api-Key": []
|
|
1246
|
+
}
|
|
1247
|
+
]
|
|
1248
|
+
}
|
|
1249
|
+
},
|
|
1250
|
+
"/v2/subscription-contracts/{contractId}/remove-discount/": {
|
|
1251
|
+
"post": {
|
|
1252
|
+
"tags": [
|
|
1253
|
+
"V2 Subscription Contracts"
|
|
1254
|
+
],
|
|
1255
|
+
"summary": "Remove the active discount from a V2 subscription contract",
|
|
1256
|
+
"description": "Ends the contract's active coupon discount. Subsequent billing runs are charged at full price. Requires a secret key.",
|
|
1257
|
+
"parameters": [
|
|
1258
|
+
{
|
|
1259
|
+
"$ref": "#/components/parameters/V2ContractId"
|
|
1260
|
+
}
|
|
1261
|
+
],
|
|
1262
|
+
"responses": {
|
|
1263
|
+
"200": {
|
|
1264
|
+
"description": "Discount removed",
|
|
1265
|
+
"content": {
|
|
1266
|
+
"application/json": {
|
|
1267
|
+
"schema": {
|
|
1268
|
+
"type": "object",
|
|
1269
|
+
"properties": {
|
|
1270
|
+
"success": {
|
|
1271
|
+
"type": "boolean"
|
|
1272
|
+
},
|
|
1273
|
+
"message": {
|
|
1274
|
+
"type": "string"
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
},
|
|
1281
|
+
"400": {
|
|
1282
|
+
"$ref": "#/components/responses/V2ValidationError"
|
|
1283
|
+
},
|
|
1284
|
+
"404": {
|
|
1285
|
+
"$ref": "#/components/responses/V2NotFound"
|
|
1286
|
+
}
|
|
1287
|
+
},
|
|
1288
|
+
"security": [
|
|
1289
|
+
{
|
|
1290
|
+
"Secret-Api-Key": []
|
|
1291
|
+
}
|
|
1292
|
+
]
|
|
1293
|
+
}
|
|
1294
|
+
},
|
|
1140
1295
|
"/v2/checkouts/": {
|
|
1141
1296
|
"post": {
|
|
1142
1297
|
"tags": [
|
|
@@ -2091,6 +2246,80 @@
|
|
|
2091
2246
|
}
|
|
2092
2247
|
}
|
|
2093
2248
|
},
|
|
2249
|
+
"V2ContractDiscount": {
|
|
2250
|
+
"type": "object",
|
|
2251
|
+
"description": "An applied coupon discount on a V2 subscription contract.",
|
|
2252
|
+
"properties": {
|
|
2253
|
+
"id": {
|
|
2254
|
+
"type": "string"
|
|
2255
|
+
},
|
|
2256
|
+
"coupon": {
|
|
2257
|
+
"type": "object",
|
|
2258
|
+
"properties": {
|
|
2259
|
+
"id": {
|
|
2260
|
+
"type": "string"
|
|
2261
|
+
},
|
|
2262
|
+
"name": {
|
|
2263
|
+
"type": "string",
|
|
2264
|
+
"nullable": true
|
|
2265
|
+
},
|
|
2266
|
+
"amount_off": {
|
|
2267
|
+
"type": "string",
|
|
2268
|
+
"format": "decimal",
|
|
2269
|
+
"nullable": true
|
|
2270
|
+
},
|
|
2271
|
+
"currency": {
|
|
2272
|
+
"type": "string",
|
|
2273
|
+
"nullable": true
|
|
2274
|
+
},
|
|
2275
|
+
"percent_off": {
|
|
2276
|
+
"type": "string",
|
|
2277
|
+
"format": "decimal",
|
|
2278
|
+
"nullable": true
|
|
2279
|
+
},
|
|
2280
|
+
"duration": {
|
|
2281
|
+
"type": "string",
|
|
2282
|
+
"enum": [
|
|
2283
|
+
"forever",
|
|
2284
|
+
"once",
|
|
2285
|
+
"repeating"
|
|
2286
|
+
]
|
|
2287
|
+
},
|
|
2288
|
+
"duration_in_months": {
|
|
2289
|
+
"type": "integer",
|
|
2290
|
+
"nullable": true
|
|
2291
|
+
},
|
|
2292
|
+
"discount_display": {
|
|
2293
|
+
"type": "string"
|
|
2294
|
+
}
|
|
2295
|
+
}
|
|
2296
|
+
},
|
|
2297
|
+
"promotion_code": {
|
|
2298
|
+
"type": "object",
|
|
2299
|
+
"nullable": true,
|
|
2300
|
+
"properties": {
|
|
2301
|
+
"id": {
|
|
2302
|
+
"type": "string"
|
|
2303
|
+
},
|
|
2304
|
+
"code": {
|
|
2305
|
+
"type": "string"
|
|
2306
|
+
}
|
|
2307
|
+
}
|
|
2308
|
+
},
|
|
2309
|
+
"start": {
|
|
2310
|
+
"type": "string",
|
|
2311
|
+
"format": "date-time"
|
|
2312
|
+
},
|
|
2313
|
+
"end": {
|
|
2314
|
+
"type": "string",
|
|
2315
|
+
"format": "date-time",
|
|
2316
|
+
"nullable": true
|
|
2317
|
+
},
|
|
2318
|
+
"is_active": {
|
|
2319
|
+
"type": "boolean"
|
|
2320
|
+
}
|
|
2321
|
+
}
|
|
2322
|
+
},
|
|
2094
2323
|
"V2SubscriptionOfferQuoteCreate": {
|
|
2095
2324
|
"type": "object",
|
|
2096
2325
|
"properties": {
|
|
@@ -2135,6 +2364,11 @@
|
|
|
2135
2364
|
"items": {
|
|
2136
2365
|
"$ref": "#/components/schemas/V2AdditionalBundle"
|
|
2137
2366
|
}
|
|
2367
|
+
},
|
|
2368
|
+
"promotion_code": {
|
|
2369
|
+
"type": "string",
|
|
2370
|
+
"nullable": true,
|
|
2371
|
+
"description": "Optional promotion code. When valid, the resulting discount is folded into the offer totals; on contract creation the code is redeemed and a discount is attached to the contract."
|
|
2138
2372
|
}
|
|
2139
2373
|
}
|
|
2140
2374
|
},
|
|
@@ -2405,58 +2639,14 @@
|
|
|
2405
2639
|
}
|
|
2406
2640
|
}
|
|
2407
2641
|
},
|
|
2408
|
-
"
|
|
2642
|
+
"V2SubscriptionContractChangeCommon": {
|
|
2409
2643
|
"type": "object",
|
|
2410
2644
|
"properties": {
|
|
2411
|
-
"operation": {
|
|
2412
|
-
"type": "string",
|
|
2413
|
-
"enum": [
|
|
2414
|
-
"add_item",
|
|
2415
|
-
"remove_item",
|
|
2416
|
-
"update_item",
|
|
2417
|
-
"pause",
|
|
2418
|
-
"resume",
|
|
2419
|
-
"cancel",
|
|
2420
|
-
"restart"
|
|
2421
|
-
],
|
|
2422
|
-
"default": "update_item"
|
|
2423
|
-
},
|
|
2424
|
-
"contract_item": {
|
|
2425
|
-
"type": "integer"
|
|
2426
|
-
},
|
|
2427
|
-
"price": {
|
|
2428
|
-
"type": "integer",
|
|
2429
|
-
"nullable": true
|
|
2430
|
-
},
|
|
2431
|
-
"quantity": {
|
|
2432
|
-
"type": "integer",
|
|
2433
|
-
"nullable": true
|
|
2434
|
-
},
|
|
2435
|
-
"discount_percent": {
|
|
2436
|
-
"type": "string",
|
|
2437
|
-
"format": "decimal",
|
|
2438
|
-
"nullable": true
|
|
2439
|
-
},
|
|
2440
2645
|
"effective_at": {
|
|
2441
2646
|
"type": "string",
|
|
2442
2647
|
"format": "date-time",
|
|
2443
2648
|
"nullable": true
|
|
2444
2649
|
},
|
|
2445
|
-
"start_date": {
|
|
2446
|
-
"type": "string",
|
|
2447
|
-
"format": "date",
|
|
2448
|
-
"nullable": true
|
|
2449
|
-
},
|
|
2450
|
-
"end_date": {
|
|
2451
|
-
"type": "string",
|
|
2452
|
-
"format": "date",
|
|
2453
|
-
"nullable": true
|
|
2454
|
-
},
|
|
2455
|
-
"pause_end_at": {
|
|
2456
|
-
"type": "string",
|
|
2457
|
-
"format": "date-time",
|
|
2458
|
-
"nullable": true
|
|
2459
|
-
},
|
|
2460
2650
|
"proration_behavior": {
|
|
2461
2651
|
"type": "string",
|
|
2462
2652
|
"enum": [
|
|
@@ -2486,13 +2676,86 @@
|
|
|
2486
2676
|
}
|
|
2487
2677
|
}
|
|
2488
2678
|
},
|
|
2679
|
+
"V2SubscriptionContractProrationPreview": {
|
|
2680
|
+
"description": "Polymorphic preview request. Fields beyond the common ones are operation-specific; fields not supported by the selected operation are rejected with a 400 validation error.",
|
|
2681
|
+
"allOf": [
|
|
2682
|
+
{
|
|
2683
|
+
"$ref": "#/components/schemas/V2SubscriptionContractChangeCommon"
|
|
2684
|
+
},
|
|
2685
|
+
{
|
|
2686
|
+
"type": "object",
|
|
2687
|
+
"properties": {
|
|
2688
|
+
"operation": {
|
|
2689
|
+
"type": "string",
|
|
2690
|
+
"enum": [
|
|
2691
|
+
"add_item",
|
|
2692
|
+
"remove_item",
|
|
2693
|
+
"update_item",
|
|
2694
|
+
"pause",
|
|
2695
|
+
"resume",
|
|
2696
|
+
"cancel",
|
|
2697
|
+
"restart"
|
|
2698
|
+
],
|
|
2699
|
+
"default": "update_item"
|
|
2700
|
+
},
|
|
2701
|
+
"contract_item": {
|
|
2702
|
+
"type": "integer",
|
|
2703
|
+
"description": "Required for update_item and remove_item."
|
|
2704
|
+
},
|
|
2705
|
+
"price": {
|
|
2706
|
+
"type": "integer",
|
|
2707
|
+
"nullable": true,
|
|
2708
|
+
"description": "Only applies to add_item and update_item. Required for add_item."
|
|
2709
|
+
},
|
|
2710
|
+
"quantity": {
|
|
2711
|
+
"type": "integer",
|
|
2712
|
+
"nullable": true,
|
|
2713
|
+
"description": "Only applies to add_item and update_item."
|
|
2714
|
+
},
|
|
2715
|
+
"discount_percent": {
|
|
2716
|
+
"type": "string",
|
|
2717
|
+
"format": "decimal",
|
|
2718
|
+
"nullable": true,
|
|
2719
|
+
"description": "Only applies to add_item and update_item."
|
|
2720
|
+
},
|
|
2721
|
+
"unit_amount_override": {
|
|
2722
|
+
"type": "string",
|
|
2723
|
+
"format": "decimal",
|
|
2724
|
+
"nullable": true,
|
|
2725
|
+
"description": "Fixed per-unit amount for the item, used instead of the catalog price. Only applies to add_item and update_item. On update_item, omitting the field keeps the item's current override while an explicit null clears it so the item reverts to the catalog price."
|
|
2726
|
+
},
|
|
2727
|
+
"start_date": {
|
|
2728
|
+
"type": "string",
|
|
2729
|
+
"format": "date",
|
|
2730
|
+
"nullable": true,
|
|
2731
|
+
"description": "Only applies to pause."
|
|
2732
|
+
},
|
|
2733
|
+
"end_date": {
|
|
2734
|
+
"type": "string",
|
|
2735
|
+
"format": "date",
|
|
2736
|
+
"nullable": true,
|
|
2737
|
+
"description": "Only applies to pause."
|
|
2738
|
+
},
|
|
2739
|
+
"pause_end_at": {
|
|
2740
|
+
"type": "string",
|
|
2741
|
+
"format": "date-time",
|
|
2742
|
+
"nullable": true,
|
|
2743
|
+
"description": "Only applies to pause."
|
|
2744
|
+
}
|
|
2745
|
+
}
|
|
2746
|
+
}
|
|
2747
|
+
]
|
|
2748
|
+
},
|
|
2489
2749
|
"V2SubscriptionContractItemAdd": {
|
|
2490
2750
|
"allOf": [
|
|
2491
2751
|
{
|
|
2492
|
-
"$ref": "#/components/schemas/
|
|
2752
|
+
"$ref": "#/components/schemas/V2SubscriptionContractChangeCommon"
|
|
2493
2753
|
},
|
|
2494
2754
|
{
|
|
2495
2755
|
"type": "object",
|
|
2756
|
+
"required": [
|
|
2757
|
+
"price"
|
|
2758
|
+
],
|
|
2496
2759
|
"properties": {
|
|
2497
2760
|
"operation": {
|
|
2498
2761
|
"type": "string",
|
|
@@ -2501,6 +2764,24 @@
|
|
|
2501
2764
|
],
|
|
2502
2765
|
"default": "add_item"
|
|
2503
2766
|
},
|
|
2767
|
+
"price": {
|
|
2768
|
+
"type": "integer"
|
|
2769
|
+
},
|
|
2770
|
+
"quantity": {
|
|
2771
|
+
"type": "integer",
|
|
2772
|
+
"nullable": true
|
|
2773
|
+
},
|
|
2774
|
+
"discount_percent": {
|
|
2775
|
+
"type": "string",
|
|
2776
|
+
"format": "decimal",
|
|
2777
|
+
"nullable": true
|
|
2778
|
+
},
|
|
2779
|
+
"unit_amount_override": {
|
|
2780
|
+
"type": "string",
|
|
2781
|
+
"format": "decimal",
|
|
2782
|
+
"nullable": true,
|
|
2783
|
+
"description": "Fixed per-unit amount for the new item, used instead of the catalog price."
|
|
2784
|
+
},
|
|
2504
2785
|
"idempotency_key": {
|
|
2505
2786
|
"type": "string",
|
|
2506
2787
|
"nullable": true
|
|
@@ -2515,7 +2796,7 @@
|
|
|
2515
2796
|
"V2SubscriptionContractItemRemove": {
|
|
2516
2797
|
"allOf": [
|
|
2517
2798
|
{
|
|
2518
|
-
"$ref": "#/components/schemas/
|
|
2799
|
+
"$ref": "#/components/schemas/V2SubscriptionContractChangeCommon"
|
|
2519
2800
|
},
|
|
2520
2801
|
{
|
|
2521
2802
|
"type": "object",
|
|
@@ -2530,6 +2811,9 @@
|
|
|
2530
2811
|
],
|
|
2531
2812
|
"default": "remove_item"
|
|
2532
2813
|
},
|
|
2814
|
+
"contract_item": {
|
|
2815
|
+
"type": "integer"
|
|
2816
|
+
},
|
|
2533
2817
|
"idempotency_key": {
|
|
2534
2818
|
"type": "string",
|
|
2535
2819
|
"nullable": true
|
|
@@ -2544,7 +2828,7 @@
|
|
|
2544
2828
|
"V2SubscriptionContractItemUpdate": {
|
|
2545
2829
|
"allOf": [
|
|
2546
2830
|
{
|
|
2547
|
-
"$ref": "#/components/schemas/
|
|
2831
|
+
"$ref": "#/components/schemas/V2SubscriptionContractChangeCommon"
|
|
2548
2832
|
},
|
|
2549
2833
|
{
|
|
2550
2834
|
"type": "object",
|
|
@@ -2552,6 +2836,35 @@
|
|
|
2552
2836
|
"contract_item"
|
|
2553
2837
|
],
|
|
2554
2838
|
"properties": {
|
|
2839
|
+
"operation": {
|
|
2840
|
+
"type": "string",
|
|
2841
|
+
"enum": [
|
|
2842
|
+
"update_item"
|
|
2843
|
+
],
|
|
2844
|
+
"default": "update_item"
|
|
2845
|
+
},
|
|
2846
|
+
"contract_item": {
|
|
2847
|
+
"type": "integer"
|
|
2848
|
+
},
|
|
2849
|
+
"price": {
|
|
2850
|
+
"type": "integer",
|
|
2851
|
+
"nullable": true
|
|
2852
|
+
},
|
|
2853
|
+
"quantity": {
|
|
2854
|
+
"type": "integer",
|
|
2855
|
+
"nullable": true
|
|
2856
|
+
},
|
|
2857
|
+
"discount_percent": {
|
|
2858
|
+
"type": "string",
|
|
2859
|
+
"format": "decimal",
|
|
2860
|
+
"nullable": true
|
|
2861
|
+
},
|
|
2862
|
+
"unit_amount_override": {
|
|
2863
|
+
"type": "string",
|
|
2864
|
+
"format": "decimal",
|
|
2865
|
+
"nullable": true,
|
|
2866
|
+
"description": "Fixed per-unit amount for the item, used instead of the catalog price. Omitting the field keeps the item's current override; an explicit null clears it so the item reverts to the catalog price."
|
|
2867
|
+
},
|
|
2555
2868
|
"idempotency_key": {
|
|
2556
2869
|
"type": "string",
|
|
2557
2870
|
"nullable": true
|
|
@@ -2688,9 +3001,15 @@
|
|
|
2688
3001
|
"type": "string",
|
|
2689
3002
|
"format": "decimal"
|
|
2690
3003
|
},
|
|
3004
|
+
"discount_amount_due_now": {
|
|
3005
|
+
"type": "string",
|
|
3006
|
+
"format": "decimal",
|
|
3007
|
+
"description": "Contract coupon discount applied to the immediate (invoice_now) charge. Percent-off, non-once coupons only; 0.0000 otherwise."
|
|
3008
|
+
},
|
|
2691
3009
|
"next_billing_estimate": {
|
|
2692
3010
|
"type": "string",
|
|
2693
|
-
"format": "decimal"
|
|
3011
|
+
"format": "decimal",
|
|
3012
|
+
"description": "Estimated next recurring charge, net of the contract's active coupon discount."
|
|
2694
3013
|
},
|
|
2695
3014
|
"resolved_price_version_ids": {
|
|
2696
3015
|
"type": "object",
|
|
@@ -3537,6 +3856,64 @@
|
|
|
3537
3856
|
"billing_schedule_preview": {
|
|
3538
3857
|
"$ref": "#/components/schemas/V2Metadata"
|
|
3539
3858
|
},
|
|
3859
|
+
"promotion_code": {
|
|
3860
|
+
"type": "string",
|
|
3861
|
+
"nullable": true,
|
|
3862
|
+
"description": "The promotion code applied to this quote, if any. When set, subtotal_amount, tax_amount, and total_amount already include the discount."
|
|
3863
|
+
},
|
|
3864
|
+
"discount": {
|
|
3865
|
+
"type": "object",
|
|
3866
|
+
"nullable": true,
|
|
3867
|
+
"description": "Discount preview when a promotion code was applied.",
|
|
3868
|
+
"properties": {
|
|
3869
|
+
"code": {
|
|
3870
|
+
"type": "string"
|
|
3871
|
+
},
|
|
3872
|
+
"coupon_display": {
|
|
3873
|
+
"type": "string"
|
|
3874
|
+
},
|
|
3875
|
+
"duration": {
|
|
3876
|
+
"type": "string",
|
|
3877
|
+
"enum": [
|
|
3878
|
+
"forever",
|
|
3879
|
+
"once",
|
|
3880
|
+
"repeating"
|
|
3881
|
+
]
|
|
3882
|
+
},
|
|
3883
|
+
"duration_in_months": {
|
|
3884
|
+
"type": "integer",
|
|
3885
|
+
"nullable": true
|
|
3886
|
+
},
|
|
3887
|
+
"skip_trial_period": {
|
|
3888
|
+
"type": "boolean",
|
|
3889
|
+
"description": "When true, the coupon skipped the offer's trial period: the quoted totals bill the first period immediately."
|
|
3890
|
+
},
|
|
3891
|
+
"discount_subtotal_amount": {
|
|
3892
|
+
"type": "string",
|
|
3893
|
+
"format": "decimal"
|
|
3894
|
+
},
|
|
3895
|
+
"discount_tax_amount": {
|
|
3896
|
+
"type": "string",
|
|
3897
|
+
"format": "decimal"
|
|
3898
|
+
},
|
|
3899
|
+
"discount_total_amount": {
|
|
3900
|
+
"type": "string",
|
|
3901
|
+
"format": "decimal"
|
|
3902
|
+
},
|
|
3903
|
+
"original_subtotal_amount": {
|
|
3904
|
+
"type": "string",
|
|
3905
|
+
"format": "decimal"
|
|
3906
|
+
},
|
|
3907
|
+
"original_tax_amount": {
|
|
3908
|
+
"type": "string",
|
|
3909
|
+
"format": "decimal"
|
|
3910
|
+
},
|
|
3911
|
+
"original_total_amount": {
|
|
3912
|
+
"type": "string",
|
|
3913
|
+
"format": "decimal"
|
|
3914
|
+
}
|
|
3915
|
+
}
|
|
3916
|
+
},
|
|
3540
3917
|
"recurring_items": {
|
|
3541
3918
|
"type": "array",
|
|
3542
3919
|
"items": {
|
|
@@ -4253,6 +4630,15 @@
|
|
|
4253
4630
|
"customer_reference": {
|
|
4254
4631
|
"type": "string"
|
|
4255
4632
|
},
|
|
4633
|
+
"discount": {
|
|
4634
|
+
"allOf": [
|
|
4635
|
+
{
|
|
4636
|
+
"$ref": "#/components/schemas/V2ContractDiscount"
|
|
4637
|
+
}
|
|
4638
|
+
],
|
|
4639
|
+
"nullable": true,
|
|
4640
|
+
"description": "The active coupon discount on this contract, if any."
|
|
4641
|
+
},
|
|
4256
4642
|
"state": {
|
|
4257
4643
|
"type": "string"
|
|
4258
4644
|
},
|