kard-financial-sdk 2.2.1__py3-none-any.whl → 2.3.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.
@@ -22,10 +22,10 @@ class BaseClientWrapper:
22
22
 
23
23
  def get_headers(self) -> typing.Dict[str, str]:
24
24
  headers: typing.Dict[str, str] = {
25
- "User-Agent": "kard-financial-sdk/2.2.1",
25
+ "User-Agent": "kard-financial-sdk/2.3.0",
26
26
  "X-Fern-Language": "Python",
27
27
  "X-Fern-SDK-Name": "kard-financial-sdk",
28
- "X-Fern-SDK-Version": "2.2.1",
28
+ "X-Fern-SDK-Version": "2.3.0",
29
29
  **(self.get_custom_headers() or {}),
30
30
  }
31
31
  token = self._get_token()
kard/users/__init__.py CHANGED
@@ -55,6 +55,7 @@ if typing.TYPE_CHECKING:
55
55
  Commission,
56
56
  ComponentType,
57
57
  Coordinates,
58
+ CtaAction,
58
59
  CtaComponent,
59
60
  EligibilityLocationAddress,
60
61
  EligibilityLocationIncluded,
@@ -147,6 +148,7 @@ _dynamic_imports: typing.Dict[str, str] = {
147
148
  "CreateUploadResponseObject": ".uploads",
148
149
  "CreateUsersMultiStatusResponse": ".types",
149
150
  "CreateUsersObject": ".types",
151
+ "CtaAction": ".rewards",
150
152
  "CtaComponent": ".rewards",
151
153
  "DeleteUserResponseObject": ".types",
152
154
  "EligibilityLocationAddress": ".rewards",
@@ -267,6 +269,7 @@ __all__ = [
267
269
  "CreateUploadResponseObject",
268
270
  "CreateUsersMultiStatusResponse",
269
271
  "CreateUsersObject",
272
+ "CtaAction",
270
273
  "CtaComponent",
271
274
  "DeleteUserResponseObject",
272
275
  "EligibilityLocationAddress",
@@ -160,7 +160,7 @@ class RawAttributionsClient:
160
160
  HttpResponse[ActivateOfferResponse]
161
161
  """
162
162
  _response = self._client_wrapper.httpx_client.request(
163
- f"v2/issuers/{jsonable_encoder(organization_id)}/users/{jsonable_encoder(user_id)}/attributions/offers/{jsonable_encoder(offer_id)}/activate",
163
+ f"v2/issuers/{jsonable_encoder(organization_id)}/users/{jsonable_encoder(user_id)}/offers/{jsonable_encoder(offer_id)}/activate",
164
164
  method="POST",
165
165
  params={
166
166
  "supportedComponents": supported_components,
@@ -351,7 +351,7 @@ class AsyncRawAttributionsClient:
351
351
  AsyncHttpResponse[ActivateOfferResponse]
352
352
  """
353
353
  _response = await self._client_wrapper.httpx_client.request(
354
- f"v2/issuers/{jsonable_encoder(organization_id)}/users/{jsonable_encoder(user_id)}/attributions/offers/{jsonable_encoder(offer_id)}/activate",
354
+ f"v2/issuers/{jsonable_encoder(organization_id)}/users/{jsonable_encoder(user_id)}/offers/{jsonable_encoder(offer_id)}/activate",
355
355
  method="POST",
356
356
  params={
357
357
  "supportedComponents": supported_components,
@@ -20,6 +20,7 @@ if typing.TYPE_CHECKING:
20
20
  Commission,
21
21
  ComponentType,
22
22
  Coordinates,
23
+ CtaAction,
23
24
  CtaComponent,
24
25
  EligibilityLocationAddress,
25
26
  EligibilityLocationIncluded,
@@ -58,6 +59,7 @@ _dynamic_imports: typing.Dict[str, str] = {
58
59
  "Commission": ".types",
59
60
  "ComponentType": ".types",
60
61
  "Coordinates": ".types",
62
+ "CtaAction": ".types",
61
63
  "CtaComponent": ".types",
62
64
  "EligibilityLocationAddress": ".types",
63
65
  "EligibilityLocationIncluded": ".types",
@@ -119,6 +121,7 @@ __all__ = [
119
121
  "Commission",
120
122
  "ComponentType",
121
123
  "Coordinates",
124
+ "CtaAction",
122
125
  "CtaComponent",
123
126
  "EligibilityLocationAddress",
124
127
  "EligibilityLocationIncluded",
@@ -19,6 +19,7 @@ if typing.TYPE_CHECKING:
19
19
  from .commission import Commission
20
20
  from .component_type import ComponentType
21
21
  from .coordinates import Coordinates
22
+ from .cta_action import CtaAction
22
23
  from .cta_component import CtaComponent
23
24
  from .eligibility_location_address import EligibilityLocationAddress
24
25
  from .eligibility_location_included import EligibilityLocationIncluded
@@ -55,6 +56,7 @@ _dynamic_imports: typing.Dict[str, str] = {
55
56
  "Commission": ".commission",
56
57
  "ComponentType": ".component_type",
57
58
  "Coordinates": ".coordinates",
59
+ "CtaAction": ".cta_action",
58
60
  "CtaComponent": ".cta_component",
59
61
  "EligibilityLocationAddress": ".eligibility_location_address",
60
62
  "EligibilityLocationIncluded": ".eligibility_location_included",
@@ -116,6 +118,7 @@ __all__ = [
116
118
  "Commission",
117
119
  "ComponentType",
118
120
  "Coordinates",
121
+ "CtaAction",
119
122
  "CtaComponent",
120
123
  "EligibilityLocationAddress",
121
124
  "EligibilityLocationIncluded",
@@ -0,0 +1,31 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ....core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+
8
+
9
+ class CtaAction(UniversalBaseModel):
10
+ """
11
+ Action configuration for CTA button
12
+ """
13
+
14
+ url: str = pydantic.Field()
15
+ """
16
+ URL endpoint to call when button is clicked
17
+ """
18
+
19
+ method: str = pydantic.Field()
20
+ """
21
+ HTTP method to use (e.g., POST)
22
+ """
23
+
24
+ if IS_PYDANTIC_V2:
25
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
26
+ else:
27
+
28
+ class Config:
29
+ frozen = True
30
+ smart_union = True
31
+ extra = pydantic.Extra.allow
@@ -7,6 +7,7 @@ import typing_extensions
7
7
  from ....core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
8
  from ....core.serialization import FieldMetadata
9
9
  from .button_style import ButtonStyle
10
+ from .cta_action import CtaAction
10
11
 
11
12
 
12
13
  class CtaComponent(UniversalBaseModel):
@@ -24,6 +25,11 @@ class CtaComponent(UniversalBaseModel):
24
25
  Style of the button
25
26
  """
26
27
 
28
+ action: typing.Optional[CtaAction] = pydantic.Field(default=None)
29
+ """
30
+ Action to perform when the button is clicked
31
+ """
32
+
27
33
  if IS_PYDANTIC_V2:
28
34
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
29
35
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kard-financial-sdk
3
- Version: 2.2.1
3
+ Version: 2.3.0
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -39,7 +39,7 @@ kard/commons/types/subscription_id.py,sha256=ftC0pKiUnQhd0vuGIjrK9NDTQeAjPALtrYb
39
39
  kard/commons/types/user_id.py,sha256=S2yE4rCRcapLUQ4_49O2n-Ph5Bm8uywFdnSXSz-otCU,78
40
40
  kard/core/__init__.py,sha256=GkNNgA0CeqvpCzo2vVtAafE8YcnGV-VGtbU5op93lbc,3624
41
41
  kard/core/api_error.py,sha256=44vPoTyWN59gonCIZMdzw7M1uspygiLnr3GNFOoVL2Q,614
42
- kard/core/client_wrapper.py,sha256=27rQgn54iLykzcbBzvIFkxTEj7eMGAJBcoSNU8LOnN4,3285
42
+ kard/core/client_wrapper.py,sha256=c7cj5mhtX2pId_LcxAsN-WB-IUBIQG-Y0oiTvCmq3SI,3285
43
43
  kard/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
44
44
  kard/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
45
45
  kard/core/force_multipart.py,sha256=cH981xLy0kZVKiZZkFoeUjgJ2Zuq7KXB2aRAnmHzRDc,477
@@ -212,10 +212,10 @@ kard/transactions/types/transactions_response.py,sha256=J_GYrJ3Rs8fXakrdrlzemMaF
212
212
  kard/transactions/types/transactions_response_data.py,sha256=nHFzk-sgUHea2c-LZ5cH5sNTUXMB2RNF5pUcNsFdwzA,740
213
213
  kard/transactions/types/visa_mid.py,sha256=inLd8mrhQ1hmdHo7g03NYMbGtq-UGo6OuhR9IFtKVjY,658
214
214
  kard/transactions/types/visa_mid_details.py,sha256=TKck88YVWuhUvvydkfB-xUfNa1sx3h2Q8GSsiCBLqiM,724
215
- kard/users/__init__.py,sha256=QKsGQMRwROeUAlYxccwD2Vww8VVEJfIOWI66awPJ4vM,11439
215
+ kard/users/__init__.py,sha256=YCetMZhoo3vlc67nlIra6ULxjbP-5mqjRehqq1mdMBU,11504
216
216
  kard/users/attributions/__init__.py,sha256=HEjpmGzplog31Y0Hb71ysE0xv-awzJ7pch54iM5Ijd0,2998
217
217
  kard/users/attributions/client.py,sha256=UmOia8is8OVqa0JcVynJwPqVHBwcnR4qGXNC5-A53PY,13178
218
- kard/users/attributions/raw_client.py,sha256=_JGOt1r0PPAa7mZ1A0BO6jKbSvg6prabM2oHU6trekg,17144
218
+ kard/users/attributions/raw_client.py,sha256=JDyVTzn-pTKIqxCTW8Fp1XlYT4j8-bOLXt2itFFJ6e4,17118
219
219
  kard/users/attributions/types/__init__.py,sha256=_FY-cbZtgBtEvzCc00w5odpguVV114dK9DG0RzHVrTE,3878
220
220
  kard/users/attributions/types/activate_offer_include_option.py,sha256=LXl7GgnYqv5QNS5z3PaafHQ2I1Jm2LKte2mqpShZ7CY,159
221
221
  kard/users/attributions/types/activate_offer_included.py,sha256=UYATfzJPNsmx-vqsgH4t5aRHcoJKG_YOZq9TY3DmzNY,277
@@ -241,10 +241,10 @@ kard/users/client.py,sha256=PV2xvrB2fbcxgx75WD-eRjlyEDSMbh0XBeRTkosuQzc,15889
241
241
  kard/users/errors/__init__.py,sha256=BYAoqh-RDSspC-n4ilOC_7zA1XRP7cHdikIiLsD2BkU,1067
242
242
  kard/users/errors/multi_status.py,sha256=6SScVu3LIZ_AghltI8DKd1g8l-1KJdEo9GwjP0TwmsE,424
243
243
  kard/users/raw_client.py,sha256=vGX7EYcyivMXrf6egmpePuD6gHy6WkcQ2B9UeT9ksGg,30492
244
- kard/users/rewards/__init__.py,sha256=lBwzNzfMz1qyUaBRNMg7MRij2Im2SjHS5L7LkUBWpis,4111
244
+ kard/users/rewards/__init__.py,sha256=0aYyrHc2ly0JdGMTShw02DZkVbeX67A9WyDTWlYaLJQ,4174
245
245
  kard/users/rewards/client.py,sha256=5HDqAjqc2siP3QE1RLYYziKyEHGnTGUMjbO9SSRYUYU,17400
246
246
  kard/users/rewards/raw_client.py,sha256=XPuW2l48T4UkDHHrgeE69tztSrfS1ac_7V50bERwBzk,26024
247
- kard/users/rewards/types/__init__.py,sha256=STOm8WoDJcv2S7yoaUqFbDnDbio_FjY0EtDoRwVUCx4,5455
247
+ kard/users/rewards/types/__init__.py,sha256=BJvBT8ZQLI9fRWnoQEuE3a75h0OuEo4T3rhN5B5BsVQ,5542
248
248
  kard/users/rewards/types/amount.py,sha256=mPz7D_XNus0QTEQFfUhfNiDqzhonYm2NhPJvUIfLlmo,573
249
249
  kard/users/rewards/types/amount_type.py,sha256=Xq8ZqimlAXzz0TuMztTHKh9u16vSCk1MCFDzXxmpWrI,143
250
250
  kard/users/rewards/types/asset.py,sha256=IG3YJ65QUNTZpyHndPdSdzuR_5AISX1BztgssI37Os0,690
@@ -258,7 +258,8 @@ kard/users/rewards/types/category_relationship_object.py,sha256=y51if2Uc9NR8vLgY
258
258
  kard/users/rewards/types/commission.py,sha256=BGn9TlcqUXt1iUq6JRr7w5nF9mqCJeGl5YFAhIcWEUo,608
259
259
  kard/users/rewards/types/component_type.py,sha256=9-uqvFRDUT1U1PIVhJFCobwhE0NtbVsSQBVCrmG5OnU,211
260
260
  kard/users/rewards/types/coordinates.py,sha256=lO4TMhukEP459DA3kCJkzTtXTtuBbmoEhRiVL1u14QQ,547
261
- kard/users/rewards/types/cta_component.py,sha256=1PztckOwHUq4d3C3YDXr0EbAubZXrKuLvv2_6yZv-HE,992
261
+ kard/users/rewards/types/cta_action.py,sha256=-yhTzVnbuGY-unk6XDyNIayDBdFPV1GwSBlNpUPenPQ,745
262
+ kard/users/rewards/types/cta_component.py,sha256=J0O1aVrmxOv3QjSzH79d2qqPnAvKrU6FSciKl5NrXGM,1162
262
263
  kard/users/rewards/types/eligibility_location_address.py,sha256=QQAbJrcaQGPF-JSKzuEzGSGwu5NSguQzdHUep0i7KQo,719
263
264
  kard/users/rewards/types/eligibility_location_included.py,sha256=8JHm8tqY44Cr_PnW1zFtMedaWaQwFfrwF6VlgsxhuXE,251
264
265
  kard/users/rewards/types/eligibility_offer_included.py,sha256=uw_eJ4Bg_qXFuvgwddof3ATUILvcQQXDRNpsyu7LviU,187
@@ -315,6 +316,6 @@ kard/users/uploads/types/update_upload_response_data.py,sha256=au2tb-iSvkMBDhU6s
315
316
  kard/users/uploads/types/update_upload_response_data_union.py,sha256=717YqC18LeMNyAkDgYZM2Us40enHiatm3s6UXiMCMPA,871
316
317
  kard/users/uploads/types/update_upload_response_object.py,sha256=0iwmSNlgVGPGh9BwzteN1FrhArQStYfjeBkwhOUNAMY,1087
317
318
  kard/version.py,sha256=V9m3K1LBEp-MG1T3GWvmb-JWKp8CK-cti5N4GIfQe2I,85
318
- kard_financial_sdk-2.2.1.dist-info/METADATA,sha256=eGH80dptl4HCG9EYeiKJs6deVu32W0j2TQVpIbM_EQU,7050
319
- kard_financial_sdk-2.2.1.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
320
- kard_financial_sdk-2.2.1.dist-info/RECORD,,
319
+ kard_financial_sdk-2.3.0.dist-info/METADATA,sha256=GUKzOgKyYRyvsldCLRRKxKgVWq3Nn-ITu2linRFeDZI,7050
320
+ kard_financial_sdk-2.3.0.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
321
+ kard_financial_sdk-2.3.0.dist-info/RECORD,,