hushscript 1.0.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.
- hushscript/__init__.py +97 -0
- hushscript/_client.py +687 -0
- hushscript/_clock.py +36 -0
- hushscript/_config.py +139 -0
- hushscript/_errors.py +563 -0
- hushscript/_guard.py +61 -0
- hushscript/_http.py +624 -0
- hushscript/_json.py +55 -0
- hushscript/_log.py +155 -0
- hushscript/_models.py +144 -0
- hushscript/_pacing.py +51 -0
- hushscript/_redact.py +140 -0
- hushscript/_response.py +67 -0
- hushscript/_retry.py +205 -0
- hushscript/_shape.py +197 -0
- hushscript/_shapes.py +248 -0
- hushscript/_version.py +1 -0
- hushscript/format.py +224 -0
- hushscript/generated/__init__.py +8 -0
- hushscript/generated/api/__init__.py +1 -0
- hushscript/generated/api/default/__init__.py +1 -0
- hushscript/generated/api/default/buy_minutes.py +248 -0
- hushscript/generated/api/default/claim_agent_account.py +238 -0
- hushscript/generated/api/default/complete_upload.py +238 -0
- hushscript/generated/api/default/create_agent_account_signup.py +261 -0
- hushscript/generated/api/default/create_setup_session.py +244 -0
- hushscript/generated/api/default/create_upload.py +225 -0
- hushscript/generated/api/default/get_account.py +169 -0
- hushscript/generated/api/default/get_job.py +198 -0
- hushscript/generated/api/default/get_org.py +169 -0
- hushscript/generated/api/default/get_transcript.py +226 -0
- hushscript/generated/api/default/get_transcription_context.py +173 -0
- hushscript/generated/api/default/get_upload_part_urls.py +246 -0
- hushscript/generated/api/default/heartbeat_upload.py +197 -0
- hushscript/generated/api/default/lift_transcript_hold.py +206 -0
- hushscript/generated/api/default/list_credit_ledger.py +229 -0
- hushscript/generated/api/default/list_deleted_transcripts.py +237 -0
- hushscript/generated/api/default/list_holds.py +233 -0
- hushscript/generated/api/default/list_jobs.py +249 -0
- hushscript/generated/api/default/list_org_audit.py +221 -0
- hushscript/generated/api/default/list_org_invoices.py +221 -0
- hushscript/generated/api/default/list_org_ledger.py +221 -0
- hushscript/generated/api/default/list_org_matters.py +247 -0
- hushscript/generated/api/default/list_org_members.py +221 -0
- hushscript/generated/api/default/list_org_transcripts.py +233 -0
- hushscript/generated/api/default/list_packs.py +169 -0
- hushscript/generated/api/default/list_saved_cards.py +169 -0
- hushscript/generated/api/default/list_transactions.py +225 -0
- hushscript/generated/api/default/list_transcripts.py +225 -0
- hushscript/generated/api/default/org_audit_csv.py +163 -0
- hushscript/generated/api/default/org_ledger_csv.py +163 -0
- hushscript/generated/api/default/org_usage_report.py +247 -0
- hushscript/generated/api/default/org_usage_report_csv.py +229 -0
- hushscript/generated/api/default/patch_org_member.py +237 -0
- hushscript/generated/api/default/place_transcript_hold.py +206 -0
- hushscript/generated/api/default/rotate_agent_credentials.py +177 -0
- hushscript/generated/api/default/schedule_org_custody.py +215 -0
- hushscript/generated/api/default/set_default_card.py +223 -0
- hushscript/generated/api/default/upload_part.py +249 -0
- hushscript/generated/catalog.py +138 -0
- hushscript/generated/client.py +282 -0
- hushscript/generated/errors.py +16 -0
- hushscript/generated/hints.py +28 -0
- hushscript/generated/models/__init__.py +193 -0
- hushscript/generated/models/account_response.py +114 -0
- hushscript/generated/models/active_hold.py +88 -0
- hushscript/generated/models/active_hold_kind.py +18 -0
- hushscript/generated/models/agent_claim_request.py +61 -0
- hushscript/generated/models/agent_claim_response.py +85 -0
- hushscript/generated/models/agent_credentials_rotate_response.py +101 -0
- hushscript/generated/models/agent_signup_request.py +118 -0
- hushscript/generated/models/agent_signup_request_agent.py +80 -0
- hushscript/generated/models/agent_signup_response.py +111 -0
- hushscript/generated/models/buy_minutes_body.py +89 -0
- hushscript/generated/models/card.py +132 -0
- hushscript/generated/models/cards_response.py +90 -0
- hushscript/generated/models/complete_upload_body.py +107 -0
- hushscript/generated/models/complete_upload_body_parts_type_0_item.py +69 -0
- hushscript/generated/models/context_dictionary.py +143 -0
- hushscript/generated/models/context_prompt_preset.py +118 -0
- hushscript/generated/models/create_setup_session_body.py +62 -0
- hushscript/generated/models/create_upload_body.py +254 -0
- hushscript/generated/models/create_upload_body_transcription_options_type_0.py +178 -0
- hushscript/generated/models/credit_ledger_entry.py +113 -0
- hushscript/generated/models/credit_ledger_response.py +90 -0
- hushscript/generated/models/deleted_transcript.py +148 -0
- hushscript/generated/models/deleted_transcript_cause.py +18 -0
- hushscript/generated/models/deleted_transcript_receipt_type_0.py +107 -0
- hushscript/generated/models/deleted_transcript_receipt_type_0_items_item.py +69 -0
- hushscript/generated/models/deleted_transcripts_response.py +90 -0
- hushscript/generated/models/dictionary_entry.py +123 -0
- hushscript/generated/models/dictionary_entry_category.py +37 -0
- hushscript/generated/models/error.py +155 -0
- hushscript/generated/models/error_details.py +94 -0
- hushscript/generated/models/get_upload_part_urls_response_200_type_0.py +108 -0
- hushscript/generated/models/heartbeat_upload_response_200.py +61 -0
- hushscript/generated/models/holds_response.py +90 -0
- hushscript/generated/models/job.py +309 -0
- hushscript/generated/models/job_failure_kind_type_1.py +16 -0
- hushscript/generated/models/job_failure_kind_type_2_type_1.py +16 -0
- hushscript/generated/models/job_failure_kind_type_3_type_1.py +16 -0
- hushscript/generated/models/job_list.py +90 -0
- hushscript/generated/models/lift_transcript_hold_response_200.py +61 -0
- hushscript/generated/models/list_jobs_active.py +17 -0
- hushscript/generated/models/list_org_matters_status.py +16 -0
- hushscript/generated/models/options_summary.py +135 -0
- hushscript/generated/models/org_audit_entry.py +105 -0
- hushscript/generated/models/org_audit_response.py +90 -0
- hushscript/generated/models/org_invoice.py +175 -0
- hushscript/generated/models/org_invoices_response.py +90 -0
- hushscript/generated/models/org_ledger_entry.py +155 -0
- hushscript/generated/models/org_ledger_response.py +90 -0
- hushscript/generated/models/org_matter.py +79 -0
- hushscript/generated/models/org_matter_status.py +16 -0
- hushscript/generated/models/org_matters_response.py +75 -0
- hushscript/generated/models/org_member.py +123 -0
- hushscript/generated/models/org_members_response.py +90 -0
- hushscript/generated/models/org_summary_response.py +482 -0
- hushscript/generated/models/org_transcript.py +103 -0
- hushscript/generated/models/org_transcripts_response.py +90 -0
- hushscript/generated/models/org_usage_report_csv_group_by.py +17 -0
- hushscript/generated/models/org_usage_report_group_by.py +17 -0
- hushscript/generated/models/org_usage_response.py +112 -0
- hushscript/generated/models/org_usage_response_group_by.py +17 -0
- hushscript/generated/models/org_usage_row.py +86 -0
- hushscript/generated/models/pack.py +107 -0
- hushscript/generated/models/packs_response.py +75 -0
- hushscript/generated/models/patch_org_member_body.py +102 -0
- hushscript/generated/models/patch_org_member_response_200.py +61 -0
- hushscript/generated/models/place_transcript_hold_response_200.py +61 -0
- hushscript/generated/models/presigned_part_url.py +69 -0
- hushscript/generated/models/purchase_response.py +76 -0
- hushscript/generated/models/schedule_org_custody_body.py +66 -0
- hushscript/generated/models/schedule_org_custody_body_custody.py +17 -0
- hushscript/generated/models/schedule_org_custody_response_200.py +69 -0
- hushscript/generated/models/set_default_card_body.py +61 -0
- hushscript/generated/models/set_default_card_response_200.py +61 -0
- hushscript/generated/models/setup_session_response.py +77 -0
- hushscript/generated/models/transaction.py +183 -0
- hushscript/generated/models/transactions_response.py +98 -0
- hushscript/generated/models/transcript_detail.py +194 -0
- hushscript/generated/models/transcript_detail_speaker_names.py +47 -0
- hushscript/generated/models/transcript_envelope.py +89 -0
- hushscript/generated/models/transcript_envelope_translations.py +62 -0
- hushscript/generated/models/transcript_language.py +75 -0
- hushscript/generated/models/transcript_list.py +90 -0
- hushscript/generated/models/transcript_list_row.py +152 -0
- hushscript/generated/models/transcript_list_row_insights_state.py +20 -0
- hushscript/generated/models/transcription_context_response.py +95 -0
- hushscript/generated/models/upload_complete_response.py +100 -0
- hushscript/generated/models/upload_create_response.py +148 -0
- hushscript/generated/models/upload_create_response_funding.py +16 -0
- hushscript/generated/models/upload_create_response_upload_type_0.py +108 -0
- hushscript/generated/models/upload_limits.py +86 -0
- hushscript/generated/models/upload_part_response_200.py +69 -0
- hushscript/generated/models/utterance.py +85 -0
- hushscript/generated/scopes.py +42 -0
- hushscript/generated/types.py +54 -0
- hushscript/money.py +79 -0
- hushscript/paginate.py +78 -0
- hushscript/py.typed +0 -0
- hushscript/resources/__init__.py +1 -0
- hushscript/resources/_params.py +33 -0
- hushscript/resources/account.py +121 -0
- hushscript/resources/agent.py +421 -0
- hushscript/resources/billing.py +567 -0
- hushscript/resources/jobs.py +105 -0
- hushscript/resources/transcripts.py +209 -0
- hushscript/transcribe/__init__.py +1 -0
- hushscript/transcribe/apipeline.py +234 -0
- hushscript/transcribe/aupload.py +197 -0
- hushscript/transcribe/heartbeat.py +78 -0
- hushscript/transcribe/pipeline.py +312 -0
- hushscript/transcribe/preflight.py +272 -0
- hushscript/transcribe/probe.py +185 -0
- hushscript/transcribe/resume.py +115 -0
- hushscript/transcribe/segment.py +23 -0
- hushscript/transcribe/session.py +34 -0
- hushscript/transcribe/sniff.py +30 -0
- hushscript/transcribe/source.py +218 -0
- hushscript/transcribe/upload.py +498 -0
- hushscript/transcribe/wait.py +124 -0
- hushscript/transcript.py +197 -0
- hushscript-1.0.0.dist-info/METADATA +502 -0
- hushscript-1.0.0.dist-info/RECORD +187 -0
- hushscript-1.0.0.dist-info/WHEEL +4 -0
- hushscript-1.0.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="OrgAuditEntry")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class OrgAuditEntry:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
id (int):
|
|
17
|
+
actor_user_id (None | str):
|
|
18
|
+
event (str):
|
|
19
|
+
detail (None | str):
|
|
20
|
+
created_at (int):
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
id: int
|
|
24
|
+
actor_user_id: None | str
|
|
25
|
+
event: str
|
|
26
|
+
detail: None | str
|
|
27
|
+
created_at: int
|
|
28
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
29
|
+
|
|
30
|
+
def to_dict(self) -> dict[str, Any]:
|
|
31
|
+
id = self.id
|
|
32
|
+
|
|
33
|
+
actor_user_id: None | str
|
|
34
|
+
actor_user_id = self.actor_user_id
|
|
35
|
+
|
|
36
|
+
event = self.event
|
|
37
|
+
|
|
38
|
+
detail: None | str
|
|
39
|
+
detail = self.detail
|
|
40
|
+
|
|
41
|
+
created_at = self.created_at
|
|
42
|
+
|
|
43
|
+
field_dict: dict[str, Any] = {}
|
|
44
|
+
field_dict.update(self.additional_properties)
|
|
45
|
+
field_dict.update(
|
|
46
|
+
{
|
|
47
|
+
"id": id,
|
|
48
|
+
"actor_user_id": actor_user_id,
|
|
49
|
+
"event": event,
|
|
50
|
+
"detail": detail,
|
|
51
|
+
"created_at": created_at,
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
return field_dict
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
59
|
+
d = dict(src_dict)
|
|
60
|
+
id = d.pop("id")
|
|
61
|
+
|
|
62
|
+
def _parse_actor_user_id(data: object) -> None | str:
|
|
63
|
+
if data is None:
|
|
64
|
+
return data
|
|
65
|
+
return cast(None | str, data)
|
|
66
|
+
|
|
67
|
+
actor_user_id = _parse_actor_user_id(d.pop("actor_user_id"))
|
|
68
|
+
|
|
69
|
+
event = d.pop("event")
|
|
70
|
+
|
|
71
|
+
def _parse_detail(data: object) -> None | str:
|
|
72
|
+
if data is None:
|
|
73
|
+
return data
|
|
74
|
+
return cast(None | str, data)
|
|
75
|
+
|
|
76
|
+
detail = _parse_detail(d.pop("detail"))
|
|
77
|
+
|
|
78
|
+
created_at = d.pop("created_at")
|
|
79
|
+
|
|
80
|
+
org_audit_entry = cls(
|
|
81
|
+
id=id,
|
|
82
|
+
actor_user_id=actor_user_id,
|
|
83
|
+
event=event,
|
|
84
|
+
detail=detail,
|
|
85
|
+
created_at=created_at,
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
org_audit_entry.additional_properties = d
|
|
89
|
+
return org_audit_entry
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
def additional_keys(self) -> list[str]:
|
|
93
|
+
return list(self.additional_properties.keys())
|
|
94
|
+
|
|
95
|
+
def __getitem__(self, key: str) -> Any:
|
|
96
|
+
return self.additional_properties[key]
|
|
97
|
+
|
|
98
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
99
|
+
self.additional_properties[key] = value
|
|
100
|
+
|
|
101
|
+
def __delitem__(self, key: str) -> None:
|
|
102
|
+
del self.additional_properties[key]
|
|
103
|
+
|
|
104
|
+
def __contains__(self, key: str) -> bool:
|
|
105
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.org_audit_entry import OrgAuditEntry
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="OrgAuditResponse")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class OrgAuditResponse:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
entries (list[OrgAuditEntry]):
|
|
21
|
+
next_cursor (None | str): An opaque token for the next page's cursor parameter, or null on the last page. This
|
|
22
|
+
API refuses a cursor it did not mint.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
entries: list[OrgAuditEntry]
|
|
26
|
+
next_cursor: None | str
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
entries = []
|
|
31
|
+
for entries_item_data in self.entries:
|
|
32
|
+
entries_item = entries_item_data.to_dict()
|
|
33
|
+
entries.append(entries_item)
|
|
34
|
+
|
|
35
|
+
next_cursor: None | str
|
|
36
|
+
next_cursor = self.next_cursor
|
|
37
|
+
|
|
38
|
+
field_dict: dict[str, Any] = {}
|
|
39
|
+
field_dict.update(self.additional_properties)
|
|
40
|
+
field_dict.update(
|
|
41
|
+
{
|
|
42
|
+
"entries": entries,
|
|
43
|
+
"next_cursor": next_cursor,
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
return field_dict
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
51
|
+
from ..models.org_audit_entry import OrgAuditEntry # noqa: PLC0415
|
|
52
|
+
|
|
53
|
+
d = dict(src_dict)
|
|
54
|
+
entries = []
|
|
55
|
+
_entries = d.pop("entries")
|
|
56
|
+
for entries_item_data in _entries:
|
|
57
|
+
entries_item = OrgAuditEntry.from_dict(entries_item_data)
|
|
58
|
+
|
|
59
|
+
entries.append(entries_item)
|
|
60
|
+
|
|
61
|
+
def _parse_next_cursor(data: object) -> None | str:
|
|
62
|
+
if data is None:
|
|
63
|
+
return data
|
|
64
|
+
return cast(None | str, data)
|
|
65
|
+
|
|
66
|
+
next_cursor = _parse_next_cursor(d.pop("next_cursor"))
|
|
67
|
+
|
|
68
|
+
org_audit_response = cls(
|
|
69
|
+
entries=entries,
|
|
70
|
+
next_cursor=next_cursor,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
org_audit_response.additional_properties = d
|
|
74
|
+
return org_audit_response
|
|
75
|
+
|
|
76
|
+
@property
|
|
77
|
+
def additional_keys(self) -> list[str]:
|
|
78
|
+
return list(self.additional_properties.keys())
|
|
79
|
+
|
|
80
|
+
def __getitem__(self, key: str) -> Any:
|
|
81
|
+
return self.additional_properties[key]
|
|
82
|
+
|
|
83
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
84
|
+
self.additional_properties[key] = value
|
|
85
|
+
|
|
86
|
+
def __delitem__(self, key: str) -> None:
|
|
87
|
+
del self.additional_properties[key]
|
|
88
|
+
|
|
89
|
+
def __contains__(self, key: str) -> bool:
|
|
90
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="OrgInvoice")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class OrgInvoice:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
id (str):
|
|
17
|
+
number (None | str):
|
|
18
|
+
kind (str):
|
|
19
|
+
sku (str):
|
|
20
|
+
seconds (int):
|
|
21
|
+
amount_cents (int):
|
|
22
|
+
currency (str):
|
|
23
|
+
payment_reference (str):
|
|
24
|
+
status (str):
|
|
25
|
+
po_number (None | str):
|
|
26
|
+
issued_at (int):
|
|
27
|
+
paid_at (int | None):
|
|
28
|
+
created_at (int):
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
id: str
|
|
32
|
+
number: None | str
|
|
33
|
+
kind: str
|
|
34
|
+
sku: str
|
|
35
|
+
seconds: int
|
|
36
|
+
amount_cents: int
|
|
37
|
+
currency: str
|
|
38
|
+
payment_reference: str
|
|
39
|
+
status: str
|
|
40
|
+
po_number: None | str
|
|
41
|
+
issued_at: int
|
|
42
|
+
paid_at: int | None
|
|
43
|
+
created_at: int
|
|
44
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
45
|
+
|
|
46
|
+
def to_dict(self) -> dict[str, Any]:
|
|
47
|
+
id = self.id
|
|
48
|
+
|
|
49
|
+
number: None | str
|
|
50
|
+
number = self.number
|
|
51
|
+
|
|
52
|
+
kind = self.kind
|
|
53
|
+
|
|
54
|
+
sku = self.sku
|
|
55
|
+
|
|
56
|
+
seconds = self.seconds
|
|
57
|
+
|
|
58
|
+
amount_cents = self.amount_cents
|
|
59
|
+
|
|
60
|
+
currency = self.currency
|
|
61
|
+
|
|
62
|
+
payment_reference = self.payment_reference
|
|
63
|
+
|
|
64
|
+
status = self.status
|
|
65
|
+
|
|
66
|
+
po_number: None | str
|
|
67
|
+
po_number = self.po_number
|
|
68
|
+
|
|
69
|
+
issued_at = self.issued_at
|
|
70
|
+
|
|
71
|
+
paid_at: int | None
|
|
72
|
+
paid_at = self.paid_at
|
|
73
|
+
|
|
74
|
+
created_at = self.created_at
|
|
75
|
+
|
|
76
|
+
field_dict: dict[str, Any] = {}
|
|
77
|
+
field_dict.update(self.additional_properties)
|
|
78
|
+
field_dict.update(
|
|
79
|
+
{
|
|
80
|
+
"id": id,
|
|
81
|
+
"number": number,
|
|
82
|
+
"kind": kind,
|
|
83
|
+
"sku": sku,
|
|
84
|
+
"seconds": seconds,
|
|
85
|
+
"amount_cents": amount_cents,
|
|
86
|
+
"currency": currency,
|
|
87
|
+
"payment_reference": payment_reference,
|
|
88
|
+
"status": status,
|
|
89
|
+
"po_number": po_number,
|
|
90
|
+
"issued_at": issued_at,
|
|
91
|
+
"paid_at": paid_at,
|
|
92
|
+
"created_at": created_at,
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
return field_dict
|
|
97
|
+
|
|
98
|
+
@classmethod
|
|
99
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
100
|
+
d = dict(src_dict)
|
|
101
|
+
id = d.pop("id")
|
|
102
|
+
|
|
103
|
+
def _parse_number(data: object) -> None | str:
|
|
104
|
+
if data is None:
|
|
105
|
+
return data
|
|
106
|
+
return cast(None | str, data)
|
|
107
|
+
|
|
108
|
+
number = _parse_number(d.pop("number"))
|
|
109
|
+
|
|
110
|
+
kind = d.pop("kind")
|
|
111
|
+
|
|
112
|
+
sku = d.pop("sku")
|
|
113
|
+
|
|
114
|
+
seconds = d.pop("seconds")
|
|
115
|
+
|
|
116
|
+
amount_cents = d.pop("amount_cents")
|
|
117
|
+
|
|
118
|
+
currency = d.pop("currency")
|
|
119
|
+
|
|
120
|
+
payment_reference = d.pop("payment_reference")
|
|
121
|
+
|
|
122
|
+
status = d.pop("status")
|
|
123
|
+
|
|
124
|
+
def _parse_po_number(data: object) -> None | str:
|
|
125
|
+
if data is None:
|
|
126
|
+
return data
|
|
127
|
+
return cast(None | str, data)
|
|
128
|
+
|
|
129
|
+
po_number = _parse_po_number(d.pop("po_number"))
|
|
130
|
+
|
|
131
|
+
issued_at = d.pop("issued_at")
|
|
132
|
+
|
|
133
|
+
def _parse_paid_at(data: object) -> int | None:
|
|
134
|
+
if data is None:
|
|
135
|
+
return data
|
|
136
|
+
return cast(int | None, data)
|
|
137
|
+
|
|
138
|
+
paid_at = _parse_paid_at(d.pop("paid_at"))
|
|
139
|
+
|
|
140
|
+
created_at = d.pop("created_at")
|
|
141
|
+
|
|
142
|
+
org_invoice = cls(
|
|
143
|
+
id=id,
|
|
144
|
+
number=number,
|
|
145
|
+
kind=kind,
|
|
146
|
+
sku=sku,
|
|
147
|
+
seconds=seconds,
|
|
148
|
+
amount_cents=amount_cents,
|
|
149
|
+
currency=currency,
|
|
150
|
+
payment_reference=payment_reference,
|
|
151
|
+
status=status,
|
|
152
|
+
po_number=po_number,
|
|
153
|
+
issued_at=issued_at,
|
|
154
|
+
paid_at=paid_at,
|
|
155
|
+
created_at=created_at,
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
org_invoice.additional_properties = d
|
|
159
|
+
return org_invoice
|
|
160
|
+
|
|
161
|
+
@property
|
|
162
|
+
def additional_keys(self) -> list[str]:
|
|
163
|
+
return list(self.additional_properties.keys())
|
|
164
|
+
|
|
165
|
+
def __getitem__(self, key: str) -> Any:
|
|
166
|
+
return self.additional_properties[key]
|
|
167
|
+
|
|
168
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
169
|
+
self.additional_properties[key] = value
|
|
170
|
+
|
|
171
|
+
def __delitem__(self, key: str) -> None:
|
|
172
|
+
del self.additional_properties[key]
|
|
173
|
+
|
|
174
|
+
def __contains__(self, key: str) -> bool:
|
|
175
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.org_invoice import OrgInvoice
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="OrgInvoicesResponse")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class OrgInvoicesResponse:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
invoices (list[OrgInvoice]):
|
|
21
|
+
next_cursor (None | str): An opaque token for the next page's cursor parameter, or null on the last page. This
|
|
22
|
+
API refuses a cursor it did not mint.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
invoices: list[OrgInvoice]
|
|
26
|
+
next_cursor: None | str
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
invoices = []
|
|
31
|
+
for invoices_item_data in self.invoices:
|
|
32
|
+
invoices_item = invoices_item_data.to_dict()
|
|
33
|
+
invoices.append(invoices_item)
|
|
34
|
+
|
|
35
|
+
next_cursor: None | str
|
|
36
|
+
next_cursor = self.next_cursor
|
|
37
|
+
|
|
38
|
+
field_dict: dict[str, Any] = {}
|
|
39
|
+
field_dict.update(self.additional_properties)
|
|
40
|
+
field_dict.update(
|
|
41
|
+
{
|
|
42
|
+
"invoices": invoices,
|
|
43
|
+
"next_cursor": next_cursor,
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
return field_dict
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
51
|
+
from ..models.org_invoice import OrgInvoice # noqa: PLC0415
|
|
52
|
+
|
|
53
|
+
d = dict(src_dict)
|
|
54
|
+
invoices = []
|
|
55
|
+
_invoices = d.pop("invoices")
|
|
56
|
+
for invoices_item_data in _invoices:
|
|
57
|
+
invoices_item = OrgInvoice.from_dict(invoices_item_data)
|
|
58
|
+
|
|
59
|
+
invoices.append(invoices_item)
|
|
60
|
+
|
|
61
|
+
def _parse_next_cursor(data: object) -> None | str:
|
|
62
|
+
if data is None:
|
|
63
|
+
return data
|
|
64
|
+
return cast(None | str, data)
|
|
65
|
+
|
|
66
|
+
next_cursor = _parse_next_cursor(d.pop("next_cursor"))
|
|
67
|
+
|
|
68
|
+
org_invoices_response = cls(
|
|
69
|
+
invoices=invoices,
|
|
70
|
+
next_cursor=next_cursor,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
org_invoices_response.additional_properties = d
|
|
74
|
+
return org_invoices_response
|
|
75
|
+
|
|
76
|
+
@property
|
|
77
|
+
def additional_keys(self) -> list[str]:
|
|
78
|
+
return list(self.additional_properties.keys())
|
|
79
|
+
|
|
80
|
+
def __getitem__(self, key: str) -> Any:
|
|
81
|
+
return self.additional_properties[key]
|
|
82
|
+
|
|
83
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
84
|
+
self.additional_properties[key] = value
|
|
85
|
+
|
|
86
|
+
def __delitem__(self, key: str) -> None:
|
|
87
|
+
del self.additional_properties[key]
|
|
88
|
+
|
|
89
|
+
def __contains__(self, key: str) -> bool:
|
|
90
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="OrgLedgerEntry")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class OrgLedgerEntry:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
id (int):
|
|
17
|
+
delta_seconds (int):
|
|
18
|
+
kind (str):
|
|
19
|
+
job_id (None | str):
|
|
20
|
+
invoice_id (None | str):
|
|
21
|
+
actor_user_id (None | str):
|
|
22
|
+
member_email (None | str):
|
|
23
|
+
note (None | str):
|
|
24
|
+
created_at (int):
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
id: int
|
|
28
|
+
delta_seconds: int
|
|
29
|
+
kind: str
|
|
30
|
+
job_id: None | str
|
|
31
|
+
invoice_id: None | str
|
|
32
|
+
actor_user_id: None | str
|
|
33
|
+
member_email: None | str
|
|
34
|
+
note: None | str
|
|
35
|
+
created_at: int
|
|
36
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
37
|
+
|
|
38
|
+
def to_dict(self) -> dict[str, Any]:
|
|
39
|
+
id = self.id
|
|
40
|
+
|
|
41
|
+
delta_seconds = self.delta_seconds
|
|
42
|
+
|
|
43
|
+
kind = self.kind
|
|
44
|
+
|
|
45
|
+
job_id: None | str
|
|
46
|
+
job_id = self.job_id
|
|
47
|
+
|
|
48
|
+
invoice_id: None | str
|
|
49
|
+
invoice_id = self.invoice_id
|
|
50
|
+
|
|
51
|
+
actor_user_id: None | str
|
|
52
|
+
actor_user_id = self.actor_user_id
|
|
53
|
+
|
|
54
|
+
member_email: None | str
|
|
55
|
+
member_email = self.member_email
|
|
56
|
+
|
|
57
|
+
note: None | str
|
|
58
|
+
note = self.note
|
|
59
|
+
|
|
60
|
+
created_at = self.created_at
|
|
61
|
+
|
|
62
|
+
field_dict: dict[str, Any] = {}
|
|
63
|
+
field_dict.update(self.additional_properties)
|
|
64
|
+
field_dict.update(
|
|
65
|
+
{
|
|
66
|
+
"id": id,
|
|
67
|
+
"delta_seconds": delta_seconds,
|
|
68
|
+
"kind": kind,
|
|
69
|
+
"job_id": job_id,
|
|
70
|
+
"invoice_id": invoice_id,
|
|
71
|
+
"actor_user_id": actor_user_id,
|
|
72
|
+
"member_email": member_email,
|
|
73
|
+
"note": note,
|
|
74
|
+
"created_at": created_at,
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
return field_dict
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
82
|
+
d = dict(src_dict)
|
|
83
|
+
id = d.pop("id")
|
|
84
|
+
|
|
85
|
+
delta_seconds = d.pop("delta_seconds")
|
|
86
|
+
|
|
87
|
+
kind = d.pop("kind")
|
|
88
|
+
|
|
89
|
+
def _parse_job_id(data: object) -> None | str:
|
|
90
|
+
if data is None:
|
|
91
|
+
return data
|
|
92
|
+
return cast(None | str, data)
|
|
93
|
+
|
|
94
|
+
job_id = _parse_job_id(d.pop("job_id"))
|
|
95
|
+
|
|
96
|
+
def _parse_invoice_id(data: object) -> None | str:
|
|
97
|
+
if data is None:
|
|
98
|
+
return data
|
|
99
|
+
return cast(None | str, data)
|
|
100
|
+
|
|
101
|
+
invoice_id = _parse_invoice_id(d.pop("invoice_id"))
|
|
102
|
+
|
|
103
|
+
def _parse_actor_user_id(data: object) -> None | str:
|
|
104
|
+
if data is None:
|
|
105
|
+
return data
|
|
106
|
+
return cast(None | str, data)
|
|
107
|
+
|
|
108
|
+
actor_user_id = _parse_actor_user_id(d.pop("actor_user_id"))
|
|
109
|
+
|
|
110
|
+
def _parse_member_email(data: object) -> None | str:
|
|
111
|
+
if data is None:
|
|
112
|
+
return data
|
|
113
|
+
return cast(None | str, data)
|
|
114
|
+
|
|
115
|
+
member_email = _parse_member_email(d.pop("member_email"))
|
|
116
|
+
|
|
117
|
+
def _parse_note(data: object) -> None | str:
|
|
118
|
+
if data is None:
|
|
119
|
+
return data
|
|
120
|
+
return cast(None | str, data)
|
|
121
|
+
|
|
122
|
+
note = _parse_note(d.pop("note"))
|
|
123
|
+
|
|
124
|
+
created_at = d.pop("created_at")
|
|
125
|
+
|
|
126
|
+
org_ledger_entry = cls(
|
|
127
|
+
id=id,
|
|
128
|
+
delta_seconds=delta_seconds,
|
|
129
|
+
kind=kind,
|
|
130
|
+
job_id=job_id,
|
|
131
|
+
invoice_id=invoice_id,
|
|
132
|
+
actor_user_id=actor_user_id,
|
|
133
|
+
member_email=member_email,
|
|
134
|
+
note=note,
|
|
135
|
+
created_at=created_at,
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
org_ledger_entry.additional_properties = d
|
|
139
|
+
return org_ledger_entry
|
|
140
|
+
|
|
141
|
+
@property
|
|
142
|
+
def additional_keys(self) -> list[str]:
|
|
143
|
+
return list(self.additional_properties.keys())
|
|
144
|
+
|
|
145
|
+
def __getitem__(self, key: str) -> Any:
|
|
146
|
+
return self.additional_properties[key]
|
|
147
|
+
|
|
148
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
149
|
+
self.additional_properties[key] = value
|
|
150
|
+
|
|
151
|
+
def __delitem__(self, key: str) -> None:
|
|
152
|
+
del self.additional_properties[key]
|
|
153
|
+
|
|
154
|
+
def __contains__(self, key: str) -> bool:
|
|
155
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.org_ledger_entry import OrgLedgerEntry
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="OrgLedgerResponse")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class OrgLedgerResponse:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
entries (list[OrgLedgerEntry]):
|
|
21
|
+
next_cursor (None | str): An opaque token for the next page's cursor parameter, or null on the last page. This
|
|
22
|
+
API refuses a cursor it did not mint.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
entries: list[OrgLedgerEntry]
|
|
26
|
+
next_cursor: None | str
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
entries = []
|
|
31
|
+
for entries_item_data in self.entries:
|
|
32
|
+
entries_item = entries_item_data.to_dict()
|
|
33
|
+
entries.append(entries_item)
|
|
34
|
+
|
|
35
|
+
next_cursor: None | str
|
|
36
|
+
next_cursor = self.next_cursor
|
|
37
|
+
|
|
38
|
+
field_dict: dict[str, Any] = {}
|
|
39
|
+
field_dict.update(self.additional_properties)
|
|
40
|
+
field_dict.update(
|
|
41
|
+
{
|
|
42
|
+
"entries": entries,
|
|
43
|
+
"next_cursor": next_cursor,
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
return field_dict
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
51
|
+
from ..models.org_ledger_entry import OrgLedgerEntry # noqa: PLC0415
|
|
52
|
+
|
|
53
|
+
d = dict(src_dict)
|
|
54
|
+
entries = []
|
|
55
|
+
_entries = d.pop("entries")
|
|
56
|
+
for entries_item_data in _entries:
|
|
57
|
+
entries_item = OrgLedgerEntry.from_dict(entries_item_data)
|
|
58
|
+
|
|
59
|
+
entries.append(entries_item)
|
|
60
|
+
|
|
61
|
+
def _parse_next_cursor(data: object) -> None | str:
|
|
62
|
+
if data is None:
|
|
63
|
+
return data
|
|
64
|
+
return cast(None | str, data)
|
|
65
|
+
|
|
66
|
+
next_cursor = _parse_next_cursor(d.pop("next_cursor"))
|
|
67
|
+
|
|
68
|
+
org_ledger_response = cls(
|
|
69
|
+
entries=entries,
|
|
70
|
+
next_cursor=next_cursor,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
org_ledger_response.additional_properties = d
|
|
74
|
+
return org_ledger_response
|
|
75
|
+
|
|
76
|
+
@property
|
|
77
|
+
def additional_keys(self) -> list[str]:
|
|
78
|
+
return list(self.additional_properties.keys())
|
|
79
|
+
|
|
80
|
+
def __getitem__(self, key: str) -> Any:
|
|
81
|
+
return self.additional_properties[key]
|
|
82
|
+
|
|
83
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
84
|
+
self.additional_properties[key] = value
|
|
85
|
+
|
|
86
|
+
def __delitem__(self, key: str) -> None:
|
|
87
|
+
del self.additional_properties[key]
|
|
88
|
+
|
|
89
|
+
def __contains__(self, key: str) -> bool:
|
|
90
|
+
return key in self.additional_properties
|