diff --git a/lib/stripe_mock/api/webhooks.rb b/lib/stripe_mock/api/webhooks.rb index 974cb4ab4..031076a3a 100644 --- a/lib/stripe_mock/api/webhooks.rb +++ b/lib/stripe_mock/api/webhooks.rb @@ -119,6 +119,8 @@ def self.event_list 'subscription_schedule.created', 'subscription_schedule.released', 'subscription_schedule.updated', + 'tax_rate.created', + 'tax_rate.updated', 'transfer.created', 'transfer.failed', 'transfer.paid', diff --git a/lib/stripe_mock/webhook_fixtures/tax_rate.created.json b/lib/stripe_mock/webhook_fixtures/tax_rate.created.json new file mode 100644 index 000000000..29c600f7b --- /dev/null +++ b/lib/stripe_mock/webhook_fixtures/tax_rate.created.json @@ -0,0 +1,32 @@ +{ + "id": "evt_000000000000000000000000", + "object": "event", + "api_version": "2020-08-27", + "created": 1700752531, + "data": { + "object": { + "id": "txr_00000000000000", + "object": "tax_rate", + "active": true, + "country": "DE", + "created": 1700750289, + "description": "VAT Germany", + "display_name": "VAT", + "effective_percentage": null, + "inclusive": false, + "jurisdiction": "DE", + "livemode": false, + "metadata": {}, + "percentage": 16.0, + "state": null, + "tax_type": "vat" + } + }, + "livemode": false, + "pending_webhooks": 2, + "request": { + "id": "req_00000000000000", + "idempotency_key": "cd3e4fc0-9d4c-42fd-a818-1b9789537ce9" + }, + "type": "tax_rate.created" +} \ No newline at end of file diff --git a/lib/stripe_mock/webhook_fixtures/tax_rate.updated.json b/lib/stripe_mock/webhook_fixtures/tax_rate.updated.json new file mode 100644 index 000000000..e90fba2d8 --- /dev/null +++ b/lib/stripe_mock/webhook_fixtures/tax_rate.updated.json @@ -0,0 +1,37 @@ +{ + "id": "evt_000000000000000000000000", + "object": "event", + "api_version": "2020-08-27", + "created": 1700752371, + "data": { + "object": { + "id": "txr_00000000000000", + "object": "tax_rate", + "active": true, + "country": "DE", + "created": 1700750289, + "description": "VAT Germany", + "display_name": "VAT", + "effective_percentage": null, + "inclusive": false, + "jurisdiction": "DE", + "livemode": false, + "metadata": {}, + "percentage": 16.0, + "state": null, + "tax_type": "vat" + }, + "previous_attributes": { + "metadata": { + "foo": null + } + } + }, + "livemode": false, + "pending_webhooks": 2, + "request": { + "id": "req_00000000000000", + "idempotency_key": "7eb234a6-64bc-4320-bc7f-780c546ab026" + }, + "type": "tax_rate.updated" +} \ No newline at end of file