Reference
shared.services.payment_providers.swan.client ¶
swan_client ¶
SwanClient ¶
Source code in shared/services/payment_providers/swan/client/swan_client.py
swan_client_configuration ¶
SwanClientConfiguration ¶
Source code in shared/services/payment_providers/swan/client/swan_client_configuration.py
graphql_endpoint_url
instance-attribute
¶
oauth_token_endpoint_url
instance-attribute
¶
project_access_token
property
¶
Fetch a new project access token to be used with Swan's API.
Tokens are valid for 1h, we might need to refresh them at some point, but it's definitely enough time for now.
server_consent_private_key
instance-attribute
¶
swan_card_product_id
instance-attribute
¶
swan_sdd_payment_method_id
instance-attribute
¶
swan_mutation_client ¶
SwanMutationClient ¶
Bases: Client
Source code in shared/services/payment_providers/swan/client/swan_mutation_client.py
accept_consent ¶
See https://api-reference.swan.io/mutations/accept-consent ⧉
Source code in shared/services/payment_providers/swan/client/swan_mutation_client.py
add_account_membership ¶
Add a new account membership to an account.
See https://api-reference.swan.io/mutations/add-account-membership ⧉
Source code in shared/services/payment_providers/swan/client/swan_mutation_client.py
add_card ¶
Add a new card to an account membership.
https://api-reference.swan.io/mutations/add-card ⧉
Source code in shared/services/payment_providers/swan/client/swan_mutation_client.py
add_sepa_direct_debit_payment_mandate ¶
add_sepa_direct_debit_payment_mandate(
debtor_name,
debtor_iban,
debtor_country,
reference,
signature_date,
mandate_name,
)
See https://api-reference.swan.io/mutations/add-sepa-direct-debit-payment-mandate ⧉
Source code in shared/services/payment_providers/swan/client/swan_mutation_client.py
add_trusted_sepa_beneficiary ¶
Add a trusted SEPA beneficiary to an account.
See https://api-reference.swan.io/mutations/add-trusted-sepa-beneficiary ⧉
Source code in shared/services/payment_providers/swan/client/swan_mutation_client.py
bind_account_membership ¶
Bind a user to an account membership.
https://api-reference.swan.io/mutations/bind-account-membership ⧉
Source code in shared/services/payment_providers/swan/client/swan_mutation_client.py
cancel_card ¶
See https://api-reference.swan.io/mutations/cancel-card ⧉
Source code in shared/services/payment_providers/swan/client/swan_mutation_client.py
complete_user_creation ¶
See https://api-reference.swan.io/mutations/complete-user-creation ⧉
Source code in shared/services/payment_providers/swan/client/swan_mutation_client.py
disable_account_membership ¶
See https://api-reference.swan.io/mutations/disable-account-membership ⧉
Source code in shared/services/payment_providers/swan/client/swan_mutation_client.py
grant_consent_with_server_signature ¶
Grant consent with a server signature.
See https://api-reference.swan.io/mutations/grant-consent-with-server-signature ⧉
Source code in shared/services/payment_providers/swan/client/swan_mutation_client.py
initiate_credit_transfers ¶
Initiates a credit transfer to an other Swan account or to an IBAN
See https://api-reference.swan.io/mutations/initiate-credit-transfers ⧉
Source code in shared/services/payment_providers/swan/client/swan_mutation_client.py
initiate_merchant_payment_collection ¶
See https://api-reference.swan.io/mutations/initiate-merchant-payment-collection ⧉
Source code in shared/services/payment_providers/swan/client/swan_mutation_client.py
start_user_creation ¶
https://api-reference.swan.io/mutations/start-user-creation ⧉
Source code in shared/services/payment_providers/swan/client/swan_mutation_client.py
view_card_numbers ¶
Reveal the card numbers in the consent page once consent has been given by the cardholder.
See https://api-reference.swan.io/mutations/view-card-numbers ⧉
Source code in shared/services/payment_providers/swan/client/swan_mutation_client.py
view_card_numbers_with_consent ¶
Obtain individual iframes containing sensitive card information from an accepted consent.
See https://api-reference.swan.io/mutations/view-card-numbers-with-consent ⧉
Source code in shared/services/payment_providers/swan/client/swan_mutation_client.py
swan_query_client ¶
SwanQueryClient ¶
Bases: Client
Source code in shared/services/payment_providers/swan/client/swan_query_client.py
account_membership ¶
Returns an account membership from its id.
See https://api-reference.swan.io/queries/account-membership ⧉
Source code in shared/services/payment_providers/swan/client/swan_query_client.py
account_memberships ¶
The list of account memberships
See https://api-reference.swan.io/queries/account-memberships ⧉
Source code in shared/services/payment_providers/swan/client/swan_query_client.py
accounts ¶
Returns the list of accounts.
See https://api-reference.swan.io/queries/accounts ⧉
Source code in shared/services/payment_providers/swan/client/swan_query_client.py
card ¶
Returns a card from its id.
See https://api-reference.swan.io/queries/card ⧉
Source code in shared/services/payment_providers/swan/client/swan_query_client.py
cards ¶
Returns the list of cards.
payment ¶
Returns a payment from its id.
See https://api-reference.swan.io/queries/payment ⧉
Source code in shared/services/payment_providers/swan/client/swan_query_client.py
payment_mandates ¶
Returns the list of all the payment mandates for the given account holder.
This method is a custom one, going through the accountHolder resource from Swan's API.
Source code in shared/services/payment_providers/swan/client/swan_query_client.py
transaction ¶
Returns a transaction from its id.
See https://api-reference.swan.io/queries/transaction ⧉
Source code in shared/services/payment_providers/swan/client/swan_query_client.py
transactions ¶
List of transactions of a project.
See https://api-reference.swan.io/queries/transactions ⧉
Source code in shared/services/payment_providers/swan/client/swan_query_client.py
trusted_beneficiary ¶
Returns a trusted beneficiary from its ID.
See https://api-reference.swan.io/queries/trusted-beneficiary ⧉
Source code in shared/services/payment_providers/swan/client/swan_query_client.py
shared.services.payment_providers.swan.decorators ¶
enable_custom_deserialization ¶
Decorator to be used to override the default deserialization from DataclassJsonMixin.
Basically, it replaces the DataclassJsonMixin.from_dict method with the YourClass.deserialize method.
Source code in shared/services/payment_providers/swan/decorators.py
shared.services.payment_providers.swan.entities ¶
account ¶
Account
dataclass
¶
Bases: SwanEntity
get_graphql_schema
classmethod
¶
account_holder ¶
AccountHolder
dataclass
¶
Bases: SwanEntity
get_graphql_schema
classmethod
¶
account_holder_info ¶
AccountHolderInfo
dataclass
¶
Bases: SwanEntity
account_membership ¶
AccountMembership
dataclass
¶
Bases: SwanEntity
get_graphql_schema
classmethod
¶
Source code in shared/services/payment_providers/swan/entities/account_membership.py
amount ¶
Amount
dataclass
¶
Bases: SwanEntity
get_graphql_schema
classmethod
¶
beneficiary ¶
Beneficiary
dataclass
¶
Bases: SwanEntity
get_graphql_schema
classmethod
¶
TrustedBeneficiary
dataclass
¶
Bases: Beneficiary
get_graphql_schema
classmethod
¶
Source code in shared/services/payment_providers/swan/entities/beneficiary.py
card ¶
Card
dataclass
¶
Card(
id,
name,
card_masked_number,
expiry_date,
status_info,
spending_limits,
account_membership,
physical_card,
created_at,
digital_cards,
)
Bases: SwanEntity
get_graphql_schema
classmethod
¶
Source code in shared/services/payment_providers/swan/entities/card.py
card_details ¶
CardDetails
dataclass
¶
Bases: SwanEntity
get_graphql_schema
classmethod
¶
card_merchant ¶
CardMerchant
dataclass
¶
CardMerchant(
merchant_id,
merchant_name,
merchant_postal_code,
merchant_city,
merchant_country,
merchant_category_code,
merchant_category_description,
)
Bases: SwanEntity
get_graphql_schema
classmethod
¶
Source code in shared/services/payment_providers/swan/entities/card_merchant.py
card_numbers ¶
CardNumbers
dataclass
¶
Bases: SwanEntity
get_graphql_schema
classmethod
¶
card_status_info ¶
CardStatusInfo
dataclass
¶
Bases: SwanEntity
get_graphql_schema
classmethod
¶
consent ¶
Consent
dataclass
¶
Bases: SwanEntity
get_graphql_schema
classmethod
¶
digital_card ¶
DigitalCard
dataclass
¶
Bases: SwanEntity
get_graphql_schema
classmethod
¶
digital_cards_connection ¶
DigitalCardsConnection
dataclass
¶
Bases: SwanEntity
Edge
dataclass
¶
Bases: SwanEntity
get_graphql_schema
classmethod
¶
Source code in shared/services/payment_providers/swan/entities/digital_cards_connection.py
get_graphql_schema
classmethod
¶
mutation_rejection ¶
AcceptConsentNotAllowedForConsentPurposeRejection
dataclass
¶
Bases: BaseMutationRejection
AccountMembershipNotAllowedRejection
dataclass
¶
Bases: BaseMutationRejection
BaseMutationRejection
dataclass
¶
BlacklistedPhoneNumberRejection
dataclass
¶
Bases: BaseMutationRejection
CardNotFoundRejection
dataclass
¶
CardProductDisabledRejection
dataclass
¶
Bases: BaseMutationRejection
CardProductSuspendedRejection
dataclass
¶
Bases: BaseMutationRejection
CardSensitiveInfoNoLongerAvailableRejection
dataclass
¶
Bases: BaseMutationRejection
ConsentNotFoundRejection
dataclass
¶
Bases: BaseMutationRejection
DebtorAccountClosedRejection
dataclass
¶
Bases: BaseMutationRejection
DebtorAccountNotAllowedRejection
dataclass
¶
Bases: BaseMutationRejection
EnabledCardDesignNotFoundRejection
dataclass
¶
Bases: BaseMutationRejection
IdentityAlreadyBindToAccountMembershipRejection
dataclass
¶
Bases: BaseMutationRejection
NotAllowedUserStatusRejection
dataclass
¶
Bases: BaseMutationRejection
NotFoundRejection
dataclass
¶
NotReachableConsentStatusRejection
dataclass
¶
Bases: BaseMutationRejection
get_graphql_schema
classmethod
¶
OperationNotAllowedRejection
dataclass
¶
Bases: BaseMutationRejection
PaymentMandateReferenceAlreadyUsedRejection
dataclass
¶
Bases: BaseMutationRejection
PaymentMethodNotCompatibleRejection
dataclass
¶
Bases: BaseMutationRejection
ServerConsentSignatureNotValidRejection
dataclass
¶
Bases: BaseMutationRejection
UserNotCardHolderRejection
dataclass
¶
Bases: BaseMutationRejection
ValidationRejection
dataclass
¶
Bases: BaseMutationRejection
ValidationFieldError
dataclass
¶
page_info ¶
PageInfo
dataclass
¶
Bases: SwanEntity
payment ¶
Payment
dataclass
¶
Bases: SwanEntity
get_graphql_schema
classmethod
¶
payment_mandate ¶
PaymentMandate
dataclass
¶
Bases: SwanEntity
deserialize
classmethod
¶
Source code in shared/services/payment_providers/swan/entities/payment_mandate.py
get_graphql_schema
classmethod
¶
Source code in shared/services/payment_providers/swan/entities/payment_mandate.py
SepaPaymentDirectDebitMandate
dataclass
¶
SepaPaymentDirectDebitMandate(
id,
status_info,
account_holder,
created_at,
reference,
debtor,
creditor,
)
Bases: PaymentMandate
get_graphql_schema
classmethod
¶
payment_status_info ¶
PaymentStatusInfo
dataclass
¶
Bases: SwanEntity
get_graphql_schema
classmethod
¶
physical_card ¶
PhysicalCard
dataclass
¶
Bases: SwanEntity
get_graphql_schema
classmethod
¶
Source code in shared/services/payment_providers/swan/entities/physical_card.py
sepa_payment_mandate_creditor ¶
SepaPaymentMandateCreditor
dataclass
¶
Bases: SwanEntity
get_graphql_schema
classmethod
¶
sepa_payment_mandate_debtor ¶
SepaPaymentMandateDebtor
dataclass
¶
Bases: SwanEntity
get_graphql_schema
classmethod
¶
spending_limit ¶
SpendingLimit
dataclass
¶
Bases: SwanEntity
get_graphql_schema
classmethod
¶
start_user_creation_payload ¶
StartUserCreationPayload
dataclass
¶
Bases: SwanEntity
swan_datetime ¶
SwanDatetime ¶
Bases: str
Custom datetime implementation for Swan API.
Avoids: - The need to declare the serialization/deserialization config everytime we have a datetime field - The need to init the dataclass field with this config (and then the need to put the field at the end of the dataclass)
as_date ¶
as_datetime ¶
Source code in shared/services/payment_providers/swan/entities/swan_datetime.py
swan_entity ¶
transaction ¶
CardTransaction
dataclass
¶
CardTransaction(
id,
type,
payment_product,
account,
side,
amount,
execution_date,
status_info,
payment_id,
origin_transaction,
created_at,
original_amount,
merchant,
card_details,
)
Bases: Transaction
get_graphql_schema
classmethod
¶
Source code in shared/services/payment_providers/swan/entities/transaction.py
CheckTransaction
dataclass
¶
CheckTransaction(
id,
type,
payment_product,
account,
side,
amount,
execution_date,
status_info,
payment_id,
origin_transaction,
created_at,
)
Bases: Transaction
FeeTransaction
dataclass
¶
FeeTransaction(
id,
type,
payment_product,
account,
side,
amount,
execution_date,
status_info,
payment_id,
origin_transaction,
created_at,
counterparty,
)
Bases: Transaction
InternalCreditTransferTransaction
dataclass
¶
InternalCreditTransferTransaction(
id,
type,
payment_product,
account,
side,
amount,
execution_date,
status_info,
payment_id,
origin_transaction,
created_at,
)
Bases: Transaction
InternalDirectDebitTransaction
dataclass
¶
InternalDirectDebitTransaction(
id,
type,
payment_product,
account,
side,
amount,
execution_date,
status_info,
payment_id,
origin_transaction,
created_at,
)
Bases: Transaction
SepaCreditTransferTransaction
dataclass
¶
SepaCreditTransferTransaction(
id,
type,
payment_product,
account,
side,
amount,
execution_date,
status_info,
payment_id,
origin_transaction,
created_at,
counterparty,
beneficiary,
)
Bases: Transaction
SepaDirectDebitTransaction
dataclass
¶
SepaDirectDebitTransaction(
id,
type,
payment_product,
account,
side,
amount,
execution_date,
status_info,
payment_id,
origin_transaction,
created_at,
counterparty,
mandate,
return_reason,
)
Bases: Transaction
get_graphql_schema
classmethod
¶
Transaction
dataclass
¶
Transaction(
id,
type,
payment_product,
account,
side,
amount,
execution_date,
status_info,
payment_id,
origin_transaction,
created_at,
)
Bases: SwanEntity
OriginTransaction
dataclass
¶
Bases: SwanEntity
get_graphql_schema
classmethod
¶
deserialize
classmethod
¶
Source code in shared/services/payment_providers/swan/entities/transaction.py
get_graphql_schema
classmethod
¶
Source code in shared/services/payment_providers/swan/entities/transaction.py
transaction_status_info ¶
TransactionStatusInfo
dataclass
¶
Bases: SwanEntity
get_graphql_schema
classmethod
¶
trusted_beneficiary_status_info ¶
TrustedBeneficiaryStatusInfo
dataclass
¶
Bases: SwanEntity
get_graphql_schema
classmethod
¶
user ¶
User
dataclass
¶
Bases: SwanEntity
get_graphql_schema
classmethod
¶
wallet_provider ¶
WalletProvider
dataclass
¶
Bases: SwanEntity
shared.services.payment_providers.swan.enums ¶
account_holder_type ¶
account_status ¶
consent_purpose ¶
ConsentPurpose ¶
Bases: AlanBaseEnum
accept_partnership_conditions
class-attribute
instance-attribute
¶
activate_physical_card
class-attribute
instance-attribute
¶
add_account_membership
class-attribute
instance-attribute
¶
add_account_memberships
class-attribute
instance-attribute
¶
add_direct_debit_payment_mandate
class-attribute
instance-attribute
¶
consent_to_multiple_consents
class-attribute
instance-attribute
¶
initiate_funding_request
class-attribute
instance-attribute
¶
initiate_instant_funding_request
class-attribute
instance-attribute
¶
initiate_international_credit_transfer
class-attribute
instance-attribute
¶
resume_account_membership
class-attribute
instance-attribute
¶
resume_physical_card
class-attribute
instance-attribute
¶
return_transaction_for_direct_debit
class-attribute
instance-attribute
¶
schedule_standing_order
class-attribute
instance-attribute
¶
update_account_membership
class-attribute
instance-attribute
¶
update_server_consent_project_settings
class-attribute
instance-attribute
¶
view_physical_card_pin
class-attribute
instance-attribute
¶
consent_status ¶
payment_product ¶
payment_status ¶
provisioning_type ¶
ProvisioningType ¶
Bases: AlanBaseEnum
Enum representing the source of digital card creation.
Attributes:
| Name | Type | Description |
|---|---|---|
manual |
Created by direct input of the PAN into a wallet application, possibly using the device camera. |
|
card_on_file |
Created based on a PAN stored in a merchant application (e.g., iTunes). |
|
in_app |
Created by in-app provisioning. |
|
unknown |
The source of digitalization could not be determined. |
rejected_reason_code ¶
RejectedReasonCode ¶
Bases: AlanBaseEnum
account_holder_deceased
class-attribute
instance-attribute
¶
account_membership_refused
class-attribute
instance-attribute
¶
beneficiary_bank_not_reachable
class-attribute
instance-attribute
¶
beneficiary_mismatch
class-attribute
instance-attribute
¶
beneficiary_missing_or_incorrect
class-attribute
instance-attribute
¶
canceled_by_card_holder
class-attribute
instance-attribute
¶
card_permanently_blocked
class-attribute
instance-attribute
¶
cardholder_cancellation
class-attribute
instance-attribute
¶
creditor_bank_offline
class-attribute
instance-attribute
¶
creditor_bank_technical_error_occurred
class-attribute
instance-attribute
¶
creditor_bank_timeout
class-attribute
instance-attribute
¶
debtor_account_closed
class-attribute
instance-attribute
¶
debtor_account_consumer
class-attribute
instance-attribute
¶
debtor_account_unknown
class-attribute
instance-attribute
¶
debtor_bank_technical_error_occurred
class-attribute
instance-attribute
¶
digital_card_deactivated
class-attribute
instance-attribute
¶
digital_card_enrollment_invalid
class-attribute
instance-attribute
¶
digital_card_refusal
class-attribute
instance-attribute
¶
digital_card_suspended
class-attribute
instance-attribute
¶
digital_card_token_invalid
class-attribute
instance-attribute
¶
digital_wallet_deactivated
class-attribute
instance-attribute
¶
digital_wallet_enrolment_invalid
class-attribute
instance-attribute
¶
digital_wallet_refusal
class-attribute
instance-attribute
¶
digital_wallet_suspended
class-attribute
instance-attribute
¶
digital_wallet_token_invalid
class-attribute
instance-attribute
¶
in_person_transactions_not_authorized
class-attribute
instance-attribute
¶
invalid_expiration_date
class-attribute
instance-attribute
¶
invalid_or_missing_amount
class-attribute
instance-attribute
¶
invalid_pin_attempts_exceeded
class-attribute
instance-attribute
¶
invalid_security_number
class-attribute
instance-attribute
¶
invalid_transfer_date
class-attribute
instance-attribute
¶
magstripe_not_supported
class-attribute
instance-attribute
¶
merchant_should_resubmit_authorization
class-attribute
instance-attribute
¶
missing_expiration_date
class-attribute
instance-attribute
¶
partner_technical_error_occurred
class-attribute
instance-attribute
¶
period_amount_limit_exceeded
class-attribute
instance-attribute
¶
period_nb_transaction_limit_exceeded
class-attribute
instance-attribute
¶
period_transaction_number_limit_exceeded
class-attribute
instance-attribute
¶
pin_required_for_further_transaction
class-attribute
instance-attribute
¶
reason_not_specified_by_bank
class-attribute
instance-attribute
¶
reason_not_specified_by_debtor
class-attribute
instance-attribute
¶
retry_with_chip_and_pin
class-attribute
instance-attribute
¶
swan_technical_error_occurred
class-attribute
instance-attribute
¶
terms_and_conditions_limit_exceeded
class-attribute
instance-attribute
¶
transaction_amount_limit_exceeded
class-attribute
instance-attribute
¶
transaction_currency_incorrect
class-attribute
instance-attribute
¶
transaction_duplicated
class-attribute
instance-attribute
¶
transaction_on_account_type_not_allowed
class-attribute
instance-attribute
¶
transaction_type_not_allowed
class-attribute
instance-attribute
¶
spending_limit_period ¶
spending_limit_type ¶
transaction_reason_code ¶
TransactionReasonCode ¶
Bases: AlanBaseEnum
account_holder_deceased
class-attribute
instance-attribute
¶
beneficiary_account_blocked
class-attribute
instance-attribute
¶
beneficiary_account_closed
class-attribute
instance-attribute
¶
beneficiary_account_incorrect
class-attribute
instance-attribute
¶
beneficiary_account_unknown
class-attribute
instance-attribute
¶
beneficiary_bank_bic_invalid
class-attribute
instance-attribute
¶
beneficiary_bank_not_reachable
class-attribute
instance-attribute
¶
beneficiary_branch_code_invalid
class-attribute
instance-attribute
¶
beneficiary_currency_invalid
class-attribute
instance-attribute
¶
beneficiary_deceased
class-attribute
instance-attribute
¶
beneficiary_id_number_invalid
class-attribute
instance-attribute
¶
beneficiary_phone_number_invalid
class-attribute
instance-attribute
¶
beneficiary_rut_number_invalid
class-attribute
instance-attribute
¶
beneficiary_tax_id_invalid
class-attribute
instance-attribute
¶
beneficiary_tax_id_suspended
class-attribute
instance-attribute
¶
card_permanently_blocked
class-attribute
instance-attribute
¶
check_number_invalid
class-attribute
instance-attribute
¶
creditor_bank_offline
class-attribute
instance-attribute
¶
creditor_bank_technical_error_occurred
class-attribute
instance-attribute
¶
creditor_bank_timeout
class-attribute
instance-attribute
¶
debtor_account_blocked
class-attribute
instance-attribute
¶
debtor_account_closed
class-attribute
instance-attribute
¶
debtor_account_consumer
class-attribute
instance-attribute
¶
debtor_account_unknown
class-attribute
instance-attribute
¶
debtor_bank_technical_error_occurred
class-attribute
instance-attribute
¶
endorsement_missing_or_invalid
class-attribute
instance-attribute
¶
funds_already_transferred_back
class-attribute
instance-attribute
¶
invalid_creditor_name
class-attribute
instance-attribute
¶
invalid_expiration_date
class-attribute
instance-attribute
¶
invalid_pin_attempts_exceeded
class-attribute
instance-attribute
¶
invalid_security_number
class-attribute
instance-attribute
¶
legal_or_bank_decision
class-attribute
instance-attribute
¶
mandatory_reference_missing_on_check
class-attribute
instance-attribute
¶
merchant_should_resubmit_authorization
class-attribute
instance-attribute
¶
no_answer_from_beneficiary
class-attribute
instance-attribute
¶
no_original_transaction_received
class-attribute
instance-attribute
¶
partner_technical_error_occurred
class-attribute
instance-attribute
¶
period_amount_limit_exceeded
class-attribute
instance-attribute
¶
period_nb_transaction_limit_exceeded
class-attribute
instance-attribute
¶
pin_required_for_further_transaction
class-attribute
instance-attribute
¶
reason_not_specified_by_bank
class-attribute
instance-attribute
¶
reason_not_specified_by_beneficiary
class-attribute
instance-attribute
¶
reason_not_specified_by_debtor
class-attribute
instance-attribute
¶
reason_not_specified_by_originator
class-attribute
instance-attribute
¶
refund_requested_by_creditor
class-attribute
instance-attribute
¶
refund_requested_by_debtor
class-attribute
instance-attribute
¶
swan_technical_error_occurred
class-attribute
instance-attribute
¶
target_currency_not_available
class-attribute
instance-attribute
¶
terms_and_conditions_limit_exceeded
class-attribute
instance-attribute
¶
transaction_amount_incorrect
class-attribute
instance-attribute
¶
transaction_amount_limit_exceeded
class-attribute
instance-attribute
¶
transaction_duplicated
class-attribute
instance-attribute
¶
transaction_on_account_type_not_allowed
class-attribute
instance-attribute
¶
transaction_on_card_type_not_allowed
class-attribute
instance-attribute
¶
transaction_purpose_invalid
class-attribute
instance-attribute
¶
transaction_reference_invalid
class-attribute
instance-attribute
¶
transaction_type_not_allowed
class-attribute
instance-attribute
¶
transaction_side ¶
transaction_type ¶
TransactionType ¶
Bases: AlanBaseEnum
card_out_authorization
class-attribute
instance-attribute
¶
card_out_credit_reversal
class-attribute
instance-attribute
¶
card_out_debit_reversal
class-attribute
instance-attribute
¶
internal_credit_transfer_in
class-attribute
instance-attribute
¶
internal_credit_transfer_in_recall
class-attribute
instance-attribute
¶
internal_credit_transfer_in_return
class-attribute
instance-attribute
¶
internal_credit_transfer_out
class-attribute
instance-attribute
¶
internal_credit_transfer_out_recall
class-attribute
instance-attribute
¶
internal_credit_transfer_out_return
class-attribute
instance-attribute
¶
internal_direct_debit_in
class-attribute
instance-attribute
¶
internal_direct_debit_in_return
class-attribute
instance-attribute
¶
internal_direct_debit_out
class-attribute
instance-attribute
¶
internal_direct_debit_out_return
class-attribute
instance-attribute
¶
international_credit_transfer_in
class-attribute
instance-attribute
¶
international_credit_transfer_in_return
class-attribute
instance-attribute
¶
international_credit_transfer_out
class-attribute
instance-attribute
¶
international_credit_transfer_out_return
class-attribute
instance-attribute
¶
sepa_credit_transfer_in
class-attribute
instance-attribute
¶
sepa_credit_transfer_in_recall
class-attribute
instance-attribute
¶
sepa_credit_transfer_in_return
class-attribute
instance-attribute
¶
sepa_credit_transfer_out
class-attribute
instance-attribute
¶
sepa_credit_transfer_out_recall
class-attribute
instance-attribute
¶
sepa_credit_transfer_out_return
class-attribute
instance-attribute
¶
sepa_direct_debit_in
class-attribute
instance-attribute
¶
sepa_direct_debit_in_return
class-attribute
instance-attribute
¶
sepa_direct_debit_in_reversal
class-attribute
instance-attribute
¶
sepa_direct_debit_out
class-attribute
instance-attribute
¶
sepa_direct_debit_out_return
class-attribute
instance-attribute
¶
sepa_direct_debit_out_reversal
class-attribute
instance-attribute
¶
sepa_instant_credit_transfer_in
class-attribute
instance-attribute
¶
sepa_instant_credit_transfer_in_recall
class-attribute
instance-attribute
¶
sepa_instant_credit_transfer_out
class-attribute
instance-attribute
¶
sepa_instant_credit_transfer_out_recall
class-attribute
instance-attribute
¶
shared.services.payment_providers.swan.exceptions ¶
swan_mutation_exception ¶
shared.services.payment_providers.swan.helpers ¶
get_swan_transaction_amount_in_cents ¶
Extract the amount of the given transaction in cents.
Amount is positive if the transaction is a credit, negative if it is a debit.
Source code in shared/services/payment_providers/swan/helpers.py
shared.services.payment_providers.swan.mutations ¶
accept_consent_mutation ¶
AcceptConsentMutation ¶
Bases: SwanMutation[Consent]
Source code in shared/services/payment_providers/swan/mutations/accept_consent_mutation.py
add_account_membership_mutation ¶
AddAccountMembershipMutation ¶
AddAccountMembershipMutation(
account_id,
first_name,
last_name,
phone_number,
birth_date,
email,
language,
)
Bases: SwanMutation[AccountMembership]
Source code in shared/services/payment_providers/swan/mutations/add_account_membership_mutation.py
add_card_mutation ¶
AddCardMutation ¶
Bases: SwanMutation[Card]
Source code in shared/services/payment_providers/swan/mutations/add_card_mutation.py
add_sepa_direct_debit_payment_mandate_mutation ¶
AddSepaDirectDebitPaymentMandateMutation ¶
AddSepaDirectDebitPaymentMandateMutation(
payment_method_id,
signature_date,
debtor_name,
debtor_iban,
debtor_country,
reference,
mandate_name,
)
Bases: SwanMutation[PaymentMandate]
Source code in shared/services/payment_providers/swan/mutations/add_sepa_direct_debit_payment_mandate_mutation.py
add_trusted_sepa_beneficiary_mutation ¶
AddTrustedSepaBeneficiaryMutation ¶
Bases: SwanMutation[TrustedBeneficiary]
Source code in shared/services/payment_providers/swan/mutations/add_trusted_sepa_beneficiary_mutation.py
bind_account_membership_mutation ¶
BindAccountMembershipMutation ¶
Bases: SwanMutation[AccountMembership]
Source code in shared/services/payment_providers/swan/mutations/bind_account_membership_mutation.py
cancel_card_mutation ¶
CancelCardMutation ¶
Bases: SwanMutation[Card]
Source code in shared/services/payment_providers/swan/mutations/cancel_card_mutation.py
complete_user_creation_mutation ¶
CompleteUserCreationMutation ¶
Bases: SwanMutation[User]
Source code in shared/services/payment_providers/swan/mutations/complete_user_creation_mutation.py
disable_account_membership_mutation ¶
DisableAccountMembershipMutation ¶
Bases: SwanMutation[AccountMembership]
Source code in shared/services/payment_providers/swan/mutations/disable_account_membership_mutation.py
grant_consent_with_server_signature_mutation ¶
GrantConsentWithServerSignatureMutation ¶
Bases: SwanMutation[Consent]
Source code in shared/services/payment_providers/swan/mutations/grant_consent_with_server_signature_mutation.py
initiate_credit_transfers_mutation ¶
InitiateCreditTransfersMutation ¶
Bases: SwanMutation[Payment]
Source code in shared/services/payment_providers/swan/mutations/initiate_credit_transfers_mutation.py
initiate_merchant_payment_collection_mutation ¶
InitiateMerchantPaymentCollectionMutation ¶
Bases: SwanMutation[Payment]
Source code in shared/services/payment_providers/swan/mutations/initiate_merchant_payment_collection_mutation.py
start_user_creation_mutation ¶
StartUserCreationMutation ¶
Bases: SwanMutation[StartUserCreationPayload]
Source code in shared/services/payment_providers/swan/mutations/start_user_creation_mutation.py
swan_mutation ¶
SwanMutation ¶
Bases: DataClassJsonMixin, ABC, Generic[T]
input_params
abstractmethod
property
¶
The mutation's input parameters - to be used in the GraphQL query.
mutation_name
abstractmethod
property
¶
The name of the mutation - to be used in the GraphQL query.
rejection_types
abstractmethod
property
¶
The list of possible rejections for this mutation.
success_payload_property
property
¶
The name of the property representing the target object in the success payload.
Default to the target object type, with the first letter in lowercase. Ex: "MyType" -> "myType"
In case the returned value is None, the client will parse the payload without looking for a specific property.
success_payload_type
property
¶
The type of the payload for a success response.
Default to the mutation name, with the first letter capitalized, suffixed with "SuccessPayload". Ex: "myMutation" -> "MyMutationSuccessPayload"
view_card_numbers_mutation ¶
ViewCardNumbersMutation ¶
Bases: SwanMutation[Consent]
Source code in shared/services/payment_providers/swan/mutations/view_card_numbers_mutation.py
view_card_numbers_with_consent_mutation ¶
ViewCardNumbersWithConsentMutation ¶
Bases: SwanMutation[CardNumbers]