Skip to content

Commit 7a332ee

Browse files
authored
Merge pull request #19 from nevermined-io/feat/pydantic-models
feat: udpate to support pydantic models@
2 parents bf8100d + 5a590bf commit 7a332ee

File tree

18 files changed

+1532
-202
lines changed

18 files changed

+1532
-202
lines changed

docs/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,21 @@
44

55
## Modules
66

7+
- [`data_models`](./data_models.md#module-data_models)
78
- [`environments`](./environments.md#module-environments)
89
- [`payments`](./payments.md#module-payments)
910
- [`utils`](./utils.md#module-utils)
1011

1112
## Classes
1213

14+
- [`data_models.BalanceResultDto`](./data_models.md#class-balanceresultdto)
15+
- [`data_models.BurnResultDto`](./data_models.md#class-burnresultdto)
16+
- [`data_models.CreateAssetResultDto`](./data_models.md#class-createassetresultdto)
17+
- [`data_models.DownloadFileResultDto`](./data_models.md#class-downloadfileresultdto)
18+
- [`data_models.MintResultDto`](./data_models.md#class-mintresultdto)
19+
- [`data_models.OrderSubscriptionResultDto`](./data_models.md#class-ordersubscriptionresultdto)
20+
- [`data_models.ServiceTokenResultDto`](./data_models.md#class-servicetokenresultdto)
21+
- [`data_models.SubscriptionType`](./data_models.md#class-subscriptiontype): An enumeration.
1322
- [`environments.Environment`](./environments.md#class-environment): Enum class to define the different environments
1423
- [`payments.Payments`](./payments.md#class-payments): A class representing a payment system.
1524

docs/data_models.md

Lines changed: 272 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,272 @@
1+
<!-- markdownlint-disable -->
2+
3+
<a href="https://github.com/nevermined-io/payments-py/blob/main/payments_py/data_models.py#L0"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
4+
5+
# <kbd>module</kbd> `data_models`
6+
7+
8+
9+
10+
11+
12+
---
13+
14+
<a href="https://github.com/nevermined-io/payments-py/blob/main/payments_py/data_models.py#L6"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
15+
16+
## <kbd>class</kbd> `SubscriptionType`
17+
An enumeration.
18+
19+
20+
21+
22+
23+
---
24+
25+
<a href="https://github.com/nevermined-io/payments-py/blob/main/payments_py/data_models.py#L11"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
26+
27+
## <kbd>class</kbd> `BalanceResultDto`
28+
29+
30+
31+
32+
33+
---
34+
35+
#### <kbd>property</kbd> model_extra
36+
37+
Get extra fields set during validation.
38+
39+
40+
41+
**Returns:**
42+
A dictionary of extra fields, or `None` if `config.extra` is not set to `"allow"`.
43+
44+
---
45+
46+
#### <kbd>property</kbd> model_fields_set
47+
48+
Returns the set of fields that have been explicitly set on this model instance.
49+
50+
51+
52+
**Returns:**
53+
A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
54+
55+
56+
57+
58+
---
59+
60+
<a href="https://github.com/nevermined-io/payments-py/blob/main/payments_py/data_models.py#L27"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
61+
62+
## <kbd>class</kbd> `MintResultDto`
63+
64+
65+
66+
67+
68+
---
69+
70+
#### <kbd>property</kbd> model_extra
71+
72+
Get extra fields set during validation.
73+
74+
75+
76+
**Returns:**
77+
A dictionary of extra fields, or `None` if `config.extra` is not set to `"allow"`.
78+
79+
---
80+
81+
#### <kbd>property</kbd> model_fields_set
82+
83+
Returns the set of fields that have been explicitly set on this model instance.
84+
85+
86+
87+
**Returns:**
88+
A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
89+
90+
91+
92+
93+
---
94+
95+
<a href="https://github.com/nevermined-io/payments-py/blob/main/payments_py/data_models.py#L41"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
96+
97+
## <kbd>class</kbd> `BurnResultDto`
98+
99+
100+
101+
102+
103+
---
104+
105+
#### <kbd>property</kbd> model_extra
106+
107+
Get extra fields set during validation.
108+
109+
110+
111+
**Returns:**
112+
A dictionary of extra fields, or `None` if `config.extra` is not set to `"allow"`.
113+
114+
---
115+
116+
#### <kbd>property</kbd> model_fields_set
117+
118+
Returns the set of fields that have been explicitly set on this model instance.
119+
120+
121+
122+
**Returns:**
123+
A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
124+
125+
126+
127+
128+
---
129+
130+
<a href="https://github.com/nevermined-io/payments-py/blob/main/payments_py/data_models.py#L55"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
131+
132+
## <kbd>class</kbd> `CreateAssetResultDto`
133+
134+
135+
136+
137+
138+
---
139+
140+
#### <kbd>property</kbd> model_extra
141+
142+
Get extra fields set during validation.
143+
144+
145+
146+
**Returns:**
147+
A dictionary of extra fields, or `None` if `config.extra` is not set to `"allow"`.
148+
149+
---
150+
151+
#### <kbd>property</kbd> model_fields_set
152+
153+
Returns the set of fields that have been explicitly set on this model instance.
154+
155+
156+
157+
**Returns:**
158+
A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
159+
160+
161+
162+
163+
---
164+
165+
<a href="https://github.com/nevermined-io/payments-py/blob/main/payments_py/data_models.py#L65"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
166+
167+
## <kbd>class</kbd> `DownloadFileResultDto`
168+
169+
170+
171+
172+
173+
---
174+
175+
#### <kbd>property</kbd> model_extra
176+
177+
Get extra fields set during validation.
178+
179+
180+
181+
**Returns:**
182+
A dictionary of extra fields, or `None` if `config.extra` is not set to `"allow"`.
183+
184+
---
185+
186+
#### <kbd>property</kbd> model_fields_set
187+
188+
Returns the set of fields that have been explicitly set on this model instance.
189+
190+
191+
192+
**Returns:**
193+
A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
194+
195+
196+
197+
198+
---
199+
200+
<a href="https://github.com/nevermined-io/payments-py/blob/main/payments_py/data_models.py#L75"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
201+
202+
## <kbd>class</kbd> `OrderSubscriptionResultDto`
203+
204+
205+
206+
207+
208+
---
209+
210+
#### <kbd>property</kbd> model_extra
211+
212+
Get extra fields set during validation.
213+
214+
215+
216+
**Returns:**
217+
A dictionary of extra fields, or `None` if `config.extra` is not set to `"allow"`.
218+
219+
---
220+
221+
#### <kbd>property</kbd> model_fields_set
222+
223+
Returns the set of fields that have been explicitly set on this model instance.
224+
225+
226+
227+
**Returns:**
228+
A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
229+
230+
231+
232+
233+
---
234+
235+
<a href="https://github.com/nevermined-io/payments-py/blob/main/payments_py/data_models.py#L87"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
236+
237+
## <kbd>class</kbd> `ServiceTokenResultDto`
238+
239+
240+
241+
242+
243+
---
244+
245+
#### <kbd>property</kbd> model_extra
246+
247+
Get extra fields set during validation.
248+
249+
250+
251+
**Returns:**
252+
A dictionary of extra fields, or `None` if `config.extra` is not set to `"allow"`.
253+
254+
---
255+
256+
#### <kbd>property</kbd> model_fields_set
257+
258+
Returns the set of fields that have been explicitly set on this model instance.
259+
260+
261+
262+
**Returns:**
263+
A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
264+
265+
266+
267+
268+
269+
270+
---
271+
272+
_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._

0 commit comments

Comments
 (0)