components.payment_gateway.public.cards ¶
This module defines the public API for the cards subcomponent.
Only business logic is exposed here. Basic entities and enums are exposed in separate modules to avoid loading the entire subcomponent with its models and dependencies when they are not needed.
Classes¶
CardDeliveryLogic ¶
This class is the public interface to the card delivery logic.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/card_delivery.py
Attributes¶
card_delivery_status_changed_topic
instance-attribute
¶
Functions¶
declare_card_not_received ¶
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/card_delivery.py
declare_card_received ¶
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/card_delivery.py
get_card_order ¶
Get the card order info for a card.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/card_delivery.py
CardHolderActions ¶
This class contains all the actions related to card holders.
Implements the following Nullable patterns: - Nullables: https://www.jamesshore.com/v2/projects/nullables/testing-without-mocks#nullables ⧉ - Parameterless instantiation: https://www.jamesshore.com/v2/projects/nullables/testing-without-mocks#instantiation ⧉
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/actions/card_holder_actions.py
Attributes¶
card_authentication_actions
instance-attribute
¶
Functions¶
create
classmethod
¶
Normal factory
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/actions/card_holder_actions.py
create_null
classmethod
¶
Null factory
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/actions/card_holder_actions.py
declare_card_holder ¶
declare_card_holder(
session,
/,
workspace_key,
external_id,
first_name,
last_name,
display_name=None,
short_name=None,
)
Declare a card holder.
The card holder must exist in the PSP workspace if an external ID is provided.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/actions/card_holder_actions.py
terminate_card_holder ¶
Terminate a card holder.
The operation is idempotent, i.e. it has no effect on already terminated entities.
Card holders in terminal state cannot be modified or used anymore. Any
attempt to use or retrieve a terminated card holder will raise a
CardHolderTerminatedException.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/actions/card_holder_actions.py
update_card_holder_contact_info ¶
Update the card holder contact info on the PSP. Phone number is needed to add cards to digital wallets. Email is optional as a second option for adding cards to digit wallets.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/actions/card_holder_actions.py
update_card_holder_identity ¶
Update the identity of a card holder.
The current identity of a card holder is used when issuing a card. The identity of a card holder may change over time, but cards are immutable.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/actions/card_holder_actions.py
CardHolderNotFoundException ¶
Bases: PaymentCardException
Exception raised when trying to use a non-existing Card Holder.
CardHolderQueries ¶
This class contains all the queries related to card holders.
Functions¶
get_card_holder ¶
Get a card holder entity from its ID.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/queries/card_holder_queries.py
CardHolderTerminatedException ¶
Bases: PaymentCardException
Exception raised when trying to use a terminated Card Holder.
CardIncidentsActions ¶
This class contains all the actions relative to card incidents.
Incidents should eventually lead to the replacement of the card.
Implements the following Nullable patterns: - Nullables: https://www.jamesshore.com/v2/projects/nullables/testing-without-mocks#nullables ⧉ - Parameterless instantiation: https://www.jamesshore.com/v2/projects/nullables/testing-without-mocks#instantiation ⧉
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/actions/card_incidents_actions.py
Attributes¶
Functions¶
create
classmethod
¶
Normal factory
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/actions/card_incidents_actions.py
create_null
classmethod
¶
Null factory
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/actions/card_incidents_actions.py
declare_card_damaged ¶
Declare a card as damaged.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/actions/card_incidents_actions.py
declare_card_lost ¶
Declare a card as lost.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/actions/card_incidents_actions.py
declare_card_stolen ¶
Declare a card as stolen.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/actions/card_incidents_actions.py
declare_card_temporarily_suspended ¶
Declare a card as temporarily suspended.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/actions/card_incidents_actions.py
CardLifecycleActions ¶
CardLifecycleActions(
adyen_client,
default_card_configuration_key,
card_configurations,
password_salt,
)
This class contains all the actions used to manage the lifecycle of a card.
Implements the following Nullable patterns: - Nullables: https://www.jamesshore.com/v2/projects/nullables/testing-without-mocks#nullables ⧉ - Parameterless instantiation: https://www.jamesshore.com/v2/projects/nullables/testing-without-mocks#instantiation ⧉
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/actions/card_lifecycle_actions.py
Attributes¶
default_card_configuration_key
instance-attribute
¶
Functions¶
create
classmethod
¶
Normal factory
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/actions/card_lifecycle_actions.py
create_card ¶
create_card(
session,
/,
card_holder_id,
account_id,
form_factor,
phone_number,
email,
shipment_info=None,
issued_at=None,
issuance_reason=None,
description=None,
reference=None,
configuration_key=None,
)
Create a card for a card holder.
Note
This operation is currently only supported for Adyen.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/actions/card_lifecycle_actions.py
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | |
create_null
classmethod
¶
create_null(
default_card_configuration_key=None,
card_configurations=None,
track_adyen_requests=None,
)
Null factory
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/actions/card_lifecycle_actions.py
terminate_card ¶
Terminate a card.
The operation is idempotent, i.e. it has no effect on already terminated entities.
Cards in terminal state cannot be modified or used anymore. Any attempt
to use or retrieve a terminated card will raise a
CardTerminatedException.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/actions/card_lifecycle_actions.py
CardLogic ¶
This class is the public interface to the card logic.
Implements the following Nullable patterns: - Nullables: https://www.jamesshore.com/v2/projects/nullables/testing-without-mocks#nullables ⧉ - Parameterless instantiation: https://www.jamesshore.com/v2/projects/nullables/testing-without-mocks#instantiation ⧉
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/cards.py
Attributes¶
card_authentication_actions
instance-attribute
¶
Functions¶
create
classmethod
¶
Normal factory
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/cards.py
create_null
classmethod
¶
Null factory
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/cards.py
edit_card_authentication_info ¶
Update the card authentication info. The phone number is mandatory, the email is optional
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/cards.py
get_card ¶
Get a card entity from its ID.
get_card_ids_for_account ¶
Get all the card IDs for an account.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/cards.py
get_card_ids_for_card_holder ¶
Get all the card IDs for a card holder.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/cards.py
get_card_pan_reveal_public_key ¶
Get the base-64 public key used for client-side encryption of card PAN reveal requests.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/cards.py
get_card_pin_reveal_public_key ¶
Get the base-64 public key used for client-side encryption of card PIN reveal requests.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/cards.py
get_cards_for_account ¶
Get all the cards for an account.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/cards.py
get_cards_for_card_holder ¶
Get all the cards for a card holder.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/cards.py
reveal_card_default_password ¶
Reveal the default password of a card.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/cards.py
reveal_card_pan ¶
Reveal the PAN of a card.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/cards.py
reveal_card_pin ¶
Reveal the PAN of a card.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/cards.py
CardNotFoundException ¶
Bases: PaymentCardException
Exception raised when trying to use a non-existing Card.
CardOrderNotFoundException ¶
Bases: PaymentCardException
Exception raised when trying to use a non-existing Card Order.
CardProvisioningActions ¶
This class contains all the actions related to card provisioning.
Functions¶
declare_card_provisioning ¶
declare_card_provisioning(
session,
/,
workspace_key,
external_id,
card_id,
provisioning_type,
provisioning_date,
wallet_provider,
)
Declare a card provisioning for the given card.
The card provisioning must exist in the PSP workspace.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/actions/card_provisioning_actions.py
CardProvisioningQueries ¶
This class contains all the queries related to card provisioning.
Functions¶
get_all_card_provisioning ¶
Get all card provisionings for a given card ID.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/queries/card_provisioning_queries.py
CardStatusLogic ¶
This class is the public interface to the card status logic.
Implements the following Nullable patterns: - Nullables: https://www.jamesshore.com/v2/projects/nullables/testing-without-mocks#nullables ⧉ - Parameterless instantiation: https://www.jamesshore.com/v2/projects/nullables/testing-without-mocks#instantiation ⧉
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/card_status.py
Attributes¶
card_suspended_by_provider_topic
instance-attribute
¶
Functions¶
activate_card ¶
Activate a card.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/card_status.py
close_card ¶
Close a card. This action is non-revertible.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/card_status.py
create
classmethod
¶
create_null
classmethod
¶
Null factory
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/card_status.py
suspend_card ¶
Suspend a card.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/card_status.py
CardTerminatedException ¶
Bases: PaymentCardException
Exception raised when trying to use a terminated Card.
InvalidCardStatusTransitionException ¶
Bases: PaymentCardException, ValueError
Exception raised when attempting an invalid Card status transition.
MissingCardPasswordSaltException ¶
Bases: PaymentCardException
Exception raised when trying to generate a Card password without a password salt.
MissingCardShipmentInfoException ¶
Bases: PaymentCardException, ValueError
Exception raised when trying to create a physical Card without providing shipment info.
PaymentCardException ¶
Bases: PaymentGatewayException
Base class for all Card exceptions.