Skip to content

Commit

Permalink
Add triggers for identity.verification_session events (#1023)
Browse files Browse the repository at this point in the history
* Add triggers for identity.verification_session events

* remove updated
  • Loading branch information
aywang-stripe committed Feb 1, 2023
1 parent f684053 commit 74046ea
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/fixtures/triggers.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ var Events = map[string]string{
"customer.subscription.created": "triggers/customer.subscription.created.json",
"customer.subscription.deleted": "triggers/customer.subscription.deleted.json",
"customer.subscription.updated": "triggers/customer.subscription.updated.json",
"identity.verification_session.canceled": "triggers/identity.verification_session.canceled.json",
"identity.verification_session.created": "triggers/identity.verification_session.created.json",
"identity.verification_session.redacted": "triggers/identity.verification_session.redacted.json",
"invoice.created": "triggers/invoice.created.json",
"invoice.finalized": "triggers/invoice.finalized.json",
"invoice.paid": "triggers/invoice.paid.json",
Expand Down
22 changes: 22 additions & 0 deletions pkg/fixtures/triggers/identity.verification_session.canceled.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"_meta": {
"template_version": 0
},
"fixtures": [
{
"name": "verification_session",
"path": "/v1/identity/verification_sessions",
"method": "post",
"params": {
"type": "document",
"options[document][require_matching_selfie]": true,
"return_url": "https://stripe.com"
}
},
{
"name": "verification_session_canceled",
"path": "/v1/identity/verification_sessions/${verification_session:id}/cancel",
"method": "post"
}
]
}
17 changes: 17 additions & 0 deletions pkg/fixtures/triggers/identity.verification_session.created.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"_meta": {
"template_version": 0
},
"fixtures": [
{
"name": "verification_session",
"path": "/v1/identity/verification_sessions",
"method": "post",
"params": {
"type": "document",
"options[document][require_matching_selfie]": true,
"return_url": "https://stripe.com"
}
}
]
}
22 changes: 22 additions & 0 deletions pkg/fixtures/triggers/identity.verification_session.redacted.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"_meta": {
"template_version": 0
},
"fixtures": [
{
"name": "verification_session",
"path": "/v1/identity/verification_sessions",
"method": "post",
"params": {
"type": "document",
"options[document][require_matching_selfie]": true,
"return_url": "https://stripe.com"
}
},
{
"name": "verification_session_redacted",
"path": "/v1/identity/verification_sessions/${verification_session:id}/redact",
"method": "post"
}
]
}
3 changes: 3 additions & 0 deletions stripe-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -31897,6 +31897,9 @@ _stripe_trigger()
must_have_one_noun+=("customer.subscription.deleted")
must_have_one_noun+=("customer.subscription.updated")
must_have_one_noun+=("customer.updated")
must_have_one_noun+=("identity.verification_session.canceled")
must_have_one_noun+=("identity.verification_session.created")
must_have_one_noun+=("identity.verification_session.redacted")
must_have_one_noun+=("invoice.created")
must_have_one_noun+=("invoice.finalized")
must_have_one_noun+=("invoice.paid")
Expand Down

0 comments on commit 74046ea

Please sign in to comment.