Skip to content

Commit

Permalink
feat: Add fixture for payment_method.detached event (#998)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsteele-stripe committed Nov 15, 2022
1 parent 24e99eb commit 9f048ca
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/fixtures/triggers.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ var Events = map[string]string{
"payment_intent.partially_funded": "triggers/payment_intent.partially_funded.json",
"payment_intent.requires_action": "triggers/payment_intent.requires_action.json",
"payment_method.attached": "triggers/payment_method.attached.json",
"payment_method.detached": "triggers/payment_method.detached.json",
"payout.created": "triggers/payout.created.json",
"payout.updated": "triggers/payout.updated.json",
"plan.created": "triggers/plan.created.json",
Expand Down
31 changes: 31 additions & 0 deletions pkg/fixtures/triggers/payment_method.detached.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"_meta": {
"template_version": 0
},
"fixtures": [
{
"name": "customer",
"path": "/v1/customers",
"method": "post",
"params": {
"description": "(created by Stripe CLI)"
}
},
{
"name": "payment_method_attach",
"path": "/v1/payment_methods/pm_card_visa/attach",
"method": "post",
"params": {
"customer": "${customer:id}"
}
},
{
"name": "payment_method_detach",
"path": "/v1/payment_methods/${payment_method_attach.id}/detach",
"method": "post",
"params": {
"customer": "${customer:id}"
}
}
]
}
1 change: 1 addition & 0 deletions stripe-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -31913,6 +31913,7 @@ _stripe_trigger()
must_have_one_noun+=("payment_intent.payment_failed")
must_have_one_noun+=("payment_intent.succeeded")
must_have_one_noun+=("payment_method.attached")
must_have_one_noun+=("payment_method.detached")
must_have_one_noun+=("payout.created")
must_have_one_noun+=("payout.updated")
must_have_one_noun+=("plan.created")
Expand Down

0 comments on commit 9f048ca

Please sign in to comment.