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,69 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="PresignedPartUrl")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class PresignedPartUrl:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
n (int): The 1-based part number this URL is for.
|
|
17
|
+
url (str): A presigned R2 PUT URL, valid for a limited time.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
n: int
|
|
21
|
+
url: str
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
n = self.n
|
|
26
|
+
|
|
27
|
+
url = self.url
|
|
28
|
+
|
|
29
|
+
field_dict: dict[str, Any] = {}
|
|
30
|
+
field_dict.update(self.additional_properties)
|
|
31
|
+
field_dict.update(
|
|
32
|
+
{
|
|
33
|
+
"n": n,
|
|
34
|
+
"url": url,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
return field_dict
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
42
|
+
d = dict(src_dict)
|
|
43
|
+
n = d.pop("n")
|
|
44
|
+
|
|
45
|
+
url = d.pop("url")
|
|
46
|
+
|
|
47
|
+
presigned_part_url = cls(
|
|
48
|
+
n=n,
|
|
49
|
+
url=url,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
presigned_part_url.additional_properties = d
|
|
53
|
+
return presigned_part_url
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def additional_keys(self) -> list[str]:
|
|
57
|
+
return list(self.additional_properties.keys())
|
|
58
|
+
|
|
59
|
+
def __getitem__(self, key: str) -> Any:
|
|
60
|
+
return self.additional_properties[key]
|
|
61
|
+
|
|
62
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
63
|
+
self.additional_properties[key] = value
|
|
64
|
+
|
|
65
|
+
def __delitem__(self, key: str) -> None:
|
|
66
|
+
del self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __contains__(self, key: str) -> bool:
|
|
69
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import (
|
|
5
|
+
Any,
|
|
6
|
+
Literal,
|
|
7
|
+
TypeVar,
|
|
8
|
+
cast,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
from attrs import define as _attrs_define
|
|
12
|
+
from attrs import field as _attrs_field
|
|
13
|
+
|
|
14
|
+
T = TypeVar("T", bound="PurchaseResponse")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@_attrs_define
|
|
18
|
+
class PurchaseResponse:
|
|
19
|
+
"""
|
|
20
|
+
Attributes:
|
|
21
|
+
status (Literal['ok']):
|
|
22
|
+
balance_seconds (int): The account's net balance after this purchase settled.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
status: Literal["ok"]
|
|
26
|
+
balance_seconds: int
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
status = self.status
|
|
31
|
+
|
|
32
|
+
balance_seconds = self.balance_seconds
|
|
33
|
+
|
|
34
|
+
field_dict: dict[str, Any] = {}
|
|
35
|
+
field_dict.update(self.additional_properties)
|
|
36
|
+
field_dict.update(
|
|
37
|
+
{
|
|
38
|
+
"status": status,
|
|
39
|
+
"balance_seconds": balance_seconds,
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
return field_dict
|
|
44
|
+
|
|
45
|
+
@classmethod
|
|
46
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
47
|
+
d = dict(src_dict)
|
|
48
|
+
status = cast(Literal["ok"], d.pop("status"))
|
|
49
|
+
if status != "ok":
|
|
50
|
+
raise ValueError(f"status must match const 'ok', got '{status}'")
|
|
51
|
+
|
|
52
|
+
balance_seconds = d.pop("balance_seconds")
|
|
53
|
+
|
|
54
|
+
purchase_response = cls(
|
|
55
|
+
status=status,
|
|
56
|
+
balance_seconds=balance_seconds,
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
purchase_response.additional_properties = d
|
|
60
|
+
return purchase_response
|
|
61
|
+
|
|
62
|
+
@property
|
|
63
|
+
def additional_keys(self) -> list[str]:
|
|
64
|
+
return list(self.additional_properties.keys())
|
|
65
|
+
|
|
66
|
+
def __getitem__(self, key: str) -> Any:
|
|
67
|
+
return self.additional_properties[key]
|
|
68
|
+
|
|
69
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
70
|
+
self.additional_properties[key] = value
|
|
71
|
+
|
|
72
|
+
def __delitem__(self, key: str) -> None:
|
|
73
|
+
del self.additional_properties[key]
|
|
74
|
+
|
|
75
|
+
def __contains__(self, key: str) -> bool:
|
|
76
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..models.schedule_org_custody_body_custody import (
|
|
10
|
+
ScheduleOrgCustodyBodyCustody,
|
|
11
|
+
check_schedule_org_custody_body_custody,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
T = TypeVar("T", bound="ScheduleOrgCustodyBody")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@_attrs_define
|
|
18
|
+
class ScheduleOrgCustodyBody:
|
|
19
|
+
"""
|
|
20
|
+
Attributes:
|
|
21
|
+
custody (ScheduleOrgCustodyBodyCustody): Must be firm; this route only schedules the private to firm switch.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
custody: ScheduleOrgCustodyBodyCustody
|
|
25
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
26
|
+
|
|
27
|
+
def to_dict(self) -> dict[str, Any]:
|
|
28
|
+
custody: str = self.custody
|
|
29
|
+
|
|
30
|
+
field_dict: dict[str, Any] = {}
|
|
31
|
+
field_dict.update(self.additional_properties)
|
|
32
|
+
field_dict.update(
|
|
33
|
+
{
|
|
34
|
+
"custody": custody,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
return field_dict
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
42
|
+
d = dict(src_dict)
|
|
43
|
+
custody = check_schedule_org_custody_body_custody(d.pop("custody"))
|
|
44
|
+
|
|
45
|
+
schedule_org_custody_body = cls(
|
|
46
|
+
custody=custody,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
schedule_org_custody_body.additional_properties = d
|
|
50
|
+
return schedule_org_custody_body
|
|
51
|
+
|
|
52
|
+
@property
|
|
53
|
+
def additional_keys(self) -> list[str]:
|
|
54
|
+
return list(self.additional_properties.keys())
|
|
55
|
+
|
|
56
|
+
def __getitem__(self, key: str) -> Any:
|
|
57
|
+
return self.additional_properties[key]
|
|
58
|
+
|
|
59
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
60
|
+
self.additional_properties[key] = value
|
|
61
|
+
|
|
62
|
+
def __delitem__(self, key: str) -> None:
|
|
63
|
+
del self.additional_properties[key]
|
|
64
|
+
|
|
65
|
+
def __contains__(self, key: str) -> bool:
|
|
66
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from typing import Literal
|
|
2
|
+
|
|
3
|
+
ScheduleOrgCustodyBodyCustody = Literal["firm"]
|
|
4
|
+
|
|
5
|
+
SCHEDULE_ORG_CUSTODY_BODY_CUSTODY_VALUES: set[ScheduleOrgCustodyBodyCustody] = {
|
|
6
|
+
"firm",
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def check_schedule_org_custody_body_custody(
|
|
11
|
+
value: str,
|
|
12
|
+
) -> ScheduleOrgCustodyBodyCustody:
|
|
13
|
+
if value in SCHEDULE_ORG_CUSTODY_BODY_CUSTODY_VALUES:
|
|
14
|
+
return value
|
|
15
|
+
raise TypeError(
|
|
16
|
+
f"Unexpected value {value!r}. Expected one of {SCHEDULE_ORG_CUSTODY_BODY_CUSTODY_VALUES!r}"
|
|
17
|
+
)
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="ScheduleOrgCustodyResponse200")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class ScheduleOrgCustodyResponse200:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
ok (bool):
|
|
17
|
+
switch_at (int): Unix timestamp when the switch to firm custody takes effect.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
ok: bool
|
|
21
|
+
switch_at: int
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
ok = self.ok
|
|
26
|
+
|
|
27
|
+
switch_at = self.switch_at
|
|
28
|
+
|
|
29
|
+
field_dict: dict[str, Any] = {}
|
|
30
|
+
field_dict.update(self.additional_properties)
|
|
31
|
+
field_dict.update(
|
|
32
|
+
{
|
|
33
|
+
"ok": ok,
|
|
34
|
+
"switch_at": switch_at,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
return field_dict
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
42
|
+
d = dict(src_dict)
|
|
43
|
+
ok = d.pop("ok")
|
|
44
|
+
|
|
45
|
+
switch_at = d.pop("switch_at")
|
|
46
|
+
|
|
47
|
+
schedule_org_custody_response_200 = cls(
|
|
48
|
+
ok=ok,
|
|
49
|
+
switch_at=switch_at,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
schedule_org_custody_response_200.additional_properties = d
|
|
53
|
+
return schedule_org_custody_response_200
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def additional_keys(self) -> list[str]:
|
|
57
|
+
return list(self.additional_properties.keys())
|
|
58
|
+
|
|
59
|
+
def __getitem__(self, key: str) -> Any:
|
|
60
|
+
return self.additional_properties[key]
|
|
61
|
+
|
|
62
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
63
|
+
self.additional_properties[key] = value
|
|
64
|
+
|
|
65
|
+
def __delitem__(self, key: str) -> None:
|
|
66
|
+
del self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __contains__(self, key: str) -> bool:
|
|
69
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="SetDefaultCardBody")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class SetDefaultCardBody:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
payment_method_id (str): The id of a card from list_saved_cards to make the new default.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
payment_method_id: str
|
|
20
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
21
|
+
|
|
22
|
+
def to_dict(self) -> dict[str, Any]:
|
|
23
|
+
payment_method_id = self.payment_method_id
|
|
24
|
+
|
|
25
|
+
field_dict: dict[str, Any] = {}
|
|
26
|
+
field_dict.update(self.additional_properties)
|
|
27
|
+
field_dict.update(
|
|
28
|
+
{
|
|
29
|
+
"payment_method_id": payment_method_id,
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
return field_dict
|
|
34
|
+
|
|
35
|
+
@classmethod
|
|
36
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
37
|
+
d = dict(src_dict)
|
|
38
|
+
payment_method_id = d.pop("payment_method_id")
|
|
39
|
+
|
|
40
|
+
set_default_card_body = cls(
|
|
41
|
+
payment_method_id=payment_method_id,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
set_default_card_body.additional_properties = d
|
|
45
|
+
return set_default_card_body
|
|
46
|
+
|
|
47
|
+
@property
|
|
48
|
+
def additional_keys(self) -> list[str]:
|
|
49
|
+
return list(self.additional_properties.keys())
|
|
50
|
+
|
|
51
|
+
def __getitem__(self, key: str) -> Any:
|
|
52
|
+
return self.additional_properties[key]
|
|
53
|
+
|
|
54
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
55
|
+
self.additional_properties[key] = value
|
|
56
|
+
|
|
57
|
+
def __delitem__(self, key: str) -> None:
|
|
58
|
+
del self.additional_properties[key]
|
|
59
|
+
|
|
60
|
+
def __contains__(self, key: str) -> bool:
|
|
61
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="SetDefaultCardResponse200")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class SetDefaultCardResponse200:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
ok (bool):
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
ok: bool
|
|
20
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
21
|
+
|
|
22
|
+
def to_dict(self) -> dict[str, Any]:
|
|
23
|
+
ok = self.ok
|
|
24
|
+
|
|
25
|
+
field_dict: dict[str, Any] = {}
|
|
26
|
+
field_dict.update(self.additional_properties)
|
|
27
|
+
field_dict.update(
|
|
28
|
+
{
|
|
29
|
+
"ok": ok,
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
return field_dict
|
|
34
|
+
|
|
35
|
+
@classmethod
|
|
36
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
37
|
+
d = dict(src_dict)
|
|
38
|
+
ok = d.pop("ok")
|
|
39
|
+
|
|
40
|
+
set_default_card_response_200 = cls(
|
|
41
|
+
ok=ok,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
set_default_card_response_200.additional_properties = d
|
|
45
|
+
return set_default_card_response_200
|
|
46
|
+
|
|
47
|
+
@property
|
|
48
|
+
def additional_keys(self) -> list[str]:
|
|
49
|
+
return list(self.additional_properties.keys())
|
|
50
|
+
|
|
51
|
+
def __getitem__(self, key: str) -> Any:
|
|
52
|
+
return self.additional_properties[key]
|
|
53
|
+
|
|
54
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
55
|
+
self.additional_properties[key] = value
|
|
56
|
+
|
|
57
|
+
def __delitem__(self, key: str) -> None:
|
|
58
|
+
del self.additional_properties[key]
|
|
59
|
+
|
|
60
|
+
def __contains__(self, key: str) -> bool:
|
|
61
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="SetupSessionResponse")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class SetupSessionResponse:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
checkout_url (str): Open this URL in a browser you control to complete the hosted setup page.
|
|
17
|
+
session_id (str):
|
|
18
|
+
expires_at (int): Unix timestamp after which the Session stops accepting a card.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
checkout_url: str
|
|
22
|
+
session_id: str
|
|
23
|
+
expires_at: int
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
checkout_url = self.checkout_url
|
|
28
|
+
|
|
29
|
+
session_id = self.session_id
|
|
30
|
+
|
|
31
|
+
expires_at = self.expires_at
|
|
32
|
+
|
|
33
|
+
field_dict: dict[str, Any] = {}
|
|
34
|
+
field_dict.update(self.additional_properties)
|
|
35
|
+
field_dict.update(
|
|
36
|
+
{
|
|
37
|
+
"checkout_url": checkout_url,
|
|
38
|
+
"session_id": session_id,
|
|
39
|
+
"expires_at": expires_at,
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
return field_dict
|
|
44
|
+
|
|
45
|
+
@classmethod
|
|
46
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
47
|
+
d = dict(src_dict)
|
|
48
|
+
checkout_url = d.pop("checkout_url")
|
|
49
|
+
|
|
50
|
+
session_id = d.pop("session_id")
|
|
51
|
+
|
|
52
|
+
expires_at = d.pop("expires_at")
|
|
53
|
+
|
|
54
|
+
setup_session_response = cls(
|
|
55
|
+
checkout_url=checkout_url,
|
|
56
|
+
session_id=session_id,
|
|
57
|
+
expires_at=expires_at,
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
setup_session_response.additional_properties = d
|
|
61
|
+
return setup_session_response
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def additional_keys(self) -> list[str]:
|
|
65
|
+
return list(self.additional_properties.keys())
|
|
66
|
+
|
|
67
|
+
def __getitem__(self, key: str) -> Any:
|
|
68
|
+
return self.additional_properties[key]
|
|
69
|
+
|
|
70
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
71
|
+
self.additional_properties[key] = value
|
|
72
|
+
|
|
73
|
+
def __delitem__(self, key: str) -> None:
|
|
74
|
+
del self.additional_properties[key]
|
|
75
|
+
|
|
76
|
+
def __contains__(self, key: str) -> bool:
|
|
77
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,183 @@
|
|
|
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="Transaction")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class Transaction:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
id (int): This row's own id.
|
|
17
|
+
seconds (int):
|
|
18
|
+
amount_cents (int):
|
|
19
|
+
amount_refunded_cents (int):
|
|
20
|
+
currency (str):
|
|
21
|
+
status (str):
|
|
22
|
+
created_at (int):
|
|
23
|
+
payment_method_type (None | str):
|
|
24
|
+
payment_method_brand (None | str):
|
|
25
|
+
payment_method_last4 (None | str):
|
|
26
|
+
receipt_number (None | str): The public receipt reference, e.g. HS-20260101-abcdef0123456789-1.
|
|
27
|
+
initiated_via (None | str):
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
id: int
|
|
31
|
+
seconds: int
|
|
32
|
+
amount_cents: int
|
|
33
|
+
amount_refunded_cents: int
|
|
34
|
+
currency: str
|
|
35
|
+
status: str
|
|
36
|
+
created_at: int
|
|
37
|
+
payment_method_type: None | str
|
|
38
|
+
payment_method_brand: None | str
|
|
39
|
+
payment_method_last4: None | str
|
|
40
|
+
receipt_number: None | str
|
|
41
|
+
initiated_via: None | str
|
|
42
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
43
|
+
|
|
44
|
+
def to_dict(self) -> dict[str, Any]:
|
|
45
|
+
id = self.id
|
|
46
|
+
|
|
47
|
+
seconds = self.seconds
|
|
48
|
+
|
|
49
|
+
amount_cents = self.amount_cents
|
|
50
|
+
|
|
51
|
+
amount_refunded_cents = self.amount_refunded_cents
|
|
52
|
+
|
|
53
|
+
currency = self.currency
|
|
54
|
+
|
|
55
|
+
status = self.status
|
|
56
|
+
|
|
57
|
+
created_at = self.created_at
|
|
58
|
+
|
|
59
|
+
payment_method_type: None | str
|
|
60
|
+
payment_method_type = self.payment_method_type
|
|
61
|
+
|
|
62
|
+
payment_method_brand: None | str
|
|
63
|
+
payment_method_brand = self.payment_method_brand
|
|
64
|
+
|
|
65
|
+
payment_method_last4: None | str
|
|
66
|
+
payment_method_last4 = self.payment_method_last4
|
|
67
|
+
|
|
68
|
+
receipt_number: None | str
|
|
69
|
+
receipt_number = self.receipt_number
|
|
70
|
+
|
|
71
|
+
initiated_via: None | str
|
|
72
|
+
initiated_via = self.initiated_via
|
|
73
|
+
|
|
74
|
+
field_dict: dict[str, Any] = {}
|
|
75
|
+
field_dict.update(self.additional_properties)
|
|
76
|
+
field_dict.update(
|
|
77
|
+
{
|
|
78
|
+
"id": id,
|
|
79
|
+
"seconds": seconds,
|
|
80
|
+
"amount_cents": amount_cents,
|
|
81
|
+
"amount_refunded_cents": amount_refunded_cents,
|
|
82
|
+
"currency": currency,
|
|
83
|
+
"status": status,
|
|
84
|
+
"created_at": created_at,
|
|
85
|
+
"payment_method_type": payment_method_type,
|
|
86
|
+
"payment_method_brand": payment_method_brand,
|
|
87
|
+
"payment_method_last4": payment_method_last4,
|
|
88
|
+
"receipt_number": receipt_number,
|
|
89
|
+
"initiated_via": initiated_via,
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
return field_dict
|
|
94
|
+
|
|
95
|
+
@classmethod
|
|
96
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
97
|
+
d = dict(src_dict)
|
|
98
|
+
id = d.pop("id")
|
|
99
|
+
|
|
100
|
+
seconds = d.pop("seconds")
|
|
101
|
+
|
|
102
|
+
amount_cents = d.pop("amount_cents")
|
|
103
|
+
|
|
104
|
+
amount_refunded_cents = d.pop("amount_refunded_cents")
|
|
105
|
+
|
|
106
|
+
currency = d.pop("currency")
|
|
107
|
+
|
|
108
|
+
status = d.pop("status")
|
|
109
|
+
|
|
110
|
+
created_at = d.pop("created_at")
|
|
111
|
+
|
|
112
|
+
def _parse_payment_method_type(data: object) -> None | str:
|
|
113
|
+
if data is None:
|
|
114
|
+
return data
|
|
115
|
+
return cast(None | str, data)
|
|
116
|
+
|
|
117
|
+
payment_method_type = _parse_payment_method_type(d.pop("payment_method_type"))
|
|
118
|
+
|
|
119
|
+
def _parse_payment_method_brand(data: object) -> None | str:
|
|
120
|
+
if data is None:
|
|
121
|
+
return data
|
|
122
|
+
return cast(None | str, data)
|
|
123
|
+
|
|
124
|
+
payment_method_brand = _parse_payment_method_brand(
|
|
125
|
+
d.pop("payment_method_brand")
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
def _parse_payment_method_last4(data: object) -> None | str:
|
|
129
|
+
if data is None:
|
|
130
|
+
return data
|
|
131
|
+
return cast(None | str, data)
|
|
132
|
+
|
|
133
|
+
payment_method_last4 = _parse_payment_method_last4(
|
|
134
|
+
d.pop("payment_method_last4")
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
def _parse_receipt_number(data: object) -> None | str:
|
|
138
|
+
if data is None:
|
|
139
|
+
return data
|
|
140
|
+
return cast(None | str, data)
|
|
141
|
+
|
|
142
|
+
receipt_number = _parse_receipt_number(d.pop("receipt_number"))
|
|
143
|
+
|
|
144
|
+
def _parse_initiated_via(data: object) -> None | str:
|
|
145
|
+
if data is None:
|
|
146
|
+
return data
|
|
147
|
+
return cast(None | str, data)
|
|
148
|
+
|
|
149
|
+
initiated_via = _parse_initiated_via(d.pop("initiated_via"))
|
|
150
|
+
|
|
151
|
+
transaction = cls(
|
|
152
|
+
id=id,
|
|
153
|
+
seconds=seconds,
|
|
154
|
+
amount_cents=amount_cents,
|
|
155
|
+
amount_refunded_cents=amount_refunded_cents,
|
|
156
|
+
currency=currency,
|
|
157
|
+
status=status,
|
|
158
|
+
created_at=created_at,
|
|
159
|
+
payment_method_type=payment_method_type,
|
|
160
|
+
payment_method_brand=payment_method_brand,
|
|
161
|
+
payment_method_last4=payment_method_last4,
|
|
162
|
+
receipt_number=receipt_number,
|
|
163
|
+
initiated_via=initiated_via,
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
transaction.additional_properties = d
|
|
167
|
+
return transaction
|
|
168
|
+
|
|
169
|
+
@property
|
|
170
|
+
def additional_keys(self) -> list[str]:
|
|
171
|
+
return list(self.additional_properties.keys())
|
|
172
|
+
|
|
173
|
+
def __getitem__(self, key: str) -> Any:
|
|
174
|
+
return self.additional_properties[key]
|
|
175
|
+
|
|
176
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
177
|
+
self.additional_properties[key] = value
|
|
178
|
+
|
|
179
|
+
def __delitem__(self, key: str) -> None:
|
|
180
|
+
del self.additional_properties[key]
|
|
181
|
+
|
|
182
|
+
def __contains__(self, key: str) -> bool:
|
|
183
|
+
return key in self.additional_properties
|