Skip to content

Commit

Permalink
asdict
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigo-barraza committed Dec 11, 2023
1 parent be2d5e2 commit e08b591
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pay-api/src/pay_api/services/non_sufficient_funds.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@
from pay_api.models import CfsAccount as CfsAccountModel
from pay_api.models import Invoice as InvoiceModel
from pay_api.models import InvoiceReference as InvoiceReferenceModel
from pay_api.models import InvoiceSchema, NonSufficientFundsModel
from pay_api.models import InvoiceSchema, NonSufficientFundsModel, NonSufficientFundsSchema
from pay_api.models import Payment as PaymentModel
from pay_api.models import PaymentAccount as PaymentAccountModel
from pay_api.models import PaymentLineItem as PaymentLineItemModel
from pay_api.models import PaymentSchema, db
from pay_api.utils.converter import Converter
from pay_api.utils.enums import AuthHeaderType, ContentType
from pay_api.utils.user_context import user_context

Expand All @@ -39,6 +40,10 @@ def __init__(self):
"""Initialize the service."""
self.dao = NonSufficientFundsModel()

def asdict(self):
"""Return the EFT Short name as a python dict."""
return Converter().unstructure(NonSufficientFundsSchema.from_row(self.dao))

@staticmethod
def populate(value: NonSufficientFundsModel):
"""Populate Non-Sufficient Funds Service."""
Expand Down

0 comments on commit e08b591

Please sign in to comment.