From b7cb6cdcae2c0b0bebe54d0c62adb07f58ca8aca Mon Sep 17 00:00:00 2001 From: maltelehmann <54817802+maltelehmann@users.noreply.github.com> Date: Tue, 1 Oct 2024 16:01:52 +0200 Subject: [PATCH] feat: add `until` parameter to shift resource (#21) --- on_call_shift.go | 3 +++ on_call_shift_test.go | 2 ++ 2 files changed, 5 insertions(+) diff --git a/on_call_shift.go b/on_call_shift.go index eb4b0b2..f24cc9a 100644 --- a/on_call_shift.go +++ b/on_call_shift.go @@ -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"` @@ -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"` @@ -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"` diff --git a/on_call_shift_test.go b/on_call_shift_test.go index 87db105..a74cedd 100644 --- a/on_call_shift_test.go +++ b/on_call_shift_test.go @@ -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, @@ -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",