@fleetless/contracts 15.6.0 → 16.0.0-next.1

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.
@@ -6846,7 +6846,7 @@
6846
6846
  "method": "POST",
6847
6847
  "path": "/api/billing/checkout",
6848
6848
  "section": "billing",
6849
- "summary": "Records a company purchase intent for the first paid plan.",
6849
+ "summary": "Decides a company's first paid plan and returns its order summary to confirm.",
6850
6850
  "audience": "developer",
6851
6851
  "auth": "developer",
6852
6852
  "rateLimited": true,
@@ -6855,7 +6855,7 @@
6855
6855
  "params": [],
6856
6856
  "query": null,
6857
6857
  "request": "checkout-request",
6858
- "response": "checkout-response",
6858
+ "response": "checkout-start-response",
6859
6859
  "errors": [
6860
6860
  "unauthorized",
6861
6861
  "token_expired",
@@ -6870,7 +6870,30 @@
6870
6870
  "payment_provider_unavailable"
6871
6871
  ],
6872
6872
  "transport": "http",
6873
- "notes": "Basic stays free for every payer. This start creates only a nonbinding draft; accept_terms is deprecated and cannot confirm an order. Current company, buyer, VIES and EUR quote checks still apply. Persist operation_key before POST; the same key and input return 200 with the existing intent (and its hosted checkout when payment_started), without another Mollie payment; changed input conflicts. A different operation_key while a first payment is open returns 409 target_state_conflict with rule checkout_open and details expires_at: null. An eligible Owner obtains a no-store C.4 display, then explicitly confirms with its proof. No payment or acceptance occurs at start. Hosted payment later offers card, PayPal or Apple Pay; its return is <console>/settings/billing?checkout=<checkout_id>. An active/past_due account uses billing/change."
6873
+ "notes": "Basic stays free for every payer. The start decides in this request, VIES included: a busy VIES is retried for up to 15 seconds before the answer. The body is first saved as the org's checkout draft (`GET /api/billing/checkout-draft`), whatever the answer. `eligible` (201) records the pending billing account and a checkout intent, freezes the EUR quote and carries its C.4 display, Cache-Control: no-store: show `display.snapshot.declaration.text` directly above one button labelled `action_label`; that one click is `POST /api/billing/intents/:id/confirm` with the display's `confirmation_proof`. `vies_unavailable`, `invalid_vat_id` and `refused` answer 200 and nothing is stored but the draft: no intent, no account, no retry in the background; check again. `held` (`issuer_cutover_in_progress`) only while an issuer cutover runs, for minutes; try again. Lexware never holds a checkout: its contact and invoice follow the payment. Use a fresh operation_key per press; the same key and input answer 200 with the same intent (`payment_started` with its hosted checkout once confirmed), without another Mollie payment; changed input conflicts. While another first payment of the org is open, 409 target_state_conflict with `checkoutOpenDetails` (rule `checkout_open`): continue it at `checkout_url`. No payment or acceptance occurs at start, and the deprecated `accept_terms` confirms nothing. Hosted payment offers card, PayPal or Apple Pay; its return is <console>/settings/billing?checkout=<checkout_id>. Rate limited on billing.checkout_start. An active/past_due account uses billing/change."
6874
+ },
6875
+ {
6876
+ "method": "GET",
6877
+ "path": "/api/billing/checkout-draft",
6878
+ "section": "billing",
6879
+ "summary": "Reads the checkout draft, or the org's earlier billing details, to fill the checkout page.",
6880
+ "audience": "developer",
6881
+ "auth": "developer",
6882
+ "rateLimited": false,
6883
+ "ownerTier": true,
6884
+ "status": 200,
6885
+ "params": [],
6886
+ "query": null,
6887
+ "request": null,
6888
+ "response": "checkout-draft-response",
6889
+ "errors": [
6890
+ "unauthorized",
6891
+ "token_expired",
6892
+ "token_revoked",
6893
+ "tier_required"
6894
+ ],
6895
+ "transport": "http",
6896
+ "notes": "`draft` is what the last `POST /api/billing/checkout` received, saved whatever it decided, and deleted once the checkout is paid. Without one, `prefill` carries the org's earlier billing details; both are `null` for a first purchase, never both set. A reload, a new tab or a return from Mollie fills the form from here. Reading changes nothing."
6874
6897
  },
6875
6898
  {
6876
6899
  "method": "GET",
@@ -6927,7 +6950,7 @@
6927
6950
  "plan_purchase_closed"
6928
6951
  ],
6929
6952
  "transport": "http",
6930
- "notes": "Owner only, Cache-Control: no-store. Cloud persists the snapshot and proof hash for an eligible current checkout or paid-change intent of this Owner and org. Pending, held, refused or accepted intents cannot mint a new proof. The proof never appears in lookup, billing views or logs."
6953
+ "notes": "Owner only, Cache-Control: no-store. Cloud persists the snapshot and proof hash for an eligible current checkout or paid-change intent of this Owner and org. A checkout start already returns its display; this route issues one for a paid change, and a fresh one for an intent that is still eligible. `snapshot.declaration` carries the approved sentence of the decision's action (`text_id`, `text`) and the label of its one button (`action_label`): `Pay 34,51 € with Mollie`, `Pay 95 € and switch`, `Switch to Pro`, `Switch to monthly at period end`, `Schedule downgrade to Plus` or `Cancel at period end`. Render both as sent. Pending, held, refused or accepted intents cannot mint a new proof. The proof never appears in lookup, billing views or logs."
6931
6954
  },
6932
6955
  {
6933
6956
  "method": "POST",
@@ -6963,7 +6986,7 @@
6963
6986
  "payment_provider_unavailable"
6964
6987
  ],
6965
6988
  "transport": "http",
6966
- "notes": "Checkout and paid-change decisions require confirmation_proof along with the operation key, quote revision and buyer fingerprint shown in the persisted C.4 display. Cloud rechecks buyer, quote, selection, legal references, period and current state under the org lock; stale or spent proof conflicts without effect. One decision and one legal acceptance commit together. An exact same-key replay returns the original result without another payment or acceptance. A paid change can return 409 target_state_conflict with field billing and rule charge_in_progress while an earlier charge is unresolved; it does not start another charge. Foreign ownership answers 404 without disclosure; pending or held cannot charge."
6989
+ "notes": "Checkout and paid-change decisions require confirmation_proof along with the operation key, quote revision and buyer fingerprint shown in the persisted C.4 display. Cloud rechecks buyer, quote, selection, legal references, period and current state under the org lock. A spent, expired or stale proof answers 409 target_state_conflict with `{ field: confirmation_proof, rule: display_stale }` and changes nothing: fetch a fresh display (for a checkout, a new start with a new key) and press again; never resend the click. One decision, one legal acceptance and, for a charge, the hosted payment commit in this one request. An exact same-key replay returns the original result without another payment or acceptance. After 502 payment_provider_unavailable the same key and proof may be sent again: the payment is created with the same idempotency key, so at most one exists. While another first payment of the org is open, a checkout answers 409 target_state_conflict with `checkoutOpenDetails` (rule `checkout_open`): continue it at `checkout_url`. A paid change can return 409 target_state_conflict with field billing and rule charge_in_progress while an earlier charge is unresolved; it does not start another charge. Foreign ownership answers 404 without disclosure; held cannot charge."
6967
6990
  },
6968
6991
  {
6969
6992
  "method": "GET",
@@ -6978,7 +7001,7 @@
6978
7001
  "params": [
6979
7002
  {
6980
7003
  "name": "id",
6981
- "description": "The checkout id from `checkoutResponse.checkout_id`, carried on the return URL."
7004
+ "description": "The checkout id from a started payment's `payment.checkout_id`, carried on the return URL."
6982
7005
  }
6983
7006
  ],
6984
7007
  "query": null,
@@ -7071,7 +7094,7 @@
7071
7094
  "payment_provider_unavailable"
7072
7095
  ],
7073
7096
  "transport": "http",
7074
- "notes": "The request names an absolute plan/cycle/add-on target and a stable operation_key. Start is nonbinding for every change, including zero-charge, scheduled and formerly immediate decreases: it neither changes the plan nor writes legal acceptance. An eligible Owner obtains a C.4 display and explicitly confirms with its proof. Confirmation may return accepted_no_payment with charged: null and no provider payment or redirect, or payment_started for a charged change. Exact-key lookup recovers the accepted result. Existing no_account, past_due, no_valid_mandate and plan_limit conflicts remain. A later paid-change confirmation can return 409 target_state_conflict with field billing and rule charge_in_progress while an earlier charge is unresolved; no second charge starts."
7097
+ "notes": "The request names an absolute plan/cycle/add-on target and a fresh operation_key per selection. Start is nonbinding for every change, including zero-charge, scheduled and formerly immediate decreases: it neither changes the plan nor writes legal acceptance. The change is decided in the request and never waits: no `awaiting_vies`, and Lexware never holds it; `held` (`issuer_cutover_in_progress`) only while an issuer cutover runs. VIES runs only when the billing details changed since the last decision or the recorded VAT treatment is blocked, and a change that charges nothing never calls it. When VIES does not answer: 409 target_state_conflict with `viesUnavailableDetails` (`field: billing.vat_id`, `rule: vies_unavailable`), nothing stored. A change charging nothing while the recorded VAT treatment is unresolved: 409 target_state_conflict with `{ field: billing.vat_id, rule: purchase_eligibility_pending }`. An eligible Owner obtains a C.4 display (`POST /api/billing/intents/:id/display`) and confirms with one click on its `action_label`. Confirmation may return accepted_no_payment with charged: null and no provider payment or redirect, or payment_started for a charged change. Exact-key lookup recovers the accepted result. Existing no_account, past_due, no_valid_mandate and plan_limit conflicts remain. A later paid-change confirmation can return 409 target_state_conflict with field billing and rule charge_in_progress while an earlier charge is unresolved; no second charge starts."
7075
7098
  },
7076
7099
  {
7077
7100
  "method": "POST",
@@ -6,59 +6,6 @@
6
6
  "properties": {
7
7
  "intent": {
8
8
  "oneOf": [
9
- {
10
- "type": "object",
11
- "properties": {
12
- "intent_id": {
13
- "type": "string",
14
- "format": "uuid",
15
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
16
- "description": "Opaque persisted purchase intent identity."
17
- },
18
- "operation_key": {
19
- "type": "string",
20
- "format": "uuid",
21
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
22
- "description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
23
- },
24
- "operation": {
25
- "type": "string",
26
- "const": "paid_change"
27
- },
28
- "invoice_id": {
29
- "description": "For an invoice-paying operation, the due charge or issued invoice being paid. For a confirmed paid_change with payment_started, the charge or invoice created for that decision; when the charge was issued through Lexware (`charged` is `null`), it identifies the matching billing.charges[].id. Absent on a paid_change in any other state.",
30
- "type": "string",
31
- "format": "uuid",
32
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
33
- },
34
- "state": {
35
- "type": "string",
36
- "const": "awaiting_vies"
37
- },
38
- "reason": {
39
- "type": "string",
40
- "enum": [
41
- "vies_unavailable",
42
- "vies_unverified",
43
- "vies_identifier_missing"
44
- ]
45
- },
46
- "next_attempt_at": {
47
- "type": "string",
48
- "format": "date-time",
49
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
50
- }
51
- },
52
- "required": [
53
- "intent_id",
54
- "operation_key",
55
- "operation",
56
- "state",
57
- "reason",
58
- "next_attempt_at"
59
- ],
60
- "additionalProperties": false
61
- },
62
9
  {
63
10
  "type": "object",
64
11
  "properties": {
@@ -189,10 +136,7 @@
189
136
  "legacy_usd_invoice",
190
137
  "legacy_payer_unresolved",
191
138
  "mandate_policy_unresolved",
192
- "lexware_contact_pending",
193
- "lexware_contact_changed",
194
- "issuer_cutover_in_progress",
195
- "lexware_issuance_paused"
139
+ "issuer_cutover_in_progress"
196
140
  ]
197
141
  },
198
142
  "original_amount": {
@@ -958,11 +958,26 @@
958
958
  "properties": {
959
959
  "text_id": {
960
960
  "type": "string",
961
- "const": "DR-1374-draft-3-C.4"
961
+ "enum": [
962
+ "C4-1168-checkout",
963
+ "C4-1168-pay-and-switch",
964
+ "C4-1168-switch",
965
+ "C4-1168-schedule-switch",
966
+ "C4-1168-schedule-downgrade",
967
+ "C4-1168-cancel"
968
+ ],
969
+ "description": "The approved sentence this display shows, one per action."
962
970
  },
963
971
  "text": {
964
972
  "type": "string",
965
- "minLength": 1
973
+ "minLength": 1,
974
+ "pattern": "^By selecting “",
975
+ "description": "The consent sentence shown directly above the button, naming the button."
976
+ },
977
+ "action_label": {
978
+ "type": "string",
979
+ "minLength": 1,
980
+ "description": "The label of the one button that confirms this decision."
966
981
  },
967
982
  "terms": {
968
983
  "type": "object",
@@ -1022,10 +1037,127 @@
1022
1037
  "required": [
1023
1038
  "text_id",
1024
1039
  "text",
1040
+ "action_label",
1025
1041
  "terms",
1026
1042
  "dpa"
1027
1043
  ],
1028
- "additionalProperties": false
1044
+ "additionalProperties": false,
1045
+ "allOf": [
1046
+ {
1047
+ "if": {
1048
+ "properties": {
1049
+ "text_id": {
1050
+ "const": "C4-1168-checkout"
1051
+ }
1052
+ },
1053
+ "required": [
1054
+ "text_id"
1055
+ ]
1056
+ },
1057
+ "then": {
1058
+ "properties": {
1059
+ "action_label": {
1060
+ "pattern": "^Pay \\S.* with Mollie$"
1061
+ }
1062
+ }
1063
+ }
1064
+ },
1065
+ {
1066
+ "if": {
1067
+ "properties": {
1068
+ "text_id": {
1069
+ "const": "C4-1168-pay-and-switch"
1070
+ }
1071
+ },
1072
+ "required": [
1073
+ "text_id"
1074
+ ]
1075
+ },
1076
+ "then": {
1077
+ "properties": {
1078
+ "action_label": {
1079
+ "pattern": "^Pay \\S.* and switch$"
1080
+ }
1081
+ }
1082
+ }
1083
+ },
1084
+ {
1085
+ "if": {
1086
+ "properties": {
1087
+ "text_id": {
1088
+ "const": "C4-1168-switch"
1089
+ }
1090
+ },
1091
+ "required": [
1092
+ "text_id"
1093
+ ]
1094
+ },
1095
+ "then": {
1096
+ "properties": {
1097
+ "action_label": {
1098
+ "pattern": "^Switch to \\S.*$"
1099
+ }
1100
+ }
1101
+ }
1102
+ },
1103
+ {
1104
+ "if": {
1105
+ "properties": {
1106
+ "text_id": {
1107
+ "const": "C4-1168-schedule-switch"
1108
+ }
1109
+ },
1110
+ "required": [
1111
+ "text_id"
1112
+ ]
1113
+ },
1114
+ "then": {
1115
+ "properties": {
1116
+ "action_label": {
1117
+ "const": "Switch to monthly at period end"
1118
+ }
1119
+ }
1120
+ }
1121
+ },
1122
+ {
1123
+ "if": {
1124
+ "properties": {
1125
+ "text_id": {
1126
+ "const": "C4-1168-schedule-downgrade"
1127
+ }
1128
+ },
1129
+ "required": [
1130
+ "text_id"
1131
+ ]
1132
+ },
1133
+ "then": {
1134
+ "properties": {
1135
+ "action_label": {
1136
+ "pattern": "^Schedule downgrade to \\S.*$"
1137
+ }
1138
+ }
1139
+ }
1140
+ },
1141
+ {
1142
+ "if": {
1143
+ "properties": {
1144
+ "text_id": {
1145
+ "const": "C4-1168-cancel"
1146
+ }
1147
+ },
1148
+ "required": [
1149
+ "text_id"
1150
+ ]
1151
+ },
1152
+ "then": {
1153
+ "properties": {
1154
+ "action_label": {
1155
+ "const": "Cancel at period end"
1156
+ }
1157
+ }
1158
+ }
1159
+ }
1160
+ ]
1029
1161
  },
1030
1162
  "expires_at": {
1031
1163
  "type": "string",
@@ -2005,11 +2137,26 @@
2005
2137
  "properties": {
2006
2138
  "text_id": {
2007
2139
  "type": "string",
2008
- "const": "DR-1374-draft-3-C.4"
2140
+ "enum": [
2141
+ "C4-1168-checkout",
2142
+ "C4-1168-pay-and-switch",
2143
+ "C4-1168-switch",
2144
+ "C4-1168-schedule-switch",
2145
+ "C4-1168-schedule-downgrade",
2146
+ "C4-1168-cancel"
2147
+ ],
2148
+ "description": "The approved sentence this display shows, one per action."
2009
2149
  },
2010
2150
  "text": {
2011
2151
  "type": "string",
2012
- "minLength": 1
2152
+ "minLength": 1,
2153
+ "pattern": "^By selecting “",
2154
+ "description": "The consent sentence shown directly above the button, naming the button."
2155
+ },
2156
+ "action_label": {
2157
+ "type": "string",
2158
+ "minLength": 1,
2159
+ "description": "The label of the one button that confirms this decision."
2013
2160
  },
2014
2161
  "terms": {
2015
2162
  "type": "object",
@@ -2069,10 +2216,127 @@
2069
2216
  "required": [
2070
2217
  "text_id",
2071
2218
  "text",
2219
+ "action_label",
2072
2220
  "terms",
2073
2221
  "dpa"
2074
2222
  ],
2075
- "additionalProperties": false
2223
+ "additionalProperties": false,
2224
+ "allOf": [
2225
+ {
2226
+ "if": {
2227
+ "properties": {
2228
+ "text_id": {
2229
+ "const": "C4-1168-checkout"
2230
+ }
2231
+ },
2232
+ "required": [
2233
+ "text_id"
2234
+ ]
2235
+ },
2236
+ "then": {
2237
+ "properties": {
2238
+ "action_label": {
2239
+ "pattern": "^Pay \\S.* with Mollie$"
2240
+ }
2241
+ }
2242
+ }
2243
+ },
2244
+ {
2245
+ "if": {
2246
+ "properties": {
2247
+ "text_id": {
2248
+ "const": "C4-1168-pay-and-switch"
2249
+ }
2250
+ },
2251
+ "required": [
2252
+ "text_id"
2253
+ ]
2254
+ },
2255
+ "then": {
2256
+ "properties": {
2257
+ "action_label": {
2258
+ "pattern": "^Pay \\S.* and switch$"
2259
+ }
2260
+ }
2261
+ }
2262
+ },
2263
+ {
2264
+ "if": {
2265
+ "properties": {
2266
+ "text_id": {
2267
+ "const": "C4-1168-switch"
2268
+ }
2269
+ },
2270
+ "required": [
2271
+ "text_id"
2272
+ ]
2273
+ },
2274
+ "then": {
2275
+ "properties": {
2276
+ "action_label": {
2277
+ "pattern": "^Switch to \\S.*$"
2278
+ }
2279
+ }
2280
+ }
2281
+ },
2282
+ {
2283
+ "if": {
2284
+ "properties": {
2285
+ "text_id": {
2286
+ "const": "C4-1168-schedule-switch"
2287
+ }
2288
+ },
2289
+ "required": [
2290
+ "text_id"
2291
+ ]
2292
+ },
2293
+ "then": {
2294
+ "properties": {
2295
+ "action_label": {
2296
+ "const": "Switch to monthly at period end"
2297
+ }
2298
+ }
2299
+ }
2300
+ },
2301
+ {
2302
+ "if": {
2303
+ "properties": {
2304
+ "text_id": {
2305
+ "const": "C4-1168-schedule-downgrade"
2306
+ }
2307
+ },
2308
+ "required": [
2309
+ "text_id"
2310
+ ]
2311
+ },
2312
+ "then": {
2313
+ "properties": {
2314
+ "action_label": {
2315
+ "pattern": "^Schedule downgrade to \\S.*$"
2316
+ }
2317
+ }
2318
+ }
2319
+ },
2320
+ {
2321
+ "if": {
2322
+ "properties": {
2323
+ "text_id": {
2324
+ "const": "C4-1168-cancel"
2325
+ }
2326
+ },
2327
+ "required": [
2328
+ "text_id"
2329
+ ]
2330
+ },
2331
+ "then": {
2332
+ "properties": {
2333
+ "action_label": {
2334
+ "const": "Cancel at period end"
2335
+ }
2336
+ }
2337
+ }
2338
+ }
2339
+ ]
2076
2340
  },
2077
2341
  "expires_at": {
2078
2342
  "type": "string",
@@ -3052,11 +3316,26 @@
3052
3316
  "properties": {
3053
3317
  "text_id": {
3054
3318
  "type": "string",
3055
- "const": "DR-1374-draft-3-C.4"
3319
+ "enum": [
3320
+ "C4-1168-checkout",
3321
+ "C4-1168-pay-and-switch",
3322
+ "C4-1168-switch",
3323
+ "C4-1168-schedule-switch",
3324
+ "C4-1168-schedule-downgrade",
3325
+ "C4-1168-cancel"
3326
+ ],
3327
+ "description": "The approved sentence this display shows, one per action."
3056
3328
  },
3057
3329
  "text": {
3058
3330
  "type": "string",
3059
- "minLength": 1
3331
+ "minLength": 1,
3332
+ "pattern": "^By selecting “",
3333
+ "description": "The consent sentence shown directly above the button, naming the button."
3334
+ },
3335
+ "action_label": {
3336
+ "type": "string",
3337
+ "minLength": 1,
3338
+ "description": "The label of the one button that confirms this decision."
3060
3339
  },
3061
3340
  "terms": {
3062
3341
  "type": "object",
@@ -3116,10 +3395,127 @@
3116
3395
  "required": [
3117
3396
  "text_id",
3118
3397
  "text",
3398
+ "action_label",
3119
3399
  "terms",
3120
3400
  "dpa"
3121
3401
  ],
3122
- "additionalProperties": false
3402
+ "additionalProperties": false,
3403
+ "allOf": [
3404
+ {
3405
+ "if": {
3406
+ "properties": {
3407
+ "text_id": {
3408
+ "const": "C4-1168-checkout"
3409
+ }
3410
+ },
3411
+ "required": [
3412
+ "text_id"
3413
+ ]
3414
+ },
3415
+ "then": {
3416
+ "properties": {
3417
+ "action_label": {
3418
+ "pattern": "^Pay \\S.* with Mollie$"
3419
+ }
3420
+ }
3421
+ }
3422
+ },
3423
+ {
3424
+ "if": {
3425
+ "properties": {
3426
+ "text_id": {
3427
+ "const": "C4-1168-pay-and-switch"
3428
+ }
3429
+ },
3430
+ "required": [
3431
+ "text_id"
3432
+ ]
3433
+ },
3434
+ "then": {
3435
+ "properties": {
3436
+ "action_label": {
3437
+ "pattern": "^Pay \\S.* and switch$"
3438
+ }
3439
+ }
3440
+ }
3441
+ },
3442
+ {
3443
+ "if": {
3444
+ "properties": {
3445
+ "text_id": {
3446
+ "const": "C4-1168-switch"
3447
+ }
3448
+ },
3449
+ "required": [
3450
+ "text_id"
3451
+ ]
3452
+ },
3453
+ "then": {
3454
+ "properties": {
3455
+ "action_label": {
3456
+ "pattern": "^Switch to \\S.*$"
3457
+ }
3458
+ }
3459
+ }
3460
+ },
3461
+ {
3462
+ "if": {
3463
+ "properties": {
3464
+ "text_id": {
3465
+ "const": "C4-1168-schedule-switch"
3466
+ }
3467
+ },
3468
+ "required": [
3469
+ "text_id"
3470
+ ]
3471
+ },
3472
+ "then": {
3473
+ "properties": {
3474
+ "action_label": {
3475
+ "const": "Switch to monthly at period end"
3476
+ }
3477
+ }
3478
+ }
3479
+ },
3480
+ {
3481
+ "if": {
3482
+ "properties": {
3483
+ "text_id": {
3484
+ "const": "C4-1168-schedule-downgrade"
3485
+ }
3486
+ },
3487
+ "required": [
3488
+ "text_id"
3489
+ ]
3490
+ },
3491
+ "then": {
3492
+ "properties": {
3493
+ "action_label": {
3494
+ "pattern": "^Schedule downgrade to \\S.*$"
3495
+ }
3496
+ }
3497
+ }
3498
+ },
3499
+ {
3500
+ "if": {
3501
+ "properties": {
3502
+ "text_id": {
3503
+ "const": "C4-1168-cancel"
3504
+ }
3505
+ },
3506
+ "required": [
3507
+ "text_id"
3508
+ ]
3509
+ },
3510
+ "then": {
3511
+ "properties": {
3512
+ "action_label": {
3513
+ "const": "Cancel at period end"
3514
+ }
3515
+ }
3516
+ }
3517
+ }
3518
+ ]
3123
3519
  },
3124
3520
  "expires_at": {
3125
3521
  "type": "string",