|
5307 | 5307 | }
|
5308 | 5308 | },
|
5309 | 5309 | "/events/{merchant_id}": {
|
5310 |
| - "get": { |
| 5310 | + "post": { |
5311 | 5311 | "tags": [
|
5312 | 5312 | "Event"
|
5313 | 5313 | ],
|
|
5323 | 5323 | "schema": {
|
5324 | 5324 | "type": "string"
|
5325 | 5325 | }
|
5326 |
| - }, |
5327 |
| - { |
5328 |
| - "name": "created_after", |
5329 |
| - "in": "query", |
5330 |
| - "description": "Only include Events created after the specified time. Either only `object_id` must be specified, or one or more of `created_after`, `created_before`, `limit` and `offset` must be specified.", |
5331 |
| - "required": false, |
5332 |
| - "schema": { |
5333 |
| - "type": "string", |
5334 |
| - "format": "date-time", |
5335 |
| - "nullable": true |
5336 |
| - } |
5337 |
| - }, |
5338 |
| - { |
5339 |
| - "name": "created_before", |
5340 |
| - "in": "query", |
5341 |
| - "description": "Only include Events created before the specified time. Either only `object_id` must be specified, or one or more of `created_after`, `created_before`, `limit` and `offset` must be specified.", |
5342 |
| - "required": false, |
5343 |
| - "schema": { |
5344 |
| - "type": "string", |
5345 |
| - "format": "date-time", |
5346 |
| - "nullable": true |
5347 |
| - } |
5348 |
| - }, |
5349 |
| - { |
5350 |
| - "name": "limit", |
5351 |
| - "in": "query", |
5352 |
| - "description": "The maximum number of Events to include in the response. Either only `object_id` must be specified, or one or more of `created_after`, `created_before`, `limit` and `offset` must be specified.", |
5353 |
| - "required": false, |
5354 |
| - "schema": { |
5355 |
| - "type": "integer", |
5356 |
| - "format": "int64", |
5357 |
| - "nullable": true |
5358 |
| - } |
5359 |
| - }, |
5360 |
| - { |
5361 |
| - "name": "offset", |
5362 |
| - "in": "query", |
5363 |
| - "description": "The number of Events to skip when retrieving the list of Events.\n Either only `object_id` must be specified, or one or more of `created_after`, `created_before`, `limit` and `offset` must be specified.", |
5364 |
| - "required": false, |
5365 |
| - "schema": { |
5366 |
| - "type": "integer", |
5367 |
| - "format": "int64", |
5368 |
| - "nullable": true |
5369 |
| - } |
5370 |
| - }, |
5371 |
| - { |
5372 |
| - "name": "object_id", |
5373 |
| - "in": "query", |
5374 |
| - "description": "Only include Events associated with the specified object (Payment Intent ID, Refund ID, etc.). Either only `object_id` must be specified, or one or more of `created_after`, `created_before`, `limit` and `offset` must be specified.", |
5375 |
| - "required": false, |
5376 |
| - "schema": { |
5377 |
| - "type": "string", |
5378 |
| - "nullable": true |
5379 |
| - } |
5380 |
| - }, |
5381 |
| - { |
5382 |
| - "name": "profile_id", |
5383 |
| - "in": "query", |
5384 |
| - "description": "Only include Events associated with the Profile identified by the specified Profile ID.", |
5385 |
| - "required": false, |
5386 |
| - "schema": { |
5387 |
| - "type": "string", |
5388 |
| - "nullable": true |
5389 |
| - } |
5390 |
| - }, |
5391 |
| - { |
5392 |
| - "name": "is_delivered", |
5393 |
| - "in": "query", |
5394 |
| - "description": "Only include Events which are ultimately delivered to the merchant.", |
5395 |
| - "required": false, |
5396 |
| - "schema": { |
5397 |
| - "type": "boolean", |
5398 |
| - "nullable": true |
5399 |
| - } |
5400 | 5326 | }
|
5401 | 5327 | ],
|
| 5328 | + "requestBody": { |
| 5329 | + "description": "The constraints that can be applied when listing Events.", |
| 5330 | + "content": { |
| 5331 | + "application/json": { |
| 5332 | + "schema": { |
| 5333 | + "$ref": "#/components/schemas/EventListConstraints" |
| 5334 | + }, |
| 5335 | + "examples": { |
| 5336 | + "example": { |
| 5337 | + "value": { |
| 5338 | + "created_after": "2023-01-01T00:00:00", |
| 5339 | + "created_before": "2023-01-31T23:59:59", |
| 5340 | + "event_classes": [ |
| 5341 | + "payments", |
| 5342 | + "refunds" |
| 5343 | + ], |
| 5344 | + "event_types": [ |
| 5345 | + "payment_succeeded" |
| 5346 | + ], |
| 5347 | + "is_delivered": true, |
| 5348 | + "limit": 5, |
| 5349 | + "object_id": "{{object_id}}", |
| 5350 | + "offset": 0, |
| 5351 | + "profile_id": "{{profile_id}}" |
| 5352 | + } |
| 5353 | + } |
| 5354 | + } |
| 5355 | + } |
| 5356 | + }, |
| 5357 | + "required": true |
| 5358 | + }, |
5402 | 5359 | "responses": {
|
5403 | 5360 | "200": {
|
5404 | 5361 | "description": "List of Events retrieved successfully",
|
|
5419 | 5376 | }
|
5420 | 5377 | },
|
5421 | 5378 | "/events/profile/list": {
|
5422 |
| - "get": { |
| 5379 | + "post": { |
5423 | 5380 | "tags": [
|
5424 | 5381 | "Event"
|
5425 | 5382 | ],
|
5426 | 5383 | "summary": "Events - List",
|
5427 | 5384 | "description": "List all Events associated with a Profile.",
|
5428 | 5385 | "operationId": "List all Events associated with a Profile",
|
5429 |
| - "parameters": [ |
5430 |
| - { |
5431 |
| - "name": "created_after", |
5432 |
| - "in": "query", |
5433 |
| - "description": "Only include Events created after the specified time. Either only `object_id` must be specified, or one or more of `created_after`, `created_before`, `limit` and `offset` must be specified.", |
5434 |
| - "required": false, |
5435 |
| - "schema": { |
5436 |
| - "type": "string", |
5437 |
| - "format": "date-time", |
5438 |
| - "nullable": true |
5439 |
| - } |
5440 |
| - }, |
5441 |
| - { |
5442 |
| - "name": "created_before", |
5443 |
| - "in": "query", |
5444 |
| - "description": "Only include Events created before the specified time. Either only `object_id` must be specified, or one or more of `created_after`, `created_before`, `limit` and `offset` must be specified.", |
5445 |
| - "required": false, |
5446 |
| - "schema": { |
5447 |
| - "type": "string", |
5448 |
| - "format": "date-time", |
5449 |
| - "nullable": true |
5450 |
| - } |
5451 |
| - }, |
5452 |
| - { |
5453 |
| - "name": "limit", |
5454 |
| - "in": "query", |
5455 |
| - "description": "The maximum number of Events to include in the response. Either only `object_id` must be specified, or one or more of `created_after`, `created_before`, `limit` and `offset` must be specified.", |
5456 |
| - "required": false, |
5457 |
| - "schema": { |
5458 |
| - "type": "integer", |
5459 |
| - "format": "int64", |
5460 |
| - "nullable": true |
5461 |
| - } |
5462 |
| - }, |
5463 |
| - { |
5464 |
| - "name": "offset", |
5465 |
| - "in": "query", |
5466 |
| - "description": "The number of Events to skip when retrieving the list of Events.\n Either only `object_id` must be specified, or one or more of `created_after`, `created_before`, `limit` and `offset` must be specified.", |
5467 |
| - "required": false, |
5468 |
| - "schema": { |
5469 |
| - "type": "integer", |
5470 |
| - "format": "int64", |
5471 |
| - "nullable": true |
| 5386 | + "requestBody": { |
| 5387 | + "description": "The constraints that can be applied when listing Events.", |
| 5388 | + "content": { |
| 5389 | + "application/json": { |
| 5390 | + "schema": { |
| 5391 | + "$ref": "#/components/schemas/EventListConstraints" |
| 5392 | + }, |
| 5393 | + "examples": { |
| 5394 | + "example": { |
| 5395 | + "value": { |
| 5396 | + "created_after": "2023-01-01T00:00:00", |
| 5397 | + "created_before": "2023-01-31T23:59:59", |
| 5398 | + "event_classes": [ |
| 5399 | + "payments", |
| 5400 | + "refunds" |
| 5401 | + ], |
| 5402 | + "event_types": [ |
| 5403 | + "payment_succeeded" |
| 5404 | + ], |
| 5405 | + "is_delivered": true, |
| 5406 | + "limit": 5, |
| 5407 | + "object_id": "{{object_id}}", |
| 5408 | + "offset": 0, |
| 5409 | + "profile_id": "{{profile_id}}" |
| 5410 | + } |
| 5411 | + } |
| 5412 | + } |
5472 | 5413 | }
|
5473 | 5414 | },
|
5474 |
| - { |
5475 |
| - "name": "object_id", |
5476 |
| - "in": "query", |
5477 |
| - "description": "Only include Events associated with the specified object (Payment Intent ID, Refund ID, etc.). Either only `object_id` must be specified, or one or more of `created_after`, `created_before`, `limit` and `offset` must be specified.", |
5478 |
| - "required": false, |
5479 |
| - "schema": { |
5480 |
| - "type": "string", |
5481 |
| - "nullable": true |
5482 |
| - } |
5483 |
| - } |
5484 |
| - ], |
| 5415 | + "required": true |
| 5416 | + }, |
5485 | 5417 | "responses": {
|
5486 | 5418 | "200": {
|
5487 | 5419 | "description": "List of Events retrieved successfully",
|
5488 | 5420 | "content": {
|
5489 | 5421 | "application/json": {
|
5490 | 5422 | "schema": {
|
5491 |
| - "type": "array", |
5492 |
| - "items": { |
5493 |
| - "$ref": "#/components/schemas/EventListItemResponse" |
5494 |
| - } |
| 5423 | + "$ref": "#/components/schemas/TotalEventsResponse" |
5495 | 5424 | }
|
5496 | 5425 | }
|
5497 | 5426 | }
|
|
12025 | 11954 | "payouts"
|
12026 | 11955 | ]
|
12027 | 11956 | },
|
| 11957 | + "EventListConstraints": { |
| 11958 | + "type": "object", |
| 11959 | + "description": "The constraints to apply when filtering events.", |
| 11960 | + "properties": { |
| 11961 | + "created_after": { |
| 11962 | + "type": "string", |
| 11963 | + "format": "date-time", |
| 11964 | + "description": "Filter events created after the specified time.", |
| 11965 | + "nullable": true |
| 11966 | + }, |
| 11967 | + "created_before": { |
| 11968 | + "type": "string", |
| 11969 | + "format": "date-time", |
| 11970 | + "description": "Filter events created before the specified time.", |
| 11971 | + "nullable": true |
| 11972 | + }, |
| 11973 | + "limit": { |
| 11974 | + "type": "integer", |
| 11975 | + "format": "int32", |
| 11976 | + "description": "Include at most the specified number of events.", |
| 11977 | + "nullable": true, |
| 11978 | + "minimum": 0 |
| 11979 | + }, |
| 11980 | + "offset": { |
| 11981 | + "type": "integer", |
| 11982 | + "format": "int32", |
| 11983 | + "description": "Include events after the specified offset.", |
| 11984 | + "nullable": true, |
| 11985 | + "minimum": 0 |
| 11986 | + }, |
| 11987 | + "object_id": { |
| 11988 | + "type": "string", |
| 11989 | + "description": "Filter all events associated with the specified object identifier (Payment Intent ID,\nRefund ID, etc.)", |
| 11990 | + "nullable": true |
| 11991 | + }, |
| 11992 | + "profile_id": { |
| 11993 | + "type": "string", |
| 11994 | + "description": "Filter all events associated with the specified business profile ID.", |
| 11995 | + "nullable": true |
| 11996 | + }, |
| 11997 | + "event_classes": { |
| 11998 | + "type": "array", |
| 11999 | + "items": { |
| 12000 | + "$ref": "#/components/schemas/EventClass" |
| 12001 | + }, |
| 12002 | + "description": "Filter events by their class.", |
| 12003 | + "uniqueItems": true, |
| 12004 | + "nullable": true |
| 12005 | + }, |
| 12006 | + "event_types": { |
| 12007 | + "type": "array", |
| 12008 | + "items": { |
| 12009 | + "$ref": "#/components/schemas/EventType" |
| 12010 | + }, |
| 12011 | + "description": "Filter events by their type.", |
| 12012 | + "uniqueItems": true, |
| 12013 | + "nullable": true |
| 12014 | + }, |
| 12015 | + "is_delivered": { |
| 12016 | + "type": "boolean", |
| 12017 | + "description": "Filter all events by `is_overall_delivery_successful` field of the event.", |
| 12018 | + "nullable": true |
| 12019 | + } |
| 12020 | + } |
| 12021 | + }, |
12028 | 12022 | "EventListItemResponse": {
|
12029 | 12023 | "type": "object",
|
12030 | 12024 | "description": "The response body for each item when listing events.",
|
|
0 commit comments