Skip to content

Commit c744103

Browse files
authored
feat: sync subscription schedules (#88)
1 parent 5e9450e commit c744103

16 files changed

+1594
-104
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,13 @@ This server synchronizes your Stripe account to a Postgres database. It can be a
9191
- [x] `setup_intent.requires_action` 🟢
9292
- [x] `setup_intent.setup_failed` 🟢
9393
- [x] `setup_intent.succeeded` 🟢
94-
- [ ] `subscription_schedule.canceled`
95-
- [ ] `subscription_schedule.created`
96-
- [ ] `subscription_schedule.released`
97-
- [ ] `subscription_schedule.updated`
94+
- [x] `subscription_schedule.aborted` 🟢
95+
- [x] `subscription_schedule.canceled` 🟢
96+
- [x] `subscription_schedule.completed` 🟢
97+
- [x] `subscription_schedule.created` 🟢
98+
- [x] `subscription_schedule.expiring` 🟢
99+
- [x] `subscription_schedule.released` 🟢
100+
- [x] `subscription_schedule.updated` 🟢
98101

99102
## Usage
100103

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
do $$
2+
BEGIN
3+
IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'subscription_schedule_status') THEN
4+
create type "stripe"."subscription_schedule_status" as enum ('not_started', 'active', 'completed', 'released', 'canceled');
5+
END IF;
6+
END
7+
$$;
8+
9+
create table if not exists
10+
"stripe"."subscription_schedules" (
11+
id text primary key,
12+
object text,
13+
application text,
14+
canceled_at integer,
15+
completed_at integer,
16+
created integer not null,
17+
current_phase jsonb,
18+
customer text not null,
19+
default_settings jsonb,
20+
end_behavior text,
21+
livemode boolean not null,
22+
metadata jsonb not null,
23+
phases jsonb not null,
24+
released_at integer,
25+
released_subscription text,
26+
status stripe.subscription_schedule_status not null,
27+
subscription text,
28+
test_clock text
29+
);

0 commit comments

Comments
 (0)