diff --git a/unit/models/payment.py b/unit/models/payment.py index 545171d..86c1b8e 100644 --- a/unit/models/payment.py +++ b/unit/models/payment.py @@ -43,9 +43,8 @@ def __init__(self, id: str, created_at: datetime, status: PaymentStatus, directi description: str, amount: int, reason: Optional[str], settlement_date: Optional[datetime], tags: Optional[Dict[str, str]], relationships: Optional[Dict[str, Relationship]]): - BasePayment.__init__(self, id, created_at, direction, description, amount, reason, tags, relationships) + BasePayment.__init__(self, id, created_at, status, direction, description, amount, reason, tags, relationships) self.type = 'achPayment' - self.attributes["status"] = status self.settlement_date = settlement_date @staticmethod @@ -53,6 +52,7 @@ def from_json_api(_id, _type, attributes, relationships): return BasePayment( _id, date_utils.to_datetime(attributes["createdAt"]), + attributes.get("status"), attributes.get("direction"), attributes["description"], attributes["amount"],