| 209 | } |
| 210 | |
| 211 | func (c *Client) PatchOrganizationIDPSyncSettings(ctx context.Context, req OrganizationSyncSettings) (OrganizationSyncSettings, error) { |
| 212 | res, err := c.Request(ctx, http.MethodPatch, "/api/v2/settings/idpsync/organization", req) |
| 213 | if err != nil { |
| 214 | return OrganizationSyncSettings{}, xerrors.Errorf("make request: %w", err) |
| 215 | } |
| 216 | defer res.Body.Close() |
| 217 | |
| 218 | if res.StatusCode != http.StatusOK { |
| 219 | return OrganizationSyncSettings{}, ReadBodyAsError(res) |
| 220 | } |
| 221 | var resp OrganizationSyncSettings |
| 222 | return resp, json.NewDecoder(res.Body).Decode(&resp) |
| 223 | } |
| 224 | |
| 225 | type PatchOrganizationIDPSyncConfigRequest struct { |
| 226 | Field string `json:"field"` |