Skip to content

[$160] We should be able to get payments inside Work Periods inside Resource Bookings #355

Closed
@maxceem

Description

@maxceem

We have endpoint GET /resourceBookings which can return us WorkPeriods if we explicitly list them inside fileds like workPeriods or specific fields like workPeriods.id.

At the moment this endpoint doesn't allow us to get payments inside WorkPeriods.

There are 3 levels of this tasks.

Return payments [$20]

  • This endpoints should also return payments inside Work Periods if we specfiy fields=workPeriods (all the fields including pyaments) or if we explicitly specify fields=workPeriods.payments
  • Only admins, bookings managers and M2M with correct scope should be able to get this field.

Return particular fields of payments [$40]

  • Would it be hard to also support filtering fields inside payments like this? fields=workPeriods.payments.status?
  • Same like above, only admins, bookings managers and M2M with correct scope should be able to get this field.

Note, that fields property we have in 2 endpoints where it should be updated: GET /resourceBookings and GET /resourceBookings/{id}.

Filter by payments fields [$100]

We would like to able to filter Resource Bookings with Work Periods by the payments fields inside. In particular, we are interested to filter by the workPeriods.payments.status field. But other fields which are easy to support also would be nice to have.

This should be done for DB and ES requests.

How hard would it be to implement it?

  • Update Swagger.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions