Skip to content

Commit f57c984

Browse files
committed
Updated python API Client
1 parent b945658 commit f57c984

15 files changed

Lines changed: 75 additions & 73 deletions

.openapi-generator/FILES

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
.travis.yml
66
README.md
77
docs/BlockingApi.md
8+
docs/DateOrTimestamp.md
89
docs/DenyRuleNew.md
910
docs/DenyRuleRecord.md
1011
docs/EmailAddressName.md
@@ -32,7 +33,6 @@ docs/SendMailTo.md
3233
docs/SendingApi.md
3334
docs/ServicesApi.md
3435
docs/StatusApi.md
35-
docs/ViewMailLogStartDateParameter.md
3636
git_push.sh
3737
openapi_client/__init__.py
3838
openapi_client/api/__init__.py
@@ -46,6 +46,7 @@ openapi_client/api_response.py
4646
openapi_client/configuration.py
4747
openapi_client/exceptions.py
4848
openapi_client/models/__init__.py
49+
openapi_client/models/date_or_timestamp.py
4950
openapi_client/models/deny_rule_new.py
5051
openapi_client/models/deny_rule_record.py
5152
openapi_client/models/email_address_name.py
@@ -69,7 +70,6 @@ openapi_client/models/send_mail.py
6970
openapi_client/models/send_mail_adv.py
7071
openapi_client/models/send_mail_raw.py
7172
openapi_client/models/send_mail_to.py
72-
openapi_client/models/view_mail_log_start_date_parameter.py
7373
openapi_client/py.typed
7474
openapi_client/rest.py
7575
pyproject.toml
@@ -79,6 +79,7 @@ setup.py
7979
test-requirements.txt
8080
test/__init__.py
8181
test/test_blocking_api.py
82+
test/test_date_or_timestamp.py
8283
test/test_deny_rule_new.py
8384
test/test_deny_rule_record.py
8485
test/test_email_address_name.py
@@ -106,5 +107,4 @@ test/test_send_mail_to.py
106107
test/test_sending_api.py
107108
test/test_services_api.py
108109
test/test_status_api.py
109-
test/test_view_mail_log_start_date_parameter.py
110110
tox.ini

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ Class | Method | HTTP request | Description
151151

152152
## Documentation For Models
153153

154+
- [DateOrTimestamp](docs/DateOrTimestamp.md)
154155
- [DenyRuleNew](docs/DenyRuleNew.md)
155156
- [DenyRuleRecord](docs/DenyRuleRecord.md)
156157
- [EmailAddressName](docs/EmailAddressName.md)
@@ -174,7 +175,6 @@ Class | Method | HTTP request | Description
174175
- [SendMailAdv](docs/SendMailAdv.md)
175176
- [SendMailRaw](docs/SendMailRaw.md)
176177
- [SendMailTo](docs/SendMailTo.md)
177-
- [ViewMailLogStartDateParameter](docs/ViewMailLogStartDateParameter.md)
178178

179179

180180
<a id="documentation-for-authorization"></a>

docs/DateOrTimestamp.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# DateOrTimestamp
2+
3+
A date/time value accepted as either a Unix timestamp (integer seconds since epoch) or a date string parseable by `strtotime()` (e.g. `2024-01-15`, `last monday`).
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
10+
## Example
11+
12+
```python
13+
from openapi_client.models.date_or_timestamp import DateOrTimestamp
14+
15+
# TODO update the JSON string below
16+
json = "{}"
17+
# create an instance of DateOrTimestamp from a JSON string
18+
date_or_timestamp_instance = DateOrTimestamp.from_json(json)
19+
# print the JSON string representation of the object
20+
print(DateOrTimestamp.to_json())
21+
22+
# convert the object into a dict
23+
date_or_timestamp_dict = date_or_timestamp_instance.to_dict()
24+
# create an instance of DateOrTimestamp from a dict
25+
date_or_timestamp_from_dict = DateOrTimestamp.from_dict(date_or_timestamp_dict)
26+
```
27+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
28+
29+

docs/HistoryApi.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ with openapi_client.ApiClient(configuration) as api_client:
171171
delivered = 1 # int | Filter by delivery status. `1` returns only messages that were successfully delivered to the destination MX. `0` returns messages that are still queued, deferred, or failed. Omit to return all messages regardless of delivery status. (optional)
172172
skip = 0 # int | Number of records to skip for pagination. Use in combination with `limit` to page through large result sets. Defaults to `0` (no skip). (optional) (default to 0)
173173
limit = 100 # int | Maximum number of records to return per page. Defaults to `100`. Maximum allowed value is `10000`. The response also includes a `total` field with the full matched count so you can calculate the number of pages. (optional) (default to 100)
174-
start_date = openapi_client.ViewMailLogStartDateParameter() # ViewMailLogStartDateParameter | Earliest date to include. Accepts either a Unix timestamp (integer seconds since epoch) or a date string parseable by `strtotime()` such as `2024-01-15` or `last monday`. Messages with a `time` value **greater than or equal to** this value will be included. (optional)
175-
end_date = openapi_client.ViewMailLogStartDateParameter() # ViewMailLogStartDateParameter | Latest date to include. Accepts either a Unix timestamp (integer seconds since epoch) or a date string parseable by `strtotime()` such as `2024-01-31` or `yesterday`. Messages with a `time` value **less than or equal to** this value will be included. (optional)
174+
start_date = openapi_client.DateOrTimestamp() # DateOrTimestamp | Earliest date to include. Accepts either a Unix timestamp (integer seconds since epoch) or a date string parseable by `strtotime()` such as `2024-01-15` or `last monday`. Messages with a `time` value **greater than or equal to** this value will be included. (optional)
175+
end_date = openapi_client.DateOrTimestamp() # DateOrTimestamp | Latest date to include. Accepts either a Unix timestamp (integer seconds since epoch) or a date string parseable by `strtotime()` such as `2024-01-31` or `yesterday`. Messages with a `time` value **less than or equal to** this value will be included. (optional)
176176
sort = time # str | Field to sort results by. Currently only `time` is supported (sorts by internal row ID which corresponds to chronological order). (optional) (default to time)
177177
dir = desc # str | Sort direction. `desc` returns newest first (default), `asc` returns oldest first. (optional) (default to desc)
178178
groupby = recipient # str | Controls how results are grouped. `recipient` (default) returns one row per delivery attempt — a message sent to 4 recipients produces 4 rows, each with its own `recipient`, `delivered`, `response`, and delivery metadata. `message` collapses to one row per unique message ID; delivery-level fields will reflect one arbitrary recipient per message. The `total` count in the response matches the grouping mode. (optional) (default to recipient)
@@ -206,8 +206,8 @@ Name | Type | Description | Notes
206206
**delivered** | **int**| Filter by delivery status. &#x60;1&#x60; returns only messages that were successfully delivered to the destination MX. &#x60;0&#x60; returns messages that are still queued, deferred, or failed. Omit to return all messages regardless of delivery status. | [optional]
207207
**skip** | **int**| Number of records to skip for pagination. Use in combination with &#x60;limit&#x60; to page through large result sets. Defaults to &#x60;0&#x60; (no skip). | [optional] [default to 0]
208208
**limit** | **int**| Maximum number of records to return per page. Defaults to &#x60;100&#x60;. Maximum allowed value is &#x60;10000&#x60;. The response also includes a &#x60;total&#x60; field with the full matched count so you can calculate the number of pages. | [optional] [default to 100]
209-
**start_date** | [**ViewMailLogStartDateParameter**](.md)| Earliest date to include. Accepts either a Unix timestamp (integer seconds since epoch) or a date string parseable by &#x60;strtotime()&#x60; such as &#x60;2024-01-15&#x60; or &#x60;last monday&#x60;. Messages with a &#x60;time&#x60; value **greater than or equal to** this value will be included. | [optional]
210-
**end_date** | [**ViewMailLogStartDateParameter**](.md)| Latest date to include. Accepts either a Unix timestamp (integer seconds since epoch) or a date string parseable by &#x60;strtotime()&#x60; such as &#x60;2024-01-31&#x60; or &#x60;yesterday&#x60;. Messages with a &#x60;time&#x60; value **less than or equal to** this value will be included. | [optional]
209+
**start_date** | [**DateOrTimestamp**](.md)| Earliest date to include. Accepts either a Unix timestamp (integer seconds since epoch) or a date string parseable by &#x60;strtotime()&#x60; such as &#x60;2024-01-15&#x60; or &#x60;last monday&#x60;. Messages with a &#x60;time&#x60; value **greater than or equal to** this value will be included. | [optional]
210+
**end_date** | [**DateOrTimestamp**](.md)| Latest date to include. Accepts either a Unix timestamp (integer seconds since epoch) or a date string parseable by &#x60;strtotime()&#x60; such as &#x60;2024-01-31&#x60; or &#x60;yesterday&#x60;. Messages with a &#x60;time&#x60; value **less than or equal to** this value will be included. | [optional]
211211
**sort** | **str**| Field to sort results by. Currently only &#x60;time&#x60; is supported (sorts by internal row ID which corresponds to chronological order). | [optional] [default to time]
212212
**dir** | **str**| Sort direction. &#x60;desc&#x60; returns newest first (default), &#x60;asc&#x60; returns oldest first. | [optional] [default to desc]
213213
**groupby** | **str**| Controls how results are grouped. &#x60;recipient&#x60; (default) returns one row per delivery attempt — a message sent to 4 recipients produces 4 rows, each with its own &#x60;recipient&#x60;, &#x60;delivered&#x60;, &#x60;response&#x60;, and delivery metadata. &#x60;message&#x60; collapses to one row per unique message ID; delivery-level fields will reflect one arbitrary recipient per message. The &#x60;total&#x60; count in the response matches the grouping mode. | [optional] [default to recipient]

docs/MailStatsType.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Account usage statistics returned by `GET /mail/stats`. Includes billing-cycle
66

77
Name | Type | Description | Notes
88
------------ | ------------- | ------------- | -------------
9-
**time** | **str** | The time window these &#x60;received&#x60;, &#x60;sent&#x60;, and &#x60;volume&#x60; statistics cover. | [optional] [default to '1h']
9+
**time** | **str** | The time window these &#x60;received&#x60;, &#x60;sent&#x60;, and &#x60;volume&#x60; statistics cover. | [optional] [default to OneHour]
1010
**usage** | **int** | Total messages accepted during the current billing cycle. Used to calculate the &#x60;cost&#x60; value. | [optional]
1111
**currency** | **str** | The ISO 4217 currency code for this account (e.g. &#x60;USD&#x60;). | [optional]
1212
**cost** | **float** | Estimated cost for the current billing cycle combining the base plan price and per-email charges ($0.20/1000 emails). | [optional]

docs/StatusApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ This endpoint does not need any parameter.
7272
### HTTP request headers
7373

7474
- **Content-Type**: Not defined
75-
- **Accept**: text/plain
75+
- **Accept**: text/plain, application/json
7676

7777
### HTTP response details
7878

docs/ViewMailLogStartDateParameter.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

openapi_client/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"ApiKeyError",
3434
"ApiAttributeError",
3535
"ApiException",
36+
"DateOrTimestamp",
3637
"DenyRuleNew",
3738
"DenyRuleRecord",
3839
"EmailAddressName",
@@ -56,7 +57,6 @@
5657
"SendMailAdv",
5758
"SendMailRaw",
5859
"SendMailTo",
59-
"ViewMailLogStartDateParameter",
6060
]
6161

6262
# import apis into sdk package
@@ -78,6 +78,7 @@
7878
from openapi_client.exceptions import ApiException as ApiException
7979

8080
# import models into sdk package
81+
from openapi_client.models.date_or_timestamp import DateOrTimestamp as DateOrTimestamp
8182
from openapi_client.models.deny_rule_new import DenyRuleNew as DenyRuleNew
8283
from openapi_client.models.deny_rule_record import DenyRuleRecord as DenyRuleRecord
8384
from openapi_client.models.email_address_name import EmailAddressName as EmailAddressName
@@ -101,5 +102,4 @@
101102
from openapi_client.models.send_mail_adv import SendMailAdv as SendMailAdv
102103
from openapi_client.models.send_mail_raw import SendMailRaw as SendMailRaw
103104
from openapi_client.models.send_mail_to import SendMailTo as SendMailTo
104-
from openapi_client.models.view_mail_log_start_date_parameter import ViewMailLogStartDateParameter as ViewMailLogStartDateParameter
105105

openapi_client/api/history_api.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -371,9 +371,9 @@ def view_mail_log(
371371
:param limit: Maximum number of records to return per page. Defaults to `100`. Maximum allowed value is `10000`. The response also includes a `total` field with the full matched count so you can calculate the number of pages.
372372
:type limit: int
373373
:param start_date: Earliest date to include. Accepts either a Unix timestamp (integer seconds since epoch) or a date string parseable by `strtotime()` such as `2024-01-15` or `last monday`. Messages with a `time` value **greater than or equal to** this value will be included.
374-
:type start_date: ViewMailLogStartDateParameter
374+
:type start_date: DateOrTimestamp
375375
:param end_date: Latest date to include. Accepts either a Unix timestamp (integer seconds since epoch) or a date string parseable by `strtotime()` such as `2024-01-31` or `yesterday`. Messages with a `time` value **less than or equal to** this value will be included.
376-
:type end_date: ViewMailLogStartDateParameter
376+
:type end_date: DateOrTimestamp
377377
:param sort: Field to sort results by. Currently only `time` is supported (sorts by internal row ID which corresponds to chronological order).
378378
:type sort: str
379379
:param dir: Sort direction. `desc` returns newest first (default), `asc` returns oldest first.
@@ -508,9 +508,9 @@ def view_mail_log_with_http_info(
508508
:param limit: Maximum number of records to return per page. Defaults to `100`. Maximum allowed value is `10000`. The response also includes a `total` field with the full matched count so you can calculate the number of pages.
509509
:type limit: int
510510
:param start_date: Earliest date to include. Accepts either a Unix timestamp (integer seconds since epoch) or a date string parseable by `strtotime()` such as `2024-01-15` or `last monday`. Messages with a `time` value **greater than or equal to** this value will be included.
511-
:type start_date: ViewMailLogStartDateParameter
511+
:type start_date: DateOrTimestamp
512512
:param end_date: Latest date to include. Accepts either a Unix timestamp (integer seconds since epoch) or a date string parseable by `strtotime()` such as `2024-01-31` or `yesterday`. Messages with a `time` value **less than or equal to** this value will be included.
513-
:type end_date: ViewMailLogStartDateParameter
513+
:type end_date: DateOrTimestamp
514514
:param sort: Field to sort results by. Currently only `time` is supported (sorts by internal row ID which corresponds to chronological order).
515515
:type sort: str
516516
:param dir: Sort direction. `desc` returns newest first (default), `asc` returns oldest first.
@@ -645,9 +645,9 @@ def view_mail_log_without_preload_content(
645645
:param limit: Maximum number of records to return per page. Defaults to `100`. Maximum allowed value is `10000`. The response also includes a `total` field with the full matched count so you can calculate the number of pages.
646646
:type limit: int
647647
:param start_date: Earliest date to include. Accepts either a Unix timestamp (integer seconds since epoch) or a date string parseable by `strtotime()` such as `2024-01-15` or `last monday`. Messages with a `time` value **greater than or equal to** this value will be included.
648-
:type start_date: ViewMailLogStartDateParameter
648+
:type start_date: DateOrTimestamp
649649
:param end_date: Latest date to include. Accepts either a Unix timestamp (integer seconds since epoch) or a date string parseable by `strtotime()` such as `2024-01-31` or `yesterday`. Messages with a `time` value **less than or equal to** this value will be included.
650-
:type end_date: ViewMailLogStartDateParameter
650+
:type end_date: DateOrTimestamp
651651
:param sort: Field to sort results by. Currently only `time` is supported (sorts by internal row ID which corresponds to chronological order).
652652
:type sort: str
653653
:param dir: Sort direction. `desc` returns newest first (default), `asc` returns oldest first.

openapi_client/api/status_api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ def _ping_server_serialize(
254254
if 'Accept' not in _header_params:
255255
_header_params['Accept'] = self.api_client.select_header_accept(
256256
[
257-
'text/plain'
257+
'text/plain',
258+
'application/json'
258259
]
259260
)
260261

0 commit comments

Comments
 (0)