Business logic
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
CARD_ISSUING_CONFIGURATIONS_CONFIG_KEY
module-attribute
¶
CARD_PASSWORD_SALT_CONFIG_KEY
module-attribute
¶
CARD_PASSWORD_SALT_DEFAULT_KEY
module-attribute
¶
DEFAULT_CARD_ISSUING_CONFIGURATION_KEY_CONFIG_KEY
module-attribute
¶
DEFAULT_CARD_ISSUING_CONFIGURATION_KEY_CONFIG_KEY = (
"ADYEN_DEFAULT_CARD_ISSUING_CONFIGURATION_KEY"
)
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
default_card_configuration_key
instance-attribute
¶
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
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
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
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
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.