/usr/lib/python2.7/dist-packages/braintree/dispute.py is in python-braintree 3.4.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | from decimal import Decimal
from braintree.attribute_getter import AttributeGetter
from braintree.transaction_details import TransactionDetails
class Dispute(AttributeGetter):
class Status(object):
"""
Constants representing dispute statuses. Available types are:
* braintree.Dispute.Status.Open
* braintree.Dispute.Status.Won
* braintree.Dispute.Status.Lost
"""
Open = "open"
Won = "won"
Lost = "lost"
class Reason(object):
"""
Constants representing dispute reasons. Available types are:
* braintree.Dispute.Reason.CancelledRecurringTransaction
* braintree.Dispute.Reason.CreditNotProcessed
* braintree.Dispute.Reason.Duplicate
* braintree.Dispute.Reason.Fraud
* braintree.Dispute.Reason.General
* braintree.Dispute.Reason.InvalidAccount
* braintree.Dispute.Reason.NotRecognized
* braintree.Dispute.Reason.ProductNotReceived
* braintree.Dispute.Reason.ProductUnsatisfactory
* braintree.Dispute.Reason.TransactionAmountDiffers
"""
CancelledRecurringTransaction = "cancelled_recurring_transaction"
CreditNotProcessed = "credit_not_processed"
Duplicate = "duplicate"
Fraud = "fraud"
General = "general"
InvalidAccount = "invalid_account"
NotRecognized = "not_recognized"
ProductNotReceived = "product_not_received"
ProductUnsatisfactory = "product_unsatisfactory"
TransactionAmountDiffers = "transaction_amount_differs"
def __init__(self, attributes):
AttributeGetter.__init__(self, attributes)
if self.amount is not None:
self.amount = Decimal(self.amount)
if "transaction" in attributes:
self.transaction_details = TransactionDetails(attributes.pop("transaction"))
|