samplehc 0.15.0__py3-none-any.whl → 0.16.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.
@@ -1,17 +1,17 @@
1
1
  samplehc/__init__.py,sha256=Kze-TKDp8j_TYknemcBAyGIxn7a_RUlisf07X8IYIVI,2731
2
- samplehc/_base_client.py,sha256=uAEatHvCkBLjMAdldUYk_rjn_2MK973Ud3kvh6GAULQ,67249
3
- samplehc/_client.py,sha256=Zrv9qsKlxlGt7aMokgvad3n6FqkzZUyrv1lmuImYaus,17978
2
+ samplehc/_base_client.py,sha256=ooaPntKjp5cnswE1QYfWraRZ2j7m2ctk3ypSUQZyfqQ,73411
3
+ samplehc/_client.py,sha256=RltjjBsbgnYUsGYWxlPrUP7dvoV6xs0jkRYHmBbDXvA,17888
4
4
  samplehc/_compat.py,sha256=DQBVORjFb33zch24jzkhM14msvnzY7mmSmgDLaVFUM8,6562
5
5
  samplehc/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
6
6
  samplehc/_exceptions.py,sha256=MxVd0pThtjM7aV1xjQcQ6nGSfxJMa5xPhoLsmtSxQgU,3240
7
7
  samplehc/_files.py,sha256=KnEzGi_O756MvKyJ4fOCW_u3JhOeWPQ4RsmDvqihDQU,3545
8
- samplehc/_models.py,sha256=3D65psj_C02Mw0K2zpBWrn1khmrvtEXgTTQ6P4r3tUY,31837
8
+ samplehc/_models.py,sha256=R3MpO2z4XhTAnD3ObEks32suRXleF1g7BEgQTOLIxTs,32112
9
9
  samplehc/_qs.py,sha256=craIKyvPktJ94cvf9zn8j8ekG9dWJzhWv0ob34lIOv4,4828
10
10
  samplehc/_resource.py,sha256=Mdg6fhf_5wYd2K2JZ4BQIJMPqJOWetqpJE3h3MmGZJE,1160
11
11
  samplehc/_response.py,sha256=UzsuYRbic274gcdUWq9ShPkdRt7VrzkjaqwSwdxqWIs,28816
12
12
  samplehc/_streaming.py,sha256=Wsd0pUQJT1ZW9v_iBIFKDS9lukt3M0X96f3Enqx1PYY,10261
13
- samplehc/_types.py,sha256=tCDW3kuJCvzexBc-TpW-HFSr1MywbIMpTP8XC6jNW5c,7297
14
- samplehc/_version.py,sha256=slWiVW_1nqaGXzUfxtKBYd41eSDG8A549XIiS19wYUY,161
13
+ samplehc/_types.py,sha256=j9OfrgjmrZOU2T8RbK9QKC0plnD1UCUWuH5oRR2oY3c,7596
14
+ samplehc/_version.py,sha256=NqW5Tgc-4ohb9RQyQlhsh_eNNM2WV1Ha7vejtdTaLsE,161
15
15
  samplehc/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  samplehc/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
17
17
  samplehc/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
@@ -29,13 +29,13 @@ samplehc/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
29
29
  samplehc/resources/__init__.py,sha256=d6hMh8jB7d3_ni6az6tWaXvUcIewUm0vRE2O_Y4ZTFw,898
30
30
  samplehc/resources/v1/__init__.py,sha256=TSJ6b8GNHShyK5w7efHV93u1bY2jYVySQRa2zKc1dKM,500
31
31
  samplehc/resources/v1/v1.py,sha256=G1SUS5rZhcE01slcOd5-ZeSn2cERwvmcfJzb0rywAdA,10965
32
- samplehc/resources/v2/__init__.py,sha256=KNFQAOHJ8fixbU9c9FLL4Jfprujvk7JIEvgMRmFmBok,6846
32
+ samplehc/resources/v2/__init__.py,sha256=C-gdjKWxDsIYZL6QSWAOuyYGhWFd1VbIHx86iIk_C8g,6396
33
33
  samplehc/resources/v2/async_results.py,sha256=UBGM6qCcWuivX169CkJ9hvwZymz4-fQbHPSnzQOXhZc,13624
34
- samplehc/resources/v2/communication.py,sha256=m6rytLcGlDtFkajfi-P5WQkaCyYbaMlBI2UrBLJ9xqI,21054
34
+ samplehc/resources/v2/communication.py,sha256=fHM2kBpKvOpzROfVKIx2Nmuw-iSs6nSH-IZJZdte3M8,21239
35
35
  samplehc/resources/v2/database.py,sha256=lFLepM70TzkRBaejyfU5GmE3PfgIaBi_liRTpJs2lzM,7950
36
36
  samplehc/resources/v2/events.py,sha256=Kdx2fSNGr21YA7fAHvs9huMGDRra8bsvnxiO1B1ZlSE,6658
37
37
  samplehc/resources/v2/policies.py,sha256=V9631MIrlZ99oqT8v_V8Qj9a76rG317bklyoV-vNNAY,24899
38
- samplehc/resources/v2/v2.py,sha256=GFKZsB5vsrPlPEi-3dsCi7qCWgBZ__dc6BSUVpR20zU,17283
38
+ samplehc/resources/v2/v2.py,sha256=gT7xJ50qahJQBzrPObc49QvdFMg2yYOVrxYy5HStjDE,16223
39
39
  samplehc/resources/v2/workflows.py,sha256=tORLHVCYwhwFcRLlXHBxcgZ9EYjinwXcFHjX04pCKUs,14242
40
40
  samplehc/resources/v2/clearinghouse/__init__.py,sha256=q2mqlV5eEa0qmHkoQUSDMsZ5zxunWN5Eo6boQaNs49Q,1530
41
41
  samplehc/resources/v2/clearinghouse/claim.py,sha256=ZgDjj4x9EWiNfFikACEBj6B-rFjtZ5-0oFN_EuDgemo,16336
@@ -71,10 +71,6 @@ samplehc/resources/v2/integrations/kno2/messages.py,sha256=BlIUV_1ae2lNtjI6wJigX
71
71
  samplehc/resources/v2/integrations/wellsky/__init__.py,sha256=-DaaU18hvyGskY1k5y3LsMtAw8nv5X6nB2PM4BFHkS8,1041
72
72
  samplehc/resources/v2/integrations/wellsky/patients.py,sha256=9TSUdr9taZMtb7yuPOL_85AMMc6BAfKrTgpJgUmsPIU,11493
73
73
  samplehc/resources/v2/integrations/wellsky/wellsky.py,sha256=0-8yyclRm13JRUbH-KJpPk0uwbPke8qunO98QNF9mDw,3697
74
- samplehc/resources/v2/ledger/__init__.py,sha256=wJp8z_TSgl7zuOvOvFxpwUBMAaVp4mRI2NVkbKGKiL0,1452
75
- samplehc/resources/v2/ledger/account.py,sha256=Fc3A7czMWCVa1jPZXiZ2EQjtmMjVqEOz4jwAihS9N_I,11452
76
- samplehc/resources/v2/ledger/entry.py,sha256=m0IuJr2Objsnm5int5Z7VGtJQkmVcFDzbK0yAqP1CUg,13982
77
- samplehc/resources/v2/ledger/ledger.py,sha256=Ayzzu9491xWtnQIFuXNbKDk19JYhHCxqT1msqHElxMI,4670
78
74
  samplehc/resources/v2/tasks/__init__.py,sha256=ez5eX-qrV79bmAy3vh-Yp2cWCpVIeDM36Zkn4lDChVg,976
79
75
  samplehc/resources/v2/tasks/state.py,sha256=VuECXSNXtdWhaJS3cNcTIdecuQJajCGIFP3lyPZi_xA,9666
80
76
  samplehc/resources/v2/tasks/tasks.py,sha256=ceIWwD6P0804Hk2HkmP0mEJFC89jDvvL3atk7ep1Paw,29581
@@ -87,7 +83,7 @@ samplehc/types/v1_query_audit_logs_response.py,sha256=q9TZGuYWsOa6nogQLzWyVl3Ikl
87
83
  samplehc/types/v1_sql_execute_params.py,sha256=mC_HUkRzC_d4Ve0XkRMR3VrpZHRqY6RQzaAe-hOdgEA,728
88
84
  samplehc/types/v1_sql_execute_response.py,sha256=Fo8npustnKfbqpw8a8FSqYSOwaakmZ4siPC1LRVbpWg,683
89
85
  samplehc/types/v1/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
90
- samplehc/types/v2/__init__.py,sha256=EPirAK-vqHYVr_CsUe3itn3PUAi1qE68b9Or806QV-U,7130
86
+ samplehc/types/v2/__init__.py,sha256=x9TCAkscWFF-RbtHGiE7vLSqbdKOd7PnNdpwYQDI0kI,7242
91
87
  samplehc/types/v2/async_result_retrieve_response.py,sha256=hDRnUnMvLJav6RzGqFH7OsZ2fPrTXOaTqlGbWzUhWVU,504
92
88
  samplehc/types/v2/async_result_sleep_params.py,sha256=vdhEdUP6vA9Y44waJBU2p_PEC-rzWBOr4RkE1F2eTHs,729
93
89
  samplehc/types/v2/async_result_sleep_response.py,sha256=nAUL4IVyG9RjVZtNyMnn_sp1mcwatJCEBjBCDf6bDtM,366
@@ -99,6 +95,7 @@ samplehc/types/v2/clearinghouse_coordination_of_benefits_params.py,sha256=09vrP_
99
95
  samplehc/types/v2/clearinghouse_run_discovery_params.py,sha256=JiXY5K6qy70xzuQYhWsgo9eLRGs_N1RI5rIs3FRThWg,1779
100
96
  samplehc/types/v2/clearinghouse_run_discovery_response.py,sha256=w5f93IiFraHYlg5_yUEBpLhtdymZHqGbY5lpUcucZfo,341
101
97
  samplehc/types/v2/communication_send_email_params.py,sha256=thNaWdxK4JwOk4JQ0zvb3rab9AlOfkDbaweP_7vXsIg,1638
98
+ samplehc/types/v2/communication_send_email_response.py,sha256=0MFpU0BjZymL6dkOnxZ7wo-lUGy0l1eMjJ_vQxotejQ,665
102
99
  samplehc/types/v2/communication_send_fax_params.py,sha256=QysQOLT_Rj4Cd_Q-YApgHoa6SOlTpFlXpTipwYJ9d-E,1595
103
100
  samplehc/types/v2/communication_send_fax_response.py,sha256=BPXrsTZPB2rMVdkToQC1y69i-9eN-X830gRit10SRwY,427
104
101
  samplehc/types/v2/communication_send_letter_params.py,sha256=rr_Ys_-WYo4ihzEyYZWyI9_-agL37zlRoJSW-7Dm5Yw,2136
@@ -216,20 +213,14 @@ samplehc/types/v2/integrations/kno2/message_retrieve_response.py,sha256=tZ-l1Plj
216
213
  samplehc/types/v2/integrations/wellsky/__init__.py,sha256=yMzbfqlrc8-Dbq1uhpHeZ0XgRCdyyAeo-Vf-gCBhIi8,270
217
214
  samplehc/types/v2/integrations/wellsky/patient_add_params.py,sha256=5pHaMWacMXHzybjSOxcDOnw8VRoQz51X0IrYxfe_lwc,367
218
215
  samplehc/types/v2/integrations/wellsky/patient_search_params.py,sha256=tFOPYSIsulg6NTYJqQscM2g5Zpt_eBPyJroBRTWxvLY,947
219
- samplehc/types/v2/ledger/__init__.py,sha256=UR89wcUHLaMEO1ZNDPNCGMK9ibhjF8oJ9eSV9RCw53s,591
220
- samplehc/types/v2/ledger/account_writeoff_params.py,sha256=hRmn--xzlslRj8HGctk8ZBeWknSX_87P77Qw-sybzE4,695
221
- samplehc/types/v2/ledger/account_writeoff_response.py,sha256=W-pBaGANRA0VqPme3uyfCxDGrIB_SvOvJW-rzi_w5bw,311
222
- samplehc/types/v2/ledger/entry_post_params.py,sha256=5AOS5cXp1gp6plyDyVJ5OMNk_57XqCP1LFUkGbAu7Vc,1976
223
- samplehc/types/v2/ledger/entry_post_response.py,sha256=mHtn35Ec6n-5PNhkkSgwM0xX-tGxx6KB1EYKwX-iY6c,264
224
- samplehc/types/v2/ledger/entry_reverse_params.py,sha256=pcFBLxZ_XiS6hXB8uphYw_H89j83fLW1XpZd40NCgw4,545
225
- samplehc/types/v2/ledger/entry_reverse_response.py,sha256=nJJLjDWSjhPICqxuCoP77v8qwiCVZeocrhoeH3fREWs,279
216
+ samplehc/types/v2/ledger/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
226
217
  samplehc/types/v2/tasks/__init__.py,sha256=iciLaYiYWPApWbgmJHjbUtC00sqrV6ziysyv0z4Pbl8,342
227
218
  samplehc/types/v2/tasks/state_get_response.py,sha256=_Eyz7nB-XpI_zkG45fTR2aC7AZIpNaxJHyYEOV_EN-w,232
228
219
  samplehc/types/v2/tasks/state_update_params.py,sha256=qSLE4Ic5PJlkvcFbTu-KlfH6qgYQCpIMqFoIspMPVNI,299
229
220
  samplehc/types/v2/tasks/state_update_response.py,sha256=ZLnR_rl9yasOnaxQvcM3fiaI_H16pDjBve1GUUleul4,214
230
221
  samplehc/types/v2/workflow_runs/__init__.py,sha256=Nmrudr30JDOaGyeMcc_dqaqqs_9kTdebHD7W0vHHfdE,208
231
222
  samplehc/types/v2/workflow_runs/step_get_output_response.py,sha256=7uRQ1Jlt2LRZyAcn_bN2L9Ac2IkFbZAfpBuGaV6NiBk,385
232
- samplehc-0.15.0.dist-info/METADATA,sha256=s_7vuyvCW-e7n44TdlhNCyWvNFmELoMAObp6cwY8WJU,14360
233
- samplehc-0.15.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
234
- samplehc-0.15.0.dist-info/licenses/LICENSE,sha256=ll_q1imgsIlRXL5pk6VmrO0f_L0thzOlPI2cc7qcqc0,11347
235
- samplehc-0.15.0.dist-info/RECORD,,
223
+ samplehc-0.16.0.dist-info/METADATA,sha256=fl-VwzL-IW0c6JUSZRbfHCihENzNLDX69NRQ0lZzO_w,14360
224
+ samplehc-0.16.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
225
+ samplehc-0.16.0.dist-info/licenses/LICENSE,sha256=ll_q1imgsIlRXL5pk6VmrO0f_L0thzOlPI2cc7qcqc0,11347
226
+ samplehc-0.16.0.dist-info/RECORD,,
@@ -1,47 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from .entry import (
4
- EntryResource,
5
- AsyncEntryResource,
6
- EntryResourceWithRawResponse,
7
- AsyncEntryResourceWithRawResponse,
8
- EntryResourceWithStreamingResponse,
9
- AsyncEntryResourceWithStreamingResponse,
10
- )
11
- from .ledger import (
12
- LedgerResource,
13
- AsyncLedgerResource,
14
- LedgerResourceWithRawResponse,
15
- AsyncLedgerResourceWithRawResponse,
16
- LedgerResourceWithStreamingResponse,
17
- AsyncLedgerResourceWithStreamingResponse,
18
- )
19
- from .account import (
20
- AccountResource,
21
- AsyncAccountResource,
22
- AccountResourceWithRawResponse,
23
- AsyncAccountResourceWithRawResponse,
24
- AccountResourceWithStreamingResponse,
25
- AsyncAccountResourceWithStreamingResponse,
26
- )
27
-
28
- __all__ = [
29
- "EntryResource",
30
- "AsyncEntryResource",
31
- "EntryResourceWithRawResponse",
32
- "AsyncEntryResourceWithRawResponse",
33
- "EntryResourceWithStreamingResponse",
34
- "AsyncEntryResourceWithStreamingResponse",
35
- "AccountResource",
36
- "AsyncAccountResource",
37
- "AccountResourceWithRawResponse",
38
- "AsyncAccountResourceWithRawResponse",
39
- "AccountResourceWithStreamingResponse",
40
- "AsyncAccountResourceWithStreamingResponse",
41
- "LedgerResource",
42
- "AsyncLedgerResource",
43
- "LedgerResourceWithRawResponse",
44
- "AsyncLedgerResourceWithRawResponse",
45
- "LedgerResourceWithStreamingResponse",
46
- "AsyncLedgerResourceWithStreamingResponse",
47
- ]
@@ -1,297 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from __future__ import annotations
4
-
5
- from typing import Dict
6
-
7
- import httpx
8
-
9
- from ...._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given
10
- from ...._utils import maybe_transform, async_maybe_transform
11
- from ...._compat import cached_property
12
- from ...._resource import SyncAPIResource, AsyncAPIResource
13
- from ...._response import (
14
- to_raw_response_wrapper,
15
- to_streamed_response_wrapper,
16
- async_to_raw_response_wrapper,
17
- async_to_streamed_response_wrapper,
18
- )
19
- from ...._base_client import make_request_options
20
- from ....types.v2.ledger import account_writeoff_params
21
- from ....types.v2.ledger.account_writeoff_response import AccountWriteoffResponse
22
-
23
- __all__ = ["AccountResource", "AsyncAccountResource"]
24
-
25
-
26
- class AccountResource(SyncAPIResource):
27
- @cached_property
28
- def with_raw_response(self) -> AccountResourceWithRawResponse:
29
- """
30
- This property can be used as a prefix for any HTTP method call to return
31
- the raw response object instead of the parsed content.
32
-
33
- For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
34
- """
35
- return AccountResourceWithRawResponse(self)
36
-
37
- @cached_property
38
- def with_streaming_response(self) -> AccountResourceWithStreamingResponse:
39
- """
40
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
41
-
42
- For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
43
- """
44
- return AccountResourceWithStreamingResponse(self)
45
-
46
- def get_balance(
47
- self,
48
- line_item_id: str,
49
- *,
50
- order_id: str,
51
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
52
- # The extra values given here take precedence over values defined on the client or passed to this method.
53
- extra_headers: Headers | None = None,
54
- extra_query: Query | None = None,
55
- extra_body: Body | None = None,
56
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
57
- ) -> None:
58
- """
59
- Get balance for a ledger account
60
-
61
- Args:
62
- extra_headers: Send extra headers
63
-
64
- extra_query: Add additional query parameters to the request
65
-
66
- extra_body: Add additional JSON properties to the request
67
-
68
- timeout: Override the client-level default timeout for this request, in seconds
69
- """
70
- if not order_id:
71
- raise ValueError(f"Expected a non-empty value for `order_id` but received {order_id!r}")
72
- if not line_item_id:
73
- raise ValueError(f"Expected a non-empty value for `line_item_id` but received {line_item_id!r}")
74
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
75
- return self._get(
76
- f"/api/v2/ledger/account/{order_id}/line-item/{line_item_id}/balance",
77
- options=make_request_options(
78
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
79
- ),
80
- cast_to=NoneType,
81
- )
82
-
83
- def writeoff(
84
- self,
85
- line_item_id: str,
86
- *,
87
- order_id: str,
88
- description: str,
89
- metadata: Dict[str, object] | Omit = omit,
90
- posted_at: str | Omit = omit,
91
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
92
- # The extra values given here take precedence over values defined on the client or passed to this method.
93
- extra_headers: Headers | None = None,
94
- extra_query: Query | None = None,
95
- extra_body: Body | None = None,
96
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
97
- ) -> AccountWriteoffResponse:
98
- """Writes off the remaining balance in an account on the ledger.
99
-
100
- Throws an error if
101
- the account contains a non-positive balance.
102
-
103
- Args:
104
- description: The description of the write-off.
105
-
106
- metadata: Any optional metadata to associate with the write-off.
107
-
108
- posted_at: The date and time to post the write-off.
109
-
110
- extra_headers: Send extra headers
111
-
112
- extra_query: Add additional query parameters to the request
113
-
114
- extra_body: Add additional JSON properties to the request
115
-
116
- timeout: Override the client-level default timeout for this request, in seconds
117
- """
118
- if not order_id:
119
- raise ValueError(f"Expected a non-empty value for `order_id` but received {order_id!r}")
120
- if not line_item_id:
121
- raise ValueError(f"Expected a non-empty value for `line_item_id` but received {line_item_id!r}")
122
- return self._post(
123
- f"/api/v2/ledger/account/{order_id}/line-item/{line_item_id}/writeoff",
124
- body=maybe_transform(
125
- {
126
- "description": description,
127
- "metadata": metadata,
128
- "posted_at": posted_at,
129
- },
130
- account_writeoff_params.AccountWriteoffParams,
131
- ),
132
- options=make_request_options(
133
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
134
- ),
135
- cast_to=AccountWriteoffResponse,
136
- )
137
-
138
-
139
- class AsyncAccountResource(AsyncAPIResource):
140
- @cached_property
141
- def with_raw_response(self) -> AsyncAccountResourceWithRawResponse:
142
- """
143
- This property can be used as a prefix for any HTTP method call to return
144
- the raw response object instead of the parsed content.
145
-
146
- For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
147
- """
148
- return AsyncAccountResourceWithRawResponse(self)
149
-
150
- @cached_property
151
- def with_streaming_response(self) -> AsyncAccountResourceWithStreamingResponse:
152
- """
153
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
154
-
155
- For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
156
- """
157
- return AsyncAccountResourceWithStreamingResponse(self)
158
-
159
- async def get_balance(
160
- self,
161
- line_item_id: str,
162
- *,
163
- order_id: str,
164
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
165
- # The extra values given here take precedence over values defined on the client or passed to this method.
166
- extra_headers: Headers | None = None,
167
- extra_query: Query | None = None,
168
- extra_body: Body | None = None,
169
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
170
- ) -> None:
171
- """
172
- Get balance for a ledger account
173
-
174
- Args:
175
- extra_headers: Send extra headers
176
-
177
- extra_query: Add additional query parameters to the request
178
-
179
- extra_body: Add additional JSON properties to the request
180
-
181
- timeout: Override the client-level default timeout for this request, in seconds
182
- """
183
- if not order_id:
184
- raise ValueError(f"Expected a non-empty value for `order_id` but received {order_id!r}")
185
- if not line_item_id:
186
- raise ValueError(f"Expected a non-empty value for `line_item_id` but received {line_item_id!r}")
187
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
188
- return await self._get(
189
- f"/api/v2/ledger/account/{order_id}/line-item/{line_item_id}/balance",
190
- options=make_request_options(
191
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
192
- ),
193
- cast_to=NoneType,
194
- )
195
-
196
- async def writeoff(
197
- self,
198
- line_item_id: str,
199
- *,
200
- order_id: str,
201
- description: str,
202
- metadata: Dict[str, object] | Omit = omit,
203
- posted_at: str | Omit = omit,
204
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
205
- # The extra values given here take precedence over values defined on the client or passed to this method.
206
- extra_headers: Headers | None = None,
207
- extra_query: Query | None = None,
208
- extra_body: Body | None = None,
209
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
210
- ) -> AccountWriteoffResponse:
211
- """Writes off the remaining balance in an account on the ledger.
212
-
213
- Throws an error if
214
- the account contains a non-positive balance.
215
-
216
- Args:
217
- description: The description of the write-off.
218
-
219
- metadata: Any optional metadata to associate with the write-off.
220
-
221
- posted_at: The date and time to post the write-off.
222
-
223
- extra_headers: Send extra headers
224
-
225
- extra_query: Add additional query parameters to the request
226
-
227
- extra_body: Add additional JSON properties to the request
228
-
229
- timeout: Override the client-level default timeout for this request, in seconds
230
- """
231
- if not order_id:
232
- raise ValueError(f"Expected a non-empty value for `order_id` but received {order_id!r}")
233
- if not line_item_id:
234
- raise ValueError(f"Expected a non-empty value for `line_item_id` but received {line_item_id!r}")
235
- return await self._post(
236
- f"/api/v2/ledger/account/{order_id}/line-item/{line_item_id}/writeoff",
237
- body=await async_maybe_transform(
238
- {
239
- "description": description,
240
- "metadata": metadata,
241
- "posted_at": posted_at,
242
- },
243
- account_writeoff_params.AccountWriteoffParams,
244
- ),
245
- options=make_request_options(
246
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
247
- ),
248
- cast_to=AccountWriteoffResponse,
249
- )
250
-
251
-
252
- class AccountResourceWithRawResponse:
253
- def __init__(self, account: AccountResource) -> None:
254
- self._account = account
255
-
256
- self.get_balance = to_raw_response_wrapper(
257
- account.get_balance,
258
- )
259
- self.writeoff = to_raw_response_wrapper(
260
- account.writeoff,
261
- )
262
-
263
-
264
- class AsyncAccountResourceWithRawResponse:
265
- def __init__(self, account: AsyncAccountResource) -> None:
266
- self._account = account
267
-
268
- self.get_balance = async_to_raw_response_wrapper(
269
- account.get_balance,
270
- )
271
- self.writeoff = async_to_raw_response_wrapper(
272
- account.writeoff,
273
- )
274
-
275
-
276
- class AccountResourceWithStreamingResponse:
277
- def __init__(self, account: AccountResource) -> None:
278
- self._account = account
279
-
280
- self.get_balance = to_streamed_response_wrapper(
281
- account.get_balance,
282
- )
283
- self.writeoff = to_streamed_response_wrapper(
284
- account.writeoff,
285
- )
286
-
287
-
288
- class AsyncAccountResourceWithStreamingResponse:
289
- def __init__(self, account: AsyncAccountResource) -> None:
290
- self._account = account
291
-
292
- self.get_balance = async_to_streamed_response_wrapper(
293
- account.get_balance,
294
- )
295
- self.writeoff = async_to_streamed_response_wrapper(
296
- account.writeoff,
297
- )