Example #1
0
 def __init__(self, data: dict = None) -> None:
     super().__init__(data)
     self.date_created = get_value(data, 'date-created',
                                   parse_date)  # type: datetime.datetime
     self.date_finished = get_value(data, 'date-finished',
                                    parse_date)  # type: datetime.datetime
     self.result_data = get_value(data, 'result-data',
                                  PaymentResponse)  # type: PaymentResponse
Example #2
0
 def __init__(self, data: dict = None) -> None:
     self.date_updated = get_value(data, 'date-updated',
                                   parse_date)  # type: datetime.datetime
     self.status_code_new = get_value(data, 'status-code-new',
                                      Status)  # type: Status
     self.status_code_old = get_value(data, 'status-code-old',
                                      Status)  # type: Status
     self.status_text_new = get_value(data, 'status-text-new', str,
                                      '')  # type: str
     self.status_text_old = get_value(data, 'status-text-old', str,
                                      '')  # type: str
Example #3
0
 def __init__(self, data: dict = None) -> None:
     self.type = get_value(data, 'type', str, '')  # type: str
     self.title = get_value(data, 'title', str, '')  # type: str
     self.acq_terminal_id = get_value(data, 'acq-terminal-id',
                                      str)  # type: str
     self.limits = get_value(data, 'counters',
                             lambda x: [Limit(v) for v in x],
                             [])  # type: Sequence[Limit]
     self.children = get_value(data, 'childs',
                               lambda x: [ObjectLimits(v) for v in x],
                               [])  # type: Sequence[ObjectLimits]
Example #4
0
    def __init__(self, data: dict = None) -> None:
        super().__init__(data)
        status_data = {}
        status_list = get_value(data, 'status')  # type: list
        if status_list is not None and len(status_list) == 1:
            status_data = status_list[0]

        self.status_code = get_value(status_data, 'status-code', Status)
        self.status_code_general = get_value(status_data,
                                             'status-code-general', Status)
        self.status_text = get_value(status_data, 'status-text', str, '')
        self.status_text_general = get_value(status_data,
                                             'status-text-general', str, '')
Example #5
0
 def __init__(self, data: dict = None) -> None:
     self.dynamic_descriptor = get_value(data, "dynamic-descriptor",
                                         str)  # type: str
     self.eci_sli = get_value(data, "eci-sli", str, "")  # type: str
     self.result_code = get_value(data, "result-code", str, "")  # type: str
     self.status_description = get_value(data, "status-description", str,
                                         "")  # type: str
     self.status_text = get_value(data, "status-text", str, "")  # type: str
     self.terminal_mid = get_value(data, "terminal-mid", str,
                                   "")  # type: str
     self.transaction_id = get_value(data, "transaction-id", str,
                                     "")  # type: str
Example #6
0
 def __init__(self, data: dict = None) -> None:
     self.counter_type = get_value(data, 'counter-type', str,
                                   '')  # type: str
     self.currency = get_value(data, 'currency', str, '')  # type: str
     self.limit = get_value(data, 'limit', int, 0)  # type: int
     self.payment_method_subtype = get_value(data, 'payment-method-subtype',
                                             str, '')  # type: str
     self.payment_method_type = get_value(data, 'payment-method-type', str,
                                          '')  # type: str
     self.value = get_value(data, 'value', int, 0)  # type: int
Example #7
0
 def __init__(self, data: dict = None) -> None:
     self.gateway_transaction_id = get_value(data, "gateway-transaction-id",
                                             str, "")  # type: str
     self.merchant_transaction_id = get_value(data,
                                              "merchant-transaction-id",
                                              str, "")  # type: str
     self.original_gateway_transaction_id = get_value(
         data, "original-gateway-transaction-id", str)  # type: str
     self.parent_gateway_transaction_id = get_value(
         data, "parent-gateway-transaction-id", str)  # type: str
     self.status_code = get_value(data, "status-code",
                                  Status)  # type: Status
     self.status_text = get_value(data, "status-text", str, "")  # type: str
     self.redirect_url = get_value(
         data, "redirect-url", lambda x: urlparse(x))  # type: ParseResult
Example #8
0
 def __init__(self, data: dict = None) -> None:
     self.error_code = get_value(data, 'code', ErrorCode, get_value(data, 'code', int))  # type: ErrorCode
     self.message = get_value(data, 'message', str)  # type: str
Example #9
0
 def __init__(self, data: dict = None) -> None:
     super().__init__(data)
     self.enrollment = get_value(data, "enrollment", EnrollmentStatus)
Example #10
0
 def __init__(self, data: dict = None) -> None:
     super().__init__(data)
     self.history = get_value(data, "history",
                              lambda x: [HistoryEvent(v) for v in x],
                              [])  # type: Sequence[HistoryEvent]
Example #11
0
 def __init__(self, data: dict = None) -> None:
     super().__init__(data)
     self.subsequent = get_value(data, "recurrents",
                                 lambda x: [TransactionInfo(v) for v in x],
                                 [])  # type: Sequence[TransactionInfo]
Example #12
0
 def __init__(self, collection_type, data: dict = None) -> None:
     super().__init__(data)
     self.transactions = get_value(
         data, "transactions", lambda x: [collection_type(v) for v in x],
         [])  # type: Sequence
Example #13
0
 def __init__(self, data: dict = None) -> None:
     self.error = get_value(data, "error", Error)  # type: Error
     self.gateway_transaction_id = get_value(data, "gateway-transaction-id",
                                             str, "")  # type: str
Example #14
0
 def __init__(self, data: dict = None) -> None:
     self.account_guid = get_value(data, 'account-guid', str, '')  # type: str
     self.acq_terminal_id = get_value(data, 'acq-terminal-id', str, '')  # type: str
     self.acq_transaction_id = get_value(data, 'acq-transaction-id', str, '')  # type: str
     self.amount = get_value(data, 'amount', int)  # type: int
     self.approval_code = get_value(data, 'approval-code', str, '')  # type: str
     self.cardholder_name = get_value(data, 'cardholder-name', str, '')  # type: str
     self.currency = get_value(data, 'currency', str, '')  # type: str
     self.eci_sli = get_value(data, 'eci-sli', str, '')  # type: str
     self.gateway_transaction_id = get_value(data, 'gateway-transaction-id', str, '')  # type: str
     self.merchant_transaction_id = get_value(data, 'merchant-transaction-id', str, '')  # type: str
     self.status_code = get_value(data, 'status-code', Status)  # type: Status
     self.status_code_general = get_value(data, 'status-code-general', Status)  # type: Status
     self.status_text = get_value(data, 'status-text', str, '')  # type: str
     self.status_text_general = get_value(data, 'status-text-general', str, '')  # type: str
     self.date_finished = get_value(data, 'date-finished', parse_date)  # type: datetime.datetime
Example #15
0
 def __init__(self, data: dict = None) -> None:
     self.error = get_value(data, "error", Error)  # type: Error
Example #16
0
 def __init__(self, data: dict = None) -> None:
     super().__init__(get_value(data, "result-data"))
Example #17
0
 def __init__(self, data: dict = None) -> None:
     super().__init__(data)
     self.acquirer_details = get_value(
         data, "acquirer-details", AcquirerDetails)  #type: AcquirerDetails
     self.gw = get_value(data, "gw", GW)  # type: GW
     self.warnings = get_value(data, "warnings")  # type: Sequence[str]