Recurring Schedule

Get Started. It's Free
or sign up with your email address
Rocket clouds
Recurring Schedule by Mind Map: Recurring Schedule

1. Common Error Codes

1.1. If token not provided or expired 401 Error code

1.1.1. "message": "Authorization has been denied for this request."

1.2. 404 Not Found - Occurs when the resource provided is not found

1.2.1. { "message":"The requested resource could not be found." }

1.3. If sending more requests than is allowed then 429: Too many requests

1.3.1. Configuration. To be confirmed with Dev

1.3.2. "message": "You have exceeded the maximum limit of request allowed. Please try your request again in a moment."

1.4. If client does not have permission to business provided then 403: Forbidden

1.4.1. { "errorCode":"access_denied", "message":"Unable to process this request as you do not have access to the customer associated to this request." }

1.5. 500: Internal Server Error Lock database to test

1.5.1. { "message": "Something went wrong while processing your request. We’re sorry for the trouble. We’ve been notified of the error and will correct it as soon as possible. Please try your request again in a moment." }

1.6. 503: Service Unavailable Turn off CustomerServices in Application Pool to Test

1.6.1. { "message": "The API is currently unavailable due to a scheduled outage – please try again soon." }

2. Create

2.1. General logic

2.1.1. Required fields

2.1.1.1. accountId in the endpoint

2.1.1.1.1. not provided

2.1.1.1.2. provided value doesn't exist

2.1.1.1.3. account is closed

2.1.1.1.4. account has ddStop = true

2.1.1.2. minimumEffectiveDate

2.1.1.2.1. not provided

2.1.1.2.2. invalid: invalid date format, date with time not date

2.1.1.2.3. date in the past

2.1.1.2.4. minimumEffectiveDate < account.StartDate

2.1.1.2.5. minimumEffectiveDate is today

2.1.1.3. installment

2.1.1.3.1. not provided

2.1.1.3.2. invalid 3dp

2.1.1.3.3. provided value is less than 1

2.1.1.4. frequency

2.1.1.4.1. not provided

2.1.1.4.2. provided value is not valid valid values: weekly, fortnightly, four-weekly, monthly, bi-monthly, quarterly

2.1.1.5. deleteFutureSchedules

2.1.1.5.1. not provided

2.1.1.5.2. true

2.1.1.5.3. false

2.1.2. Optional fields

2.1.2.1. scheduleDescription

2.1.2.1.1. provided value is 51 long

2.1.2.1.2. space is truncated before and after the value

2.1.2.2. externalScheduleId

2.1.2.2.1. provided value is 51 long

2.1.2.2.2. not unique in facility account (provided value that already assigned to PS that belong to FA)

2.1.2.2.3. space is truncated before and after the value

2.1.2.3. overrideBillingCycleAlligment

2.1.2.3.1. true

2.1.2.3.2. false / not provided

2.1.2.4. previousSheduleEndDate

2.1.2.4.1. invalid invalid date format, date with time not date

2.1.2.4.2. previousScheduleEndDate >= minimumEffectiveDate

2.1.2.4.3. provided date is day before and current system time is after cut off time

2.2. Successful request

2.2.1. Response Code is 201

2.2.2. Response includes all provided values

2.2.2.1. PreviousScheduleDate returns

2.2.3. audit trail record created

2.2.4. scheduleID is returned

2.2.5. DB has PS created

2.2.5.1. SchedulePayment has EndDate for a previous PS

2.2.6. Processing has a balance updated

3. Get

3.1. Validation

3.1.1. ScheduleId

3.1.1.1. DSElk.dbo.PaySchedule.ScheduleNo

3.1.2. AccountId

3.1.2.1. DSElk.dbo.Account.AdfitNo

3.1.3. AccountExternalId

3.1.3.1. DSElk.dbo.Account.Clubno

3.1.4. RecurringScheduleStartDate

3.1.4.1. DSElk.dbo.PaySchedule.StartDate

3.1.5. RecurringScheduleEndDate

3.1.5.1. DSElk.dbo.SchedulePayment.EndDate

3.1.6. Installment

3.1.6.1. DSElk.dbo.PaySchedule.Installment

3.1.7. Frequency

3.1.7.1. DSElk.dbo.PaySchedule.Frequency

3.1.8. ScheduleDescription

3.1.8.1. DSElk.dbo.PaySchedule.PayDesc

3.1.9. ExternalScheduleId

3.1.9.1. DSElk.dbo.PaySchedule.ExternalIdentifier

3.2. Get 1 Recurring Schedule Both AccountId and ScheduleId must be provided

3.2.1. AccountId DSElk.dbo.Account.Adfitno

3.2.1.1. Invalid value provided

3.2.1.1.1. 404 error

3.2.1.2. Not provided

3.2.1.2.1. 405 TBC

3.2.1.3. Provided value exists in DB but no permission

3.2.1.3.1. 403 error

3.2.1.4. Provided value exists and client has permission

3.2.1.4.1. 200 OK: { "scheduleId":"12345678", "accountId":"AILL056H6", "accountExternalId":"ABC12345", "recurringScheduleStartDate":"2020-01-31", "recurringScheduleEndDate":"2020-12-31", "installment":50.00, "frequency":"monthly", "scheduleDescription":"Recurring schedule Jan-Dec", "externalScheduleId":"T125810" }

3.2.2. ScheduleId DSElk.dbo.PaySchedule.ScheduleNo

3.2.2.1. Invalid value provided

3.2.2.1.1. 404 error

3.2.2.2. Not provided

3.2.2.2.1. 404 error

3.2.2.3. Existing value provided

3.2.2.3.1. 200 OK

3.2.2.4. ScheduleID for Non Recurring Schedule provided

3.2.2.4.1. 404 error

3.3. Get list of Recurring Schedules ScheduleID must not be provided

3.3.1. AccountId

3.3.1.1. provided

3.3.1.1.1. return list of recurring schedules associated to specific Account

3.3.1.2. not provided

3.3.1.2.1. 405 TBC

4. Delete

4.1. 200 OK Successful delete

4.1.1. { "message":"Recurring schedule successfully deleted" }

4.1.2. Deleting last recurring schedule

4.1.2.1. If Previous recurring schedule is in the future or ongoing - end date will be removed

4.1.3. account is closed but cancel reason is (prep for debt collection, prep write off) - this is considered as still active

4.2. 403 Forbidden

4.2.1. Deleting active schedule ScheduleID.Startdate is <= today

4.2.1.1. { "errorCode":"access_denied", "message":"Unable to process this request as the schedule has already started or ended." }

4.2.2. (Payschedule.StartDate <= SystemTime.Now.AddHours(-7).Date)

4.2.2.1. already covered on the above scenario

4.2.3. Deleting only one Schedule

4.2.3.1. { "errorCode":"access_denied", "message":"Unable to process this request as the account associated to this schedule must have at least 1 schedule." }

4.2.4. Deleting middle schedule (with previous and next recurring schedule)

4.2.4.1. { "errorCode":"access_denied", "message":"Unable to process this request as only the last schedule is allowed to be deleted." }

4.2.5. deleting future schedule with subsequent schedule

4.2.5.1. { "errorCode":"access_denied", "message":"Unable to process this request as only the last schedule is allowed to be deleted." }

4.2.6. When account is closed

4.2.6.1. { "errorCode":"access_denied", "message":"Unable to process this request as the account is not active." }

4.2.7. when the schedule is already done (ex. EndDate >=today

4.2.7.1. { "errorCode":"access_denied", "message":"Unable to process this request as the schedule has already started or ended." }

4.2.8. If Previous recurring schedule is in the past or ended - end date will be the same, no changes

4.3. 404 Not found

4.3.1. ScheduleID exist but doesn't belong to the AccountID provided

4.3.1.1. { "message":"The requested resource could not be found." }

4.3.2. ScheduleID doesn't exist

4.3.2.1. { "message":"The requested resource could not be found." }

4.3.3. Account ID provided value doesn't exist

4.3.3.1. { "message":"The requested resource could not be found." }

4.3.4. ScheduleID is not recurringSchedule (class = ScheduleMisc ScheduleOneOff ScheduleSuspense)

4.3.4.1. { "message":"The requested resource could not be found." }

4.4. 405 error method is not allowed

4.4.1. AccountID not provided

4.4.2. ScheduleID not provided

4.5. DB Check

4.5.1. Audit created

4.5.2. Specific schedule will no longer be available in DB

4.5.3. Deleted schedule will be added in Payschedule_Deleted

4.6. ELK CRM

4.6.1. Audit created

4.6.2. specific schedule will not be available