dodopayments 1.43.1__py3-none-any.whl → 1.47.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dodopayments might be problematic. Click here for more details.
- dodopayments/_base_client.py +4 -1
- dodopayments/_client.py +20 -9
- dodopayments/_files.py +4 -4
- dodopayments/_version.py +1 -1
- dodopayments/pagination.py +64 -1
- dodopayments/resources/__init__.py +27 -13
- dodopayments/resources/discounts.py +24 -0
- dodopayments/resources/products/products.py +17 -1
- dodopayments/resources/subscriptions.py +4 -6
- dodopayments/resources/webhooks/__init__.py +33 -0
- dodopayments/resources/webhooks/headers.py +255 -0
- dodopayments/resources/webhooks/webhooks.py +676 -0
- dodopayments/resources/your_webhook_url.py +224 -0
- dodopayments/types/__init__.py +17 -3
- dodopayments/types/addon_cart_response_item_param.py +13 -0
- dodopayments/types/customer_limited_details_param.py +18 -0
- dodopayments/types/customer_request_param.py +2 -2
- dodopayments/types/discount.py +7 -0
- dodopayments/types/discount_create_params.py +7 -0
- dodopayments/types/discount_update_params.py +7 -0
- dodopayments/types/dispute_param.py +45 -0
- dodopayments/types/get_dispute_param.py +52 -0
- dodopayments/types/license_key_param.py +53 -0
- dodopayments/types/new_customer_param.py +16 -0
- dodopayments/types/payment_param.py +131 -0
- dodopayments/types/product.py +4 -1
- dodopayments/types/product_create_params.py +4 -1
- dodopayments/types/product_list_response.py +4 -1
- dodopayments/types/product_update_params.py +4 -1
- dodopayments/types/refund_param.py +42 -0
- dodopayments/types/subscription.py +3 -0
- dodopayments/types/subscription_change_plan_params.py +1 -1
- dodopayments/types/subscription_list_params.py +1 -1
- dodopayments/types/subscription_list_response.py +3 -0
- dodopayments/types/subscription_param.py +97 -0
- dodopayments/types/subscription_status.py +1 -1
- dodopayments/types/webhook_create_params.py +40 -0
- dodopayments/types/webhook_create_response.py +42 -0
- dodopayments/types/webhook_event_type.py +0 -1
- dodopayments/types/webhook_list_params.py +16 -0
- dodopayments/types/webhook_list_response.py +42 -0
- dodopayments/types/webhook_retrieve_response.py +42 -0
- dodopayments/types/webhook_update_params.py +33 -0
- dodopayments/types/webhook_update_response.py +42 -0
- dodopayments/types/webhooks/__init__.py +6 -0
- dodopayments/types/webhooks/header_retrieve_response.py +15 -0
- dodopayments/types/webhooks/header_update_params.py +13 -0
- dodopayments/types/your_webhook_url_create_params.py +66 -0
- {dodopayments-1.43.1.dist-info → dodopayments-1.47.0.dist-info}/METADATA +1 -1
- {dodopayments-1.43.1.dist-info → dodopayments-1.47.0.dist-info}/RECORD +52 -32
- dodopayments/resources/webhook_events.py +0 -326
- dodopayments/types/create_new_customer_param.py +0 -23
- dodopayments/types/webhook_event.py +0 -26
- dodopayments/types/webhook_event_list_params.py +0 -39
- {dodopayments-1.43.1.dist-info → dodopayments-1.47.0.dist-info}/WHEEL +0 -0
- {dodopayments-1.43.1.dist-info → dodopayments-1.47.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, Union, Iterable, Optional
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Required, Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
from .._utils import PropertyInfo
|
|
10
|
+
from .currency import Currency
|
|
11
|
+
from .country_code import CountryCode
|
|
12
|
+
from .refund_param import RefundParam
|
|
13
|
+
from .dispute_param import DisputeParam
|
|
14
|
+
from .intent_status import IntentStatus
|
|
15
|
+
from .billing_address_param import BillingAddressParam
|
|
16
|
+
from .customer_limited_details_param import CustomerLimitedDetailsParam
|
|
17
|
+
|
|
18
|
+
__all__ = ["PaymentParam", "ProductCart"]
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class ProductCart(TypedDict, total=False):
|
|
22
|
+
product_id: Required[str]
|
|
23
|
+
|
|
24
|
+
quantity: Required[int]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class PaymentParam(TypedDict, total=False):
|
|
28
|
+
billing: Required[BillingAddressParam]
|
|
29
|
+
"""Billing address details for payments"""
|
|
30
|
+
|
|
31
|
+
brand_id: Required[str]
|
|
32
|
+
"""brand id this payment belongs to"""
|
|
33
|
+
|
|
34
|
+
business_id: Required[str]
|
|
35
|
+
"""Identifier of the business associated with the payment"""
|
|
36
|
+
|
|
37
|
+
created_at: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
|
|
38
|
+
"""Timestamp when the payment was created"""
|
|
39
|
+
|
|
40
|
+
currency: Required[Currency]
|
|
41
|
+
"""Currency used for the payment"""
|
|
42
|
+
|
|
43
|
+
customer: Required[CustomerLimitedDetailsParam]
|
|
44
|
+
"""Details about the customer who made the payment"""
|
|
45
|
+
|
|
46
|
+
digital_products_delivered: Required[bool]
|
|
47
|
+
"""brand id this payment belongs to"""
|
|
48
|
+
|
|
49
|
+
disputes: Required[Iterable[DisputeParam]]
|
|
50
|
+
"""List of disputes associated with this payment"""
|
|
51
|
+
|
|
52
|
+
metadata: Required[Dict[str, str]]
|
|
53
|
+
"""Additional custom data associated with the payment"""
|
|
54
|
+
|
|
55
|
+
payment_id: Required[str]
|
|
56
|
+
"""Unique identifier for the payment"""
|
|
57
|
+
|
|
58
|
+
refunds: Required[Iterable[RefundParam]]
|
|
59
|
+
"""List of refunds issued for this payment"""
|
|
60
|
+
|
|
61
|
+
settlement_amount: Required[int]
|
|
62
|
+
"""
|
|
63
|
+
The amount that will be credited to your Dodo balance after currency conversion
|
|
64
|
+
and processing. Especially relevant for adaptive pricing where the customer's
|
|
65
|
+
payment currency differs from your settlement currency.
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
settlement_currency: Required[Currency]
|
|
69
|
+
"""
|
|
70
|
+
The currency in which the settlement_amount will be credited to your Dodo
|
|
71
|
+
balance. This may differ from the customer's payment currency in adaptive
|
|
72
|
+
pricing scenarios.
|
|
73
|
+
"""
|
|
74
|
+
|
|
75
|
+
total_amount: Required[int]
|
|
76
|
+
"""
|
|
77
|
+
Total amount charged to the customer including tax, in smallest currency unit
|
|
78
|
+
(e.g. cents)
|
|
79
|
+
"""
|
|
80
|
+
|
|
81
|
+
card_issuing_country: Optional[CountryCode]
|
|
82
|
+
"""ISO2 country code of the card"""
|
|
83
|
+
|
|
84
|
+
card_last_four: Optional[str]
|
|
85
|
+
"""The last four digits of the card"""
|
|
86
|
+
|
|
87
|
+
card_network: Optional[str]
|
|
88
|
+
"""Card network like VISA, MASTERCARD etc."""
|
|
89
|
+
|
|
90
|
+
card_type: Optional[str]
|
|
91
|
+
"""The type of card DEBIT or CREDIT"""
|
|
92
|
+
|
|
93
|
+
discount_id: Optional[str]
|
|
94
|
+
"""The discount id if discount is applied"""
|
|
95
|
+
|
|
96
|
+
error_code: Optional[str]
|
|
97
|
+
"""An error code if the payment failed"""
|
|
98
|
+
|
|
99
|
+
error_message: Optional[str]
|
|
100
|
+
"""An error message if the payment failed"""
|
|
101
|
+
|
|
102
|
+
payment_link: Optional[str]
|
|
103
|
+
"""Checkout URL"""
|
|
104
|
+
|
|
105
|
+
payment_method: Optional[str]
|
|
106
|
+
"""Payment method used by customer (e.g. "card", "bank_transfer")"""
|
|
107
|
+
|
|
108
|
+
payment_method_type: Optional[str]
|
|
109
|
+
"""Specific type of payment method (e.g. "visa", "mastercard")"""
|
|
110
|
+
|
|
111
|
+
product_cart: Optional[Iterable[ProductCart]]
|
|
112
|
+
"""List of products purchased in a one-time payment"""
|
|
113
|
+
|
|
114
|
+
settlement_tax: Optional[int]
|
|
115
|
+
"""
|
|
116
|
+
This represents the portion of settlement_amount that corresponds to taxes
|
|
117
|
+
collected. Especially relevant for adaptive pricing where the tax component must
|
|
118
|
+
be tracked separately in your Dodo balance.
|
|
119
|
+
"""
|
|
120
|
+
|
|
121
|
+
status: Optional[IntentStatus]
|
|
122
|
+
"""Current status of the payment intent"""
|
|
123
|
+
|
|
124
|
+
subscription_id: Optional[str]
|
|
125
|
+
"""Identifier of the subscription if payment is part of a subscription"""
|
|
126
|
+
|
|
127
|
+
tax: Optional[int]
|
|
128
|
+
"""Amount of tax collected in smallest currency unit (e.g. cents)"""
|
|
129
|
+
|
|
130
|
+
updated_at: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
|
|
131
|
+
"""Timestamp when the payment was last updated"""
|
dodopayments/types/product.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
from typing import List, Optional
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
4
|
from datetime import datetime
|
|
5
5
|
|
|
6
6
|
from .price import Price
|
|
@@ -45,6 +45,9 @@ class Product(BaseModel):
|
|
|
45
45
|
license_key_enabled: bool
|
|
46
46
|
"""Indicates whether the product requires a license key."""
|
|
47
47
|
|
|
48
|
+
metadata: Dict[str, str]
|
|
49
|
+
"""Additional custom data associated with the product"""
|
|
50
|
+
|
|
48
51
|
price: Price
|
|
49
52
|
"""Pricing information for the product."""
|
|
50
53
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import List, Optional
|
|
5
|
+
from typing import Dict, List, Optional
|
|
6
6
|
from typing_extensions import Required, TypedDict
|
|
7
7
|
|
|
8
8
|
from .price_param import PriceParam
|
|
@@ -49,6 +49,9 @@ class ProductCreateParams(TypedDict, total=False):
|
|
|
49
49
|
When true, generates and sends a license key to your customer. Defaults to false
|
|
50
50
|
"""
|
|
51
51
|
|
|
52
|
+
metadata: Dict[str, str]
|
|
53
|
+
"""Additional metadata for the product"""
|
|
54
|
+
|
|
52
55
|
name: Optional[str]
|
|
53
56
|
"""Optional name of the product"""
|
|
54
57
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
from typing import Optional
|
|
3
|
+
from typing import Dict, Optional
|
|
4
4
|
from datetime import datetime
|
|
5
5
|
|
|
6
6
|
from .price import Price
|
|
@@ -21,6 +21,9 @@ class ProductListResponse(BaseModel):
|
|
|
21
21
|
is_recurring: bool
|
|
22
22
|
"""Indicates if the product is recurring (e.g., subscriptions)."""
|
|
23
23
|
|
|
24
|
+
metadata: Dict[str, str]
|
|
25
|
+
"""Additional custom data associated with the product"""
|
|
26
|
+
|
|
24
27
|
product_id: str
|
|
25
28
|
"""Unique identifier for the product."""
|
|
26
29
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import List, Optional
|
|
5
|
+
from typing import Dict, List, Optional
|
|
6
6
|
from typing_extensions import TypedDict
|
|
7
7
|
|
|
8
8
|
from .price_param import PriceParam
|
|
@@ -55,6 +55,9 @@ class ProductUpdateParams(TypedDict, total=False):
|
|
|
55
55
|
limit, activation message) become applicable.
|
|
56
56
|
"""
|
|
57
57
|
|
|
58
|
+
metadata: Optional[Dict[str, str]]
|
|
59
|
+
"""Additional metadata for the product"""
|
|
60
|
+
|
|
58
61
|
name: Optional[str]
|
|
59
62
|
"""Name of the product, optional and must be at most 100 characters."""
|
|
60
63
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Union, Optional
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Required, Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
from .._utils import PropertyInfo
|
|
10
|
+
from .currency import Currency
|
|
11
|
+
from .refund_status import RefundStatus
|
|
12
|
+
|
|
13
|
+
__all__ = ["RefundParam"]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class RefundParam(TypedDict, total=False):
|
|
17
|
+
business_id: Required[str]
|
|
18
|
+
"""The unique identifier of the business issuing the refund."""
|
|
19
|
+
|
|
20
|
+
created_at: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
|
|
21
|
+
"""The timestamp of when the refund was created in UTC."""
|
|
22
|
+
|
|
23
|
+
is_partial: Required[bool]
|
|
24
|
+
"""If true the refund is a partial refund"""
|
|
25
|
+
|
|
26
|
+
payment_id: Required[str]
|
|
27
|
+
"""The unique identifier of the payment associated with the refund."""
|
|
28
|
+
|
|
29
|
+
refund_id: Required[str]
|
|
30
|
+
"""The unique identifier of the refund."""
|
|
31
|
+
|
|
32
|
+
status: Required[RefundStatus]
|
|
33
|
+
"""The current status of the refund."""
|
|
34
|
+
|
|
35
|
+
amount: Optional[int]
|
|
36
|
+
"""The refunded amount."""
|
|
37
|
+
|
|
38
|
+
currency: Optional[Currency]
|
|
39
|
+
"""The currency of the refund, represented as an ISO 4217 currency code."""
|
|
40
|
+
|
|
41
|
+
reason: Optional[str]
|
|
42
|
+
"""The reason provided for the refund, if any. Optional."""
|
|
@@ -87,5 +87,8 @@ class Subscription(BaseModel):
|
|
|
87
87
|
cancelled_at: Optional[datetime] = None
|
|
88
88
|
"""Cancelled timestamp if the subscription is cancelled"""
|
|
89
89
|
|
|
90
|
+
discount_cycles_remaining: Optional[int] = None
|
|
91
|
+
"""Number of remaining discount cycles if discount is applied"""
|
|
92
|
+
|
|
90
93
|
discount_id: Optional[str] = None
|
|
91
94
|
"""The discount id if discount is applied"""
|
|
@@ -14,7 +14,7 @@ class SubscriptionChangePlanParams(TypedDict, total=False):
|
|
|
14
14
|
product_id: Required[str]
|
|
15
15
|
"""Unique identifier of the product to subscribe to"""
|
|
16
16
|
|
|
17
|
-
proration_billing_mode: Required[Literal["prorated_immediately", "full_immediately"]]
|
|
17
|
+
proration_billing_mode: Required[Literal["prorated_immediately", "full_immediately", "difference_immediately"]]
|
|
18
18
|
"""Proration Billing Mode"""
|
|
19
19
|
|
|
20
20
|
quantity: Required[int]
|
|
@@ -30,5 +30,5 @@ class SubscriptionListParams(TypedDict, total=False):
|
|
|
30
30
|
page_size: int
|
|
31
31
|
"""Page size default is 10 max is 100"""
|
|
32
32
|
|
|
33
|
-
status: Literal["pending", "active", "on_hold", "
|
|
33
|
+
status: Literal["pending", "active", "on_hold", "cancelled", "failed", "expired"]
|
|
34
34
|
"""Filter by status"""
|
|
@@ -83,5 +83,8 @@ class SubscriptionListResponse(BaseModel):
|
|
|
83
83
|
cancelled_at: Optional[datetime] = None
|
|
84
84
|
"""Cancelled timestamp if the subscription is cancelled"""
|
|
85
85
|
|
|
86
|
+
discount_cycles_remaining: Optional[int] = None
|
|
87
|
+
"""Number of remaining discount cycles if discount is applied"""
|
|
88
|
+
|
|
86
89
|
discount_id: Optional[str] = None
|
|
87
90
|
"""The discount id if discount is applied"""
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, Union, Iterable, Optional
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Required, Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
from .._utils import PropertyInfo
|
|
10
|
+
from .currency import Currency
|
|
11
|
+
from .time_interval import TimeInterval
|
|
12
|
+
from .subscription_status import SubscriptionStatus
|
|
13
|
+
from .billing_address_param import BillingAddressParam
|
|
14
|
+
from .addon_cart_response_item_param import AddonCartResponseItemParam
|
|
15
|
+
from .customer_limited_details_param import CustomerLimitedDetailsParam
|
|
16
|
+
|
|
17
|
+
__all__ = ["SubscriptionParam"]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class SubscriptionParam(TypedDict, total=False):
|
|
21
|
+
addons: Required[Iterable[AddonCartResponseItemParam]]
|
|
22
|
+
"""Addons associated with this subscription"""
|
|
23
|
+
|
|
24
|
+
billing: Required[BillingAddressParam]
|
|
25
|
+
"""Billing address details for payments"""
|
|
26
|
+
|
|
27
|
+
cancel_at_next_billing_date: Required[bool]
|
|
28
|
+
"""Indicates if the subscription will cancel at the next billing date"""
|
|
29
|
+
|
|
30
|
+
created_at: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
|
|
31
|
+
"""Timestamp when the subscription was created"""
|
|
32
|
+
|
|
33
|
+
currency: Required[Currency]
|
|
34
|
+
"""Currency used for the subscription payments"""
|
|
35
|
+
|
|
36
|
+
customer: Required[CustomerLimitedDetailsParam]
|
|
37
|
+
"""Customer details associated with the subscription"""
|
|
38
|
+
|
|
39
|
+
metadata: Required[Dict[str, str]]
|
|
40
|
+
"""Additional custom data associated with the subscription"""
|
|
41
|
+
|
|
42
|
+
next_billing_date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
|
|
43
|
+
"""Timestamp of the next scheduled billing.
|
|
44
|
+
|
|
45
|
+
Indicates the end of current billing period
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
on_demand: Required[bool]
|
|
49
|
+
"""Wether the subscription is on-demand or not"""
|
|
50
|
+
|
|
51
|
+
payment_frequency_count: Required[int]
|
|
52
|
+
"""Number of payment frequency intervals"""
|
|
53
|
+
|
|
54
|
+
payment_frequency_interval: Required[TimeInterval]
|
|
55
|
+
"""Time interval for payment frequency (e.g. month, year)"""
|
|
56
|
+
|
|
57
|
+
previous_billing_date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
|
|
58
|
+
"""Timestamp of the last payment. Indicates the start of current billing period"""
|
|
59
|
+
|
|
60
|
+
product_id: Required[str]
|
|
61
|
+
"""Identifier of the product associated with this subscription"""
|
|
62
|
+
|
|
63
|
+
quantity: Required[int]
|
|
64
|
+
"""Number of units/items included in the subscription"""
|
|
65
|
+
|
|
66
|
+
recurring_pre_tax_amount: Required[int]
|
|
67
|
+
"""
|
|
68
|
+
Amount charged before tax for each recurring payment in smallest currency unit
|
|
69
|
+
(e.g. cents)
|
|
70
|
+
"""
|
|
71
|
+
|
|
72
|
+
status: Required[SubscriptionStatus]
|
|
73
|
+
"""Current status of the subscription"""
|
|
74
|
+
|
|
75
|
+
subscription_id: Required[str]
|
|
76
|
+
"""Unique identifier for the subscription"""
|
|
77
|
+
|
|
78
|
+
subscription_period_count: Required[int]
|
|
79
|
+
"""Number of subscription period intervals"""
|
|
80
|
+
|
|
81
|
+
subscription_period_interval: Required[TimeInterval]
|
|
82
|
+
"""Time interval for the subscription period (e.g. month, year)"""
|
|
83
|
+
|
|
84
|
+
tax_inclusive: Required[bool]
|
|
85
|
+
"""Indicates if the recurring_pre_tax_amount is tax inclusive"""
|
|
86
|
+
|
|
87
|
+
trial_period_days: Required[int]
|
|
88
|
+
"""Number of days in the trial period (0 if no trial)"""
|
|
89
|
+
|
|
90
|
+
cancelled_at: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
|
|
91
|
+
"""Cancelled timestamp if the subscription is cancelled"""
|
|
92
|
+
|
|
93
|
+
discount_cycles_remaining: Optional[int]
|
|
94
|
+
"""Number of remaining discount cycles if discount is applied"""
|
|
95
|
+
|
|
96
|
+
discount_id: Optional[str]
|
|
97
|
+
"""The discount id if discount is applied"""
|
|
@@ -4,4 +4,4 @@ from typing_extensions import Literal, TypeAlias
|
|
|
4
4
|
|
|
5
5
|
__all__ = ["SubscriptionStatus"]
|
|
6
6
|
|
|
7
|
-
SubscriptionStatus: TypeAlias = Literal["pending", "active", "on_hold", "
|
|
7
|
+
SubscriptionStatus: TypeAlias = Literal["pending", "active", "on_hold", "cancelled", "failed", "expired"]
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, List, Optional
|
|
6
|
+
from typing_extensions import Required, TypedDict
|
|
7
|
+
|
|
8
|
+
from .webhook_event_type import WebhookEventType
|
|
9
|
+
|
|
10
|
+
__all__ = ["WebhookCreateParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class WebhookCreateParams(TypedDict, total=False):
|
|
14
|
+
url: Required[str]
|
|
15
|
+
"""Url of the webhook"""
|
|
16
|
+
|
|
17
|
+
description: Optional[str]
|
|
18
|
+
"""Filter events to the webhook.
|
|
19
|
+
|
|
20
|
+
Webhook event will only be sent for events in the list.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
disabled: Optional[bool]
|
|
24
|
+
"""Create the webhook in a disabled state.
|
|
25
|
+
|
|
26
|
+
Default is false
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
filter_types: List[WebhookEventType]
|
|
30
|
+
|
|
31
|
+
headers: Optional[Dict[str, str]]
|
|
32
|
+
"""Custom headers to be passed"""
|
|
33
|
+
|
|
34
|
+
idempotency_key: Optional[str]
|
|
35
|
+
"""The request's idempotency key"""
|
|
36
|
+
|
|
37
|
+
metadata: Optional[Dict[str, str]]
|
|
38
|
+
"""Metadata to be passed to the webhook Defaut is {}"""
|
|
39
|
+
|
|
40
|
+
rate_limit: Optional[int]
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["WebhookCreateResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class WebhookCreateResponse(BaseModel):
|
|
11
|
+
id: str
|
|
12
|
+
"""The webhook's ID."""
|
|
13
|
+
|
|
14
|
+
created_at: str
|
|
15
|
+
"""Created at timestamp"""
|
|
16
|
+
|
|
17
|
+
description: str
|
|
18
|
+
"""An example webhook name."""
|
|
19
|
+
|
|
20
|
+
metadata: Dict[str, str]
|
|
21
|
+
"""Metadata of the webhook"""
|
|
22
|
+
|
|
23
|
+
updated_at: str
|
|
24
|
+
"""Updated at timestamp"""
|
|
25
|
+
|
|
26
|
+
url: str
|
|
27
|
+
"""Url endpoint of the webhook"""
|
|
28
|
+
|
|
29
|
+
disabled: Optional[bool] = None
|
|
30
|
+
"""Status of the webhook.
|
|
31
|
+
|
|
32
|
+
If true, events are not sent
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
filter_types: Optional[List[str]] = None
|
|
36
|
+
"""Filter events to the webhook.
|
|
37
|
+
|
|
38
|
+
Webhook event will only be sent for events in the list.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
rate_limit: Optional[int] = None
|
|
42
|
+
"""Configured rate limit"""
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Optional
|
|
6
|
+
from typing_extensions import TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["WebhookListParams"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class WebhookListParams(TypedDict, total=False):
|
|
12
|
+
iterator: Optional[str]
|
|
13
|
+
"""The iterator returned from a prior invocation"""
|
|
14
|
+
|
|
15
|
+
limit: Optional[int]
|
|
16
|
+
"""Limit the number of returned items"""
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["WebhookListResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class WebhookListResponse(BaseModel):
|
|
11
|
+
id: str
|
|
12
|
+
"""The webhook's ID."""
|
|
13
|
+
|
|
14
|
+
created_at: str
|
|
15
|
+
"""Created at timestamp"""
|
|
16
|
+
|
|
17
|
+
description: str
|
|
18
|
+
"""An example webhook name."""
|
|
19
|
+
|
|
20
|
+
metadata: Dict[str, str]
|
|
21
|
+
"""Metadata of the webhook"""
|
|
22
|
+
|
|
23
|
+
updated_at: str
|
|
24
|
+
"""Updated at timestamp"""
|
|
25
|
+
|
|
26
|
+
url: str
|
|
27
|
+
"""Url endpoint of the webhook"""
|
|
28
|
+
|
|
29
|
+
disabled: Optional[bool] = None
|
|
30
|
+
"""Status of the webhook.
|
|
31
|
+
|
|
32
|
+
If true, events are not sent
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
filter_types: Optional[List[str]] = None
|
|
36
|
+
"""Filter events to the webhook.
|
|
37
|
+
|
|
38
|
+
Webhook event will only be sent for events in the list.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
rate_limit: Optional[int] = None
|
|
42
|
+
"""Configured rate limit"""
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["WebhookRetrieveResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class WebhookRetrieveResponse(BaseModel):
|
|
11
|
+
id: str
|
|
12
|
+
"""The webhook's ID."""
|
|
13
|
+
|
|
14
|
+
created_at: str
|
|
15
|
+
"""Created at timestamp"""
|
|
16
|
+
|
|
17
|
+
description: str
|
|
18
|
+
"""An example webhook name."""
|
|
19
|
+
|
|
20
|
+
metadata: Dict[str, str]
|
|
21
|
+
"""Metadata of the webhook"""
|
|
22
|
+
|
|
23
|
+
updated_at: str
|
|
24
|
+
"""Updated at timestamp"""
|
|
25
|
+
|
|
26
|
+
url: str
|
|
27
|
+
"""Url endpoint of the webhook"""
|
|
28
|
+
|
|
29
|
+
disabled: Optional[bool] = None
|
|
30
|
+
"""Status of the webhook.
|
|
31
|
+
|
|
32
|
+
If true, events are not sent
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
filter_types: Optional[List[str]] = None
|
|
36
|
+
"""Filter events to the webhook.
|
|
37
|
+
|
|
38
|
+
Webhook event will only be sent for events in the list.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
rate_limit: Optional[int] = None
|
|
42
|
+
"""Configured rate limit"""
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, List, Optional
|
|
6
|
+
from typing_extensions import TypedDict
|
|
7
|
+
|
|
8
|
+
from .webhook_event_type import WebhookEventType
|
|
9
|
+
|
|
10
|
+
__all__ = ["WebhookUpdateParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class WebhookUpdateParams(TypedDict, total=False):
|
|
14
|
+
description: Optional[str]
|
|
15
|
+
"""Description of the webhook"""
|
|
16
|
+
|
|
17
|
+
disabled: Optional[bool]
|
|
18
|
+
"""To Disable the endpoint, set it to true."""
|
|
19
|
+
|
|
20
|
+
filter_types: Optional[List[WebhookEventType]]
|
|
21
|
+
"""Filter events to the endpoint.
|
|
22
|
+
|
|
23
|
+
Webhook event will only be sent for events in the list.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
metadata: Optional[Dict[str, str]]
|
|
27
|
+
"""Metadata"""
|
|
28
|
+
|
|
29
|
+
rate_limit: Optional[int]
|
|
30
|
+
"""Rate limit"""
|
|
31
|
+
|
|
32
|
+
url: Optional[str]
|
|
33
|
+
"""Url endpoint"""
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["WebhookUpdateResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class WebhookUpdateResponse(BaseModel):
|
|
11
|
+
id: str
|
|
12
|
+
"""The webhook's ID."""
|
|
13
|
+
|
|
14
|
+
created_at: str
|
|
15
|
+
"""Created at timestamp"""
|
|
16
|
+
|
|
17
|
+
description: str
|
|
18
|
+
"""An example webhook name."""
|
|
19
|
+
|
|
20
|
+
metadata: Dict[str, str]
|
|
21
|
+
"""Metadata of the webhook"""
|
|
22
|
+
|
|
23
|
+
updated_at: str
|
|
24
|
+
"""Updated at timestamp"""
|
|
25
|
+
|
|
26
|
+
url: str
|
|
27
|
+
"""Url endpoint of the webhook"""
|
|
28
|
+
|
|
29
|
+
disabled: Optional[bool] = None
|
|
30
|
+
"""Status of the webhook.
|
|
31
|
+
|
|
32
|
+
If true, events are not sent
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
filter_types: Optional[List[str]] = None
|
|
36
|
+
"""Filter events to the webhook.
|
|
37
|
+
|
|
38
|
+
Webhook event will only be sent for events in the list.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
rate_limit: Optional[int] = None
|
|
42
|
+
"""Configured rate limit"""
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .header_update_params import HeaderUpdateParams as HeaderUpdateParams
|
|
6
|
+
from .header_retrieve_response import HeaderRetrieveResponse as HeaderRetrieveResponse
|