Skip to content

Commit

Permalink
feat: add until parameter to shift resource (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
maltelehmann authored Oct 1, 2024
1 parent d1edb87 commit b7cb6cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions on_call_shift.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type OnCallShift struct {
Name string `json:"name"`
Level int `json:"level"`
Start string `json:"start"`
Until string `json:"until"`
Duration int `json:"duration"`
Frequency *string `json:"frequency"`
Users *[]string `json:"users"`
Expand Down Expand Up @@ -101,6 +102,7 @@ type CreateOnCallShiftOptions struct {
Name string `json:"name"`
Level *int `json:"level,omitempty"`
Start string `json:"start"`
Until string `json:"until"`
Duration int `json:"duration"`
Frequency *string `json:"frequency"`
Users *[]string `json:"users"`
Expand Down Expand Up @@ -142,6 +144,7 @@ type UpdateOnCallShiftOptions struct {
TeamId string `json:"team_id"`
Level *int `json:"level,omitempty"`
Start string `json:"start"`
Until string `json:"until"`
Duration int `json:"duration"`
Frequency *string `json:"frequency"`
Users *[]string `json:"users"`
Expand Down
2 changes: 2 additions & 0 deletions on_call_shift_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ var testOnCallShift = &OnCallShift{
Name: "Test On-Call Shift",
Type: "recurrent_event",
Start: "2020-09-04T13:00:00",
Until: "2020-09-05T13:00:00",
Level: 0,
Duration: 7200,
Frequency: &frequency,
Expand All @@ -35,6 +36,7 @@ var testOnCallShiftBody = `{
"schedule_id" : "SBM7DV7BKFUYU",
"type" : "recurrent_event",
"start" : "2020-09-04T13:00:00",
"until" : "2020-09-05T13:00:00",
"level" : 0,
"duration" : 7200,
"frequency" : "weekly",
Expand Down

0 comments on commit b7cb6cd

Please sign in to comment.