Business logic
Card Holders¶
CardHolderLogic ¶
This class is the public interface to the card holder 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_holders.py
create
classmethod
¶
Normal factory
create_null
classmethod
¶
Null factory
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/card_holders.py
declare_card_holder ¶
declare_card_holder(
session,
/,
first_name,
last_name,
display_name=None,
short_name=None,
provider=PaymentServiceProvider.adyen,
external_id=None,
)
Declare a card holder.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/card_holders.py
get_card_holder ¶
Get a card holder entity from its ID.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/card_holders.py
terminate_card_holder ¶
Terminate a card holder.
Card holders in terminal state cannot be modified or used anymore.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/card_holders.py
update_card_holder_contact_info ¶
Update the phone number and email of a card holder on the PSP. Phone number is 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/card_holders.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/card_holders.py
Cards¶
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
card_authentication_actions
instance-attribute
¶
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
CardLifecycleLogic ¶
This class is the public interface to the card lifecycle 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_lifecycle.py
create
classmethod
¶
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=None,
)
Create a card for a card holder.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/card_lifecycle.py
create_null
classmethod
¶
Null factory
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/card_lifecycle.py
terminate_card ¶
Terminate a card.
Cards in terminal state cannot be modified or used anymore.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/card_lifecycle.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
card_suspended_by_provider_topic
instance-attribute
¶
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
CardIncidentsLogic ¶
This class is the public interface to the card incidents declaration logic.
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/card_incidents.py
create
classmethod
¶
create_null
classmethod
¶
Null factory
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/card_incidents.py
declare_card_damaged ¶
Declare a card as damaged.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/card_incidents.py
declare_card_lost ¶
Declare a card as lost.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/card_incidents.py
declare_card_stolen ¶
Declare a card as stolen.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/card_incidents.py
declare_card_temporarily_suspended ¶
Declare a card as temporarily suspended.
Source code in components/payment_gateway/subcomponents/cards/protected/business_logic/card_incidents.py
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
card_delivery_status_changed_topic
instance-attribute
¶
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.