Get Calculation Cycles for a Policy

This operation provides information about the next calculation cycles for a Policy that uses Policy Calculation Period based on Premium Calculation.

Resource Representation

A policy:nextcycle relation link represents this operation.

{
    "links": [
    {
      "href": "http://<host>:<port>/<contextRoot>/generic/policies/<id>",
      "rel": "self"
    },
    {
      "href": "http://<host>:<port>/<contextRoot>/policies/<id>/nextcalculationcycles/<YYYY-MM-DD>",
      "rel": "policy:nextcycle",
      "httpMethod": "POST"

    }
  ]
}

Request

The request provides the Input Date. The system by default returns the cycle belonging to the Input Date and the next two ones after it (provided collection setting allows for it).

Processing

The system generates Policy Calculation Periods by up-to date set to the Input Calculation Date and billing cycle set to forward billing. The system continues to generate periods up to two (default) subsequent collection cycles following the collection cycle belonging to the Input Date. Configure the next cycles by setting system property ohi.policies.calculate.calculationperiods.nextcycle. One can request up to a maximum of next five cycles.

Refer to Generate Policy Calculation Periods process for details.

Periods that this process generates do not store anywhere. Periods do not replace or re-generate.

The system returns the Policy Calculation Periods corresponding to the current (collection cycle belonging to the Input Date), and the next two subsequent cycles in the response. If a valid collection setting to generate all the periods for the current calculation cycle or to generate subsequent collection cycles does not exist, then the system returns whatever periods that it could generate.

Response Messages

This operation will provide HTTP status codes as set out in Response Messages.

The successful response would comprise a collection of Policy Calculation Periods, including extensibility data (each Policy Calculation Period will follow to generic HTTP API standard).

Returns an appropriate error code and message if an error occurs.

Authorization

This integration point requires a grant for access restriction policies.nextcycle.