# Path: mollie/api/resources/refunds.py
# class Refunds(ResourceBase):
#     RESOURCE_ID_PREFIX = "re_"
# 
#     def get_resource_object(self, result):
#         return Refund(result, self.client)
# 
#     def get(self, refund_id, **params):
#         if not refund_id or not refund_id.startswith(self.RESOURCE_ID_PREFIX):
#             raise IdentifierError(
#                 f"Invalid refund ID: '{refund_id}'. A refund ID should start with '{self.RESOURCE_ID_PREFIX}'."
#             )
#         return super().get(refund_id, **params)


from .refunds import Refunds


class ProfileRefunds(Refunds):
    profile_id = None

    def get_resource_name(self):
        return f"refunds?profileId={self.profile_id}"

    def with_parent_id(self, profile_id):
        self.profile_id = profile_id
        return self

    def on(self, profile):

# Path: mollie/api/resources/refunds.py
# class Refunds(ResourceBase):
#     RESOURCE_ID_PREFIX = "re_"
# 
#     def get_resource_object(self, result):
#         return Refund(result, self.client)
# 
#     def get(self, refund_id, **params):
#         if not refund_id or not refund_id.startswith(self.RESOURCE_ID_PREFIX):
#             raise IdentifierError(
#                 f"Invalid refund ID: '{refund_id}'. A refund ID should start with '{self.RESOURCE_ID_PREFIX}'."
#             )
#         return super().get(refund_id, **params)


# Path: mollie/api/resources/profile_refunds.py
from .refunds import Refunds



class ProfileRefunds(Refunds):
    profile_id = None

    def get_resource_name(self):
        return f"refunds?profileId={self.profile_id}"

    def with_parent_id(self, profile_id):
        self.profile_id = profile_id
        return self

    def on(self, profile):

        return self.with_parent_id(profile.id)