Ejemplo n.º 1
0
    def __init__(self, attributes):
        AttributeGetter.__init__(self, attributes)

        if "amount" in attributes and getattr(self, "amount",
                                              None) is not None:
            self.amount = Decimal(self.amount)
        if "amount_disputed" in attributes and getattr(self, "amount_disputed",
                                                       None) is not None:
            self.amount_disputed = Decimal(self.amount_disputed)
        if "amount_won" in attributes and getattr(self, "amount_won",
                                                  None) is not None:
            self.amount_won = Decimal(self.amount_won)
        if "transaction" in attributes:
            self.transaction_details = TransactionDetails(
                attributes.pop("transaction"))
            self.transaction = self.transaction_details
        if "evidence" in attributes and getattr(self, "evidence",
                                                None) is not None:
            self.evidence = [
                DisputeEvidence(evidence) for evidence in self.evidence
            ]
        if "status_history" in attributes and getattr(self, "status_history",
                                                      None) is not None:
            self.status_history = [
                DisputeStatusHistory(status_history)
                for status_history in self.status_history
            ]
        if "processor_comments" in attributes and self.processor_comments is not None:
            self.forwarded_comments = self.processor_comments
Ejemplo n.º 2
0
    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"))
    def __init__(self, gateway, attributes):
        AttributeGetter.__init__(self, attributes)

        if attributes.get("us_bank_account") is not None:
            self.us_bank_account = braintree.us_bank_account.UsBankAccount(gateway, self.us_bank_account)
        else:
            self.us_bank_account = None
    def __init__(self, gateway, attributes):
        AttributeGetter.__init__(self, attributes)

        if "amount" in attributes and getattr(self, "amount", None):
            self.amount = Decimal(self.amount)
        else:
            self.amount = None

        if "currency_iso_code" not in attributes:
            self.currency_iso_code = None

        if "processor_response_code" not in attributes:
            self.processor_response_code = None
        if "processor_response_text" not in attributes:
            self.processor_response_text = None

        if "network_response_code" not in attributes:
            self.network_response_code = None
        if "network_response_text" not in attributes:
            self.network_response_text = None

        if "risk_data" in attributes:
            self.risk_data = RiskData(attributes["risk_data"])
        else:
            self.risk_data = None

        if "three_d_secure_info" in attributes and not attributes[
                "three_d_secure_info"] is None:
            self.three_d_secure_info = ThreeDSecureInfo(
                attributes["three_d_secure_info"])
        else:
            self.three_d_secure_info = None
    def __init__(self, attributes):
        AttributeGetter.__init__(self, attributes)

        if self.settlement_amount is not None:
            self.settlement_amount = Decimal(self.settlement_amount)
        if self.settlement_currency_exchange_rate is not None:
            self.settlement_currency_exchange_rate = Decimal(self.settlement_currency_exchange_rate)
Ejemplo n.º 6
0
    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"))
    def __init__(self, attributes):
        AttributeGetter.__init__(self, attributes)

        if self.settlement_amount is not None:
            self.settlement_amount = Decimal(self.settlement_amount)
        if self.settlement_currency_exchange_rate is not None:
            self.settlement_currency_exchange_rate = Decimal(
                self.settlement_currency_exchange_rate)
Ejemplo n.º 8
0
    def __init__(self, gateway, attributes):
        AttributeGetter.__init__(self, attributes)
        if "processor_response_code" not in attributes:
            self.processor_response_code = None
        if "processor_response_text" not in attributes:
            self.processor_response_text = None

        if "risk_data" in attributes:
            self.risk_data = RiskData(attributes["risk_data"])
        else:
            self.risk_data = None
    def __init__(self, gateway, attributes):
        AttributeGetter.__init__(self, attributes)
        if "processor_response_code" not in attributes:
            self.processor_response_code = None
        if "processor_response_text" not in attributes:
            self.processor_response_text = None

        if "risk_data" in attributes:
            self.risk_data = RiskData(attributes["risk_data"])
        else:
            self.risk_data = None
Ejemplo n.º 10
0
    def __init__(self, attributes):
        AttributeGetter.__init__(self, attributes)

        if "amount" in attributes and self.amount is not None:
            self.amount = Decimal(self.amount)
        if "amount_disputed" in attributes and self.amount_disputed is not None:
            self.amount_disputed = Decimal(self.amount_disputed)
        if "amount_won" in attributes and self.amount_won is not None:
            self.amount_won = Decimal(self.amount_won)
        if "transaction" in attributes:
            self.transaction_details = TransactionDetails(attributes.pop("transaction"))
            self.transaction = self.transaction_details
        if "evidence" in attributes and self.evidence is not None:
            self.evidence = [DisputeEvidence(evidence) for evidence in self.evidence]
        if "status_history" in attributes and self.status_history is not None:
            self.status_history = [DisputeStatusHistory(status_history) for status_history in self.status_history]
Ejemplo n.º 11
0
    def __init__(self, gateway, attributes):
        AttributeGetter.__init__(self, attributes)

        if "amount" in attributes and self.amount:
            self.amount = Decimal(self.amount)
        else:
            self.amount = None

        if "currency_iso_code" not in attributes:
            self.currency_iso_code = None

        if "processor_response_code" not in attributes:
            self.processor_response_code = None
        if "processor_response_text" not in attributes:
            self.processor_response_text = None

        if "risk_data" in attributes:
            self.risk_data = RiskData(attributes["risk_data"])
        else:
            self.risk_data = None
    def __init__(self, gateway, attributes):
        AttributeGetter.__init__(self, attributes)

        if "amount" in attributes and self.amount:
            self.amount = Decimal(self.amount)
        else:
            self.amount = None

        if "currency_iso_code" not in attributes:
            self.currency_iso_code = None

        if "processor_response_code" not in attributes:
            self.processor_response_code = None
        if "processor_response_text" not in attributes:
            self.processor_response_text = None

        if "risk_data" in attributes:
            self.risk_data = RiskData(attributes["risk_data"])
        else:
            self.risk_data = None
Ejemplo n.º 13
0
    def __init__(self, attributes):
        AttributeGetter.__init__(self, attributes)

        if "amount" in attributes and self.amount is not None:
            self.amount = Decimal(self.amount)
        if "amount_disputed" in attributes and self.amount_disputed is not None:
            self.amount_disputed = Decimal(self.amount_disputed)
        if "amount_won" in attributes and self.amount_won is not None:
            self.amount_won = Decimal(self.amount_won)
        if "transaction" in attributes:
            self.transaction_details = TransactionDetails(
                attributes.pop("transaction"))
            self.transaction = self.transaction_details
        if "evidence" in attributes and self.evidence is not None:
            self.evidence = [
                DisputeEvidence(evidence) for evidence in self.evidence
            ]
        if "status_history" in attributes and self.status_history is not None:
            self.status_history = [
                DisputeStatusHistory(status_history)
                for status_history in self.status_history
            ]
Ejemplo n.º 14
0
    def __init__(self, attributes):
        AttributeGetter.__init__(self, attributes)

        if getattr(self, "amount", None) is not None:
            self.amount = Decimal(self.amount)
Ejemplo n.º 15
0
 def __init__(self, attributes):
     AttributeGetter.__init__(self, attributes)
     if hasattr(self, 'amount') and self.amount is not None:
         self.amount = Decimal(self.amount)
Ejemplo n.º 16
0
 def __init__(self, attributes):
     AttributeGetter.__init__(self, attributes)
 def __init__(self, attributes):
     AttributeGetter.__init__(self, attributes)
     self.address_details = AddressDetails(attributes.get("address", {}))
Ejemplo n.º 18
0
 def __init__(self, gateway, attributes):
     AttributeGetter.__init__(self, attributes)
     if "processor_response_code" not in attributes:
         self.processor_response_code = None
     if "processor_response_text" not in attributes:
         self.processor_response_text = None
Ejemplo n.º 19
0
 def __init__(self, attributes):
     AttributeGetter.__init__(self, attributes)
Ejemplo n.º 20
0
 def __init__(self, attributes):
     if attributes.get("category") is not None:
         attributes["tag"] = attributes.pop("category")
     else:
         attributes["tag"] = None
     AttributeGetter.__init__(self, attributes)
 def __init__(self, gateway, attributes):
     AttributeGetter.__init__(self, attributes)
     if "processor_response_code" not in attributes:
         self.processor_response_code = None
     if "processor_response_text" not in attributes:
         self.processor_response_text = None
Ejemplo n.º 22
0
 def __init__(self, attributes):
     attributes["tag"] = attributes.get("category")
     AttributeGetter.__init__(self, attributes)
    def __init__(self, attributes):
        AttributeGetter.__init__(self, attributes)

        if self.amount is not None:
            self.amount = Decimal(self.amount)
Ejemplo n.º 24
0
 def __init__(self, attributes):
     AttributeGetter.__init__(self, attributes)
     self.address_details = AddressDetails(attributes.get("address", {}))
Ejemplo n.º 25
0
 def __init__(self, gateway, attributes):
     AttributeGetter.__init__(self, attributes)
     self.gateway = gateway
Ejemplo n.º 26
0
    def __init__(self, attributes):
        AttributeGetter.__init__(self, attributes)

        if self.amount is not None:
            self.amount = Decimal(self.amount)
Ejemplo n.º 27
0
 def __init__(self, gateway, attributes):
     AttributeGetter.__init__(self, attributes)
     self.gateway = gateway