|
26 | 26 | "name": "debug", |
27 | 27 | "description": "Flag to enable additional debug information in the endpoint response", |
28 | 28 | "schema": { |
29 | | - "type": "string", |
30 | | - "enum": [ |
31 | | - "true", |
32 | | - "false" |
33 | | - ], |
34 | | - "default": "false" |
| 29 | + "$ref": "#/components/schemas/Debug" |
35 | 30 | } |
36 | 31 | }, |
37 | 32 | { |
|
401 | 396 | "get": { |
402 | 397 | "parameters": [ |
403 | 398 | { |
404 | | - "$ref": "#/components/parameters/EntryType" |
| 399 | + "$ref": "#/components/parameters/EntryTypeParam" |
405 | 400 | }, |
406 | 401 | { |
407 | 402 | "$ref": "#/components/parameters/MinimumAmount" |
|
445 | 440 | "get": { |
446 | 441 | "parameters": [ |
447 | 442 | { |
448 | | - "$ref": "#/components/parameters/EntryType" |
| 443 | + "$ref": "#/components/parameters/EntryTypeParam" |
449 | 444 | }, |
450 | 445 | { |
451 | 446 | "$ref": "#/components/parameters/MinimumAmount" |
|
2004 | 1999 | "format": "date-time" |
2005 | 2000 | }, |
2006 | 2001 | "status": { |
| 2002 | + "$anchor": "subscription-status", |
2007 | 2003 | "type": "string", |
2008 | 2004 | "minLength": 1, |
2009 | 2005 | "enum": [ |
|
2153 | 2149 | "example": "2022-01-01" |
2154 | 2150 | }, |
2155 | 2151 | "external_marketplace": { |
| 2152 | + "$anchor": "external-marketplace", |
2156 | 2153 | "type": "string", |
2157 | 2154 | "description": "Optionally provide the name of the external marketplace that the subscription is attached to.", |
2158 | 2155 | "example": "google", |
|
2215 | 2212 | "data": { |
2216 | 2213 | "type": "array", |
2217 | 2214 | "items": { |
2218 | | - "type": "object", |
2219 | | - "properties": { |
2220 | | - "id": { |
2221 | | - "type": "string" |
2222 | | - }, |
2223 | | - "model_type": { |
2224 | | - "type": "string", |
2225 | | - "enum": [ |
2226 | | - "usage" |
2227 | | - ], |
2228 | | - "example": "usage" |
2229 | | - }, |
2230 | | - "usage": { |
2231 | | - "type": "array", |
2232 | | - "items": { |
2233 | | - "type": "object", |
2234 | | - "properties": { |
2235 | | - "quantity": { |
2236 | | - "type": "string" |
2237 | | - }, |
2238 | | - "timeframe_start": { |
2239 | | - "type": "string", |
2240 | | - "format": "date-time" |
2241 | | - }, |
2242 | | - "timeframe_end": { |
2243 | | - "type": "string", |
2244 | | - "format": "date-time" |
2245 | | - } |
2246 | | - }, |
2247 | | - "required": [ |
2248 | | - "quantity", |
2249 | | - "timeframe_start", |
2250 | | - "timeframe_end" |
2251 | | - ] |
2252 | | - } |
2253 | | - } |
2254 | | - }, |
2255 | | - "required": [ |
2256 | | - "id", |
2257 | | - "model_type", |
2258 | | - "usage" |
2259 | | - ] |
| 2215 | + "$ref": "#/components/schemas/Usage" |
2260 | 2216 | } |
2261 | 2217 | } |
2262 | 2218 | } |
2263 | 2219 | }, |
| 2220 | + "Usage": { |
| 2221 | + "type": "object", |
| 2222 | + "properties": { |
| 2223 | + "id": { |
| 2224 | + "type": "string" |
| 2225 | + }, |
| 2226 | + "model_type": { |
| 2227 | + "$anchor": "model-type", |
| 2228 | + "type": "string", |
| 2229 | + "enum": [ |
| 2230 | + "usage" |
| 2231 | + ], |
| 2232 | + "example": "usage" |
| 2233 | + }, |
| 2234 | + "usage": { |
| 2235 | + "type": "array", |
| 2236 | + "items": { |
| 2237 | + "$ref": "#/components/schemas/UsageItem" |
| 2238 | + } |
| 2239 | + } |
| 2240 | + }, |
| 2241 | + "required": [ |
| 2242 | + "id", |
| 2243 | + "model_type", |
| 2244 | + "usage" |
| 2245 | + ] |
| 2246 | + }, |
| 2247 | + "UsageItem": { |
| 2248 | + "type": "object", |
| 2249 | + "properties": { |
| 2250 | + "quantity": { |
| 2251 | + "type": "string" |
| 2252 | + }, |
| 2253 | + "timeframe_start": { |
| 2254 | + "type": "string", |
| 2255 | + "format": "date-time" |
| 2256 | + }, |
| 2257 | + "timeframe_end": { |
| 2258 | + "type": "string", |
| 2259 | + "format": "date-time" |
| 2260 | + } |
| 2261 | + }, |
| 2262 | + "required": [ |
| 2263 | + "quantity", |
| 2264 | + "timeframe_start", |
| 2265 | + "timeframe_end" |
| 2266 | + ] |
| 2267 | + }, |
2264 | 2268 | "SubscriptionCosts": { |
2265 | 2269 | "description": "", |
2266 | 2270 | "type": "object", |
|
2369 | 2373 | "type": "object", |
2370 | 2374 | "properties": { |
2371 | 2375 | "cancel_option": { |
| 2376 | + "$anchor": "cancel-options", |
2372 | 2377 | "type": "string", |
2373 | 2378 | "description": "Determines the timing of subscription cancellation", |
2374 | 2379 | "enum": [ |
|
2403 | 2408 | "example": "ZMwNQefe7J3ecf7W" |
2404 | 2409 | }, |
2405 | 2410 | "change_option": { |
| 2411 | + "$anchor": "change-options", |
2406 | 2412 | "type": "string", |
2407 | 2413 | "enum": [ |
2408 | 2414 | "requested_date", |
|
2507 | 2513 | "example": "mqBkze6HoCwL4ytV" |
2508 | 2514 | }, |
2509 | 2515 | "model_type": { |
| 2516 | + "$anchor": "tiered-model-type", |
2510 | 2517 | "type": "string", |
2511 | 2518 | "enum": [ |
2512 | 2519 | "tiered" |
|
2558 | 2565 | "type": "string" |
2559 | 2566 | }, |
2560 | 2567 | "model_type": { |
| 2568 | + "$anchor": "unit-model-type", |
2561 | 2569 | "type": "string", |
2562 | 2570 | "enum": [ |
2563 | 2571 | "unit" |
|
2595 | 2603 | "type": "string" |
2596 | 2604 | }, |
2597 | 2605 | "model_type": { |
| 2606 | + "$anchor": "bulk-model-type", |
2598 | 2607 | "type": "string", |
2599 | 2608 | "enum": [ |
2600 | 2609 | "bulk" |
|
2647 | 2656 | }, |
2648 | 2657 | "model_type": { |
2649 | 2658 | "type": "string", |
| 2659 | + "$anchor": "package-model-type", |
2650 | 2660 | "enum": [ |
2651 | 2661 | "package" |
2652 | 2662 | ], |
|
2688 | 2698 | }, |
2689 | 2699 | "model_type": { |
2690 | 2700 | "type": "string", |
| 2701 | + "$anchor": "bps-model-type", |
2691 | 2702 | "enum": [ |
2692 | 2703 | "bps" |
2693 | 2704 | ], |
|
2728 | 2739 | }, |
2729 | 2740 | "model_type": { |
2730 | 2741 | "type": "string", |
| 2742 | + "$anchor": "bulk-bps-model-type", |
2731 | 2743 | "enum": [ |
2732 | 2744 | "bulk_bps" |
2733 | 2745 | ], |
|
2779 | 2791 | }, |
2780 | 2792 | "model_type": { |
2781 | 2793 | "type": "string", |
| 2794 | + "$anchor": "tiered-bps-model-type", |
2782 | 2795 | "enum": [ |
2783 | 2796 | "tiered_bps" |
2784 | 2797 | ], |
|
2847 | 2860 | "example": "\"2022-12-21\"" |
2848 | 2861 | }, |
2849 | 2862 | "change_option": { |
| 2863 | + "$anchor": "fee-change_option", |
2850 | 2864 | "type": "string", |
2851 | 2865 | "x-stoplight": { |
2852 | 2866 | "id": "exiyopgavm7qn" |
|
2971 | 2985 | } |
2972 | 2986 | }, |
2973 | 2987 | "PaymentProvider": { |
| 2988 | + "$anchor": "payment-provider", |
2974 | 2989 | "type": [ |
2975 | 2990 | "string", |
2976 | 2991 | "null" |
|
3215 | 3230 | "description": "If the Price represents a fixed cost, this represents the quantity of units applied. Mutually exclusive with billable_metric." |
3216 | 3231 | }, |
3217 | 3232 | "cadence": { |
| 3233 | + "$anchor": "cadence", |
3218 | 3234 | "type": "string", |
3219 | 3235 | "enum": [ |
3220 | 3236 | "annual", |
|
4785 | 4801 | "description": "The number of credits to effect. Note that this is required for increment or decrement operations." |
4786 | 4802 | }, |
4787 | 4803 | "entry_type": { |
4788 | | - "$anchor": "entry_type", |
4789 | | - "type": "string", |
4790 | | - "enum": [ |
4791 | | - "increment", |
4792 | | - "decrement", |
4793 | | - "expiration_change" |
4794 | | - ] |
| 4804 | + "$ref": "#/components/schemas/EntryType" |
4795 | 4805 | }, |
4796 | 4806 | "expiry_date": { |
4797 | 4807 | "type": "string", |
|
5423 | 5433 | "example": "Product unsatisfactory" |
5424 | 5434 | }, |
5425 | 5435 | "type": { |
| 5436 | + "$anchor": "adjustment_type", |
5426 | 5437 | "type": "string", |
5427 | 5438 | "x-stoplight": { |
5428 | 5439 | "id": "1n41ak4btp9e5" |
|
5826 | 5837 | "validation_failed" |
5827 | 5838 | ] |
5828 | 5839 | }, |
| 5840 | + "EntryType": { |
| 5841 | + "$anchor": "entry_type", |
| 5842 | + "type": "string", |
| 5843 | + "enum": [ |
| 5844 | + "increment", |
| 5845 | + "decrement", |
| 5846 | + "expiration_change", |
| 5847 | + "credit_block_expiry" |
| 5848 | + ] |
| 5849 | + }, |
5829 | 5850 | "Debug": { |
5830 | 5851 | "type": "object", |
5831 | 5852 | "description": "Optional debug information (only present when debug=true is passed to the endpoint). Contains ingested and duplicate event idempotency keys.", |
|
5976 | 5997 | ] |
5977 | 5998 | } |
5978 | 5999 | }, |
| 6000 | + |
5979 | 6001 | "securitySchemes": { |
5980 | 6002 | "APIKeyAuth": { |
5981 | 6003 | "bearerFormat": "auth-scheme", |
|
6026 | 6048 | "name": "group_by", |
6027 | 6049 | "description": "Groups per-price costs by the key provided." |
6028 | 6050 | }, |
6029 | | - "EntryType": { |
| 6051 | + "EntryTypeParam": { |
6030 | 6052 | "schema": { |
6031 | | - "type": "string", |
6032 | | - "enum": [ |
6033 | | - "increment", |
6034 | | - "decrement", |
6035 | | - "expiration_change", |
6036 | | - "credit_block_expiry" |
6037 | | - ] |
| 6053 | + "$ref:": "#/components/schemas/EntryType" |
6038 | 6054 | }, |
6039 | 6055 | "in": "query", |
6040 | 6056 | "name": "entry_type", |
|
6050 | 6066 | }, |
6051 | 6067 | "EntryStatus": { |
6052 | 6068 | "schema": { |
| 6069 | + "$anchor": "entry_status", |
6053 | 6070 | "type": "string", |
6054 | 6071 | "enum": [ |
6055 | 6072 | "committed", |
|
0 commit comments