dodopayments 1.78.0__py3-none-any.whl → 1.81.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.
- dodopayments/_client.py +38 -0
- dodopayments/_version.py +1 -1
- dodopayments/resources/__init__.py +14 -0
- dodopayments/resources/balances.py +576 -0
- dodopayments/resources/checkout_sessions.py +35 -25
- dodopayments/resources/subscriptions.py +40 -0
- dodopayments/types/__init__.py +12 -0
- dodopayments/types/balance_ledger_entry.py +55 -0
- dodopayments/types/balance_retrieve_ledger_params.py +204 -0
- dodopayments/types/checkout_session_billing_address_param.py +27 -0
- dodopayments/types/checkout_session_create_params.py +14 -309
- dodopayments/types/checkout_session_customization_param.py +36 -0
- dodopayments/types/checkout_session_flags_param.py +61 -0
- dodopayments/types/checkout_session_preview_params.py +14 -309
- dodopayments/types/custom_field_param.py +32 -0
- dodopayments/types/payment.py +7 -0
- dodopayments/types/product_item_req_param.py +31 -0
- dodopayments/types/subscription_change_plan_params.py +10 -0
- dodopayments/types/subscription_data_param.py +20 -0
- dodopayments/types/subscription_preview_change_plan_params.py +10 -0
- dodopayments/types/theme_config_param.py +38 -0
- dodopayments/types/theme_mode_config_param.py +71 -0
- {dodopayments-1.78.0.dist-info → dodopayments-1.81.0.dist-info}/METADATA +1 -1
- {dodopayments-1.78.0.dist-info → dodopayments-1.81.0.dist-info}/RECORD +26 -15
- {dodopayments-1.78.0.dist-info → dodopayments-1.81.0.dist-info}/WHEEL +0 -0
- {dodopayments-1.78.0.dist-info → dodopayments-1.81.0.dist-info}/licenses/LICENSE +0 -0
dodopayments/_client.py
CHANGED
|
@@ -38,6 +38,7 @@ if TYPE_CHECKING:
|
|
|
38
38
|
meters,
|
|
39
39
|
payouts,
|
|
40
40
|
refunds,
|
|
41
|
+
balances,
|
|
41
42
|
disputes,
|
|
42
43
|
invoices,
|
|
43
44
|
licenses,
|
|
@@ -58,6 +59,7 @@ if TYPE_CHECKING:
|
|
|
58
59
|
from .resources.meters import MetersResource, AsyncMetersResource
|
|
59
60
|
from .resources.payouts import PayoutsResource, AsyncPayoutsResource
|
|
60
61
|
from .resources.refunds import RefundsResource, AsyncRefundsResource
|
|
62
|
+
from .resources.balances import BalancesResource, AsyncBalancesResource
|
|
61
63
|
from .resources.disputes import DisputesResource, AsyncDisputesResource
|
|
62
64
|
from .resources.licenses import LicensesResource, AsyncLicensesResource
|
|
63
65
|
from .resources.payments import PaymentsResource, AsyncPaymentsResource
|
|
@@ -291,6 +293,12 @@ class DodoPayments(SyncAPIClient):
|
|
|
291
293
|
|
|
292
294
|
return MetersResource(self)
|
|
293
295
|
|
|
296
|
+
@cached_property
|
|
297
|
+
def balances(self) -> BalancesResource:
|
|
298
|
+
from .resources.balances import BalancesResource
|
|
299
|
+
|
|
300
|
+
return BalancesResource(self)
|
|
301
|
+
|
|
294
302
|
@cached_property
|
|
295
303
|
def with_raw_response(self) -> DodoPaymentsWithRawResponse:
|
|
296
304
|
return DodoPaymentsWithRawResponse(self)
|
|
@@ -609,6 +617,12 @@ class AsyncDodoPayments(AsyncAPIClient):
|
|
|
609
617
|
|
|
610
618
|
return AsyncMetersResource(self)
|
|
611
619
|
|
|
620
|
+
@cached_property
|
|
621
|
+
def balances(self) -> AsyncBalancesResource:
|
|
622
|
+
from .resources.balances import AsyncBalancesResource
|
|
623
|
+
|
|
624
|
+
return AsyncBalancesResource(self)
|
|
625
|
+
|
|
612
626
|
@cached_property
|
|
613
627
|
def with_raw_response(self) -> AsyncDodoPaymentsWithRawResponse:
|
|
614
628
|
return AsyncDodoPaymentsWithRawResponse(self)
|
|
@@ -846,6 +860,12 @@ class DodoPaymentsWithRawResponse:
|
|
|
846
860
|
|
|
847
861
|
return MetersResourceWithRawResponse(self._client.meters)
|
|
848
862
|
|
|
863
|
+
@cached_property
|
|
864
|
+
def balances(self) -> balances.BalancesResourceWithRawResponse:
|
|
865
|
+
from .resources.balances import BalancesResourceWithRawResponse
|
|
866
|
+
|
|
867
|
+
return BalancesResourceWithRawResponse(self._client.balances)
|
|
868
|
+
|
|
849
869
|
|
|
850
870
|
class AsyncDodoPaymentsWithRawResponse:
|
|
851
871
|
_client: AsyncDodoPayments
|
|
@@ -967,6 +987,12 @@ class AsyncDodoPaymentsWithRawResponse:
|
|
|
967
987
|
|
|
968
988
|
return AsyncMetersResourceWithRawResponse(self._client.meters)
|
|
969
989
|
|
|
990
|
+
@cached_property
|
|
991
|
+
def balances(self) -> balances.AsyncBalancesResourceWithRawResponse:
|
|
992
|
+
from .resources.balances import AsyncBalancesResourceWithRawResponse
|
|
993
|
+
|
|
994
|
+
return AsyncBalancesResourceWithRawResponse(self._client.balances)
|
|
995
|
+
|
|
970
996
|
|
|
971
997
|
class DodoPaymentsWithStreamedResponse:
|
|
972
998
|
_client: DodoPayments
|
|
@@ -1088,6 +1114,12 @@ class DodoPaymentsWithStreamedResponse:
|
|
|
1088
1114
|
|
|
1089
1115
|
return MetersResourceWithStreamingResponse(self._client.meters)
|
|
1090
1116
|
|
|
1117
|
+
@cached_property
|
|
1118
|
+
def balances(self) -> balances.BalancesResourceWithStreamingResponse:
|
|
1119
|
+
from .resources.balances import BalancesResourceWithStreamingResponse
|
|
1120
|
+
|
|
1121
|
+
return BalancesResourceWithStreamingResponse(self._client.balances)
|
|
1122
|
+
|
|
1091
1123
|
|
|
1092
1124
|
class AsyncDodoPaymentsWithStreamedResponse:
|
|
1093
1125
|
_client: AsyncDodoPayments
|
|
@@ -1209,6 +1241,12 @@ class AsyncDodoPaymentsWithStreamedResponse:
|
|
|
1209
1241
|
|
|
1210
1242
|
return AsyncMetersResourceWithStreamingResponse(self._client.meters)
|
|
1211
1243
|
|
|
1244
|
+
@cached_property
|
|
1245
|
+
def balances(self) -> balances.AsyncBalancesResourceWithStreamingResponse:
|
|
1246
|
+
from .resources.balances import AsyncBalancesResourceWithStreamingResponse
|
|
1247
|
+
|
|
1248
|
+
return AsyncBalancesResourceWithStreamingResponse(self._client.balances)
|
|
1249
|
+
|
|
1212
1250
|
|
|
1213
1251
|
Client = DodoPayments
|
|
1214
1252
|
|
dodopayments/_version.py
CHANGED
|
@@ -48,6 +48,14 @@ from .refunds import (
|
|
|
48
48
|
RefundsResourceWithStreamingResponse,
|
|
49
49
|
AsyncRefundsResourceWithStreamingResponse,
|
|
50
50
|
)
|
|
51
|
+
from .balances import (
|
|
52
|
+
BalancesResource,
|
|
53
|
+
AsyncBalancesResource,
|
|
54
|
+
BalancesResourceWithRawResponse,
|
|
55
|
+
AsyncBalancesResourceWithRawResponse,
|
|
56
|
+
BalancesResourceWithStreamingResponse,
|
|
57
|
+
AsyncBalancesResourceWithStreamingResponse,
|
|
58
|
+
)
|
|
51
59
|
from .disputes import (
|
|
52
60
|
DisputesResource,
|
|
53
61
|
AsyncDisputesResource,
|
|
@@ -268,4 +276,10 @@ __all__ = [
|
|
|
268
276
|
"AsyncMetersResourceWithRawResponse",
|
|
269
277
|
"MetersResourceWithStreamingResponse",
|
|
270
278
|
"AsyncMetersResourceWithStreamingResponse",
|
|
279
|
+
"BalancesResource",
|
|
280
|
+
"AsyncBalancesResource",
|
|
281
|
+
"BalancesResourceWithRawResponse",
|
|
282
|
+
"AsyncBalancesResourceWithRawResponse",
|
|
283
|
+
"BalancesResourceWithStreamingResponse",
|
|
284
|
+
"AsyncBalancesResourceWithStreamingResponse",
|
|
271
285
|
]
|
|
@@ -0,0 +1,576 @@
|
|
|
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
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Literal
|
|
8
|
+
|
|
9
|
+
import httpx
|
|
10
|
+
|
|
11
|
+
from ..types import balance_retrieve_ledger_params
|
|
12
|
+
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
13
|
+
from .._utils import maybe_transform
|
|
14
|
+
from .._compat import cached_property
|
|
15
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
16
|
+
from .._response import (
|
|
17
|
+
to_raw_response_wrapper,
|
|
18
|
+
to_streamed_response_wrapper,
|
|
19
|
+
async_to_raw_response_wrapper,
|
|
20
|
+
async_to_streamed_response_wrapper,
|
|
21
|
+
)
|
|
22
|
+
from ..pagination import SyncDefaultPageNumberPagination, AsyncDefaultPageNumberPagination
|
|
23
|
+
from .._base_client import AsyncPaginator, make_request_options
|
|
24
|
+
from ..types.balance_ledger_entry import BalanceLedgerEntry
|
|
25
|
+
|
|
26
|
+
__all__ = ["BalancesResource", "AsyncBalancesResource"]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class BalancesResource(SyncAPIResource):
|
|
30
|
+
@cached_property
|
|
31
|
+
def with_raw_response(self) -> BalancesResourceWithRawResponse:
|
|
32
|
+
"""
|
|
33
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
34
|
+
the raw response object instead of the parsed content.
|
|
35
|
+
|
|
36
|
+
For more information, see https://www.github.com/dodopayments/dodopayments-python#accessing-raw-response-data-eg-headers
|
|
37
|
+
"""
|
|
38
|
+
return BalancesResourceWithRawResponse(self)
|
|
39
|
+
|
|
40
|
+
@cached_property
|
|
41
|
+
def with_streaming_response(self) -> BalancesResourceWithStreamingResponse:
|
|
42
|
+
"""
|
|
43
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
44
|
+
|
|
45
|
+
For more information, see https://www.github.com/dodopayments/dodopayments-python#with_streaming_response
|
|
46
|
+
"""
|
|
47
|
+
return BalancesResourceWithStreamingResponse(self)
|
|
48
|
+
|
|
49
|
+
def retrieve_ledger(
|
|
50
|
+
self,
|
|
51
|
+
*,
|
|
52
|
+
created_at_gte: Union[str, datetime] | Omit = omit,
|
|
53
|
+
created_at_lte: Union[str, datetime] | Omit = omit,
|
|
54
|
+
currency: Literal[
|
|
55
|
+
"AED",
|
|
56
|
+
"ALL",
|
|
57
|
+
"AMD",
|
|
58
|
+
"ANG",
|
|
59
|
+
"AOA",
|
|
60
|
+
"ARS",
|
|
61
|
+
"AUD",
|
|
62
|
+
"AWG",
|
|
63
|
+
"AZN",
|
|
64
|
+
"BAM",
|
|
65
|
+
"BBD",
|
|
66
|
+
"BDT",
|
|
67
|
+
"BGN",
|
|
68
|
+
"BHD",
|
|
69
|
+
"BIF",
|
|
70
|
+
"BMD",
|
|
71
|
+
"BND",
|
|
72
|
+
"BOB",
|
|
73
|
+
"BRL",
|
|
74
|
+
"BSD",
|
|
75
|
+
"BWP",
|
|
76
|
+
"BYN",
|
|
77
|
+
"BZD",
|
|
78
|
+
"CAD",
|
|
79
|
+
"CHF",
|
|
80
|
+
"CLP",
|
|
81
|
+
"CNY",
|
|
82
|
+
"COP",
|
|
83
|
+
"CRC",
|
|
84
|
+
"CUP",
|
|
85
|
+
"CVE",
|
|
86
|
+
"CZK",
|
|
87
|
+
"DJF",
|
|
88
|
+
"DKK",
|
|
89
|
+
"DOP",
|
|
90
|
+
"DZD",
|
|
91
|
+
"EGP",
|
|
92
|
+
"ETB",
|
|
93
|
+
"EUR",
|
|
94
|
+
"FJD",
|
|
95
|
+
"FKP",
|
|
96
|
+
"GBP",
|
|
97
|
+
"GEL",
|
|
98
|
+
"GHS",
|
|
99
|
+
"GIP",
|
|
100
|
+
"GMD",
|
|
101
|
+
"GNF",
|
|
102
|
+
"GTQ",
|
|
103
|
+
"GYD",
|
|
104
|
+
"HKD",
|
|
105
|
+
"HNL",
|
|
106
|
+
"HRK",
|
|
107
|
+
"HTG",
|
|
108
|
+
"HUF",
|
|
109
|
+
"IDR",
|
|
110
|
+
"ILS",
|
|
111
|
+
"INR",
|
|
112
|
+
"IQD",
|
|
113
|
+
"JMD",
|
|
114
|
+
"JOD",
|
|
115
|
+
"JPY",
|
|
116
|
+
"KES",
|
|
117
|
+
"KGS",
|
|
118
|
+
"KHR",
|
|
119
|
+
"KMF",
|
|
120
|
+
"KRW",
|
|
121
|
+
"KWD",
|
|
122
|
+
"KYD",
|
|
123
|
+
"KZT",
|
|
124
|
+
"LAK",
|
|
125
|
+
"LBP",
|
|
126
|
+
"LKR",
|
|
127
|
+
"LRD",
|
|
128
|
+
"LSL",
|
|
129
|
+
"LYD",
|
|
130
|
+
"MAD",
|
|
131
|
+
"MDL",
|
|
132
|
+
"MGA",
|
|
133
|
+
"MKD",
|
|
134
|
+
"MMK",
|
|
135
|
+
"MNT",
|
|
136
|
+
"MOP",
|
|
137
|
+
"MRU",
|
|
138
|
+
"MUR",
|
|
139
|
+
"MVR",
|
|
140
|
+
"MWK",
|
|
141
|
+
"MXN",
|
|
142
|
+
"MYR",
|
|
143
|
+
"MZN",
|
|
144
|
+
"NAD",
|
|
145
|
+
"NGN",
|
|
146
|
+
"NIO",
|
|
147
|
+
"NOK",
|
|
148
|
+
"NPR",
|
|
149
|
+
"NZD",
|
|
150
|
+
"OMR",
|
|
151
|
+
"PAB",
|
|
152
|
+
"PEN",
|
|
153
|
+
"PGK",
|
|
154
|
+
"PHP",
|
|
155
|
+
"PKR",
|
|
156
|
+
"PLN",
|
|
157
|
+
"PYG",
|
|
158
|
+
"QAR",
|
|
159
|
+
"RON",
|
|
160
|
+
"RSD",
|
|
161
|
+
"RUB",
|
|
162
|
+
"RWF",
|
|
163
|
+
"SAR",
|
|
164
|
+
"SBD",
|
|
165
|
+
"SCR",
|
|
166
|
+
"SEK",
|
|
167
|
+
"SGD",
|
|
168
|
+
"SHP",
|
|
169
|
+
"SLE",
|
|
170
|
+
"SLL",
|
|
171
|
+
"SOS",
|
|
172
|
+
"SRD",
|
|
173
|
+
"SSP",
|
|
174
|
+
"STN",
|
|
175
|
+
"SVC",
|
|
176
|
+
"SZL",
|
|
177
|
+
"THB",
|
|
178
|
+
"TND",
|
|
179
|
+
"TOP",
|
|
180
|
+
"TRY",
|
|
181
|
+
"TTD",
|
|
182
|
+
"TWD",
|
|
183
|
+
"TZS",
|
|
184
|
+
"UAH",
|
|
185
|
+
"UGX",
|
|
186
|
+
"USD",
|
|
187
|
+
"UYU",
|
|
188
|
+
"UZS",
|
|
189
|
+
"VES",
|
|
190
|
+
"VND",
|
|
191
|
+
"VUV",
|
|
192
|
+
"WST",
|
|
193
|
+
"XAF",
|
|
194
|
+
"XCD",
|
|
195
|
+
"XOF",
|
|
196
|
+
"XPF",
|
|
197
|
+
"YER",
|
|
198
|
+
"ZAR",
|
|
199
|
+
"ZMW",
|
|
200
|
+
]
|
|
201
|
+
| Omit = omit,
|
|
202
|
+
event_type: Literal[
|
|
203
|
+
"payment",
|
|
204
|
+
"refund",
|
|
205
|
+
"refund_reversal",
|
|
206
|
+
"dispute",
|
|
207
|
+
"dispute_reversal",
|
|
208
|
+
"tax",
|
|
209
|
+
"tax_reversal",
|
|
210
|
+
"payment_fees",
|
|
211
|
+
"refund_fees",
|
|
212
|
+
"refund_fees_reversal",
|
|
213
|
+
"dispute_fees",
|
|
214
|
+
"payout",
|
|
215
|
+
"payout_fees",
|
|
216
|
+
"payout_reversal",
|
|
217
|
+
"payout_fees_reversal",
|
|
218
|
+
"dodo_credits",
|
|
219
|
+
"adjustment",
|
|
220
|
+
"currency_conversion",
|
|
221
|
+
]
|
|
222
|
+
| Omit = omit,
|
|
223
|
+
limit: int | Omit = omit,
|
|
224
|
+
page_number: int | Omit = omit,
|
|
225
|
+
page_size: int | Omit = omit,
|
|
226
|
+
reference_object_id: str | Omit = omit,
|
|
227
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
228
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
229
|
+
extra_headers: Headers | None = None,
|
|
230
|
+
extra_query: Query | None = None,
|
|
231
|
+
extra_body: Body | None = None,
|
|
232
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
233
|
+
) -> SyncDefaultPageNumberPagination[BalanceLedgerEntry]:
|
|
234
|
+
"""
|
|
235
|
+
Args:
|
|
236
|
+
created_at_gte: Get events after this created time
|
|
237
|
+
|
|
238
|
+
created_at_lte: Get events created before this time
|
|
239
|
+
|
|
240
|
+
currency: Filter by currency
|
|
241
|
+
|
|
242
|
+
event_type: Filter by Ledger Event Type
|
|
243
|
+
|
|
244
|
+
limit: Min : 1, Max : 100, default 10
|
|
245
|
+
|
|
246
|
+
page_number: Page number default is 0
|
|
247
|
+
|
|
248
|
+
page_size: Page size default is 10 max is 100
|
|
249
|
+
|
|
250
|
+
reference_object_id: Get events history of a specific object like payment/subscription/refund/dispute
|
|
251
|
+
|
|
252
|
+
extra_headers: Send extra headers
|
|
253
|
+
|
|
254
|
+
extra_query: Add additional query parameters to the request
|
|
255
|
+
|
|
256
|
+
extra_body: Add additional JSON properties to the request
|
|
257
|
+
|
|
258
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
259
|
+
"""
|
|
260
|
+
return self._get_api_list(
|
|
261
|
+
"/balances/ledger",
|
|
262
|
+
page=SyncDefaultPageNumberPagination[BalanceLedgerEntry],
|
|
263
|
+
options=make_request_options(
|
|
264
|
+
extra_headers=extra_headers,
|
|
265
|
+
extra_query=extra_query,
|
|
266
|
+
extra_body=extra_body,
|
|
267
|
+
timeout=timeout,
|
|
268
|
+
query=maybe_transform(
|
|
269
|
+
{
|
|
270
|
+
"created_at_gte": created_at_gte,
|
|
271
|
+
"created_at_lte": created_at_lte,
|
|
272
|
+
"currency": currency,
|
|
273
|
+
"event_type": event_type,
|
|
274
|
+
"limit": limit,
|
|
275
|
+
"page_number": page_number,
|
|
276
|
+
"page_size": page_size,
|
|
277
|
+
"reference_object_id": reference_object_id,
|
|
278
|
+
},
|
|
279
|
+
balance_retrieve_ledger_params.BalanceRetrieveLedgerParams,
|
|
280
|
+
),
|
|
281
|
+
),
|
|
282
|
+
model=BalanceLedgerEntry,
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
class AsyncBalancesResource(AsyncAPIResource):
|
|
287
|
+
@cached_property
|
|
288
|
+
def with_raw_response(self) -> AsyncBalancesResourceWithRawResponse:
|
|
289
|
+
"""
|
|
290
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
291
|
+
the raw response object instead of the parsed content.
|
|
292
|
+
|
|
293
|
+
For more information, see https://www.github.com/dodopayments/dodopayments-python#accessing-raw-response-data-eg-headers
|
|
294
|
+
"""
|
|
295
|
+
return AsyncBalancesResourceWithRawResponse(self)
|
|
296
|
+
|
|
297
|
+
@cached_property
|
|
298
|
+
def with_streaming_response(self) -> AsyncBalancesResourceWithStreamingResponse:
|
|
299
|
+
"""
|
|
300
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
301
|
+
|
|
302
|
+
For more information, see https://www.github.com/dodopayments/dodopayments-python#with_streaming_response
|
|
303
|
+
"""
|
|
304
|
+
return AsyncBalancesResourceWithStreamingResponse(self)
|
|
305
|
+
|
|
306
|
+
def retrieve_ledger(
|
|
307
|
+
self,
|
|
308
|
+
*,
|
|
309
|
+
created_at_gte: Union[str, datetime] | Omit = omit,
|
|
310
|
+
created_at_lte: Union[str, datetime] | Omit = omit,
|
|
311
|
+
currency: Literal[
|
|
312
|
+
"AED",
|
|
313
|
+
"ALL",
|
|
314
|
+
"AMD",
|
|
315
|
+
"ANG",
|
|
316
|
+
"AOA",
|
|
317
|
+
"ARS",
|
|
318
|
+
"AUD",
|
|
319
|
+
"AWG",
|
|
320
|
+
"AZN",
|
|
321
|
+
"BAM",
|
|
322
|
+
"BBD",
|
|
323
|
+
"BDT",
|
|
324
|
+
"BGN",
|
|
325
|
+
"BHD",
|
|
326
|
+
"BIF",
|
|
327
|
+
"BMD",
|
|
328
|
+
"BND",
|
|
329
|
+
"BOB",
|
|
330
|
+
"BRL",
|
|
331
|
+
"BSD",
|
|
332
|
+
"BWP",
|
|
333
|
+
"BYN",
|
|
334
|
+
"BZD",
|
|
335
|
+
"CAD",
|
|
336
|
+
"CHF",
|
|
337
|
+
"CLP",
|
|
338
|
+
"CNY",
|
|
339
|
+
"COP",
|
|
340
|
+
"CRC",
|
|
341
|
+
"CUP",
|
|
342
|
+
"CVE",
|
|
343
|
+
"CZK",
|
|
344
|
+
"DJF",
|
|
345
|
+
"DKK",
|
|
346
|
+
"DOP",
|
|
347
|
+
"DZD",
|
|
348
|
+
"EGP",
|
|
349
|
+
"ETB",
|
|
350
|
+
"EUR",
|
|
351
|
+
"FJD",
|
|
352
|
+
"FKP",
|
|
353
|
+
"GBP",
|
|
354
|
+
"GEL",
|
|
355
|
+
"GHS",
|
|
356
|
+
"GIP",
|
|
357
|
+
"GMD",
|
|
358
|
+
"GNF",
|
|
359
|
+
"GTQ",
|
|
360
|
+
"GYD",
|
|
361
|
+
"HKD",
|
|
362
|
+
"HNL",
|
|
363
|
+
"HRK",
|
|
364
|
+
"HTG",
|
|
365
|
+
"HUF",
|
|
366
|
+
"IDR",
|
|
367
|
+
"ILS",
|
|
368
|
+
"INR",
|
|
369
|
+
"IQD",
|
|
370
|
+
"JMD",
|
|
371
|
+
"JOD",
|
|
372
|
+
"JPY",
|
|
373
|
+
"KES",
|
|
374
|
+
"KGS",
|
|
375
|
+
"KHR",
|
|
376
|
+
"KMF",
|
|
377
|
+
"KRW",
|
|
378
|
+
"KWD",
|
|
379
|
+
"KYD",
|
|
380
|
+
"KZT",
|
|
381
|
+
"LAK",
|
|
382
|
+
"LBP",
|
|
383
|
+
"LKR",
|
|
384
|
+
"LRD",
|
|
385
|
+
"LSL",
|
|
386
|
+
"LYD",
|
|
387
|
+
"MAD",
|
|
388
|
+
"MDL",
|
|
389
|
+
"MGA",
|
|
390
|
+
"MKD",
|
|
391
|
+
"MMK",
|
|
392
|
+
"MNT",
|
|
393
|
+
"MOP",
|
|
394
|
+
"MRU",
|
|
395
|
+
"MUR",
|
|
396
|
+
"MVR",
|
|
397
|
+
"MWK",
|
|
398
|
+
"MXN",
|
|
399
|
+
"MYR",
|
|
400
|
+
"MZN",
|
|
401
|
+
"NAD",
|
|
402
|
+
"NGN",
|
|
403
|
+
"NIO",
|
|
404
|
+
"NOK",
|
|
405
|
+
"NPR",
|
|
406
|
+
"NZD",
|
|
407
|
+
"OMR",
|
|
408
|
+
"PAB",
|
|
409
|
+
"PEN",
|
|
410
|
+
"PGK",
|
|
411
|
+
"PHP",
|
|
412
|
+
"PKR",
|
|
413
|
+
"PLN",
|
|
414
|
+
"PYG",
|
|
415
|
+
"QAR",
|
|
416
|
+
"RON",
|
|
417
|
+
"RSD",
|
|
418
|
+
"RUB",
|
|
419
|
+
"RWF",
|
|
420
|
+
"SAR",
|
|
421
|
+
"SBD",
|
|
422
|
+
"SCR",
|
|
423
|
+
"SEK",
|
|
424
|
+
"SGD",
|
|
425
|
+
"SHP",
|
|
426
|
+
"SLE",
|
|
427
|
+
"SLL",
|
|
428
|
+
"SOS",
|
|
429
|
+
"SRD",
|
|
430
|
+
"SSP",
|
|
431
|
+
"STN",
|
|
432
|
+
"SVC",
|
|
433
|
+
"SZL",
|
|
434
|
+
"THB",
|
|
435
|
+
"TND",
|
|
436
|
+
"TOP",
|
|
437
|
+
"TRY",
|
|
438
|
+
"TTD",
|
|
439
|
+
"TWD",
|
|
440
|
+
"TZS",
|
|
441
|
+
"UAH",
|
|
442
|
+
"UGX",
|
|
443
|
+
"USD",
|
|
444
|
+
"UYU",
|
|
445
|
+
"UZS",
|
|
446
|
+
"VES",
|
|
447
|
+
"VND",
|
|
448
|
+
"VUV",
|
|
449
|
+
"WST",
|
|
450
|
+
"XAF",
|
|
451
|
+
"XCD",
|
|
452
|
+
"XOF",
|
|
453
|
+
"XPF",
|
|
454
|
+
"YER",
|
|
455
|
+
"ZAR",
|
|
456
|
+
"ZMW",
|
|
457
|
+
]
|
|
458
|
+
| Omit = omit,
|
|
459
|
+
event_type: Literal[
|
|
460
|
+
"payment",
|
|
461
|
+
"refund",
|
|
462
|
+
"refund_reversal",
|
|
463
|
+
"dispute",
|
|
464
|
+
"dispute_reversal",
|
|
465
|
+
"tax",
|
|
466
|
+
"tax_reversal",
|
|
467
|
+
"payment_fees",
|
|
468
|
+
"refund_fees",
|
|
469
|
+
"refund_fees_reversal",
|
|
470
|
+
"dispute_fees",
|
|
471
|
+
"payout",
|
|
472
|
+
"payout_fees",
|
|
473
|
+
"payout_reversal",
|
|
474
|
+
"payout_fees_reversal",
|
|
475
|
+
"dodo_credits",
|
|
476
|
+
"adjustment",
|
|
477
|
+
"currency_conversion",
|
|
478
|
+
]
|
|
479
|
+
| Omit = omit,
|
|
480
|
+
limit: int | Omit = omit,
|
|
481
|
+
page_number: int | Omit = omit,
|
|
482
|
+
page_size: int | Omit = omit,
|
|
483
|
+
reference_object_id: str | Omit = omit,
|
|
484
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
485
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
486
|
+
extra_headers: Headers | None = None,
|
|
487
|
+
extra_query: Query | None = None,
|
|
488
|
+
extra_body: Body | None = None,
|
|
489
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
490
|
+
) -> AsyncPaginator[BalanceLedgerEntry, AsyncDefaultPageNumberPagination[BalanceLedgerEntry]]:
|
|
491
|
+
"""
|
|
492
|
+
Args:
|
|
493
|
+
created_at_gte: Get events after this created time
|
|
494
|
+
|
|
495
|
+
created_at_lte: Get events created before this time
|
|
496
|
+
|
|
497
|
+
currency: Filter by currency
|
|
498
|
+
|
|
499
|
+
event_type: Filter by Ledger Event Type
|
|
500
|
+
|
|
501
|
+
limit: Min : 1, Max : 100, default 10
|
|
502
|
+
|
|
503
|
+
page_number: Page number default is 0
|
|
504
|
+
|
|
505
|
+
page_size: Page size default is 10 max is 100
|
|
506
|
+
|
|
507
|
+
reference_object_id: Get events history of a specific object like payment/subscription/refund/dispute
|
|
508
|
+
|
|
509
|
+
extra_headers: Send extra headers
|
|
510
|
+
|
|
511
|
+
extra_query: Add additional query parameters to the request
|
|
512
|
+
|
|
513
|
+
extra_body: Add additional JSON properties to the request
|
|
514
|
+
|
|
515
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
516
|
+
"""
|
|
517
|
+
return self._get_api_list(
|
|
518
|
+
"/balances/ledger",
|
|
519
|
+
page=AsyncDefaultPageNumberPagination[BalanceLedgerEntry],
|
|
520
|
+
options=make_request_options(
|
|
521
|
+
extra_headers=extra_headers,
|
|
522
|
+
extra_query=extra_query,
|
|
523
|
+
extra_body=extra_body,
|
|
524
|
+
timeout=timeout,
|
|
525
|
+
query=maybe_transform(
|
|
526
|
+
{
|
|
527
|
+
"created_at_gte": created_at_gte,
|
|
528
|
+
"created_at_lte": created_at_lte,
|
|
529
|
+
"currency": currency,
|
|
530
|
+
"event_type": event_type,
|
|
531
|
+
"limit": limit,
|
|
532
|
+
"page_number": page_number,
|
|
533
|
+
"page_size": page_size,
|
|
534
|
+
"reference_object_id": reference_object_id,
|
|
535
|
+
},
|
|
536
|
+
balance_retrieve_ledger_params.BalanceRetrieveLedgerParams,
|
|
537
|
+
),
|
|
538
|
+
),
|
|
539
|
+
model=BalanceLedgerEntry,
|
|
540
|
+
)
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
class BalancesResourceWithRawResponse:
|
|
544
|
+
def __init__(self, balances: BalancesResource) -> None:
|
|
545
|
+
self._balances = balances
|
|
546
|
+
|
|
547
|
+
self.retrieve_ledger = to_raw_response_wrapper(
|
|
548
|
+
balances.retrieve_ledger,
|
|
549
|
+
)
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
class AsyncBalancesResourceWithRawResponse:
|
|
553
|
+
def __init__(self, balances: AsyncBalancesResource) -> None:
|
|
554
|
+
self._balances = balances
|
|
555
|
+
|
|
556
|
+
self.retrieve_ledger = async_to_raw_response_wrapper(
|
|
557
|
+
balances.retrieve_ledger,
|
|
558
|
+
)
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
class BalancesResourceWithStreamingResponse:
|
|
562
|
+
def __init__(self, balances: BalancesResource) -> None:
|
|
563
|
+
self._balances = balances
|
|
564
|
+
|
|
565
|
+
self.retrieve_ledger = to_streamed_response_wrapper(
|
|
566
|
+
balances.retrieve_ledger,
|
|
567
|
+
)
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
class AsyncBalancesResourceWithStreamingResponse:
|
|
571
|
+
def __init__(self, balances: AsyncBalancesResource) -> None:
|
|
572
|
+
self._balances = balances
|
|
573
|
+
|
|
574
|
+
self.retrieve_ledger = async_to_streamed_response_wrapper(
|
|
575
|
+
balances.retrieve_ledger,
|
|
576
|
+
)
|