pyznuny 0.0.6__py3-none-any.whl → 0.0.7__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyznuny
3
- Version: 0.0.6
3
+ Version: 0.0.7
4
4
  Summary: A Python client for interacting with the Znuny ticketing system API.
5
5
  Author-email: Junior Rosa <jr.dasrosas@gmail.com>, Pablo Gascon <pablogasconiel445@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/Junior-Rosa/py-znuny
@@ -77,27 +77,21 @@ PASSWORD=your-password
77
77
  ### Create a ticket
78
78
 
79
79
  ```python
80
- from pyznuny.ticket.models import (
81
- TicketCreateArticle,
82
- TicketCreatePayload,
83
- TicketCreateTicket,
84
- )
85
-
86
- payload = TicketCreatePayload(
87
- Ticket=TicketCreateTicket(
88
- Title="Ticket Title",
89
- Queue="Ticket queue",
90
- State="Ticket state",
91
- Priority="Ticket priority",
92
- CustomerUser="customer@example.com",
93
- ),
94
- Article=TicketCreateArticle(
95
- Subject="Ticket subject",
96
- Body="Ticket body...",
97
- ContentType="text/plain; charset=utf-8",
98
- From_="customer@example.com",
99
- ),
100
- )
80
+ payload = {
81
+ "Ticket": {
82
+ "Title": "Ticket Title",
83
+ "Queue": "Ticket queue",
84
+ "State": "Ticket state",
85
+ "Priority": "Ticket priority",
86
+ "CustomerUser": "customer@example.com",
87
+ },
88
+ "Article": {
89
+ "Subject": "Ticket subject",
90
+ "Body": "Ticket body...",
91
+ "ContentType": "text/plain; charset=utf-8",
92
+ "From": "customer@example.com",
93
+ },
94
+ }
101
95
 
102
96
  response = client.ticket.create(payload=payload)
103
97
  print(response.json())
@@ -137,6 +131,8 @@ response = client.ticket.get(ticket_id=1234)
137
131
  - When `username` and `password` are provided, the client logs in and stores
138
132
  `session_id` automatically.
139
133
  - You can pass a pre-configured `httpx.Client` via `client=...` if needed.
134
+ - You can send payloads as plain dicts using the same attributes shown in the
135
+ examples.
140
136
 
141
137
  ## License
142
138
 
@@ -5,8 +5,8 @@ pyznuny/ticket/endpoints.py,sha256=ArLl_BnUnZAQaWOA-T9EnTQHF1vl1XUG2kCgxlzr7vc,4
5
5
  pyznuny/ticket/exceptions.py,sha256=0pK5I0TjF_yR19eUWITGd0DryG1BrD_3ggA1YXbmPxI,563
6
6
  pyznuny/ticket/models.py,sha256=oLn3asm3cDvRvi4LfR5HOKPsyP7tG-y7d7stD-QnNjc,4691
7
7
  pyznuny/ticket/routes.py,sha256=54cr08Z2NM9JwWCkY47E1Kj94Uen9d1PJXrJ24mb2nM,2514
8
- pyznuny-0.0.6.dist-info/licenses/LICENSE,sha256=u46khy_M-afxT4hYts7ZKb557BdvpkgoCnqTd0YCiE8,1068
9
- pyznuny-0.0.6.dist-info/METADATA,sha256=6LlJydC7RuHbJSs1EtfnVmtOYg-tSKGLnLQGo60sK0U,3313
10
- pyznuny-0.0.6.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
11
- pyznuny-0.0.6.dist-info/top_level.txt,sha256=ki9uLRbo2oQCeiEaaYUcnYMj1mD_dkIhQroMCdJJXmk,8
12
- pyznuny-0.0.6.dist-info/RECORD,,
8
+ pyznuny-0.0.7.dist-info/licenses/LICENSE,sha256=u46khy_M-afxT4hYts7ZKb557BdvpkgoCnqTd0YCiE8,1068
9
+ pyznuny-0.0.7.dist-info/METADATA,sha256=xhtnqtxzKgMwcqiAlR3g9iZidVTUJyS1f3ZV84p87c0,3266
10
+ pyznuny-0.0.7.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
11
+ pyznuny-0.0.7.dist-info/top_level.txt,sha256=ki9uLRbo2oQCeiEaaYUcnYMj1mD_dkIhQroMCdJJXmk,8
12
+ pyznuny-0.0.7.dist-info/RECORD,,