kard-financial-sdk 2.0.0__py3-none-any.whl → 2.2.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 (38) hide show
  1. kard/__init__.py +15 -0
  2. kard/core/client_wrapper.py +2 -2
  3. kard/transactions/__init__.py +15 -0
  4. kard/transactions/client.py +6 -2
  5. kard/transactions/raw_client.py +6 -2
  6. kard/transactions/types/__init__.py +20 -1
  7. kard/transactions/types/core_merchant.py +24 -0
  8. kard/transactions/types/core_transaction_attributes.py +82 -0
  9. kard/transactions/types/core_transaction_request.py +25 -0
  10. kard/transactions/types/financial_institution.py +29 -0
  11. kard/transactions/types/matched_transactions_attributes.py +1 -1
  12. kard/transactions/types/transactions.py +18 -1
  13. kard/transactions/types/transactions_attributes.py +3 -3
  14. kard/transactions/types/transactions_request_body.py +1 -0
  15. kard/users/__init__.py +27 -0
  16. kard/users/attributions/__init__.py +15 -0
  17. kard/users/attributions/client.py +135 -0
  18. kard/users/attributions/raw_client.py +193 -0
  19. kard/users/attributions/types/__init__.py +15 -0
  20. kard/users/attributions/types/activate_offer_include_option.py +5 -0
  21. kard/users/attributions/types/activate_offer_included.py +8 -0
  22. kard/users/attributions/types/activate_offer_response.py +49 -0
  23. kard/users/attributions/types/activate_offer_response_attributes.py +25 -0
  24. kard/users/attributions/types/activate_offer_response_data.py +22 -0
  25. kard/users/attributions/types/event_code.py +1 -1
  26. kard/users/attributions/types/offer_medium.py +1 -1
  27. kard/users/rewards/__init__.py +12 -0
  28. kard/users/rewards/client.py +25 -8
  29. kard/users/rewards/raw_client.py +25 -8
  30. kard/users/rewards/types/__init__.py +12 -0
  31. kard/users/rewards/types/button_style.py +5 -0
  32. kard/users/rewards/types/component_type.py +7 -0
  33. kard/users/rewards/types/cta_component.py +34 -0
  34. kard/users/rewards/types/offer_common_fields.py +6 -0
  35. kard/users/rewards/types/offer_components.py +55 -0
  36. {kard_financial_sdk-2.0.0.dist-info → kard_financial_sdk-2.2.0.dist-info}/METADATA +1 -1
  37. {kard_financial_sdk-2.0.0.dist-info → kard_financial_sdk-2.2.0.dist-info}/RECORD +38 -25
  38. {kard_financial_sdk-2.0.0.dist-info → kard_financial_sdk-2.2.0.dist-info}/WHEEL +0 -0
@@ -10,6 +10,7 @@ if typing.TYPE_CHECKING:
10
10
  Amount,
11
11
  AmountType,
12
12
  Asset,
13
+ ButtonStyle,
13
14
  CategoryData,
14
15
  CategoryFields,
15
16
  CategoryIdentifier,
@@ -17,7 +18,9 @@ if typing.TYPE_CHECKING:
17
18
  CategoryRelationship,
18
19
  CategoryRelationshipObject,
19
20
  Commission,
21
+ ComponentType,
20
22
  Coordinates,
23
+ CtaComponent,
21
24
  EligibilityLocationAddress,
22
25
  EligibilityLocationIncluded,
23
26
  EligibilityOfferIncluded,
@@ -28,6 +31,7 @@ if typing.TYPE_CHECKING:
28
31
  LocationSortOptions,
29
32
  LocationsResponseObject,
30
33
  OfferCommonFields,
34
+ OfferComponents,
31
35
  OfferDataUnion,
32
36
  OfferDataUnion_StandardOffer,
33
37
  OfferRelationship,
@@ -44,6 +48,7 @@ _dynamic_imports: typing.Dict[str, str] = {
44
48
  "Amount": ".types",
45
49
  "AmountType": ".types",
46
50
  "Asset": ".types",
51
+ "ButtonStyle": ".types",
47
52
  "CategoryData": ".types",
48
53
  "CategoryFields": ".types",
49
54
  "CategoryIdentifier": ".types",
@@ -51,7 +56,9 @@ _dynamic_imports: typing.Dict[str, str] = {
51
56
  "CategoryRelationship": ".types",
52
57
  "CategoryRelationshipObject": ".types",
53
58
  "Commission": ".types",
59
+ "ComponentType": ".types",
54
60
  "Coordinates": ".types",
61
+ "CtaComponent": ".types",
55
62
  "EligibilityLocationAddress": ".types",
56
63
  "EligibilityLocationIncluded": ".types",
57
64
  "EligibilityOfferIncluded": ".types",
@@ -62,6 +69,7 @@ _dynamic_imports: typing.Dict[str, str] = {
62
69
  "LocationSortOptions": ".types",
63
70
  "LocationsResponseObject": ".types",
64
71
  "OfferCommonFields": ".types",
72
+ "OfferComponents": ".types",
65
73
  "OfferDataUnion": ".types",
66
74
  "OfferDataUnion_StandardOffer": ".types",
67
75
  "OfferRelationship": ".types",
@@ -101,6 +109,7 @@ __all__ = [
101
109
  "Amount",
102
110
  "AmountType",
103
111
  "Asset",
112
+ "ButtonStyle",
104
113
  "CategoryData",
105
114
  "CategoryFields",
106
115
  "CategoryIdentifier",
@@ -108,7 +117,9 @@ __all__ = [
108
117
  "CategoryRelationship",
109
118
  "CategoryRelationshipObject",
110
119
  "Commission",
120
+ "ComponentType",
111
121
  "Coordinates",
122
+ "CtaComponent",
112
123
  "EligibilityLocationAddress",
113
124
  "EligibilityLocationIncluded",
114
125
  "EligibilityOfferIncluded",
@@ -119,6 +130,7 @@ __all__ = [
119
130
  "LocationSortOptions",
120
131
  "LocationsResponseObject",
121
132
  "OfferCommonFields",
133
+ "OfferComponents",
122
134
  "OfferDataUnion",
123
135
  "OfferDataUnion_StandardOffer",
124
136
  "OfferRelationship",
@@ -10,6 +10,7 @@ from ...commons.types.user_id import UserId
10
10
  from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
11
11
  from ...core.request_options import RequestOptions
12
12
  from .raw_client import AsyncRawRewardsClient, RawRewardsClient
13
+ from .types.component_type import ComponentType
13
14
  from .types.location_sort_options import LocationSortOptions
14
15
  from .types.locations_response_object import LocationsResponseObject
15
16
  from .types.offer_sort_options import OfferSortOptions
@@ -44,13 +45,13 @@ class RewardsClient:
44
45
  filter_is_targeted: typing.Optional[bool] = None,
45
46
  sort: typing.Optional[typing.Union[OfferSortOptions, typing.Sequence[OfferSortOptions]]] = None,
46
47
  include: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
48
+ supported_components: typing.Optional[typing.Union[ComponentType, typing.Sequence[ComponentType]]] = None,
47
49
  request_options: typing.Optional[RequestOptions] = None,
48
50
  ) -> OffersResponseObject:
49
51
  """
50
52
  Retrieve national brand offers that a specified user is eligible for. Call this endpoint to build out your
51
53
  [targeted offers UX experience](/2024-10-01/api/getting-started#b-discover-a-lapsed-customer-clo). Local offers details
52
- can be found by calling the [Get Eligible Locations](/2024-10-01/api/rewards/locations) endpoint with the
53
- `includeLocal` query parameter.<br/>
54
+ can be found by calling the [Get Eligible Locations](/2024-10-01/api/rewards/locations).<br/>
54
55
  <b>Required scopes:</b> `rewards:read`
55
56
 
56
57
  Parameters
@@ -77,6 +78,9 @@ class RewardsClient:
77
78
  include : typing.Optional[typing.Union[str, typing.Sequence[str]]]
78
79
  CSV list of included resources in the response (e.g "categories"). Allowed value is `categories`.
79
80
 
81
+ supported_components : typing.Optional[typing.Union[ComponentType, typing.Sequence[ComponentType]]]
82
+ UI component types to include in the response. Valid values are shortDescription, longDescription, cta, tags, and detailTags.
83
+
80
84
  request_options : typing.Optional[RequestOptions]
81
85
  Request-specific configuration.
82
86
 
@@ -111,6 +115,7 @@ class RewardsClient:
111
115
  filter_is_targeted=filter_is_targeted,
112
116
  sort=sort,
113
117
  include=include,
118
+ supported_components=supported_components,
114
119
  request_options=request_options,
115
120
  )
116
121
  return _response.data
@@ -133,11 +138,11 @@ class RewardsClient:
133
138
  filter_radius: typing.Optional[int] = None,
134
139
  sort: typing.Optional[typing.Union[LocationSortOptions, typing.Sequence[LocationSortOptions]]] = None,
135
140
  include: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
141
+ supported_components: typing.Optional[typing.Union[ComponentType, typing.Sequence[ComponentType]]] = None,
136
142
  request_options: typing.Optional[RequestOptions] = None,
137
143
  ) -> LocationsResponseObject:
138
144
  """
139
- Retrieve national and local geographic locations that a specified user has eligible in-store offers at. To
140
- include local locations, add the `includeLocal` query parameter to your api call. Use this endpoint to build
145
+ Retrieve national and local geographic locations that a specified user has eligible in-store offers at. Use this endpoint to build
141
146
  out your [map-specific UX experiences](/2024-10-01/api/getting-started#c-discover-clos-near-you-map-view). Please note
142
147
  that Longitude and Latitude fields are prioritized over State, City and Zipcode and are the recommended search
143
148
  pattern.<br/>
@@ -178,6 +183,9 @@ class RewardsClient:
178
183
  include : typing.Optional[typing.Union[str, typing.Sequence[str]]]
179
184
  CSV list of included resources in the response (e.g "offers,categories"). Allowed values are `offers` and `categories`.
180
185
 
186
+ supported_components : typing.Optional[typing.Union[ComponentType, typing.Sequence[ComponentType]]]
187
+ UI component types to include in included offers. Valid values are shortDescription, longDescription, cta, tags, and detailTags.
188
+
181
189
  request_options : typing.Optional[RequestOptions]
182
190
  Request-specific configuration.
183
191
 
@@ -219,6 +227,7 @@ class RewardsClient:
219
227
  filter_radius=filter_radius,
220
228
  sort=sort,
221
229
  include=include,
230
+ supported_components=supported_components,
222
231
  request_options=request_options,
223
232
  )
224
233
  return _response.data
@@ -252,13 +261,13 @@ class AsyncRewardsClient:
252
261
  filter_is_targeted: typing.Optional[bool] = None,
253
262
  sort: typing.Optional[typing.Union[OfferSortOptions, typing.Sequence[OfferSortOptions]]] = None,
254
263
  include: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
264
+ supported_components: typing.Optional[typing.Union[ComponentType, typing.Sequence[ComponentType]]] = None,
255
265
  request_options: typing.Optional[RequestOptions] = None,
256
266
  ) -> OffersResponseObject:
257
267
  """
258
268
  Retrieve national brand offers that a specified user is eligible for. Call this endpoint to build out your
259
269
  [targeted offers UX experience](/2024-10-01/api/getting-started#b-discover-a-lapsed-customer-clo). Local offers details
260
- can be found by calling the [Get Eligible Locations](/2024-10-01/api/rewards/locations) endpoint with the
261
- `includeLocal` query parameter.<br/>
270
+ can be found by calling the [Get Eligible Locations](/2024-10-01/api/rewards/locations).<br/>
262
271
  <b>Required scopes:</b> `rewards:read`
263
272
 
264
273
  Parameters
@@ -285,6 +294,9 @@ class AsyncRewardsClient:
285
294
  include : typing.Optional[typing.Union[str, typing.Sequence[str]]]
286
295
  CSV list of included resources in the response (e.g "categories"). Allowed value is `categories`.
287
296
 
297
+ supported_components : typing.Optional[typing.Union[ComponentType, typing.Sequence[ComponentType]]]
298
+ UI component types to include in the response. Valid values are shortDescription, longDescription, cta, tags, and detailTags.
299
+
288
300
  request_options : typing.Optional[RequestOptions]
289
301
  Request-specific configuration.
290
302
 
@@ -327,6 +339,7 @@ class AsyncRewardsClient:
327
339
  filter_is_targeted=filter_is_targeted,
328
340
  sort=sort,
329
341
  include=include,
342
+ supported_components=supported_components,
330
343
  request_options=request_options,
331
344
  )
332
345
  return _response.data
@@ -349,11 +362,11 @@ class AsyncRewardsClient:
349
362
  filter_radius: typing.Optional[int] = None,
350
363
  sort: typing.Optional[typing.Union[LocationSortOptions, typing.Sequence[LocationSortOptions]]] = None,
351
364
  include: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
365
+ supported_components: typing.Optional[typing.Union[ComponentType, typing.Sequence[ComponentType]]] = None,
352
366
  request_options: typing.Optional[RequestOptions] = None,
353
367
  ) -> LocationsResponseObject:
354
368
  """
355
- Retrieve national and local geographic locations that a specified user has eligible in-store offers at. To
356
- include local locations, add the `includeLocal` query parameter to your api call. Use this endpoint to build
369
+ Retrieve national and local geographic locations that a specified user has eligible in-store offers at. Use this endpoint to build
357
370
  out your [map-specific UX experiences](/2024-10-01/api/getting-started#c-discover-clos-near-you-map-view). Please note
358
371
  that Longitude and Latitude fields are prioritized over State, City and Zipcode and are the recommended search
359
372
  pattern.<br/>
@@ -394,6 +407,9 @@ class AsyncRewardsClient:
394
407
  include : typing.Optional[typing.Union[str, typing.Sequence[str]]]
395
408
  CSV list of included resources in the response (e.g "offers,categories"). Allowed values are `offers` and `categories`.
396
409
 
410
+ supported_components : typing.Optional[typing.Union[ComponentType, typing.Sequence[ComponentType]]]
411
+ UI component types to include in included offers. Valid values are shortDescription, longDescription, cta, tags, and detailTags.
412
+
397
413
  request_options : typing.Optional[RequestOptions]
398
414
  Request-specific configuration.
399
415
 
@@ -443,6 +459,7 @@ class AsyncRewardsClient:
443
459
  filter_radius=filter_radius,
444
460
  sort=sort,
445
461
  include=include,
462
+ supported_components=supported_components,
446
463
  request_options=request_options,
447
464
  )
448
465
  return _response.data
@@ -19,6 +19,7 @@ from ...core.http_response import AsyncHttpResponse, HttpResponse
19
19
  from ...core.jsonable_encoder import jsonable_encoder
20
20
  from ...core.pydantic_utilities import parse_obj_as
21
21
  from ...core.request_options import RequestOptions
22
+ from .types.component_type import ComponentType
22
23
  from .types.location_sort_options import LocationSortOptions
23
24
  from .types.locations_response_object import LocationsResponseObject
24
25
  from .types.offer_sort_options import OfferSortOptions
@@ -42,13 +43,13 @@ class RawRewardsClient:
42
43
  filter_is_targeted: typing.Optional[bool] = None,
43
44
  sort: typing.Optional[typing.Union[OfferSortOptions, typing.Sequence[OfferSortOptions]]] = None,
44
45
  include: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
46
+ supported_components: typing.Optional[typing.Union[ComponentType, typing.Sequence[ComponentType]]] = None,
45
47
  request_options: typing.Optional[RequestOptions] = None,
46
48
  ) -> HttpResponse[OffersResponseObject]:
47
49
  """
48
50
  Retrieve national brand offers that a specified user is eligible for. Call this endpoint to build out your
49
51
  [targeted offers UX experience](/2024-10-01/api/getting-started#b-discover-a-lapsed-customer-clo). Local offers details
50
- can be found by calling the [Get Eligible Locations](/2024-10-01/api/rewards/locations) endpoint with the
51
- `includeLocal` query parameter.<br/>
52
+ can be found by calling the [Get Eligible Locations](/2024-10-01/api/rewards/locations).<br/>
52
53
  <b>Required scopes:</b> `rewards:read`
53
54
 
54
55
  Parameters
@@ -75,6 +76,9 @@ class RawRewardsClient:
75
76
  include : typing.Optional[typing.Union[str, typing.Sequence[str]]]
76
77
  CSV list of included resources in the response (e.g "categories"). Allowed value is `categories`.
77
78
 
79
+ supported_components : typing.Optional[typing.Union[ComponentType, typing.Sequence[ComponentType]]]
80
+ UI component types to include in the response. Valid values are shortDescription, longDescription, cta, tags, and detailTags.
81
+
78
82
  request_options : typing.Optional[RequestOptions]
79
83
  Request-specific configuration.
80
84
 
@@ -94,6 +98,7 @@ class RawRewardsClient:
94
98
  "filter[isTargeted]": filter_is_targeted,
95
99
  "sort": sort,
96
100
  "include": include,
101
+ "supportedComponents": supported_components,
97
102
  },
98
103
  request_options=request_options,
99
104
  )
@@ -174,11 +179,11 @@ class RawRewardsClient:
174
179
  filter_radius: typing.Optional[int] = None,
175
180
  sort: typing.Optional[typing.Union[LocationSortOptions, typing.Sequence[LocationSortOptions]]] = None,
176
181
  include: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
182
+ supported_components: typing.Optional[typing.Union[ComponentType, typing.Sequence[ComponentType]]] = None,
177
183
  request_options: typing.Optional[RequestOptions] = None,
178
184
  ) -> HttpResponse[LocationsResponseObject]:
179
185
  """
180
- Retrieve national and local geographic locations that a specified user has eligible in-store offers at. To
181
- include local locations, add the `includeLocal` query parameter to your api call. Use this endpoint to build
186
+ Retrieve national and local geographic locations that a specified user has eligible in-store offers at. Use this endpoint to build
182
187
  out your [map-specific UX experiences](/2024-10-01/api/getting-started#c-discover-clos-near-you-map-view). Please note
183
188
  that Longitude and Latitude fields are prioritized over State, City and Zipcode and are the recommended search
184
189
  pattern.<br/>
@@ -219,6 +224,9 @@ class RawRewardsClient:
219
224
  include : typing.Optional[typing.Union[str, typing.Sequence[str]]]
220
225
  CSV list of included resources in the response (e.g "offers,categories"). Allowed values are `offers` and `categories`.
221
226
 
227
+ supported_components : typing.Optional[typing.Union[ComponentType, typing.Sequence[ComponentType]]]
228
+ UI component types to include in included offers. Valid values are shortDescription, longDescription, cta, tags, and detailTags.
229
+
222
230
  request_options : typing.Optional[RequestOptions]
223
231
  Request-specific configuration.
224
232
 
@@ -243,6 +251,7 @@ class RawRewardsClient:
243
251
  "filter[radius]": filter_radius,
244
252
  "sort": sort,
245
253
  "include": include,
254
+ "supportedComponents": supported_components,
246
255
  },
247
256
  request_options=request_options,
248
257
  )
@@ -323,13 +332,13 @@ class AsyncRawRewardsClient:
323
332
  filter_is_targeted: typing.Optional[bool] = None,
324
333
  sort: typing.Optional[typing.Union[OfferSortOptions, typing.Sequence[OfferSortOptions]]] = None,
325
334
  include: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
335
+ supported_components: typing.Optional[typing.Union[ComponentType, typing.Sequence[ComponentType]]] = None,
326
336
  request_options: typing.Optional[RequestOptions] = None,
327
337
  ) -> AsyncHttpResponse[OffersResponseObject]:
328
338
  """
329
339
  Retrieve national brand offers that a specified user is eligible for. Call this endpoint to build out your
330
340
  [targeted offers UX experience](/2024-10-01/api/getting-started#b-discover-a-lapsed-customer-clo). Local offers details
331
- can be found by calling the [Get Eligible Locations](/2024-10-01/api/rewards/locations) endpoint with the
332
- `includeLocal` query parameter.<br/>
341
+ can be found by calling the [Get Eligible Locations](/2024-10-01/api/rewards/locations).<br/>
333
342
  <b>Required scopes:</b> `rewards:read`
334
343
 
335
344
  Parameters
@@ -356,6 +365,9 @@ class AsyncRawRewardsClient:
356
365
  include : typing.Optional[typing.Union[str, typing.Sequence[str]]]
357
366
  CSV list of included resources in the response (e.g "categories"). Allowed value is `categories`.
358
367
 
368
+ supported_components : typing.Optional[typing.Union[ComponentType, typing.Sequence[ComponentType]]]
369
+ UI component types to include in the response. Valid values are shortDescription, longDescription, cta, tags, and detailTags.
370
+
359
371
  request_options : typing.Optional[RequestOptions]
360
372
  Request-specific configuration.
361
373
 
@@ -375,6 +387,7 @@ class AsyncRawRewardsClient:
375
387
  "filter[isTargeted]": filter_is_targeted,
376
388
  "sort": sort,
377
389
  "include": include,
390
+ "supportedComponents": supported_components,
378
391
  },
379
392
  request_options=request_options,
380
393
  )
@@ -455,11 +468,11 @@ class AsyncRawRewardsClient:
455
468
  filter_radius: typing.Optional[int] = None,
456
469
  sort: typing.Optional[typing.Union[LocationSortOptions, typing.Sequence[LocationSortOptions]]] = None,
457
470
  include: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
471
+ supported_components: typing.Optional[typing.Union[ComponentType, typing.Sequence[ComponentType]]] = None,
458
472
  request_options: typing.Optional[RequestOptions] = None,
459
473
  ) -> AsyncHttpResponse[LocationsResponseObject]:
460
474
  """
461
- Retrieve national and local geographic locations that a specified user has eligible in-store offers at. To
462
- include local locations, add the `includeLocal` query parameter to your api call. Use this endpoint to build
475
+ Retrieve national and local geographic locations that a specified user has eligible in-store offers at. Use this endpoint to build
463
476
  out your [map-specific UX experiences](/2024-10-01/api/getting-started#c-discover-clos-near-you-map-view). Please note
464
477
  that Longitude and Latitude fields are prioritized over State, City and Zipcode and are the recommended search
465
478
  pattern.<br/>
@@ -500,6 +513,9 @@ class AsyncRawRewardsClient:
500
513
  include : typing.Optional[typing.Union[str, typing.Sequence[str]]]
501
514
  CSV list of included resources in the response (e.g "offers,categories"). Allowed values are `offers` and `categories`.
502
515
 
516
+ supported_components : typing.Optional[typing.Union[ComponentType, typing.Sequence[ComponentType]]]
517
+ UI component types to include in included offers. Valid values are shortDescription, longDescription, cta, tags, and detailTags.
518
+
503
519
  request_options : typing.Optional[RequestOptions]
504
520
  Request-specific configuration.
505
521
 
@@ -524,6 +540,7 @@ class AsyncRawRewardsClient:
524
540
  "filter[radius]": filter_radius,
525
541
  "sort": sort,
526
542
  "include": include,
543
+ "supportedComponents": supported_components,
527
544
  },
528
545
  request_options=request_options,
529
546
  )
@@ -9,6 +9,7 @@ if typing.TYPE_CHECKING:
9
9
  from .amount import Amount
10
10
  from .amount_type import AmountType
11
11
  from .asset import Asset
12
+ from .button_style import ButtonStyle
12
13
  from .category_data import CategoryData
13
14
  from .category_fields import CategoryFields
14
15
  from .category_identifier import CategoryIdentifier
@@ -16,7 +17,9 @@ if typing.TYPE_CHECKING:
16
17
  from .category_relationship import CategoryRelationship
17
18
  from .category_relationship_object import CategoryRelationshipObject
18
19
  from .commission import Commission
20
+ from .component_type import ComponentType
19
21
  from .coordinates import Coordinates
22
+ from .cta_component import CtaComponent
20
23
  from .eligibility_location_address import EligibilityLocationAddress
21
24
  from .eligibility_location_included import EligibilityLocationIncluded
22
25
  from .eligibility_offer_included import EligibilityOfferIncluded
@@ -27,6 +30,7 @@ if typing.TYPE_CHECKING:
27
30
  from .location_sort_options import LocationSortOptions
28
31
  from .locations_response_object import LocationsResponseObject
29
32
  from .offer_common_fields import OfferCommonFields
33
+ from .offer_components import OfferComponents
30
34
  from .offer_data_union import OfferDataUnion, OfferDataUnion_StandardOffer
31
35
  from .offer_relationship import OfferRelationship
32
36
  from .offer_sort_options import OfferSortOptions
@@ -41,6 +45,7 @@ _dynamic_imports: typing.Dict[str, str] = {
41
45
  "Amount": ".amount",
42
46
  "AmountType": ".amount_type",
43
47
  "Asset": ".asset",
48
+ "ButtonStyle": ".button_style",
44
49
  "CategoryData": ".category_data",
45
50
  "CategoryFields": ".category_fields",
46
51
  "CategoryIdentifier": ".category_identifier",
@@ -48,7 +53,9 @@ _dynamic_imports: typing.Dict[str, str] = {
48
53
  "CategoryRelationship": ".category_relationship",
49
54
  "CategoryRelationshipObject": ".category_relationship_object",
50
55
  "Commission": ".commission",
56
+ "ComponentType": ".component_type",
51
57
  "Coordinates": ".coordinates",
58
+ "CtaComponent": ".cta_component",
52
59
  "EligibilityLocationAddress": ".eligibility_location_address",
53
60
  "EligibilityLocationIncluded": ".eligibility_location_included",
54
61
  "EligibilityOfferIncluded": ".eligibility_offer_included",
@@ -59,6 +66,7 @@ _dynamic_imports: typing.Dict[str, str] = {
59
66
  "LocationSortOptions": ".location_sort_options",
60
67
  "LocationsResponseObject": ".locations_response_object",
61
68
  "OfferCommonFields": ".offer_common_fields",
69
+ "OfferComponents": ".offer_components",
62
70
  "OfferDataUnion": ".offer_data_union",
63
71
  "OfferDataUnion_StandardOffer": ".offer_data_union",
64
72
  "OfferRelationship": ".offer_relationship",
@@ -98,6 +106,7 @@ __all__ = [
98
106
  "Amount",
99
107
  "AmountType",
100
108
  "Asset",
109
+ "ButtonStyle",
101
110
  "CategoryData",
102
111
  "CategoryFields",
103
112
  "CategoryIdentifier",
@@ -105,7 +114,9 @@ __all__ = [
105
114
  "CategoryRelationship",
106
115
  "CategoryRelationshipObject",
107
116
  "Commission",
117
+ "ComponentType",
108
118
  "Coordinates",
119
+ "CtaComponent",
109
120
  "EligibilityLocationAddress",
110
121
  "EligibilityLocationIncluded",
111
122
  "EligibilityOfferIncluded",
@@ -116,6 +127,7 @@ __all__ = [
116
127
  "LocationSortOptions",
117
128
  "LocationsResponseObject",
118
129
  "OfferCommonFields",
130
+ "OfferComponents",
119
131
  "OfferDataUnion",
120
132
  "OfferDataUnion_StandardOffer",
121
133
  "OfferRelationship",
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ ButtonStyle = typing.Union[typing.Literal["PRIMARY", "DISABLED"], typing.Any]
@@ -0,0 +1,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ ComponentType = typing.Union[
6
+ typing.Literal["shortDescription", "longDescription", "cta", "tags", "detailTags"], typing.Any
7
+ ]
@@ -0,0 +1,34 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ import typing_extensions
7
+ from ....core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ....core.serialization import FieldMetadata
9
+ from .button_style import ButtonStyle
10
+
11
+
12
+ class CtaComponent(UniversalBaseModel):
13
+ """
14
+ Call-to-action button component for offers
15
+ """
16
+
17
+ button_text: typing_extensions.Annotated[str, FieldMetadata(alias="buttonText")] = pydantic.Field()
18
+ """
19
+ Text to display on the button
20
+ """
21
+
22
+ button_style: typing_extensions.Annotated[ButtonStyle, FieldMetadata(alias="buttonStyle")] = pydantic.Field()
23
+ """
24
+ Style of the button
25
+ """
26
+
27
+ if IS_PYDANTIC_V2:
28
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
29
+ else:
30
+
31
+ class Config:
32
+ frozen = True
33
+ smart_union = True
34
+ extra = pydantic.Extra.allow
@@ -11,6 +11,7 @@ from ....core.serialization import FieldMetadata
11
11
  from .amount import Amount
12
12
  from .asset import Asset
13
13
  from .commission import Commission
14
+ from .offer_components import OfferComponents
14
15
 
15
16
 
16
17
  class OfferCommonFields(UniversalBaseModel):
@@ -93,6 +94,11 @@ class OfferCommonFields(UniversalBaseModel):
93
94
  Description of the offer
94
95
  """
95
96
 
97
+ components: typing.Optional[OfferComponents] = pydantic.Field(default=None)
98
+ """
99
+ UI component data for the offer, returned when supportedComponents query parameter is provided
100
+ """
101
+
96
102
  if IS_PYDANTIC_V2:
97
103
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
98
104
  else:
@@ -0,0 +1,55 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ import typing_extensions
7
+ from ....core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ....core.serialization import FieldMetadata
9
+ from .cta_component import CtaComponent
10
+
11
+
12
+ class OfferComponents(UniversalBaseModel):
13
+ """
14
+ UI component data for rendering offer details
15
+ """
16
+
17
+ short_description: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="shortDescription")] = (
18
+ pydantic.Field(default=None)
19
+ )
20
+ """
21
+ Short description for the offer
22
+ """
23
+
24
+ long_description: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="longDescription")] = (
25
+ pydantic.Field(default=None)
26
+ )
27
+ """
28
+ Long description for the offer
29
+ """
30
+
31
+ cta: typing.Optional[CtaComponent] = pydantic.Field(default=None)
32
+ """
33
+ Call-to-action button component
34
+ """
35
+
36
+ tags: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
37
+ """
38
+ Tags for the offer
39
+ """
40
+
41
+ detail_tags: typing_extensions.Annotated[typing.Optional[typing.List[str]], FieldMetadata(alias="detailTags")] = (
42
+ pydantic.Field(default=None)
43
+ )
44
+ """
45
+ Detail tags for the offer
46
+ """
47
+
48
+ if IS_PYDANTIC_V2:
49
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
50
+ else:
51
+
52
+ class Config:
53
+ frozen = True
54
+ smart_union = True
55
+ extra = pydantic.Extra.allow
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kard-financial-sdk
3
- Version: 2.0.0
3
+ Version: 2.2.0
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers