kard-financial-sdk 0.0.82__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.
- kard/__init__.py +579 -0
- kard/auth/__init__.py +34 -0
- kard/auth/client.py +121 -0
- kard/auth/raw_client.py +108 -0
- kard/auth/types/__init__.py +34 -0
- kard/auth/types/token_response.py +25 -0
- kard/client.py +416 -0
- kard/commons/__init__.py +120 -0
- kard/commons/errors/__init__.py +44 -0
- kard/commons/errors/conflict_error.py +11 -0
- kard/commons/errors/does_not_exist_error.py +11 -0
- kard/commons/errors/internal_server_error.py +11 -0
- kard/commons/errors/invalid_request.py +11 -0
- kard/commons/errors/unauthorized_error.py +11 -0
- kard/commons/types/__init__.py +107 -0
- kard/commons/types/category_option.py +26 -0
- kard/commons/types/commission_type.py +5 -0
- kard/commons/types/commission_value.py +28 -0
- kard/commons/types/commission_value_type.py +5 -0
- kard/commons/types/empty_object.py +17 -0
- kard/commons/types/enrolled_rewards_type.py +5 -0
- kard/commons/types/error_object.py +43 -0
- kard/commons/types/error_response.py +20 -0
- kard/commons/types/error_source.py +32 -0
- kard/commons/types/job.py +24 -0
- kard/commons/types/job_response.py +27 -0
- kard/commons/types/job_status.py +5 -0
- kard/commons/types/links.py +27 -0
- kard/commons/types/mongo_id.py +3 -0
- kard/commons/types/notification_type.py +19 -0
- kard/commons/types/organization_id.py +3 -0
- kard/commons/types/purchase_channel.py +5 -0
- kard/commons/types/relationship_data.py +24 -0
- kard/commons/types/relationship_multiple.py +20 -0
- kard/commons/types/relationship_single.py +20 -0
- kard/commons/types/resource_type.py +3 -0
- kard/commons/types/state.py +68 -0
- kard/commons/types/subscription_id.py +3 -0
- kard/commons/types/user_id.py +3 -0
- kard/core/__init__.py +105 -0
- kard/core/api_error.py +23 -0
- kard/core/client_wrapper.py +97 -0
- kard/core/datetime_utils.py +28 -0
- kard/core/file.py +67 -0
- kard/core/force_multipart.py +18 -0
- kard/core/http_client.py +613 -0
- kard/core/http_response.py +55 -0
- kard/core/http_sse/__init__.py +42 -0
- kard/core/http_sse/_api.py +112 -0
- kard/core/http_sse/_decoders.py +61 -0
- kard/core/http_sse/_exceptions.py +7 -0
- kard/core/http_sse/_models.py +17 -0
- kard/core/jsonable_encoder.py +100 -0
- kard/core/oauth_token_provider.py +73 -0
- kard/core/pydantic_utilities.py +260 -0
- kard/core/query_encoder.py +58 -0
- kard/core/remove_none_from_dict.py +11 -0
- kard/core/request_options.py +35 -0
- kard/core/serialization.py +276 -0
- kard/environment.py +8 -0
- kard/files/__init__.py +58 -0
- kard/files/client.py +213 -0
- kard/files/errors/__init__.py +34 -0
- kard/files/errors/forbidden_error.py +11 -0
- kard/files/raw_client.py +278 -0
- kard/files/types/__init__.py +53 -0
- kard/files/types/file_metadata_attribute.py +39 -0
- kard/files/types/file_metadata_with_url.py +34 -0
- kard/files/types/file_type.py +13 -0
- kard/files/types/files_metadata_sort_options.py +5 -0
- kard/files/types/get_files_metadata_response.py +71 -0
- kard/files/types/pagination_meta.py +29 -0
- kard/notifications/__init__.py +279 -0
- kard/notifications/client.py +63 -0
- kard/notifications/raw_client.py +13 -0
- kard/notifications/subscriptions/__init__.py +97 -0
- kard/notifications/subscriptions/client.py +372 -0
- kard/notifications/subscriptions/raw_client.py +581 -0
- kard/notifications/subscriptions/types/__init__.py +94 -0
- kard/notifications/subscriptions/types/create_subscription_union.py +27 -0
- kard/notifications/subscriptions/types/create_subscriptions_response_object.py +43 -0
- kard/notifications/subscriptions/types/created_subscription.py +23 -0
- kard/notifications/subscriptions/types/subscription.py +25 -0
- kard/notifications/subscriptions/types/subscription_attributes.py +35 -0
- kard/notifications/subscriptions/types/subscription_request.py +20 -0
- kard/notifications/subscriptions/types/subscription_request_attributes.py +35 -0
- kard/notifications/subscriptions/types/subscription_request_body.py +42 -0
- kard/notifications/subscriptions/types/subscription_request_union.py +26 -0
- kard/notifications/subscriptions/types/subscription_union.py +27 -0
- kard/notifications/subscriptions/types/subscriptions_response_object.py +43 -0
- kard/notifications/subscriptions/types/update_subscription_request.py +20 -0
- kard/notifications/subscriptions/types/update_subscription_request_attributes.py +39 -0
- kard/notifications/subscriptions/types/update_subscription_request_body.py +40 -0
- kard/notifications/subscriptions/types/update_subscription_request_union.py +26 -0
- kard/notifications/subscriptions/types/update_subscriptions_response_object.py +41 -0
- kard/notifications/types/__init__.py +214 -0
- kard/notifications/types/audit_update_attributes.py +88 -0
- kard/notifications/types/audit_update_data.py +27 -0
- kard/notifications/types/audit_update_relationships.py +21 -0
- kard/notifications/types/broker_amount.py +28 -0
- kard/notifications/types/broker_amount_type.py +5 -0
- kard/notifications/types/broker_asset.py +33 -0
- kard/notifications/types/broker_asset_type.py +5 -0
- kard/notifications/types/broker_operation_hours.py +30 -0
- kard/notifications/types/broker_operation_period.py +28 -0
- kard/notifications/types/broker_purchase_channel.py +5 -0
- kard/notifications/types/broker_reward.py +28 -0
- kard/notifications/types/broker_reward_type.py +5 -0
- kard/notifications/types/clawback_data.py +27 -0
- kard/notifications/types/earned_reward_approved_data.py +27 -0
- kard/notifications/types/earned_reward_attributes.py +18 -0
- kard/notifications/types/earned_reward_relationships.py +21 -0
- kard/notifications/types/earned_reward_settled_attributes.py +23 -0
- kard/notifications/types/earned_reward_settled_data.py +27 -0
- kard/notifications/types/failed_transaction_attributes.py +41 -0
- kard/notifications/types/failed_transaction_data.py +27 -0
- kard/notifications/types/failed_transaction_relationships.py +22 -0
- kard/notifications/types/location_address.py +39 -0
- kard/notifications/types/location_coordinates.py +27 -0
- kard/notifications/types/location_status.py +5 -0
- kard/notifications/types/merchant_source.py +5 -0
- kard/notifications/types/notification_data_union.py +203 -0
- kard/notifications/types/notification_metadata.py +22 -0
- kard/notifications/types/notification_payload.py +65 -0
- kard/notifications/types/offer_status.py +5 -0
- kard/notifications/types/offer_type.py +5 -0
- kard/notifications/types/reward_notification_attributes.py +48 -0
- kard/notifications/types/time_period.py +27 -0
- kard/notifications/types/transaction_relationships.py +22 -0
- kard/notifications/types/user_offer_status.py +5 -0
- kard/notifications/types/valid_transaction_attributes.py +25 -0
- kard/notifications/types/valid_transaction_commission_earned.py +21 -0
- kard/notifications/types/valid_transaction_data.py +27 -0
- kard/notifications/types/webhook_locations_attributes.py +71 -0
- kard/notifications/types/webhook_locations_data.py +27 -0
- kard/notifications/types/webhook_locations_relationships.py +20 -0
- kard/notifications/types/webhook_merchant_attributes.py +67 -0
- kard/notifications/types/webhook_merchant_data.py +27 -0
- kard/notifications/types/webhook_merchant_relationships.py +20 -0
- kard/notifications/types/webhook_offer_attributes.py +143 -0
- kard/notifications/types/webhook_offer_data.py +27 -0
- kard/notifications/types/webhook_offer_relationships.py +20 -0
- kard/notifications/types/webhook_user_offer_attributes.py +41 -0
- kard/notifications/types/webhook_user_offer_data.py +27 -0
- kard/notifications/types/webhook_user_offer_relationships.py +21 -0
- kard/ping/__init__.py +39 -0
- kard/ping/client.py +100 -0
- kard/ping/errors/__init__.py +34 -0
- kard/ping/errors/network_blocked_error.py +11 -0
- kard/ping/raw_client.py +113 -0
- kard/ping/types/__init__.py +38 -0
- kard/ping/types/network_blocked_error_body.py +34 -0
- kard/ping/types/ping_response_object.py +46 -0
- kard/py.typed +0 -0
- kard/transactions/__init__.py +212 -0
- kard/transactions/client.py +639 -0
- kard/transactions/errors/__init__.py +40 -0
- kard/transactions/errors/create_audit_multi_status.py +11 -0
- kard/transactions/errors/create_incoming_transactions_multi_status.py +11 -0
- kard/transactions/errors/fraud_multi_status.py +11 -0
- kard/transactions/raw_client.py +925 -0
- kard/transactions/types/__init__.py +199 -0
- kard/transactions/types/audit_attributes.py +44 -0
- kard/transactions/types/audit_request_data.py +20 -0
- kard/transactions/types/audit_response_attributes.py +24 -0
- kard/transactions/types/audit_response_data.py +25 -0
- kard/transactions/types/audit_status.py +5 -0
- kard/transactions/types/card_network.py +5 -0
- kard/transactions/types/commission_earned_details.py +21 -0
- kard/transactions/types/create_audit_multi_status_response.py +21 -0
- kard/transactions/types/create_audit_request_body.py +43 -0
- kard/transactions/types/create_audit_request_data_union.py +26 -0
- kard/transactions/types/create_audit_response_body.py +41 -0
- kard/transactions/types/create_audit_response_data_union.py +27 -0
- kard/transactions/types/direction_type.py +5 -0
- kard/transactions/types/fraudulent_transaction_attributes.py +24 -0
- kard/transactions/types/fraudulent_transaction_data.py +30 -0
- kard/transactions/types/fraudulent_transaction_object.py +42 -0
- kard/transactions/types/fraudulent_transaction_request_body.py +45 -0
- kard/transactions/types/fraudulent_transaction_response.py +21 -0
- kard/transactions/types/get_earned_rewards_response.py +133 -0
- kard/transactions/types/matched_transactions_attributes.py +156 -0
- kard/transactions/types/matched_transactions_request.py +25 -0
- kard/transactions/types/merchant.py +82 -0
- kard/transactions/types/payment_status.py +5 -0
- kard/transactions/types/payment_type.py +5 -0
- kard/transactions/types/processor_mid.py +26 -0
- kard/transactions/types/receipt_medium_type.py +5 -0
- kard/transactions/types/rewarded_transaction.py +27 -0
- kard/transactions/types/rewarded_transaction_attributes.py +74 -0
- kard/transactions/types/rewarded_transaction_relationships.py +22 -0
- kard/transactions/types/rewarded_transaction_status.py +5 -0
- kard/transactions/types/rewarded_transaction_union.py +29 -0
- kard/transactions/types/states.py +68 -0
- kard/transactions/types/transaction_included_resource.py +47 -0
- kard/transactions/types/transaction_merchant_attributes.py +22 -0
- kard/transactions/types/transaction_merchant_resource.py +28 -0
- kard/transactions/types/transaction_offer_attributes.py +26 -0
- kard/transactions/types/transaction_offer_resource.py +28 -0
- kard/transactions/types/transaction_payment_type.py +5 -0
- kard/transactions/types/transaction_status.py +5 -0
- kard/transactions/types/transactions.py +46 -0
- kard/transactions/types/transactions_attributes.py +198 -0
- kard/transactions/types/transactions_multi_response.py +21 -0
- kard/transactions/types/transactions_request.py +25 -0
- kard/transactions/types/transactions_request_body.py +90 -0
- kard/transactions/types/transactions_response.py +38 -0
- kard/transactions/types/transactions_response_data.py +27 -0
- kard/transactions/types/visa_mid.py +23 -0
- kard/transactions/types/visa_mid_details.py +27 -0
- kard/users/__init__.py +293 -0
- kard/users/attributions/__init__.py +73 -0
- kard/users/attributions/client.py +229 -0
- kard/users/attributions/raw_client.py +215 -0
- kard/users/attributions/types/__init__.py +73 -0
- kard/users/attributions/types/create_attribution_request_object.py +75 -0
- kard/users/attributions/types/create_attribution_request_union.py +45 -0
- kard/users/attributions/types/create_attribution_response.py +38 -0
- kard/users/attributions/types/event_code.py +5 -0
- kard/users/attributions/types/notification_attribution_attributes.py +35 -0
- kard/users/attributions/types/notification_attribution_request.py +20 -0
- kard/users/attributions/types/notification_medium.py +5 -0
- kard/users/attributions/types/offer_attribution_attributes.py +35 -0
- kard/users/attributions/types/offer_attribution_request.py +20 -0
- kard/users/attributions/types/offer_medium.py +5 -0
- kard/users/client.py +512 -0
- kard/users/errors/__init__.py +34 -0
- kard/users/errors/multi_status.py +11 -0
- kard/users/raw_client.py +783 -0
- kard/users/rewards/__init__.py +133 -0
- kard/users/rewards/client.py +448 -0
- kard/users/rewards/raw_client.py +587 -0
- kard/users/rewards/types/__init__.py +130 -0
- kard/users/rewards/types/amount.py +21 -0
- kard/users/rewards/types/amount_type.py +5 -0
- kard/users/rewards/types/asset.py +28 -0
- kard/users/rewards/types/category_data.py +18 -0
- kard/users/rewards/types/category_fields.py +23 -0
- kard/users/rewards/types/category_identifier.py +24 -0
- kard/users/rewards/types/category_included.py +21 -0
- kard/users/rewards/types/category_relationship.py +20 -0
- kard/users/rewards/types/category_relationship_object.py +20 -0
- kard/users/rewards/types/commission.py +21 -0
- kard/users/rewards/types/coordinates.py +20 -0
- kard/users/rewards/types/eligibility_location_address.py +24 -0
- kard/users/rewards/types/eligibility_location_included.py +8 -0
- kard/users/rewards/types/eligibility_offer_included.py +7 -0
- kard/users/rewards/types/eligibility_offer_relationship.py +7 -0
- kard/users/rewards/types/location_attributes.py +28 -0
- kard/users/rewards/types/location_data.py +32 -0
- kard/users/rewards/types/location_relationships.py +18 -0
- kard/users/rewards/types/location_sort_options.py +5 -0
- kard/users/rewards/types/locations_response_object.py +215 -0
- kard/users/rewards/types/offer_common_fields.py +103 -0
- kard/users/rewards/types/offer_data_union.py +30 -0
- kard/users/rewards/types/offer_relationship.py +21 -0
- kard/users/rewards/types/offer_sort_options.py +7 -0
- kard/users/rewards/types/offers_response_object.py +130 -0
- kard/users/rewards/types/operation_hours.py +23 -0
- kard/users/rewards/types/operation_period.py +21 -0
- kard/users/rewards/types/operation_time.py +20 -0
- kard/users/rewards/types/standard_offer.py +21 -0
- kard/users/rewards/types/standard_offer_core.py +26 -0
- kard/users/rewards/types/standard_offer_fields.py +18 -0
- kard/users/types/__init__.py +66 -0
- kard/users/types/create_users_multi_status_response.py +21 -0
- kard/users/types/create_users_object.py +42 -0
- kard/users/types/delete_user_response_object.py +34 -0
- kard/users/types/update_user_object.py +40 -0
- kard/users/types/user_request_attributes.py +60 -0
- kard/users/types/user_request_data.py +22 -0
- kard/users/types/user_request_data_union.py +28 -0
- kard/users/types/user_response_no_data.py +22 -0
- kard/users/types/user_response_union_no_data.py +28 -0
- kard/users/uploads/__init__.py +112 -0
- kard/users/uploads/client.py +484 -0
- kard/users/uploads/errors/__init__.py +34 -0
- kard/users/uploads/errors/upload_part_multi_status.py +13 -0
- kard/users/uploads/raw_client.py +625 -0
- kard/users/uploads/types/__init__.py +119 -0
- kard/users/uploads/types/create_upload_part_data_union.py +27 -0
- kard/users/uploads/types/create_upload_part_multi_status_response.py +21 -0
- kard/users/uploads/types/create_upload_part_request_object.py +74 -0
- kard/users/uploads/types/create_upload_part_response_data.py +25 -0
- kard/users/uploads/types/create_upload_part_response_data_union.py +27 -0
- kard/users/uploads/types/create_upload_part_response_object.py +39 -0
- kard/users/uploads/types/create_upload_request_data_union.py +26 -0
- kard/users/uploads/types/create_upload_request_object.py +36 -0
- kard/users/uploads/types/create_upload_response_data.py +25 -0
- kard/users/uploads/types/create_upload_response_data_union.py +27 -0
- kard/users/uploads/types/create_upload_response_object.py +37 -0
- kard/users/uploads/types/historical_transaction_complete_no_data.py +25 -0
- kard/users/uploads/types/start_historical_upload_no_data.py +20 -0
- kard/users/uploads/types/update_upload_request_data_union.py +27 -0
- kard/users/uploads/types/update_upload_request_object.py +37 -0
- kard/users/uploads/types/update_upload_response_data.py +25 -0
- kard/users/uploads/types/update_upload_response_data_union.py +27 -0
- kard/users/uploads/types/update_upload_response_object.py +37 -0
- kard/version.py +3 -0
- kard_financial_sdk-0.0.82.dist-info/METADATA +238 -0
- kard_financial_sdk-0.0.82.dist-info/RECORD +302 -0
- kard_financial_sdk-0.0.82.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...commons.types.error_response import ErrorResponse
|
|
7
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
from .fraudulent_transaction_data import FraudulentTransactionData
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FraudulentTransactionResponse(ErrorResponse):
|
|
12
|
+
data: typing.List[FraudulentTransactionData]
|
|
13
|
+
|
|
14
|
+
if IS_PYDANTIC_V2:
|
|
15
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
16
|
+
else:
|
|
17
|
+
|
|
18
|
+
class Config:
|
|
19
|
+
frozen = True
|
|
20
|
+
smart_union = True
|
|
21
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...commons.types.links import Links
|
|
7
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from .rewarded_transaction_union import RewardedTransactionUnion
|
|
9
|
+
from .transaction_included_resource import TransactionIncludedResource
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class GetEarnedRewardsResponse(UniversalBaseModel):
|
|
13
|
+
"""
|
|
14
|
+
Examples
|
|
15
|
+
--------
|
|
16
|
+
import datetime
|
|
17
|
+
|
|
18
|
+
from kard.commons import (
|
|
19
|
+
CommissionValue,
|
|
20
|
+
Links,
|
|
21
|
+
RelationshipData,
|
|
22
|
+
RelationshipSingle,
|
|
23
|
+
)
|
|
24
|
+
from kard.transactions import (
|
|
25
|
+
CommissionEarnedDetails,
|
|
26
|
+
GetEarnedRewardsResponse,
|
|
27
|
+
RewardedTransactionAttributes,
|
|
28
|
+
RewardedTransactionRelationships,
|
|
29
|
+
RewardedTransactionUnion_RewardedTransaction,
|
|
30
|
+
TransactionIncludedResource_Merchant,
|
|
31
|
+
TransactionIncludedResource_Offer,
|
|
32
|
+
TransactionMerchantAttributes,
|
|
33
|
+
TransactionOfferAttributes,
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
GetEarnedRewardsResponse(
|
|
37
|
+
data=[
|
|
38
|
+
RewardedTransactionUnion_RewardedTransaction(
|
|
39
|
+
id="fcabf024-3870-41f3-9fbd-b43ea85a3d19",
|
|
40
|
+
attributes=RewardedTransactionAttributes(
|
|
41
|
+
status="SETTLED",
|
|
42
|
+
transaction_id="TXN-20241001-F21-127964",
|
|
43
|
+
transaction_amount_in_cents=12796,
|
|
44
|
+
transaction_timestamp=datetime.datetime.fromisoformat(
|
|
45
|
+
"2024-10-01 01:36:57+00:00",
|
|
46
|
+
),
|
|
47
|
+
paid_to_issuer="UNPAID",
|
|
48
|
+
payout_timestamp=datetime.datetime.fromisoformat(
|
|
49
|
+
"2024-10-01 02:00:00+00:00",
|
|
50
|
+
),
|
|
51
|
+
card_bin="123456",
|
|
52
|
+
card_last_four="4321",
|
|
53
|
+
commission_earned=CommissionEarnedDetails(
|
|
54
|
+
issuer=CommissionValue(
|
|
55
|
+
type="cents",
|
|
56
|
+
value=102,
|
|
57
|
+
),
|
|
58
|
+
user=CommissionValue(
|
|
59
|
+
type="cents",
|
|
60
|
+
value=320,
|
|
61
|
+
),
|
|
62
|
+
),
|
|
63
|
+
),
|
|
64
|
+
relationships=RewardedTransactionRelationships(
|
|
65
|
+
user=RelationshipSingle(
|
|
66
|
+
data=RelationshipData(
|
|
67
|
+
type="user",
|
|
68
|
+
id="8c52423a-c319-44ee-8fc7-508e97b43892",
|
|
69
|
+
),
|
|
70
|
+
),
|
|
71
|
+
merchant=RelationshipSingle(
|
|
72
|
+
data=RelationshipData(
|
|
73
|
+
type="merchant",
|
|
74
|
+
id="633ed2ab30dcb60009dd5699",
|
|
75
|
+
),
|
|
76
|
+
),
|
|
77
|
+
offer=RelationshipSingle(
|
|
78
|
+
data=RelationshipData(
|
|
79
|
+
type="offer",
|
|
80
|
+
id="OFF-F21-INSTORE-2024Q4-001",
|
|
81
|
+
),
|
|
82
|
+
),
|
|
83
|
+
),
|
|
84
|
+
)
|
|
85
|
+
],
|
|
86
|
+
links=Links(
|
|
87
|
+
self_="/v2/issuers/org-123/users/user-456/earned-rewards?page[size]=10",
|
|
88
|
+
next="/v2/issuers/org-123/users/user-456/earned-rewards?page[size]=10&page[after]=eyJpZCI6ImZjYWJmMDI0LTM4NzAtNDFmMy05ZmJkLWI0M2VhODVhM2QxOSIsInRzIjoiMjAyNC0xMC0wMVQwMTozNjo1N1oifQ==",
|
|
89
|
+
),
|
|
90
|
+
included=[
|
|
91
|
+
TransactionIncludedResource_Merchant(
|
|
92
|
+
id="633ed2ab30dcb60009dd5699",
|
|
93
|
+
attributes=TransactionMerchantAttributes(
|
|
94
|
+
name="Forever 21",
|
|
95
|
+
),
|
|
96
|
+
),
|
|
97
|
+
TransactionIncludedResource_Merchant(
|
|
98
|
+
id="5f3e2d1c40abc50008cc4821",
|
|
99
|
+
attributes=TransactionMerchantAttributes(
|
|
100
|
+
name="Target",
|
|
101
|
+
),
|
|
102
|
+
),
|
|
103
|
+
TransactionIncludedResource_Offer(
|
|
104
|
+
id="OFF-F21-INSTORE-2024Q4-001",
|
|
105
|
+
attributes=TransactionOfferAttributes(
|
|
106
|
+
purchase_channel=["INSTORE"],
|
|
107
|
+
),
|
|
108
|
+
),
|
|
109
|
+
TransactionIncludedResource_Offer(
|
|
110
|
+
id="OFF-TGT-ONLINE-2024Q4-002",
|
|
111
|
+
attributes=TransactionOfferAttributes(
|
|
112
|
+
purchase_channel=["ONLINE"],
|
|
113
|
+
),
|
|
114
|
+
),
|
|
115
|
+
],
|
|
116
|
+
)
|
|
117
|
+
"""
|
|
118
|
+
|
|
119
|
+
data: typing.List[RewardedTransactionUnion]
|
|
120
|
+
links: Links
|
|
121
|
+
included: typing.Optional[typing.List[TransactionIncludedResource]] = pydantic.Field(default=None)
|
|
122
|
+
"""
|
|
123
|
+
Additional resources referenced in the response
|
|
124
|
+
"""
|
|
125
|
+
|
|
126
|
+
if IS_PYDANTIC_V2:
|
|
127
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
128
|
+
else:
|
|
129
|
+
|
|
130
|
+
class Config:
|
|
131
|
+
frozen = True
|
|
132
|
+
smart_union = True
|
|
133
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
import pydantic
|
|
7
|
+
import typing_extensions
|
|
8
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
9
|
+
from ...core.serialization import FieldMetadata
|
|
10
|
+
from .card_network import CardNetwork
|
|
11
|
+
from .direction_type import DirectionType
|
|
12
|
+
from .merchant import Merchant
|
|
13
|
+
from .payment_type import PaymentType
|
|
14
|
+
from .receipt_medium_type import ReceiptMediumType
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class MatchedTransactionsAttributes(UniversalBaseModel):
|
|
18
|
+
user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")] = pydantic.Field()
|
|
19
|
+
"""
|
|
20
|
+
The ID of the user as defined on the issuers system
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
amount: int = pydantic.Field()
|
|
24
|
+
"""
|
|
25
|
+
Transaction amount in cents
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
subtotal: typing.Optional[int] = pydantic.Field(default=None)
|
|
29
|
+
"""
|
|
30
|
+
The base amount in cents excluding additional charges (such as tips, taxes, and other fees).
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
description: str = pydantic.Field()
|
|
34
|
+
"""
|
|
35
|
+
Description of transaction - usually includes merchant and other key details on transaction
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
authorization_date: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="authorizationDate")] = (
|
|
39
|
+
pydantic.Field()
|
|
40
|
+
)
|
|
41
|
+
"""
|
|
42
|
+
Timestamp for transaction event. Date string should be in ISO format i.e.`'YYYY-MM-DDThh:mm:ss.sTZD'` where TZD = time zone designator (Z or +hh:mm or -hh:mm) i.e. `1994-11-05T08:15:30-05:00 OR 1994-11-05T08:15:30Z`
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
matched_offer_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="matchedOfferId")] = (
|
|
46
|
+
pydantic.Field(default=None)
|
|
47
|
+
)
|
|
48
|
+
"""
|
|
49
|
+
The ID of the Kard offer to which the transaction was matched. If this field is omitted, the transaction will be considered unmatched to any Kard offer. This field **must** be omitted when the `paymentType` is `UNKNOWN` and neither an orderId nor a `cardLastFour` is supplied.
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
matched_location_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="matchedLocationId")] = (
|
|
53
|
+
pydantic.Field(default=None)
|
|
54
|
+
)
|
|
55
|
+
"""
|
|
56
|
+
The unique Kard location ID where the transaction took place. This field **must** be omitted when `paymentType` is `UNKNOWN`.
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
merchant: typing.Optional[Merchant] = pydantic.Field(default=None)
|
|
60
|
+
"""
|
|
61
|
+
Merchant details
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
payment_type: typing_extensions.Annotated[PaymentType, FieldMetadata(alias="paymentType")] = pydantic.Field()
|
|
65
|
+
"""
|
|
66
|
+
The type of payment involved in the transaction.
|
|
67
|
+
"""
|
|
68
|
+
|
|
69
|
+
card_bin: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardBIN")] = pydantic.Field(
|
|
70
|
+
default=None
|
|
71
|
+
)
|
|
72
|
+
"""
|
|
73
|
+
Bank identification number (BIN). Must be a valid BIN of 6 digits. If over 6 digits, please send first 6. This field **must** be omitted when `paymentType` is `CASH` or `UNKNOWN`.
|
|
74
|
+
"""
|
|
75
|
+
|
|
76
|
+
card_last_four: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardLastFour")] = (
|
|
77
|
+
pydantic.Field(default=None)
|
|
78
|
+
)
|
|
79
|
+
"""
|
|
80
|
+
Card last four digits. This field is **required** when `paymentType` is `CARD` and `matchedOfferId` is provided. It **must** be omitted when `paymentType` is `CASH`.
|
|
81
|
+
"""
|
|
82
|
+
|
|
83
|
+
authorization_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="authorizationCode")] = (
|
|
84
|
+
pydantic.Field(default=None)
|
|
85
|
+
)
|
|
86
|
+
"""
|
|
87
|
+
Transaction approval code
|
|
88
|
+
"""
|
|
89
|
+
|
|
90
|
+
retrieval_reference_number: typing_extensions.Annotated[
|
|
91
|
+
typing.Optional[str], FieldMetadata(alias="retrievalReferenceNumber")
|
|
92
|
+
] = pydantic.Field(default=None)
|
|
93
|
+
"""
|
|
94
|
+
Retrieval Reference Number
|
|
95
|
+
"""
|
|
96
|
+
|
|
97
|
+
system_trace_audit_number: typing_extensions.Annotated[
|
|
98
|
+
typing.Optional[str], FieldMetadata(alias="systemTraceAuditNumber")
|
|
99
|
+
] = pydantic.Field(default=None)
|
|
100
|
+
"""
|
|
101
|
+
System Trace Audit Number
|
|
102
|
+
"""
|
|
103
|
+
|
|
104
|
+
acquirer_reference_number: typing_extensions.Annotated[
|
|
105
|
+
typing.Optional[str], FieldMetadata(alias="acquirerReferenceNumber")
|
|
106
|
+
] = pydantic.Field(default=None)
|
|
107
|
+
"""
|
|
108
|
+
Acquirer Reference Number
|
|
109
|
+
"""
|
|
110
|
+
|
|
111
|
+
direction: DirectionType = pydantic.Field()
|
|
112
|
+
"""
|
|
113
|
+
The direction in which the funds flow - DEBIT or CREDIT
|
|
114
|
+
"""
|
|
115
|
+
|
|
116
|
+
card_network: typing_extensions.Annotated[typing.Optional[CardNetwork], FieldMetadata(alias="cardNetwork")] = (
|
|
117
|
+
pydantic.Field(default=None)
|
|
118
|
+
)
|
|
119
|
+
"""
|
|
120
|
+
The card network associated with the transaction. This field **must** be omitted when `paymentType` is `CASH` or `UNKNOWN`.
|
|
121
|
+
"""
|
|
122
|
+
|
|
123
|
+
transaction_id: typing_extensions.Annotated[str, FieldMetadata(alias="transactionId")] = pydantic.Field()
|
|
124
|
+
"""
|
|
125
|
+
The transaction ID
|
|
126
|
+
"""
|
|
127
|
+
|
|
128
|
+
card_product_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardProductId")] = (
|
|
129
|
+
pydantic.Field(default=None)
|
|
130
|
+
)
|
|
131
|
+
"""
|
|
132
|
+
The card product ID associated with the transaction. This field **must** be omitted when `paymentType` is `CASH` or `UNKNOWN`.
|
|
133
|
+
"""
|
|
134
|
+
|
|
135
|
+
order_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="orderId")] = pydantic.Field(
|
|
136
|
+
default=None
|
|
137
|
+
)
|
|
138
|
+
"""
|
|
139
|
+
The unique identifier for an online order linked to this transaction.
|
|
140
|
+
"""
|
|
141
|
+
|
|
142
|
+
receipt_medium: typing_extensions.Annotated[
|
|
143
|
+
typing.Optional[ReceiptMediumType], FieldMetadata(alias="receiptMedium")
|
|
144
|
+
] = pydantic.Field(default=None)
|
|
145
|
+
"""
|
|
146
|
+
Indicates the format of the receipt from which the transaction is derived.
|
|
147
|
+
"""
|
|
148
|
+
|
|
149
|
+
if IS_PYDANTIC_V2:
|
|
150
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
151
|
+
else:
|
|
152
|
+
|
|
153
|
+
class Config:
|
|
154
|
+
frozen = True
|
|
155
|
+
smart_union = True
|
|
156
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
from .matched_transactions_attributes import MatchedTransactionsAttributes
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MatchedTransactionsRequest(UniversalBaseModel):
|
|
11
|
+
id: str = pydantic.Field()
|
|
12
|
+
"""
|
|
13
|
+
Unique identifier for the transaction event. This <b>must</b> be unique for each distinct event sent to the API.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
attributes: MatchedTransactionsAttributes
|
|
17
|
+
|
|
18
|
+
if IS_PYDANTIC_V2:
|
|
19
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
20
|
+
else:
|
|
21
|
+
|
|
22
|
+
class Config:
|
|
23
|
+
frozen = True
|
|
24
|
+
smart_union = True
|
|
25
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,82 @@
|
|
|
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 .states import States
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Merchant(UniversalBaseModel):
|
|
13
|
+
id: typing.Optional[str] = pydantic.Field(default=None)
|
|
14
|
+
"""
|
|
15
|
+
Acquirer Merchant Identification Number (MID) — usually a 15 digit numerical identifier code. <b>Note, this field is REQUIRED for local offers. We HIGHLY RECOMMEND sending this field as it will be required in the near future.</b>
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
name: str = pydantic.Field()
|
|
19
|
+
"""
|
|
20
|
+
Merchant name associated with transaction
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
addr_street: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="addrStreet")] = pydantic.Field(
|
|
24
|
+
default=None
|
|
25
|
+
)
|
|
26
|
+
"""
|
|
27
|
+
Merchant street address associated with transaction.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
addr_city: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="addrCity")] = pydantic.Field(
|
|
31
|
+
default=None
|
|
32
|
+
)
|
|
33
|
+
"""
|
|
34
|
+
Merchant address city associated with transaction.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
addr_state: typing_extensions.Annotated[typing.Optional[States], FieldMetadata(alias="addrState")] = pydantic.Field(
|
|
38
|
+
default=None
|
|
39
|
+
)
|
|
40
|
+
"""
|
|
41
|
+
Merchant address state associated with transaction.
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
addr_zipcode: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="addrZipcode")] = (
|
|
45
|
+
pydantic.Field(default=None)
|
|
46
|
+
)
|
|
47
|
+
"""
|
|
48
|
+
Merchant address zip code associated with transaction.
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
addr_country: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="addrCountry")] = (
|
|
52
|
+
pydantic.Field(default=None)
|
|
53
|
+
)
|
|
54
|
+
"""
|
|
55
|
+
Merchant address country associated with transaction.
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
latitude: typing.Optional[str] = pydantic.Field(default=None)
|
|
59
|
+
"""
|
|
60
|
+
Merchant latitude geocoordinate associated with transaction.
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
longitude: typing.Optional[str] = pydantic.Field(default=None)
|
|
64
|
+
"""
|
|
65
|
+
Merchant longitude geocoordinate associated with transaction.
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
store_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="storeId")] = pydantic.Field(
|
|
69
|
+
default=None
|
|
70
|
+
)
|
|
71
|
+
"""
|
|
72
|
+
Merchant store ID where transaction originated from
|
|
73
|
+
"""
|
|
74
|
+
|
|
75
|
+
if IS_PYDANTIC_V2:
|
|
76
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
77
|
+
else:
|
|
78
|
+
|
|
79
|
+
class Config:
|
|
80
|
+
frozen = True
|
|
81
|
+
smart_union = True
|
|
82
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import typing
|
|
6
|
+
|
|
7
|
+
import pydantic
|
|
8
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
9
|
+
from .visa_mid_details import VisaMidDetails
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ProcessorMid_Visa(UniversalBaseModel):
|
|
13
|
+
processor: typing.Literal["VISA"] = "VISA"
|
|
14
|
+
mids: VisaMidDetails
|
|
15
|
+
|
|
16
|
+
if IS_PYDANTIC_V2:
|
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
18
|
+
else:
|
|
19
|
+
|
|
20
|
+
class Config:
|
|
21
|
+
frozen = True
|
|
22
|
+
smart_union = True
|
|
23
|
+
extra = pydantic.Extra.allow
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
ProcessorMid = ProcessorMid_Visa
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
from .rewarded_transaction_attributes import RewardedTransactionAttributes
|
|
8
|
+
from .rewarded_transaction_relationships import RewardedTransactionRelationships
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class RewardedTransaction(UniversalBaseModel):
|
|
12
|
+
id: str = pydantic.Field()
|
|
13
|
+
"""
|
|
14
|
+
Unique transaction identifier
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
attributes: RewardedTransactionAttributes
|
|
18
|
+
relationships: RewardedTransactionRelationships
|
|
19
|
+
|
|
20
|
+
if IS_PYDANTIC_V2:
|
|
21
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
22
|
+
else:
|
|
23
|
+
|
|
24
|
+
class Config:
|
|
25
|
+
frozen = True
|
|
26
|
+
smart_union = True
|
|
27
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
import pydantic
|
|
7
|
+
import typing_extensions
|
|
8
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
9
|
+
from ...core.serialization import FieldMetadata
|
|
10
|
+
from .commission_earned_details import CommissionEarnedDetails
|
|
11
|
+
from .payment_status import PaymentStatus
|
|
12
|
+
from .rewarded_transaction_status import RewardedTransactionStatus
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class RewardedTransactionAttributes(UniversalBaseModel):
|
|
16
|
+
status: RewardedTransactionStatus = pydantic.Field()
|
|
17
|
+
"""
|
|
18
|
+
Status of the rewarded transaction
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
transaction_id: typing_extensions.Annotated[str, FieldMetadata(alias="transactionId")] = pydantic.Field()
|
|
22
|
+
"""
|
|
23
|
+
The transaction identifier
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
transaction_amount_in_cents: typing_extensions.Annotated[int, FieldMetadata(alias="transactionAmountInCents")] = (
|
|
27
|
+
pydantic.Field()
|
|
28
|
+
)
|
|
29
|
+
"""
|
|
30
|
+
Transaction amount in cents
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
transaction_timestamp: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="transactionTimestamp")] = (
|
|
34
|
+
pydantic.Field()
|
|
35
|
+
)
|
|
36
|
+
"""
|
|
37
|
+
Timestamp of the transaction in ISO 8601 format
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
paid_to_issuer: typing_extensions.Annotated[PaymentStatus, FieldMetadata(alias="paidToIssuer")] = pydantic.Field()
|
|
41
|
+
"""
|
|
42
|
+
Payment status to issuer
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
commission_earned: typing_extensions.Annotated[CommissionEarnedDetails, FieldMetadata(alias="commissionEarned")]
|
|
46
|
+
payout_timestamp: typing_extensions.Annotated[
|
|
47
|
+
typing.Optional[dt.datetime], FieldMetadata(alias="payoutTimestamp")
|
|
48
|
+
] = pydantic.Field(default=None)
|
|
49
|
+
"""
|
|
50
|
+
Timestamp representing the month when the transaction has been paid out to issuer
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
card_bin: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardBIN")] = pydantic.Field(
|
|
54
|
+
default=None
|
|
55
|
+
)
|
|
56
|
+
"""
|
|
57
|
+
Bank identification number (BIN).
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
card_last_four: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardLastFour")] = (
|
|
61
|
+
pydantic.Field(default=None)
|
|
62
|
+
)
|
|
63
|
+
"""
|
|
64
|
+
Card last four digits.
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
if IS_PYDANTIC_V2:
|
|
68
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
69
|
+
else:
|
|
70
|
+
|
|
71
|
+
class Config:
|
|
72
|
+
frozen = True
|
|
73
|
+
smart_union = True
|
|
74
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...commons.types.relationship_single import RelationshipSingle
|
|
7
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class RewardedTransactionRelationships(UniversalBaseModel):
|
|
11
|
+
user: RelationshipSingle
|
|
12
|
+
merchant: RelationshipSingle
|
|
13
|
+
offer: RelationshipSingle
|
|
14
|
+
|
|
15
|
+
if IS_PYDANTIC_V2:
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import typing
|
|
6
|
+
|
|
7
|
+
import pydantic
|
|
8
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
9
|
+
from .rewarded_transaction_attributes import RewardedTransactionAttributes
|
|
10
|
+
from .rewarded_transaction_relationships import RewardedTransactionRelationships
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class RewardedTransactionUnion_RewardedTransaction(UniversalBaseModel):
|
|
14
|
+
type: typing.Literal["rewardedTransaction"] = "rewardedTransaction"
|
|
15
|
+
id: str
|
|
16
|
+
attributes: RewardedTransactionAttributes
|
|
17
|
+
relationships: RewardedTransactionRelationships
|
|
18
|
+
|
|
19
|
+
if IS_PYDANTIC_V2:
|
|
20
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
21
|
+
else:
|
|
22
|
+
|
|
23
|
+
class Config:
|
|
24
|
+
frozen = True
|
|
25
|
+
smart_union = True
|
|
26
|
+
extra = pydantic.Extra.allow
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
RewardedTransactionUnion = RewardedTransactionUnion_RewardedTransaction
|