-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
21536 - Passing short Name Id parameter to find refunds #1783
Conversation
@@ -80,7 +80,7 @@ def create_shortname_refund(request: dict, **kwargs): | |||
@staticmethod | |||
def get_shortname_refunds(data: EFTShortNameRefundGetRequest): | |||
"""Get all refunds.""" | |||
refunds = EFTRefundModel.find_refunds(data.statuses) | |||
refunds = EFTRefundModel.find_refunds(data.statuses, data.short_name_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update tests for short_name_id search please
"status_filter_multiple", | ||
2, | ||
), | ||
( | ||
f"?status={EFTShortnameRefundStatus.DECLINED.value}", | ||
f"?statuses={EFTShortnameRefundStatus.DECLINED.value}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
additional parameters for short_name_id search?
input_string = data.get("status", "") | ||
input_string = data.get("statuses", "") | ||
short_name_id = None | ||
if data.get("shortNameId", None) is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This defeats the purpose of using the serializer or converter.. please use Serializable
super().from_dict(data)
instead of doing this, the statuses were a work around because the serialization needed a bit more looking at
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we eventually want to get rid of dto.state = dto.state.split(",")
etc somehow in the converter
same with the account_id_list
shouldn't need to do this by hand.. eventually we'd like to do this all in the serializer in a generic way - so were not repeating a bunch of boilerplate code over and over again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll see if we can put in:
typical register structure unstructure hook - new type DelimitedString - so we wont need to do above hopefully and it's done in one spot in code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perfect thank you
Issue #:
bcgov/entity#21536
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the sbc-pay license (Apache 2.0).