File: amex_express_checkout_card.py

package info (click to toggle)
python-braintree 4.31.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,576 kB
  • sloc: python: 28,946; makefile: 9; sh: 8
file content (18 lines) | stat: -rw-r--r-- 663 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import braintree
from braintree.resource import Resource
from warnings import warn

class AmexExpressCheckoutCard(Resource):
    """
    A class representing Braintree Amex Express Checkout card objects. Deprecated
    """
    def __init__(self, gateway, attributes):
        warn("AmexExpressCheckoutCard is deprecated")
        Resource.__init__(self, gateway, attributes)

        if "subscriptions" in attributes:
            self.subscriptions = [braintree.subscription.Subscription(gateway, subscription) for subscription in self.subscriptions]

    @property
    def expiration_date(self):
        return self.expiration_month + "/" + self.expiration_year