components.payment_gateway.public.enums ¶
This module defines all the common enums that don't belong to a specific subcomponent. It also exports all the public enums from all the subcomponents.
Classes¶
AccountStatus ¶
Bases: AlanBaseEnum
Account status on the provider.
Note: Suspended is a special state that can only be set by the Payment Service Provider.
Allowed transitions (self-transitions are allowed):
stateDiagram-v2
direction LR
[*] --> Inactive
Inactive --> Active
Inactive --> Closed
Active --> Inactive
Active --> Closed
Closed --> [*]
AuthorizationRequestStatus ¶
AuthorizationResult ¶
CardFormFactor ¶
CardStatus ¶
Bases: AlanBaseEnum
Card status on the provider.
Allowed transitions (self-transitions are allowed):
stateDiagram-v2
direction LR
[*] --> Inactive
Inactive --> Active
Inactive --> Suspended
Inactive --> Closed
Active --> Suspended
Active --> Closed
Suspended --> Active
Suspended --> Closed
Closed --> [*]
CardSuspensionSource ¶
CountryCode ¶
Bases: AlanBaseEnum
Country codes used throughout the payment gateway.
Attributes¶
OTHER
class-attribute
instance-attribute
¶
For all other countries not listed above.
Functions¶
from_country_name
staticmethod
¶
Convert country name to CountryCode enum.
Source code in components/payment_gateway/public/enums.py
from_iso_alpha2
staticmethod
¶
Convert ISO 3166-1 alpha-2 country code to CountryCode enum.
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 ⧉
Source code in components/payment_gateway/public/enums.py
from_iso_alpha3
staticmethod
¶
Convert ISO 3166-1 alpha-3 country code to CountryCode enum.
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3 ⧉
Source code in components/payment_gateway/public/enums.py
to_country_name ¶
Convert CountryCode enum to country name.
Source code in components/payment_gateway/public/enums.py
to_iso_alpha2 ¶
Convert CountryCode enum to ISO 3166-1 alpha-2 country code.
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 ⧉
Source code in components/payment_gateway/public/enums.py
to_iso_alpha3 ¶
Convert CountryCode enum to ISO 3166-1 alpha-3 country code.
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3 ⧉
Source code in components/payment_gateway/public/enums.py
CurrencyCode ¶
ExpenseLimitPeriod ¶
Bases: AlanBaseEnum
Period of time over which the expense limit amounts are aggregated.
ListMatch ¶
Bases: AlanBaseEnum
Condition to apply when matching against a list of values.
MCC ¶
Bases: AlanBaseEnum
Merchant Category Code
Declare all the MCCs we support here. The enum names are from the Stripe MCC database.
Although there is no standard list of MCCs and each vendor provides their own list, there is a pretty large list of common MCC values that work everywhere for the most common merchant types.
Citing the Stripe documentation ⧉:
" A frustrating aspect of MCCs is that there is not one universally
accepted set of merchant category codes used by all entities and
organizations. That said, the category code ranges are consistent."
References:
- Wikipedia: https://en.wikipedia.org/wiki/Merchant_category_code ⧉
- Visa:
https://usa.visa.com/content/dam/VCOM/download/merchants/visa-merchant-data-standards-manual.pdf ⧉
- Stripe: https://stripe.com/docs/issuing/categories ⧉
- python-iso18245: https://github.com/jleclanche/python-iso18245 ⧉
This library provides a list of MCCs from the ISO 18245 standard in CSV format.
Note: The MCCs are four-digit strings and not integers because some values have leading zeros.
Attributes¶
automobile_rental_agencies
class-attribute
instance-attribute
¶
7512 Automobile Rental Agencies
candy_nut_and_confectionery_stores
class-attribute
instance-attribute
¶
5441 Candy, Nut, and Confectionery Stores
child_care_services
class-attribute
instance-attribute
¶
8351 Child Care Services
cigar_stores_and_stands
class-attribute
instance-attribute
¶
5993 Cigar Stores and Stands
commuter_transport_and_ferries
class-attribute
instance-attribute
¶
4111 Commuter Transport, Ferries
dairy_products_stores
class-attribute
instance-attribute
¶
5451 Dairy Products Stores
eating_places_restaurants
class-attribute
instance-attribute
¶
5812 Eating Places, Restaurants
fast_food_restaurants
class-attribute
instance-attribute
¶
5814 Fast Food Restaurants
grocery_stores_supermarkets
class-attribute
instance-attribute
¶
5411 Grocery Stores, Supermarkets
miscellaneous_food_stores
class-attribute
instance-attribute
¶
5499 Miscellaneous Food Stores
miscellaneous_recreation_services
class-attribute
instance-attribute
¶
7999 Miscellaneous Recreation Services
passenger_railways
class-attribute
instance-attribute
¶
4112 Passenger Railways
taxicabs_limousines
class-attribute
instance-attribute
¶
4121 Taxicabs, Limousines
PaymentServiceProvider ¶
Bases: AlanBaseEnum
Supported Payment Service Providers (PSPs) used throughout the Payment Gateway.
ProcessingType ¶
ProvisioningType ¶
Bases: AlanBaseEnum
Types of CardProvisioning
SepaBeneficiaryStatus ¶
SepaMandateStatus ¶
Bases: AlanBaseEnum
TransferDirection ¶
TransferUpdateTransferType ¶
WebhookLogTransferStatus ¶
Bases: AlanBaseEnum
Defines the possible statuses of a webhook log transfer.
- received: The transfer webhook event was correctly received from payment provider
- ingested: The transfer webhook event was correctly parsed, and ingested in our system. But we could not route it to the appropriate transfer type / transfer_history
- routed: Successfully ingested and routed the transfer webhook event
WebhookLogTransferType ¶
Bases: AlanBaseEnum
Defines the possible types of a webhook log transfer.
- internalTransfer: Transfer between two accounts
- bankTransfer: Transfer between an account and a bank
- payment: Payment made to a merchant