limelight package¶
Subpackages¶
- limelight.membership package
- limelight.transaction package
- Submodules
- limelight.transaction.authorize_payment module
- limelight.transaction.new_order module
- limelight.transaction.new_order_card_on_file module
- limelight.transaction.new_order_with_prospect module
- limelight.transaction.new_prospect module
- limelight.transaction.three_d_redirect module
- Module contents
Submodules¶
limelight.api module¶
Lime Light API clients
- class limelight.api.BaseClient(host=None, username=None, password=None)¶
Bases: object
A Lime Light API client object.
- class limelight.api.MembershipClient(host=None, username=None, password=None)¶
Bases: limelight.api.BaseClient
The client object for accessing the Lime Light Membership API
- class limelight.api.TransactionClient(host=None, username=None, password=None)¶
Bases: limelight.api.BaseClient
The client object for accessing the Lime Light Transaction API
limelight.errors module¶
- exception limelight.errors.ConnectionError(*args, **kwargs)¶
- exception limelight.errors.CouldNotFindProspectRecord(*args, **kwargs)¶
- exception limelight.errors.ImproperlyConfigured(*args, **kwargs)¶
- exception limelight.errors.LimeLightException(*args, **kwargs)¶
Bases: exceptions.Exception
- exception limelight.errors.NoPreviousOrder(*args, **kwargs)¶
- exception limelight.errors.TransactionDeclined(*args, **kwargs)¶
- exception limelight.errors.ValidationError(*args, **kwargs)¶
limelight.request module¶
- class limelight.request.MembershipMethod(host=None, username=None, password=None, **kwargs)¶
Bases: limelight.request.Request
Superclass of all Membership API methods
- endpoint¶
Returns: API endpoint Return type: str
- class limelight.request.Request(host=None, username=None, password=None, **kwargs)¶
Bases: object
The superclass of all Lime Light API methods.
- MAX_TRIES = 3¶
- TIMEOUT = 12¶
- VERIFY_CERT = True¶
- endpoint¶
A placeholder for properties and methods that should be defined in a subclass
- error¶
A placeholder for properties and methods that should be defined in a subclass
- handle_errors(*args, **kwargs)¶
A placeholder for properties and methods that should be defined in a subclass
- http_method = 'POST'¶
- preserve_field_labels = None¶
- schema¶
A placeholder for properties and methods that should be defined in a subclass
- class limelight.request.TransactionMethod(**kwargs)¶
Bases: limelight.request.Request
Superclass of all Transaction API methods
- Declined¶
alias of TransactionDeclined
- endpoint¶
Returns: API endpoint Return type: str
- handle_errors()¶
Raises exceptions for Transaction API-related errors.
Returns:
- preserve_field_labels = set(['subscription_day', 'force_subscription_cycle', 'auth_amount', 'master_order_id', 'recurring_days', 'click_id', 'alt_pay_token', 'subscription_week', 'thm_session_id', 'save_customer', 'preserve_force_gateway', 'cascade_enabled', 'alt_pay_payer_id', 'total_installments', 'temp_customer_id'])¶
limelight.utils module¶
- limelight.utils.func_not_implemented(*args, **kwargs)¶
A placeholder for properties and methods that should be defined in a subclass
- limelight.utils.not_implemented¶
A placeholder for properties and methods that should be defined in a subclass
- limelight.utils.to_python(var)¶
Converts strings that are really numbers to ints or floats
May be more generic in the future :param var: a string :type var: six.string_types
- limelight.utils.to_camel_case(name, initial_cap=False)¶
Convert identifiers from underscore_style to camelCase
- limelight.utils.to_underscore(name, initial_cap=False)¶
Convert identifiers from camelCase to underscore_style
limelight.validate module¶
A collection of Lime Light-specific validation functions.
- limelight.validate.email_address(email)¶
Verifies that the given value is a valid email address
Parameters: email (str) – An email address Returns: The given value Return type: str Raises: voluptuous.Invalid
- limelight.validate.accepted_payment_type(credit_card_type)¶
Verifies that the given payment type is supported by Lime Light
Parameters: credit_card_type (str) – The type of credit card Returns: The given values Return type: str Raises: voluptuous.Invalid
- limelight.validate.credit_card_number(number, credit_card_re=<_sre.SRE_Pattern object at 0x307c130>)¶
Verifies that the given credit card number is valid.
Parameters: - number (str) – A credit card number
- credit_card_re (_sre.SRE_Pattern) – CONSTANT
Raises: voluptuous.Invalid
- limelight.validate.ip_address(ip)¶
Verifies that the given IP address is valid.
Parameters: ip (str) – An IP address Returns: The given value Return type: str Raises: voluptuous.Invalid
- limelight.validate.decimal(number, decimal_re=<_sre.SRE_Pattern object at 0x7fd63b22f2b8>)¶
Verifies that the given number is a valid decimal
Parameters: - number (str or decimal.Decimal) – A number to check
- decimal_re (_sre.SRE_Pattern) – CONSTANT
Returns: The given value
Return type: str
Raises: voluptuous.Invalid
- limelight.validate.country_code(code)¶
Verifies that the given two-letter country code is valid.
Parameters: code (str) – A two-letter country code Returns: The passed value Return type: str Raises: voluptuous.Invalid
- limelight.validate.expiration_date(date_)¶
Verifies that the given object represents a date and that the date has not passed
Parameters: date (datetime.datetime) – A datetime object representing an expiration date Returns: Correctly formatted expiration date Return type: str Raises: voluptuous.Invalid