#Andres2792
1 messages · Page 1 of 1 (latest)
Okay in that case you would want to use the --override flag. However, it can be hard to understand what you need to override
But all the events that you trigger are defined by JSON fixtures
You can see them here: https://github.com/stripe/stripe-cli/tree/master/pkg/fixtures/triggers
ohh just need to give name to the Customer the CLI creates to be included in the JSON payload so my server do something special for a customer
Well if you look at the fixture for customer.created:
"fixtures": [
{
"name": "customer",
"path": "/v1/customers",
"method": "post",
"params": {
"description": "(created by Stripe CLI)"
}
}
The only param is the Description. So in that case --override wouldn't work because the fixture doesn't use the name parameter. In those cases you use the --add flag
https://stripe.com/docs/cli/trigger#trigger-add
This fixture describes exactly what the CLI will do to trigger the customer.created event. For the step called customer it will make a POST request to /v1/customers and pass the parameter description with the value provided.
so the add will add the parameter to my local fixture?
If you use it during the CLI command it will add it to the params used for that call.
so for example the CLI command should be Stripe trigger customer.create --add customer:name=whatever
If you want to write your own fixtures you can get seriously custom. We document that here: https://stripe.com/docs/cli/fixtures
Yes the command stripe trigger customer.create --add customer:name=Sue will create a customer named Sue
great! that was it! really thanks for your help !