samplehc 0.10.0__py3-none-any.whl → 0.11.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.
Files changed (96) hide show
  1. samplehc/_base_client.py +3 -3
  2. samplehc/_compat.py +48 -48
  3. samplehc/_models.py +40 -40
  4. samplehc/_types.py +35 -1
  5. samplehc/_utils/__init__.py +9 -2
  6. samplehc/_utils/_compat.py +45 -0
  7. samplehc/_utils/_datetime_parse.py +136 -0
  8. samplehc/_utils/_transform.py +11 -1
  9. samplehc/_utils/_typing.py +6 -1
  10. samplehc/_utils/_utils.py +0 -1
  11. samplehc/_version.py +1 -1
  12. samplehc/resources/v2/browser_agents/__init__.py +33 -0
  13. samplehc/resources/v2/{browser_agents.py → browser_agents/browser_agents.py} +40 -8
  14. samplehc/resources/v2/browser_agents/runs/__init__.py +33 -0
  15. samplehc/resources/v2/browser_agents/runs/help_requests.py +191 -0
  16. samplehc/resources/v2/browser_agents/runs/runs.py +102 -0
  17. samplehc/resources/v2/clearinghouse/clearinghouse.py +4 -4
  18. samplehc/resources/v2/{events/events.py → events.py} +8 -40
  19. samplehc/resources/v2/integrations/__init__.py +28 -0
  20. samplehc/resources/v2/integrations/careviso.py +10 -10
  21. samplehc/resources/v2/integrations/integrations.py +64 -0
  22. samplehc/resources/v2/integrations/salesforce.py +193 -0
  23. samplehc/resources/v2/{events/integrations → integrations}/xcures.py +7 -7
  24. samplehc/resources/v2/ledger/__init__.py +27 -55
  25. samplehc/resources/v2/ledger/{orders.py → account.py} +120 -82
  26. samplehc/resources/v2/ledger/entry.py +382 -0
  27. samplehc/resources/v2/ledger/ledger.py +38 -1560
  28. samplehc/resources/v2/v2.py +16 -16
  29. samplehc/types/v2/__init__.py +0 -28
  30. samplehc/types/v2/browser_agents/runs/__init__.py +6 -0
  31. samplehc/types/v2/browser_agents/runs/help_request_resolve_params.py +18 -0
  32. samplehc/types/v2/browser_agents/runs/help_request_resolve_response.py +30 -0
  33. samplehc/types/v2/clearinghouse/claim_submit_params.py +10 -9
  34. samplehc/types/v2/clearinghouse_calculate_patient_cost_params.py +3 -2
  35. samplehc/types/v2/clearinghouse_check_eligibility_params.py +2 -2
  36. samplehc/types/v2/communication_send_letter_params.py +4 -3
  37. samplehc/types/v2/document_classify_params.py +3 -2
  38. samplehc/types/v2/document_generate_csv_params.py +3 -2
  39. samplehc/types/v2/documents/legacy_extract_params.py +8 -7
  40. samplehc/types/v2/integrations/__init__.py +2 -0
  41. samplehc/types/v2/integrations/careviso_submit_prior_authorization_params.py +6 -5
  42. samplehc/types/v2/integrations/glidian/prior_authorizations/clinical_question_update_params.py +3 -2
  43. samplehc/types/v2/integrations/salesforce_run_crud_action_params.py +22 -0
  44. samplehc/types/v2/ledger/__init__.py +6 -17
  45. samplehc/types/v2/ledger/account_writeoff_params.py +24 -0
  46. samplehc/types/v2/ledger/account_writeoff_response.py +12 -0
  47. samplehc/types/v2/ledger/entry_post_params.py +61 -0
  48. samplehc/types/v2/ledger/entry_post_response.py +10 -0
  49. samplehc/types/v2/ledger/entry_reverse_params.py +19 -0
  50. samplehc/types/v2/ledger/entry_reverse_response.py +10 -0
  51. {samplehc-0.10.0.dist-info → samplehc-0.11.0.dist-info}/METADATA +1 -1
  52. {samplehc-0.10.0.dist-info → samplehc-0.11.0.dist-info}/RECORD +56 -78
  53. samplehc/resources/v2/events/__init__.py +0 -33
  54. samplehc/resources/v2/events/integrations/__init__.py +0 -33
  55. samplehc/resources/v2/events/integrations/integrations.py +0 -102
  56. samplehc/resources/v2/ledger/institutions/__init__.py +0 -33
  57. samplehc/resources/v2/ledger/institutions/institutions.py +0 -258
  58. samplehc/resources/v2/ledger/institutions/orders.py +0 -169
  59. samplehc/resources/v2/ledger/insurance.py +0 -141
  60. samplehc/resources/v2/ledger/patients.py +0 -141
  61. samplehc/types/v2/events/integrations/__init__.py +0 -5
  62. samplehc/types/v2/ledger/institution_list_outstanding_accounts_response.py +0 -25
  63. samplehc/types/v2/ledger/institution_retrieve_outstanding_orders_response.py +0 -25
  64. samplehc/types/v2/ledger/institutions/__init__.py +0 -5
  65. samplehc/types/v2/ledger/institutions/order_retrieve_balance_response.py +0 -12
  66. samplehc/types/v2/ledger/insurance_list_outstanding_accounts_response.py +0 -25
  67. samplehc/types/v2/ledger/order_retrieve_balances_response.py +0 -31
  68. samplehc/types/v2/ledger/order_retrieve_batch_balances_params.py +0 -15
  69. samplehc/types/v2/ledger/order_retrieve_batch_balances_response.py +0 -38
  70. samplehc/types/v2/ledger/patient_list_outstanding_accounts_response.py +0 -22
  71. samplehc/types/v2/ledger_assign_invoice_params.py +0 -34
  72. samplehc/types/v2/ledger_assign_invoice_response.py +0 -12
  73. samplehc/types/v2/ledger_claim_adjustment_params.py +0 -34
  74. samplehc/types/v2/ledger_claim_adjustment_response.py +0 -12
  75. samplehc/types/v2/ledger_claim_payment_params.py +0 -34
  76. samplehc/types/v2/ledger_claim_payment_response.py +0 -12
  77. samplehc/types/v2/ledger_institution_adjustment_params.py +0 -31
  78. samplehc/types/v2/ledger_institution_adjustment_response.py +0 -12
  79. samplehc/types/v2/ledger_institution_payment_params.py +0 -31
  80. samplehc/types/v2/ledger_institution_payment_response.py +0 -12
  81. samplehc/types/v2/ledger_new_order_params.py +0 -22
  82. samplehc/types/v2/ledger_new_order_response.py +0 -12
  83. samplehc/types/v2/ledger_order_writeoff_params.py +0 -28
  84. samplehc/types/v2/ledger_order_writeoff_response.py +0 -12
  85. samplehc/types/v2/ledger_patient_adjustment_params.py +0 -31
  86. samplehc/types/v2/ledger_patient_adjustment_response.py +0 -12
  87. samplehc/types/v2/ledger_patient_payment_params.py +0 -28
  88. samplehc/types/v2/ledger_patient_payment_response.py +0 -12
  89. samplehc/types/v2/ledger_post_remittance_accepted_params.py +0 -37
  90. samplehc/types/v2/ledger_post_remittance_accepted_response.py +0 -12
  91. samplehc/types/v2/ledger_reverse_entry_params.py +0 -12
  92. samplehc/types/v2/ledger_reverse_entry_response.py +0 -12
  93. /samplehc/types/v2/{events → browser_agents}/__init__.py +0 -0
  94. /samplehc/types/v2/{events/integrations → integrations}/xcure_make_request_params.py +0 -0
  95. {samplehc-0.10.0.dist-info → samplehc-0.11.0.dist-info}/WHEEL +0 -0
  96. {samplehc-0.10.0.dist-info → samplehc-0.11.0.dist-info}/licenses/LICENSE +0 -0
@@ -16,6 +16,14 @@ from .kno2 import (
16
16
  Kno2ResourceWithStreamingResponse,
17
17
  AsyncKno2ResourceWithStreamingResponse,
18
18
  )
19
+ from .xcures import (
20
+ XcuresResource,
21
+ AsyncXcuresResource,
22
+ XcuresResourceWithRawResponse,
23
+ AsyncXcuresResourceWithRawResponse,
24
+ XcuresResourceWithStreamingResponse,
25
+ AsyncXcuresResourceWithStreamingResponse,
26
+ )
19
27
  from .glidian import (
20
28
  GlidianResource,
21
29
  AsyncGlidianResource,
@@ -40,6 +48,14 @@ from .snowflake import (
40
48
  SnowflakeResourceWithStreamingResponse,
41
49
  AsyncSnowflakeResourceWithStreamingResponse,
42
50
  )
51
+ from .salesforce import (
52
+ SalesforceResource,
53
+ AsyncSalesforceResource,
54
+ SalesforceResourceWithRawResponse,
55
+ AsyncSalesforceResourceWithRawResponse,
56
+ SalesforceResourceWithStreamingResponse,
57
+ AsyncSalesforceResourceWithStreamingResponse,
58
+ )
43
59
  from .integrations import (
44
60
  IntegrationsResource,
45
61
  AsyncIntegrationsResource,
@@ -80,6 +96,18 @@ __all__ = [
80
96
  "AsyncGlidianResourceWithRawResponse",
81
97
  "GlidianResourceWithStreamingResponse",
82
98
  "AsyncGlidianResourceWithStreamingResponse",
99
+ "XcuresResource",
100
+ "AsyncXcuresResource",
101
+ "XcuresResourceWithRawResponse",
102
+ "AsyncXcuresResourceWithRawResponse",
103
+ "XcuresResourceWithStreamingResponse",
104
+ "AsyncXcuresResourceWithStreamingResponse",
105
+ "SalesforceResource",
106
+ "AsyncSalesforceResource",
107
+ "SalesforceResourceWithRawResponse",
108
+ "AsyncSalesforceResourceWithRawResponse",
109
+ "SalesforceResourceWithStreamingResponse",
110
+ "AsyncSalesforceResourceWithStreamingResponse",
83
111
  "IntegrationsResource",
84
112
  "AsyncIntegrationsResource",
85
113
  "IntegrationsResourceWithRawResponse",
@@ -2,12 +2,12 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import List, Iterable
5
+ from typing import Iterable
6
6
  from typing_extensions import Literal
7
7
 
8
8
  import httpx
9
9
 
10
- from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
10
+ from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
11
11
  from ...._utils import maybe_transform, async_maybe_transform
12
12
  from ...._compat import cached_property
13
13
  from ...._resource import SyncAPIResource, AsyncAPIResource
@@ -69,9 +69,9 @@ class CarevisoResource(SyncAPIResource):
69
69
  *,
70
70
  attachments: Iterable[careviso_submit_prior_authorization_params.Attachment],
71
71
  case_type: Literal["prior_auth_request", "benefits_investigation"],
72
- cpt_codes: List[str],
72
+ cpt_codes: SequenceNotStr[str],
73
73
  group_id: str,
74
- icd10_codes: List[str],
74
+ icd10_codes: SequenceNotStr[str],
75
75
  insurance_name: str,
76
76
  lab_order_id: str,
77
77
  member_id: str,
@@ -87,7 +87,7 @@ class CarevisoResource(SyncAPIResource):
87
87
  provider_npi: str,
88
88
  provider_phone: str,
89
89
  service_date: str,
90
- test_names: List[str],
90
+ test_names: SequenceNotStr[str],
91
91
  accession_date: str | NotGiven = NOT_GIVEN,
92
92
  collection_date: str | NotGiven = NOT_GIVEN,
93
93
  collection_type: str | NotGiven = NOT_GIVEN,
@@ -98,7 +98,7 @@ class CarevisoResource(SyncAPIResource):
98
98
  patient_street: str | NotGiven = NOT_GIVEN,
99
99
  patient_street2: str | NotGiven = NOT_GIVEN,
100
100
  patient_zip: str | NotGiven = NOT_GIVEN,
101
- test_identifiers: List[str] | NotGiven = NOT_GIVEN,
101
+ test_identifiers: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
102
102
  test_type: str | NotGiven = NOT_GIVEN,
103
103
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
104
104
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -219,9 +219,9 @@ class AsyncCarevisoResource(AsyncAPIResource):
219
219
  *,
220
220
  attachments: Iterable[careviso_submit_prior_authorization_params.Attachment],
221
221
  case_type: Literal["prior_auth_request", "benefits_investigation"],
222
- cpt_codes: List[str],
222
+ cpt_codes: SequenceNotStr[str],
223
223
  group_id: str,
224
- icd10_codes: List[str],
224
+ icd10_codes: SequenceNotStr[str],
225
225
  insurance_name: str,
226
226
  lab_order_id: str,
227
227
  member_id: str,
@@ -237,7 +237,7 @@ class AsyncCarevisoResource(AsyncAPIResource):
237
237
  provider_npi: str,
238
238
  provider_phone: str,
239
239
  service_date: str,
240
- test_names: List[str],
240
+ test_names: SequenceNotStr[str],
241
241
  accession_date: str | NotGiven = NOT_GIVEN,
242
242
  collection_date: str | NotGiven = NOT_GIVEN,
243
243
  collection_type: str | NotGiven = NOT_GIVEN,
@@ -248,7 +248,7 @@ class AsyncCarevisoResource(AsyncAPIResource):
248
248
  patient_street: str | NotGiven = NOT_GIVEN,
249
249
  patient_street2: str | NotGiven = NOT_GIVEN,
250
250
  patient_zip: str | NotGiven = NOT_GIVEN,
251
- test_identifiers: List[str] | NotGiven = NOT_GIVEN,
251
+ test_identifiers: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
252
252
  test_type: str | NotGiven = NOT_GIVEN,
253
253
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
254
254
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -2,6 +2,14 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from .xcures import (
6
+ XcuresResource,
7
+ AsyncXcuresResource,
8
+ XcuresResourceWithRawResponse,
9
+ AsyncXcuresResourceWithRawResponse,
10
+ XcuresResourceWithStreamingResponse,
11
+ AsyncXcuresResourceWithStreamingResponse,
12
+ )
5
13
  from .careviso import (
6
14
  CarevisoResource,
7
15
  AsyncCarevisoResource,
@@ -35,6 +43,14 @@ from .snowflake import (
35
43
  AsyncSnowflakeResourceWithStreamingResponse,
36
44
  )
37
45
  from ...._compat import cached_property
46
+ from .salesforce import (
47
+ SalesforceResource,
48
+ AsyncSalesforceResource,
49
+ SalesforceResourceWithRawResponse,
50
+ AsyncSalesforceResourceWithRawResponse,
51
+ SalesforceResourceWithStreamingResponse,
52
+ AsyncSalesforceResourceWithStreamingResponse,
53
+ )
38
54
  from ...._resource import SyncAPIResource, AsyncAPIResource
39
55
  from .glidian.glidian import (
40
56
  GlidianResource,
@@ -69,6 +85,14 @@ class IntegrationsResource(SyncAPIResource):
69
85
  def glidian(self) -> GlidianResource:
70
86
  return GlidianResource(self._client)
71
87
 
88
+ @cached_property
89
+ def xcures(self) -> XcuresResource:
90
+ return XcuresResource(self._client)
91
+
92
+ @cached_property
93
+ def salesforce(self) -> SalesforceResource:
94
+ return SalesforceResource(self._client)
95
+
72
96
  @cached_property
73
97
  def with_raw_response(self) -> IntegrationsResourceWithRawResponse:
74
98
  """
@@ -110,6 +134,14 @@ class AsyncIntegrationsResource(AsyncAPIResource):
110
134
  def glidian(self) -> AsyncGlidianResource:
111
135
  return AsyncGlidianResource(self._client)
112
136
 
137
+ @cached_property
138
+ def xcures(self) -> AsyncXcuresResource:
139
+ return AsyncXcuresResource(self._client)
140
+
141
+ @cached_property
142
+ def salesforce(self) -> AsyncSalesforceResource:
143
+ return AsyncSalesforceResource(self._client)
144
+
113
145
  @cached_property
114
146
  def with_raw_response(self) -> AsyncIntegrationsResourceWithRawResponse:
115
147
  """
@@ -154,6 +186,14 @@ class IntegrationsResourceWithRawResponse:
154
186
  def glidian(self) -> GlidianResourceWithRawResponse:
155
187
  return GlidianResourceWithRawResponse(self._integrations.glidian)
156
188
 
189
+ @cached_property
190
+ def xcures(self) -> XcuresResourceWithRawResponse:
191
+ return XcuresResourceWithRawResponse(self._integrations.xcures)
192
+
193
+ @cached_property
194
+ def salesforce(self) -> SalesforceResourceWithRawResponse:
195
+ return SalesforceResourceWithRawResponse(self._integrations.salesforce)
196
+
157
197
 
158
198
  class AsyncIntegrationsResourceWithRawResponse:
159
199
  def __init__(self, integrations: AsyncIntegrationsResource) -> None:
@@ -179,6 +219,14 @@ class AsyncIntegrationsResourceWithRawResponse:
179
219
  def glidian(self) -> AsyncGlidianResourceWithRawResponse:
180
220
  return AsyncGlidianResourceWithRawResponse(self._integrations.glidian)
181
221
 
222
+ @cached_property
223
+ def xcures(self) -> AsyncXcuresResourceWithRawResponse:
224
+ return AsyncXcuresResourceWithRawResponse(self._integrations.xcures)
225
+
226
+ @cached_property
227
+ def salesforce(self) -> AsyncSalesforceResourceWithRawResponse:
228
+ return AsyncSalesforceResourceWithRawResponse(self._integrations.salesforce)
229
+
182
230
 
183
231
  class IntegrationsResourceWithStreamingResponse:
184
232
  def __init__(self, integrations: IntegrationsResource) -> None:
@@ -204,6 +252,14 @@ class IntegrationsResourceWithStreamingResponse:
204
252
  def glidian(self) -> GlidianResourceWithStreamingResponse:
205
253
  return GlidianResourceWithStreamingResponse(self._integrations.glidian)
206
254
 
255
+ @cached_property
256
+ def xcures(self) -> XcuresResourceWithStreamingResponse:
257
+ return XcuresResourceWithStreamingResponse(self._integrations.xcures)
258
+
259
+ @cached_property
260
+ def salesforce(self) -> SalesforceResourceWithStreamingResponse:
261
+ return SalesforceResourceWithStreamingResponse(self._integrations.salesforce)
262
+
207
263
 
208
264
  class AsyncIntegrationsResourceWithStreamingResponse:
209
265
  def __init__(self, integrations: AsyncIntegrationsResource) -> None:
@@ -228,3 +284,11 @@ class AsyncIntegrationsResourceWithStreamingResponse:
228
284
  @cached_property
229
285
  def glidian(self) -> AsyncGlidianResourceWithStreamingResponse:
230
286
  return AsyncGlidianResourceWithStreamingResponse(self._integrations.glidian)
287
+
288
+ @cached_property
289
+ def xcures(self) -> AsyncXcuresResourceWithStreamingResponse:
290
+ return AsyncXcuresResourceWithStreamingResponse(self._integrations.xcures)
291
+
292
+ @cached_property
293
+ def salesforce(self) -> AsyncSalesforceResourceWithStreamingResponse:
294
+ return AsyncSalesforceResourceWithStreamingResponse(self._integrations.salesforce)
@@ -0,0 +1,193 @@
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
+ from typing_extensions import Literal
7
+
8
+ import httpx
9
+
10
+ from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
11
+ from ...._utils import maybe_transform, async_maybe_transform
12
+ from ...._compat import cached_property
13
+ from ...._resource import SyncAPIResource, AsyncAPIResource
14
+ from ...._response import (
15
+ to_raw_response_wrapper,
16
+ to_streamed_response_wrapper,
17
+ async_to_raw_response_wrapper,
18
+ async_to_streamed_response_wrapper,
19
+ )
20
+ from ...._base_client import make_request_options
21
+ from ....types.v2.integrations import salesforce_run_crud_action_params
22
+
23
+ __all__ = ["SalesforceResource", "AsyncSalesforceResource"]
24
+
25
+
26
+ class SalesforceResource(SyncAPIResource):
27
+ @cached_property
28
+ def with_raw_response(self) -> SalesforceResourceWithRawResponse:
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 SalesforceResourceWithRawResponse(self)
36
+
37
+ @cached_property
38
+ def with_streaming_response(self) -> SalesforceResourceWithStreamingResponse:
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 SalesforceResourceWithStreamingResponse(self)
45
+
46
+ def run_crud_action(
47
+ self,
48
+ slug: str,
49
+ *,
50
+ crud_action_type: Literal["create", "update", "upsert", "delete", "retrieve"],
51
+ resource_type: str,
52
+ resource_body: Dict[str, object] | NotGiven = NOT_GIVEN,
53
+ resource_id: str | NotGiven = NOT_GIVEN,
54
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
55
+ # The extra values given here take precedence over values defined on the client or passed to this method.
56
+ extra_headers: Headers | None = None,
57
+ extra_query: Query | None = None,
58
+ extra_body: Body | None = None,
59
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
60
+ ) -> object:
61
+ """
62
+ Resolve connection by slug and run a CRUD action on a Salesforce sObject.
63
+
64
+ Args:
65
+ extra_headers: Send extra headers
66
+
67
+ extra_query: Add additional query parameters to the request
68
+
69
+ extra_body: Add additional JSON properties to the request
70
+
71
+ timeout: Override the client-level default timeout for this request, in seconds
72
+ """
73
+ if not slug:
74
+ raise ValueError(f"Expected a non-empty value for `slug` but received {slug!r}")
75
+ return self._post(
76
+ f"/api/v2/integrations/salesforce/{slug}/crud-action",
77
+ body=maybe_transform(
78
+ {
79
+ "crud_action_type": crud_action_type,
80
+ "resource_type": resource_type,
81
+ "resource_body": resource_body,
82
+ "resource_id": resource_id,
83
+ },
84
+ salesforce_run_crud_action_params.SalesforceRunCrudActionParams,
85
+ ),
86
+ options=make_request_options(
87
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
88
+ ),
89
+ cast_to=object,
90
+ )
91
+
92
+
93
+ class AsyncSalesforceResource(AsyncAPIResource):
94
+ @cached_property
95
+ def with_raw_response(self) -> AsyncSalesforceResourceWithRawResponse:
96
+ """
97
+ This property can be used as a prefix for any HTTP method call to return
98
+ the raw response object instead of the parsed content.
99
+
100
+ For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
101
+ """
102
+ return AsyncSalesforceResourceWithRawResponse(self)
103
+
104
+ @cached_property
105
+ def with_streaming_response(self) -> AsyncSalesforceResourceWithStreamingResponse:
106
+ """
107
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
108
+
109
+ For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
110
+ """
111
+ return AsyncSalesforceResourceWithStreamingResponse(self)
112
+
113
+ async def run_crud_action(
114
+ self,
115
+ slug: str,
116
+ *,
117
+ crud_action_type: Literal["create", "update", "upsert", "delete", "retrieve"],
118
+ resource_type: str,
119
+ resource_body: Dict[str, object] | NotGiven = NOT_GIVEN,
120
+ resource_id: str | NotGiven = NOT_GIVEN,
121
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
122
+ # The extra values given here take precedence over values defined on the client or passed to this method.
123
+ extra_headers: Headers | None = None,
124
+ extra_query: Query | None = None,
125
+ extra_body: Body | None = None,
126
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
127
+ ) -> object:
128
+ """
129
+ Resolve connection by slug and run a CRUD action on a Salesforce sObject.
130
+
131
+ Args:
132
+ extra_headers: Send extra headers
133
+
134
+ extra_query: Add additional query parameters to the request
135
+
136
+ extra_body: Add additional JSON properties to the request
137
+
138
+ timeout: Override the client-level default timeout for this request, in seconds
139
+ """
140
+ if not slug:
141
+ raise ValueError(f"Expected a non-empty value for `slug` but received {slug!r}")
142
+ return await self._post(
143
+ f"/api/v2/integrations/salesforce/{slug}/crud-action",
144
+ body=await async_maybe_transform(
145
+ {
146
+ "crud_action_type": crud_action_type,
147
+ "resource_type": resource_type,
148
+ "resource_body": resource_body,
149
+ "resource_id": resource_id,
150
+ },
151
+ salesforce_run_crud_action_params.SalesforceRunCrudActionParams,
152
+ ),
153
+ options=make_request_options(
154
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
155
+ ),
156
+ cast_to=object,
157
+ )
158
+
159
+
160
+ class SalesforceResourceWithRawResponse:
161
+ def __init__(self, salesforce: SalesforceResource) -> None:
162
+ self._salesforce = salesforce
163
+
164
+ self.run_crud_action = to_raw_response_wrapper(
165
+ salesforce.run_crud_action,
166
+ )
167
+
168
+
169
+ class AsyncSalesforceResourceWithRawResponse:
170
+ def __init__(self, salesforce: AsyncSalesforceResource) -> None:
171
+ self._salesforce = salesforce
172
+
173
+ self.run_crud_action = async_to_raw_response_wrapper(
174
+ salesforce.run_crud_action,
175
+ )
176
+
177
+
178
+ class SalesforceResourceWithStreamingResponse:
179
+ def __init__(self, salesforce: SalesforceResource) -> None:
180
+ self._salesforce = salesforce
181
+
182
+ self.run_crud_action = to_streamed_response_wrapper(
183
+ salesforce.run_crud_action,
184
+ )
185
+
186
+
187
+ class AsyncSalesforceResourceWithStreamingResponse:
188
+ def __init__(self, salesforce: AsyncSalesforceResource) -> None:
189
+ self._salesforce = salesforce
190
+
191
+ self.run_crud_action = async_to_streamed_response_wrapper(
192
+ salesforce.run_crud_action,
193
+ )
@@ -7,18 +7,18 @@ from typing_extensions import Literal
7
7
 
8
8
  import httpx
9
9
 
10
- from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven
11
- from ....._utils import maybe_transform, async_maybe_transform
12
- from ....._compat import cached_property
13
- from ....._resource import SyncAPIResource, AsyncAPIResource
14
- from ....._response import (
10
+ from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
11
+ from ...._utils import maybe_transform, async_maybe_transform
12
+ from ...._compat import cached_property
13
+ from ...._resource import SyncAPIResource, AsyncAPIResource
14
+ from ...._response import (
15
15
  to_raw_response_wrapper,
16
16
  to_streamed_response_wrapper,
17
17
  async_to_raw_response_wrapper,
18
18
  async_to_streamed_response_wrapper,
19
19
  )
20
- from ....._base_client import make_request_options
21
- from .....types.v2.events.integrations import xcure_make_request_params
20
+ from ...._base_client import make_request_options
21
+ from ....types.v2.integrations import xcure_make_request_params
22
22
 
23
23
  __all__ = ["XcuresResource", "AsyncXcuresResource"]
24
24
 
@@ -1,5 +1,13 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ from .entry import (
4
+ EntryResource,
5
+ AsyncEntryResource,
6
+ EntryResourceWithRawResponse,
7
+ AsyncEntryResourceWithRawResponse,
8
+ EntryResourceWithStreamingResponse,
9
+ AsyncEntryResourceWithStreamingResponse,
10
+ )
3
11
  from .ledger import (
4
12
  LedgerResource,
5
13
  AsyncLedgerResource,
@@ -8,64 +16,28 @@ from .ledger import (
8
16
  LedgerResourceWithStreamingResponse,
9
17
  AsyncLedgerResourceWithStreamingResponse,
10
18
  )
11
- from .orders import (
12
- OrdersResource,
13
- AsyncOrdersResource,
14
- OrdersResourceWithRawResponse,
15
- AsyncOrdersResourceWithRawResponse,
16
- OrdersResourceWithStreamingResponse,
17
- AsyncOrdersResourceWithStreamingResponse,
18
- )
19
- from .patients import (
20
- PatientsResource,
21
- AsyncPatientsResource,
22
- PatientsResourceWithRawResponse,
23
- AsyncPatientsResourceWithRawResponse,
24
- PatientsResourceWithStreamingResponse,
25
- AsyncPatientsResourceWithStreamingResponse,
26
- )
27
- from .insurance import (
28
- InsuranceResource,
29
- AsyncInsuranceResource,
30
- InsuranceResourceWithRawResponse,
31
- AsyncInsuranceResourceWithRawResponse,
32
- InsuranceResourceWithStreamingResponse,
33
- AsyncInsuranceResourceWithStreamingResponse,
34
- )
35
- from .institutions import (
36
- InstitutionsResource,
37
- AsyncInstitutionsResource,
38
- InstitutionsResourceWithRawResponse,
39
- AsyncInstitutionsResourceWithRawResponse,
40
- InstitutionsResourceWithStreamingResponse,
41
- AsyncInstitutionsResourceWithStreamingResponse,
19
+ from .account import (
20
+ AccountResource,
21
+ AsyncAccountResource,
22
+ AccountResourceWithRawResponse,
23
+ AsyncAccountResourceWithRawResponse,
24
+ AccountResourceWithStreamingResponse,
25
+ AsyncAccountResourceWithStreamingResponse,
42
26
  )
43
27
 
44
28
  __all__ = [
45
- "InstitutionsResource",
46
- "AsyncInstitutionsResource",
47
- "InstitutionsResourceWithRawResponse",
48
- "AsyncInstitutionsResourceWithRawResponse",
49
- "InstitutionsResourceWithStreamingResponse",
50
- "AsyncInstitutionsResourceWithStreamingResponse",
51
- "InsuranceResource",
52
- "AsyncInsuranceResource",
53
- "InsuranceResourceWithRawResponse",
54
- "AsyncInsuranceResourceWithRawResponse",
55
- "InsuranceResourceWithStreamingResponse",
56
- "AsyncInsuranceResourceWithStreamingResponse",
57
- "PatientsResource",
58
- "AsyncPatientsResource",
59
- "PatientsResourceWithRawResponse",
60
- "AsyncPatientsResourceWithRawResponse",
61
- "PatientsResourceWithStreamingResponse",
62
- "AsyncPatientsResourceWithStreamingResponse",
63
- "OrdersResource",
64
- "AsyncOrdersResource",
65
- "OrdersResourceWithRawResponse",
66
- "AsyncOrdersResourceWithRawResponse",
67
- "OrdersResourceWithStreamingResponse",
68
- "AsyncOrdersResourceWithStreamingResponse",
29
+ "EntryResource",
30
+ "AsyncEntryResource",
31
+ "EntryResourceWithRawResponse",
32
+ "AsyncEntryResourceWithRawResponse",
33
+ "EntryResourceWithStreamingResponse",
34
+ "AsyncEntryResourceWithStreamingResponse",
35
+ "AccountResource",
36
+ "AsyncAccountResource",
37
+ "AccountResourceWithRawResponse",
38
+ "AsyncAccountResourceWithRawResponse",
39
+ "AccountResourceWithStreamingResponse",
40
+ "AsyncAccountResourceWithStreamingResponse",
69
41
  "LedgerResource",
70
42
  "AsyncLedgerResource",
71
43
  "LedgerResourceWithRawResponse",