From f02643615e5e6de8dbb6957f6215b4602e272768 Mon Sep 17 00:00:00 2001 From: Shubham Date: Fri, 4 Oct 2024 22:55:13 +0530 Subject: [PATCH] chore: moving to v4 (#488) * chore: moving to v4 * chore: update readme with v4 --- README.md | 4 +- client/client.go | 2 +- go.mod | 2 +- rest/api/v3/account_provisioning/README.md | 2 +- .../v3/account_provisioning/api_service.go | 2 +- rest/api/v3/alerts/README.md | 2 +- rest/api/v3/alerts/api_service.go | 2 +- rest/api/v3/api_keys/README.md | 2 +- rest/api/v3/api_keys/api_service.go | 2 +- rest/api/v3/domain_authentication/README.md | 2 +- .../v3/domain_authentication/api_service.go | 2 +- rest/api/v3/email_activity/README.md | 2 +- rest/api/v3/email_activity/api_service.go | 2 +- rest/api/v3/email_validation/README.md | 2 +- rest/api/v3/email_validation/api_service.go | 2 +- rest/api/v3/enforced_tls/README.md | 2 +- rest/api/v3/enforced_tls/api_service.go | 2 +- rest/api/v3/integrations/README.md | 2 +- rest/api/v3/integrations/api_service.go | 2 +- rest/api/v3/ip_access_management/README.md | 2 +- .../v3/ip_access_management/api_service.go | 2 +- rest/api/v3/ip_address_management/README.md | 2 +- .../v3/ip_address_management/api_service.go | 2 +- rest/api/v3/ip_warmup/README.md | 2 +- rest/api/v3/ip_warmup/api_service.go | 2 +- rest/api/v3/ips/README.md | 2 +- rest/api/v3/ips/api_service.go | 2 +- rest/api/v3/link_branding/README.md | 2 +- rest/api/v3/link_branding/api_service.go | 2 +- rest/api/v3/lmc_campaigns/README.md | 2 +- rest/api/v3/lmc_campaigns/api_service.go | 2 +- rest/api/v3/lmc_contactdb/README.md | 2 +- rest/api/v3/lmc_contactdb/api_service.go | 2 +- rest/api/v3/lmc_senders/README.md | 2 +- rest/api/v3/lmc_senders/api_service.go | 2 +- rest/api/v3/mail/README.md | 2 +- rest/api/v3/mail/api_service.go | 2 +- rest/api/v3/mail_settings/README.md | 2 +- rest/api/v3/mail_settings/api_service.go | 2 +- rest/api/v3/mc_custom_fields/README.md | 2 +- rest/api/v3/mc_custom_fields/api_service.go | 2 +- rest/api/v3/mc_designs/README.md | 2 +- rest/api/v3/mc_designs/api_service.go | 2 +- rest/api/v3/mc_lists/README.md | 2 +- rest/api/v3/mc_lists/api_service.go | 2 +- rest/api/v3/mc_segments/README.md | 75 ----------- rest/api/v3/mc_segments/api_delete_segment.go | 101 --------------- rest/api/v3/mc_segments/api_get_segment.go | 104 --------------- rest/api/v3/mc_segments/api_list_segment.go | 120 ----------------- rest/api/v3/mc_segments/api_service.go | 34 ----- .../v3/mc_segments/docs/ContactResponse.md | 27 ---- .../docs/ContactResponseCustomFields.md | 12 -- rest/api/v3/mc_segments/docs/DeleteSegment.md | 51 -------- rest/api/v3/mc_segments/docs/ErrorResponse.md | 12 -- .../docs/ErrorResponseErrorsInner.md | 13 -- rest/api/v3/mc_segments/docs/FullSegment.md | 22 ---- rest/api/v3/mc_segments/docs/GetSegment.md | 52 -------- .../mc_segments/docs/GetSegment404Response.md | 11 -- .../docs/GetSegment404ResponseErrorsInner.md | 12 -- rest/api/v3/mc_segments/docs/ListSegment.md | 50 ------- .../docs/ListSegment200Response.md | 11 -- .../docs/ListSegment500Response.md | 11 -- .../docs/ListSegment500ResponseErrorsInner.md | 11 -- .../api/v3/mc_segments/docs/SegmentSummary.md | 18 --- .../api/v3/mc_segments/docs/SegmentWriteV2.md | 13 -- .../v3/mc_segments/model_contact_response.go | 51 -------- .../model_contact_response_custom_fields.go | 20 --- .../v3/mc_segments/model_error_response.go | 21 --- .../model_error_response_errors_inner.go | 24 ---- rest/api/v3/mc_segments/model_full_segment.go | 43 ------ .../model_get_segment_404_response.go | 19 --- ...l_get_segment_404_response_errors_inner.go | 20 --- .../model_list_segment_200_response.go | 19 --- .../model_list_segment_500_response.go | 19 --- ..._list_segment_500_response_errors_inner.go | 19 --- .../v3/mc_segments/model_segment_summary.go | 35 ----- .../v3/mc_segments/model_segment_write_v2.go | 24 ---- rest/api/v3/mc_segments_2/README.md | 2 +- rest/api/v3/mc_segments_2/api_service.go | 2 +- rest/api/v3/mc_senders/README.md | 2 +- rest/api/v3/mc_senders/api_service.go | 2 +- rest/api/v3/mc_singlesends/README.md | 2 +- rest/api/v3/mc_singlesends/api_service.go | 2 +- rest/api/v3/mc_stats/README.md | 2 +- rest/api/v3/mc_stats/api_service.go | 2 +- rest/api/v3/mc_test/README.md | 2 +- rest/api/v3/mc_test/api_service.go | 2 +- rest/api/v3/partner/README.md | 2 +- rest/api/v3/partner/api_service.go | 2 +- rest/api/v3/recipients_data_erasure/README.md | 2 +- .../v3/recipients_data_erasure/api_service.go | 2 +- rest/api/v3/reverse_dns/README.md | 2 +- rest/api/v3/reverse_dns/api_service.go | 2 +- rest/api/v3/scheduled_sends/README.md | 2 +- rest/api/v3/scheduled_sends/api_service.go | 2 +- rest/api/v3/scopes/README.md | 2 +- rest/api/v3/scopes/api_service.go | 2 +- rest/api/v3/seq/README.md | 2 +- rest/api/v3/seq/api_service.go | 2 +- rest/api/v3/sso/README.md | 2 +- rest/api/v3/sso/api_service.go | 2 +- rest/api/v3/stats/README.md | 2 +- rest/api/v3/stats/api_service.go | 2 +- rest/api/v3/subusers/README.md | 2 +- rest/api/v3/subusers/api_service.go | 2 +- rest/api/v3/teammates/README.md | 89 ------------- .../teammates/api_delete_pending_teammate.go | 70 ---------- rest/api/v3/teammates/api_delete_teammate.go | 70 ---------- rest/api/v3/teammates/api_get_teammate.go | 70 ---------- rest/api/v3/teammates/api_invite_teammate.go | 82 ------------ .../v3/teammates/api_list_pending_teammate.go | 59 --------- .../teammates/api_list_subuser_by_template.go | 122 ------------------ rest/api/v3/teammates/api_list_teammate.go | 79 ------------ .../teammates/api_resend_teammate_invite.go | 78 ----------- rest/api/v3/teammates/api_service.go | 34 ----- rest/api/v3/teammates/api_update_teammate.go | 101 --------------- .../teammates/docs/DeletePendingTeammate.md | 52 -------- rest/api/v3/teammates/docs/DeleteTeammate.md | 52 -------- rest/api/v3/teammates/docs/GetTeammate.md | 52 -------- .../teammates/docs/GetTeammate200Response.md | 25 ---- rest/api/v3/teammates/docs/InviteTeammate.md | 49 ------- .../docs/InviteTeammate201Response.md | 14 -- .../docs/InviteTeammate400Response.md | 11 -- .../InviteTeammate400ResponseErrorsInner.md | 12 -- .../teammates/docs/InviteTeammateRequest.md | 13 -- .../v3/teammates/docs/ListPendingTeammate.md | 48 ------- .../docs/ListPendingTeammate200Response.md | 11 -- ...stPendingTeammate200ResponseResultInner.md | 15 --- .../teammates/docs/ListSubuserByTemplate.md | 54 -------- .../docs/ListSubuserByTemplate200Response.md | 13 -- ...istSubuserByTemplate200ResponseMetadata.md | 11 -- ...ByTemplate200ResponseMetadataNextParams.md | 13 -- ...ByTemplate200ResponseSubuserAccessInner.md | 16 --- .../docs/ListSubuserByTemplate400Response.md | 11 -- ...SubuserByTemplate400ResponseErrorsInner.md | 12 -- rest/api/v3/teammates/docs/ListTeammate.md | 50 ------- .../teammates/docs/ListTeammate200Response.md | 11 -- .../ListTeammate200ResponseResultInner.md | 24 ---- rest/api/v3/teammates/docs/PermissionType.md | 13 -- .../v3/teammates/docs/ResendTeammateInvite.md | 52 -------- .../docs/ResendTeammateInvite200Response.md | 14 -- rest/api/v3/teammates/docs/UpdateTeammate.md | 53 -------- .../docs/UpdateTeammate200Response.md | 25 ---- .../teammates/docs/UpdateTeammateRequest.md | 12 -- rest/api/v3/teammates/docs/UserType.md | 14 -- rest/api/v3/teammates/docs/UserType1.md | 14 -- rest/api/v3/teammates/docs/UserType2.md | 14 -- .../model_get_teammate_200_response.go | 48 ------- .../model_invite_teammate_201_response.go | 26 ---- .../model_invite_teammate_400_response.go | 19 --- ...vite_teammate_400_response_errors_inner.go | 20 --- .../model_invite_teammate_request.go | 24 ---- ...odel_list_pending_teammate_200_response.go | 19 --- ...ding_teammate_200_response_result_inner.go | 28 ---- ...l_list_subuser_by_template_200_response.go | 23 ---- ...user_by_template_200_response__metadata.go | 19 --- ...late_200_response__metadata_next_params.go | 24 ---- ...plate_200_response_subuser_access_inner.go | 30 ----- ...l_list_subuser_by_template_400_response.go | 19 --- ...r_by_template_400_response_errors_inner.go | 22 ---- .../model_list_teammate_200_response.go | 19 --- ...list_teammate_200_response_result_inner.go | 46 ------- .../api/v3/teammates/model_permission_type.go | 23 ---- ...del_resend_teammate_invite_200_response.go | 26 ---- .../model_update_teammate_200_response.go | 48 ------- .../model_update_teammate_request.go | 22 ---- rest/api/v3/teammates/model_user_type.go | 24 ---- rest/api/v3/teammates/model_user_type1.go | 24 ---- rest/api/v3/teammates/model_user_type2.go | 24 ---- rest/api/v3/templates/README.md | 2 +- rest/api/v3/templates/api_service.go | 2 +- rest/api/v3/tracking_settings/README.md | 2 +- rest/api/v3/tracking_settings/api_service.go | 2 +- rest/api/v3/user/README.md | 2 +- rest/api/v3/user/api_service.go | 2 +- rest/api/v3/verified_senders/README.md | 2 +- rest/api/v3/verified_senders/api_service.go | 2 +- rest/api/v3/webhooks/README.md | 2 +- rest/api/v3/webhooks/api_service.go | 2 +- sendgrid.go | 88 ++++++------- 180 files changed, 125 insertions(+), 3416 deletions(-) delete mode 100644 rest/api/v3/mc_segments/README.md delete mode 100644 rest/api/v3/mc_segments/api_delete_segment.go delete mode 100644 rest/api/v3/mc_segments/api_get_segment.go delete mode 100644 rest/api/v3/mc_segments/api_list_segment.go delete mode 100644 rest/api/v3/mc_segments/api_service.go delete mode 100644 rest/api/v3/mc_segments/docs/ContactResponse.md delete mode 100644 rest/api/v3/mc_segments/docs/ContactResponseCustomFields.md delete mode 100644 rest/api/v3/mc_segments/docs/DeleteSegment.md delete mode 100644 rest/api/v3/mc_segments/docs/ErrorResponse.md delete mode 100644 rest/api/v3/mc_segments/docs/ErrorResponseErrorsInner.md delete mode 100644 rest/api/v3/mc_segments/docs/FullSegment.md delete mode 100644 rest/api/v3/mc_segments/docs/GetSegment.md delete mode 100644 rest/api/v3/mc_segments/docs/GetSegment404Response.md delete mode 100644 rest/api/v3/mc_segments/docs/GetSegment404ResponseErrorsInner.md delete mode 100644 rest/api/v3/mc_segments/docs/ListSegment.md delete mode 100644 rest/api/v3/mc_segments/docs/ListSegment200Response.md delete mode 100644 rest/api/v3/mc_segments/docs/ListSegment500Response.md delete mode 100644 rest/api/v3/mc_segments/docs/ListSegment500ResponseErrorsInner.md delete mode 100644 rest/api/v3/mc_segments/docs/SegmentSummary.md delete mode 100644 rest/api/v3/mc_segments/docs/SegmentWriteV2.md delete mode 100644 rest/api/v3/mc_segments/model_contact_response.go delete mode 100644 rest/api/v3/mc_segments/model_contact_response_custom_fields.go delete mode 100644 rest/api/v3/mc_segments/model_error_response.go delete mode 100644 rest/api/v3/mc_segments/model_error_response_errors_inner.go delete mode 100644 rest/api/v3/mc_segments/model_full_segment.go delete mode 100644 rest/api/v3/mc_segments/model_get_segment_404_response.go delete mode 100644 rest/api/v3/mc_segments/model_get_segment_404_response_errors_inner.go delete mode 100644 rest/api/v3/mc_segments/model_list_segment_200_response.go delete mode 100644 rest/api/v3/mc_segments/model_list_segment_500_response.go delete mode 100644 rest/api/v3/mc_segments/model_list_segment_500_response_errors_inner.go delete mode 100644 rest/api/v3/mc_segments/model_segment_summary.go delete mode 100644 rest/api/v3/mc_segments/model_segment_write_v2.go delete mode 100644 rest/api/v3/teammates/README.md delete mode 100644 rest/api/v3/teammates/api_delete_pending_teammate.go delete mode 100644 rest/api/v3/teammates/api_delete_teammate.go delete mode 100644 rest/api/v3/teammates/api_get_teammate.go delete mode 100644 rest/api/v3/teammates/api_invite_teammate.go delete mode 100644 rest/api/v3/teammates/api_list_pending_teammate.go delete mode 100644 rest/api/v3/teammates/api_list_subuser_by_template.go delete mode 100644 rest/api/v3/teammates/api_list_teammate.go delete mode 100644 rest/api/v3/teammates/api_resend_teammate_invite.go delete mode 100644 rest/api/v3/teammates/api_service.go delete mode 100644 rest/api/v3/teammates/api_update_teammate.go delete mode 100644 rest/api/v3/teammates/docs/DeletePendingTeammate.md delete mode 100644 rest/api/v3/teammates/docs/DeleteTeammate.md delete mode 100644 rest/api/v3/teammates/docs/GetTeammate.md delete mode 100644 rest/api/v3/teammates/docs/GetTeammate200Response.md delete mode 100644 rest/api/v3/teammates/docs/InviteTeammate.md delete mode 100644 rest/api/v3/teammates/docs/InviteTeammate201Response.md delete mode 100644 rest/api/v3/teammates/docs/InviteTeammate400Response.md delete mode 100644 rest/api/v3/teammates/docs/InviteTeammate400ResponseErrorsInner.md delete mode 100644 rest/api/v3/teammates/docs/InviteTeammateRequest.md delete mode 100644 rest/api/v3/teammates/docs/ListPendingTeammate.md delete mode 100644 rest/api/v3/teammates/docs/ListPendingTeammate200Response.md delete mode 100644 rest/api/v3/teammates/docs/ListPendingTeammate200ResponseResultInner.md delete mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate.md delete mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate200Response.md delete mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadata.md delete mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadataNextParams.md delete mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseSubuserAccessInner.md delete mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate400Response.md delete mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate400ResponseErrorsInner.md delete mode 100644 rest/api/v3/teammates/docs/ListTeammate.md delete mode 100644 rest/api/v3/teammates/docs/ListTeammate200Response.md delete mode 100644 rest/api/v3/teammates/docs/ListTeammate200ResponseResultInner.md delete mode 100644 rest/api/v3/teammates/docs/PermissionType.md delete mode 100644 rest/api/v3/teammates/docs/ResendTeammateInvite.md delete mode 100644 rest/api/v3/teammates/docs/ResendTeammateInvite200Response.md delete mode 100644 rest/api/v3/teammates/docs/UpdateTeammate.md delete mode 100644 rest/api/v3/teammates/docs/UpdateTeammate200Response.md delete mode 100644 rest/api/v3/teammates/docs/UpdateTeammateRequest.md delete mode 100644 rest/api/v3/teammates/docs/UserType.md delete mode 100644 rest/api/v3/teammates/docs/UserType1.md delete mode 100644 rest/api/v3/teammates/docs/UserType2.md delete mode 100644 rest/api/v3/teammates/model_get_teammate_200_response.go delete mode 100644 rest/api/v3/teammates/model_invite_teammate_201_response.go delete mode 100644 rest/api/v3/teammates/model_invite_teammate_400_response.go delete mode 100644 rest/api/v3/teammates/model_invite_teammate_400_response_errors_inner.go delete mode 100644 rest/api/v3/teammates/model_invite_teammate_request.go delete mode 100644 rest/api/v3/teammates/model_list_pending_teammate_200_response.go delete mode 100644 rest/api/v3/teammates/model_list_pending_teammate_200_response_result_inner.go delete mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_200_response.go delete mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata.go delete mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata_next_params.go delete mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_200_response_subuser_access_inner.go delete mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_400_response.go delete mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_400_response_errors_inner.go delete mode 100644 rest/api/v3/teammates/model_list_teammate_200_response.go delete mode 100644 rest/api/v3/teammates/model_list_teammate_200_response_result_inner.go delete mode 100644 rest/api/v3/teammates/model_permission_type.go delete mode 100644 rest/api/v3/teammates/model_resend_teammate_invite_200_response.go delete mode 100644 rest/api/v3/teammates/model_update_teammate_200_response.go delete mode 100644 rest/api/v3/teammates/model_update_teammate_request.go delete mode 100644 rest/api/v3/teammates/model_user_type.go delete mode 100644 rest/api/v3/teammates/model_user_type1.go delete mode 100644 rest/api/v3/teammates/model_user_type2.go diff --git a/README.md b/README.md index e18e28f3..b535b215 100644 --- a/README.md +++ b/README.md @@ -96,8 +96,8 @@ package main import ( "encoding/json" "fmt" - "github.com/sendgrid/sendgrid-go" - MailV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mail" + "github.com/sendgrid/sendgrid-go/v4" + MailV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/mail" "net/http" "os" ) diff --git a/client/client.go b/client/client.go index 7b20616a..5a1b175c 100644 --- a/client/client.go +++ b/client/client.go @@ -11,7 +11,7 @@ import ( "strings" "time" - "github.com/sendgrid/sendgrid-go/client/form" + "github.com/sendgrid/sendgrid-go/v4/client/form" ) var alphanumericRegex *regexp.Regexp diff --git a/go.mod b/go.mod index bf77c18f..e6e9f056 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/sendgrid/sendgrid-go +module github.com/sendgrid/sendgrid-go/v4 go 1.21.4 diff --git a/rest/api/v3/account_provisioning/README.md b/rest/api/v3/account_provisioning/README.md index e04a232d..b756738c 100644 --- a/rest/api/v3/account_provisioning/README.md +++ b/rest/api/v3/account_provisioning/README.md @@ -9,7 +9,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:01.491818+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:43.746152+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/account_provisioning/api_service.go b/rest/api/v3/account_provisioning/api_service.go index 6459d6eb..93ed1e0f 100644 --- a/rest/api/v3/account_provisioning/api_service.go +++ b/rest/api/v3/account_provisioning/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/alerts/README.md b/rest/api/v3/alerts/README.md index dac97bea..153921be 100644 --- a/rest/api/v3/alerts/README.md +++ b/rest/api/v3/alerts/README.md @@ -9,7 +9,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:01.491895+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:43.743830+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/alerts/api_service.go b/rest/api/v3/alerts/api_service.go index 79301822..3b1d3429 100644 --- a/rest/api/v3/alerts/api_service.go +++ b/rest/api/v3/alerts/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/api_keys/README.md b/rest/api/v3/api_keys/README.md index 010e8385..b413f1e1 100644 --- a/rest/api/v3/api_keys/README.md +++ b/rest/api/v3/api_keys/README.md @@ -9,7 +9,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:01.492228+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:43.743443+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/api_keys/api_service.go b/rest/api/v3/api_keys/api_service.go index 24d94ab9..69923b38 100644 --- a/rest/api/v3/api_keys/api_service.go +++ b/rest/api/v3/api_keys/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/domain_authentication/README.md b/rest/api/v3/domain_authentication/README.md index 5a105004..8ec034f1 100644 --- a/rest/api/v3/domain_authentication/README.md +++ b/rest/api/v3/domain_authentication/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:01.511283+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:43.763997+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/domain_authentication/api_service.go b/rest/api/v3/domain_authentication/api_service.go index bfe66aff..2322d30e 100644 --- a/rest/api/v3/domain_authentication/api_service.go +++ b/rest/api/v3/domain_authentication/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/email_activity/README.md b/rest/api/v3/email_activity/README.md index de11c476..fd23dc21 100644 --- a/rest/api/v3/email_activity/README.md +++ b/rest/api/v3/email_activity/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:01.497877+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:43.745239+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/email_activity/api_service.go b/rest/api/v3/email_activity/api_service.go index 9a929e14..3c60dcc8 100644 --- a/rest/api/v3/email_activity/api_service.go +++ b/rest/api/v3/email_activity/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/email_validation/README.md b/rest/api/v3/email_validation/README.md index af6d3899..3c1c0363 100644 --- a/rest/api/v3/email_validation/README.md +++ b/rest/api/v3/email_validation/README.md @@ -18,7 +18,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:01.492490+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:43.748458+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/email_validation/api_service.go b/rest/api/v3/email_validation/api_service.go index 12f01b4a..510a3dae 100644 --- a/rest/api/v3/email_validation/api_service.go +++ b/rest/api/v3/email_validation/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/enforced_tls/README.md b/rest/api/v3/enforced_tls/README.md index 5ce51635..1236eaf3 100644 --- a/rest/api/v3/enforced_tls/README.md +++ b/rest/api/v3/enforced_tls/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:01.490412+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:43.741092+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/enforced_tls/api_service.go b/rest/api/v3/enforced_tls/api_service.go index b52f212f..f6e949c8 100644 --- a/rest/api/v3/enforced_tls/api_service.go +++ b/rest/api/v3/enforced_tls/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/integrations/README.md b/rest/api/v3/integrations/README.md index a7aafef9..2b1db159 100644 --- a/rest/api/v3/integrations/README.md +++ b/rest/api/v3/integrations/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:01.495372+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:43.743581+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/integrations/api_service.go b/rest/api/v3/integrations/api_service.go index 6a43a8ff..41839401 100644 --- a/rest/api/v3/integrations/api_service.go +++ b/rest/api/v3/integrations/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/ip_access_management/README.md b/rest/api/v3/ip_access_management/README.md index 3636ea94..0e444732 100644 --- a/rest/api/v3/ip_access_management/README.md +++ b/rest/api/v3/ip_access_management/README.md @@ -13,7 +13,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:01.499792+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:43.740566+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/ip_access_management/api_service.go b/rest/api/v3/ip_access_management/api_service.go index d43663e0..a94b6c5d 100644 --- a/rest/api/v3/ip_access_management/api_service.go +++ b/rest/api/v3/ip_access_management/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/ip_address_management/README.md b/rest/api/v3/ip_address_management/README.md index 33791ae1..fb0c93c8 100644 --- a/rest/api/v3/ip_address_management/README.md +++ b/rest/api/v3/ip_address_management/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:01.519876+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:43.815724+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/ip_address_management/api_service.go b/rest/api/v3/ip_address_management/api_service.go index b08b7968..060a89e4 100644 --- a/rest/api/v3/ip_address_management/api_service.go +++ b/rest/api/v3/ip_address_management/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/ip_warmup/README.md b/rest/api/v3/ip_warmup/README.md index 3658d1ab..083e49d2 100644 --- a/rest/api/v3/ip_warmup/README.md +++ b/rest/api/v3/ip_warmup/README.md @@ -13,7 +13,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:01.498963+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:43.742744+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/ip_warmup/api_service.go b/rest/api/v3/ip_warmup/api_service.go index 53f0581d..961e6fe2 100644 --- a/rest/api/v3/ip_warmup/api_service.go +++ b/rest/api/v3/ip_warmup/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/ips/README.md b/rest/api/v3/ips/README.md index 6ee5f096..00286358 100644 --- a/rest/api/v3/ips/README.md +++ b/rest/api/v3/ips/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:01.517402+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:43.751051+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/ips/api_service.go b/rest/api/v3/ips/api_service.go index 63970833..ae9285f0 100644 --- a/rest/api/v3/ips/api_service.go +++ b/rest/api/v3/ips/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/link_branding/README.md b/rest/api/v3/link_branding/README.md index 9a652498..f50d1691 100644 --- a/rest/api/v3/link_branding/README.md +++ b/rest/api/v3/link_branding/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:01.493812+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:43.743371+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/link_branding/api_service.go b/rest/api/v3/link_branding/api_service.go index 53680fb0..187c383d 100644 --- a/rest/api/v3/link_branding/api_service.go +++ b/rest/api/v3/link_branding/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/lmc_campaigns/README.md b/rest/api/v3/lmc_campaigns/README.md index 214a012e..2daa7321 100644 --- a/rest/api/v3/lmc_campaigns/README.md +++ b/rest/api/v3/lmc_campaigns/README.md @@ -9,7 +9,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:01.498878+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:43.745950+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/lmc_campaigns/api_service.go b/rest/api/v3/lmc_campaigns/api_service.go index 8f9dfc14..bca5c394 100644 --- a/rest/api/v3/lmc_campaigns/api_service.go +++ b/rest/api/v3/lmc_campaigns/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/lmc_contactdb/README.md b/rest/api/v3/lmc_contactdb/README.md index 45861477..a9d8b75a 100644 --- a/rest/api/v3/lmc_contactdb/README.md +++ b/rest/api/v3/lmc_contactdb/README.md @@ -9,7 +9,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:01.502496+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:43.767823+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/lmc_contactdb/api_service.go b/rest/api/v3/lmc_contactdb/api_service.go index 47aac07a..466c6925 100644 --- a/rest/api/v3/lmc_contactdb/api_service.go +++ b/rest/api/v3/lmc_contactdb/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/lmc_senders/README.md b/rest/api/v3/lmc_senders/README.md index 7f23b87b..4e6c473f 100644 --- a/rest/api/v3/lmc_senders/README.md +++ b/rest/api/v3/lmc_senders/README.md @@ -9,7 +9,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:01.505489+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:43.744540+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/lmc_senders/api_service.go b/rest/api/v3/lmc_senders/api_service.go index aa0529a6..d751f2a8 100644 --- a/rest/api/v3/lmc_senders/api_service.go +++ b/rest/api/v3/lmc_senders/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/mail/README.md b/rest/api/v3/mail/README.md index 4140add1..e4ce4e07 100644 --- a/rest/api/v3/mail/README.md +++ b/rest/api/v3/mail/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:01.956960+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.136718+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/mail/api_service.go b/rest/api/v3/mail/api_service.go index 0ca11aea..dd338693 100644 --- a/rest/api/v3/mail/api_service.go +++ b/rest/api/v3/mail/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/mail_settings/README.md b/rest/api/v3/mail_settings/README.md index 0ea4bce1..243c1758 100644 --- a/rest/api/v3/mail_settings/README.md +++ b/rest/api/v3/mail_settings/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:01.948903+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.128063+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/mail_settings/api_service.go b/rest/api/v3/mail_settings/api_service.go index e9a35ea3..5d0090b1 100644 --- a/rest/api/v3/mail_settings/api_service.go +++ b/rest/api/v3/mail_settings/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/mc_custom_fields/README.md b/rest/api/v3/mc_custom_fields/README.md index 11b6c285..ee4696e7 100644 --- a/rest/api/v3/mc_custom_fields/README.md +++ b/rest/api/v3/mc_custom_fields/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:02.005526+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.199940+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/mc_custom_fields/api_service.go b/rest/api/v3/mc_custom_fields/api_service.go index c8f8f2a4..30d8a1c2 100644 --- a/rest/api/v3/mc_custom_fields/api_service.go +++ b/rest/api/v3/mc_custom_fields/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/mc_designs/README.md b/rest/api/v3/mc_designs/README.md index cfb76ce1..aba0b0f8 100644 --- a/rest/api/v3/mc_designs/README.md +++ b/rest/api/v3/mc_designs/README.md @@ -13,7 +13,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:02.002686+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.195222+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/mc_designs/api_service.go b/rest/api/v3/mc_designs/api_service.go index d0bf8bbe..e3c0d471 100644 --- a/rest/api/v3/mc_designs/api_service.go +++ b/rest/api/v3/mc_designs/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/mc_lists/README.md b/rest/api/v3/mc_lists/README.md index e2aa7644..e4f957bb 100644 --- a/rest/api/v3/mc_lists/README.md +++ b/rest/api/v3/mc_lists/README.md @@ -9,7 +9,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:02.113131+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.182863+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/mc_lists/api_service.go b/rest/api/v3/mc_lists/api_service.go index f7079e91..bf773900 100644 --- a/rest/api/v3/mc_lists/api_service.go +++ b/rest/api/v3/mc_lists/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/mc_segments/README.md b/rest/api/v3/mc_segments/README.md deleted file mode 100644 index eed4bd30..00000000 --- a/rest/api/v3/mc_segments/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# Go API client for - -This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). - -To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T18:29:02.150414+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DeleteSegment* | [**DeleteSegment**](docs/DeleteSegment.md#deletesegment) | **Delete** /v3/marketing/segments/{SegmentId} | Delete Segment -*GetSegment* | [**GetSegment**](docs/GetSegment.md#getsegment) | **Get** /v3/marketing/segments/{SegmentId} | Get Segment by ID -*ListSegment* | [**ListSegment**](docs/ListSegment.md#listsegment) | **Get** /v3/marketing/segments | Get List of Segments - - -## Documentation For Models - - - [ContactResponse](ContactResponse.md) - - [ContactResponseCustomFields](ContactResponseCustomFields.md) - - [ErrorResponse](ErrorResponse.md) - - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) - - [FullSegment](FullSegment.md) - - [GetSegment404Response](GetSegment404Response.md) - - [GetSegment404ResponseErrorsInner](GetSegment404ResponseErrorsInner.md) - - [ListSegment200Response](ListSegment200Response.md) - - [ListSegment500Response](ListSegment500Response.md) - - [ListSegment500ResponseErrorsInner](ListSegment500ResponseErrorsInner.md) - - [SegmentSummary](SegmentSummary.md) - - [SegmentWriteV2](SegmentWriteV2.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/mc_segments/api_delete_segment.go b/rest/api/v3/mc_segments/api_delete_segment.go deleted file mode 100644 index 5e82b2f1..00000000 --- a/rest/api/v3/mc_segments/api_delete_segment.go +++ /dev/null @@ -1,101 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteSegmentParam struct { - // - SegmentId *string `json:"segment_id"` -} - -func (params *DeleteSegmentParam) SetSegmentId(SegmentId string) *DeleteSegmentParam { - params.SegmentId = &SegmentId - return params -} - -// **This endpoint allows you to delete a segment by `segment_id`.** Note that deleting a segment does not delete the contacts associated with the segment by default. Contacts associated with a deleted segment will remain in your list of all contacts and any other segments they belong to. -func (c *ApiService) DeleteSegment(params *DeleteSegmentParam) (interface{}, error) { - path := "/v3/marketing/segments/{SegmentId}" - if params != nil && params.SegmentId != nil { - path = strings.Replace(path, "{"+"SegmentId"+"}", *params.SegmentId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 202 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &GetSegment404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ListSegment500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil -} diff --git a/rest/api/v3/mc_segments/api_get_segment.go b/rest/api/v3/mc_segments/api_get_segment.go deleted file mode 100644 index 8d7fbcc3..00000000 --- a/rest/api/v3/mc_segments/api_get_segment.go +++ /dev/null @@ -1,104 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type GetSegmentParam struct { - // - SegmentId *string `json:"segment_id"` - // Defaults to `false`. Set to `true` to return the parsed SQL AST as a JSON object in the field `query_json` - QueryJson *bool `json:"query_json,omitempty"` -} - -func (params *GetSegmentParam) SetSegmentId(SegmentId string) *GetSegmentParam { - params.SegmentId = &SegmentId - return params -} -func (params *GetSegmentParam) SetQueryJson(QueryJson bool) *GetSegmentParam { - params.QueryJson = &QueryJson - return params -} - -// **This endpoint allows you to retrieve a single segment by ID.** -func (c *ApiService) GetSegment(params *GetSegmentParam) (interface{}, error) { - path := "/v3/marketing/segments/{SegmentId}" - if params != nil && params.SegmentId != nil { - path = strings.Replace(path, "{"+"SegmentId"+"}", *params.SegmentId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.QueryJson != nil { - data.Set("query_json", fmt.Sprint(*params.QueryJson)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &FullSegment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &GetSegment404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ListSegment500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil -} diff --git a/rest/api/v3/mc_segments/api_list_segment.go b/rest/api/v3/mc_segments/api_list_segment.go deleted file mode 100644 index 80a58cd6..00000000 --- a/rest/api/v3/mc_segments/api_list_segment.go +++ /dev/null @@ -1,120 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListSegmentParam struct { - // A list of segment IDs to retrieve. When this parameter is included, the `no_parent_list_ids` and `parent_list_ids` parameters are ignored and only segments with given IDs are returned. - Ids *[]string `json:"ids,omitempty"` - // A comma separated list of list ids to be used when searching for segments with the specified parent_list_id, no more than 50 is allowed - ParentListIds *string `json:"parent_list_ids,omitempty"` - // If set to `true` segments with an empty value of `parent_list_id` will be returned in the filter. If the value is not present it defaults to 'false'. - NoParentListId *bool `json:"no_parent_list_id,omitempty"` -} - -func (params *ListSegmentParam) SetIds(Ids []string) *ListSegmentParam { - params.Ids = &Ids - return params -} -func (params *ListSegmentParam) SetParentListIds(ParentListIds string) *ListSegmentParam { - params.ParentListIds = &ParentListIds - return params -} -func (params *ListSegmentParam) SetNoParentListId(NoParentListId bool) *ListSegmentParam { - params.NoParentListId = &NoParentListId - return params -} - -// **This endpoint allows you to retrieve a list of segments.** The query param `parent_list_ids` is treated as a filter. Any match will be returned. Zero matches will return a response code of 200 with an empty `results` array. `parent_list_ids` | `no_parent_list_id` | `ids` | `result` -----------------:|:--------------------:|:-------------:|:-------------: empty | false | empty | all segments values list_ids | false | empty | segments filtered by list_ids values list_ids |true | empty | segments filtered by list_ids and segments with no parent list_ids empty empty | true | empty | segments with no parent list_ids anything | anything | ids | segments with matching segment ids | -func (c *ApiService) ListSegment(params *ListSegmentParam) (interface{}, error) { - path := "/v3/marketing/segments" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Ids != nil { - for _, item := range *params.Ids { - v, err := json.Marshal(item) - - if err != nil { - return nil, err - } - - data.Add("ids", string(v)) - - } - } - if params != nil && params.ParentListIds != nil { - data.Set("parent_list_ids", *params.ParentListIds) - } - if params != nil && params.NoParentListId != nil { - data.Set("no_parent_list_id", fmt.Sprint(*params.NoParentListId)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListSegment200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ListSegment500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil -} diff --git a/rest/api/v3/mc_segments/api_service.go b/rest/api/v3/mc_segments/api_service.go deleted file mode 100644 index b3304ebe..00000000 --- a/rest/api/v3/mc_segments/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/mc_segments/docs/ContactResponse.md b/rest/api/v3/mc_segments/docs/ContactResponse.md deleted file mode 100644 index 0041ba2e..00000000 --- a/rest/api/v3/mc_segments/docs/ContactResponse.md +++ /dev/null @@ -1,27 +0,0 @@ -# ContactResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | ID assigned to a contact when added to the system. | -**Email** | **string** | Email of the contact. This is a reserved field. |[optional] -**PhoneNumberId** | **string** | The contact's Phone Number ID. This must be a valid phone number. |[optional] -**ExternalId** | **string** | The contact's External ID. |[optional] -**AnonymousId** | **string** | The contact's Anonymous ID. |[optional] -**AlternateEmails** | **[]string** | Alternate emails of the contact. This is a reserved field. | -**FirstName** | **string** | First name of the contact. This is a reserved field. | -**LastName** | **string** | Last name of the contact. This is a reserved field. | -**AddressLine1** | **string** | First line of address of the contact. This is a reserved field. | -**AddressLine2** | **string** | Second line of address of the contact. This is a reserved field. | -**City** | **string** | City associated with the contact. This is a reserved field. | -**StateProvinceRegion** | **string** | State associated with the contact. This is a reserved field. | -**PostalCode** | **int32** | Zipcode associated with the address of the contact. This is a reserved field. | -**Country** | **string** | Country associated with the address of the contact. This is a reserved field. | -**ListIds** | **[]string** | IDs of all lists the contact is part of |[optional] -**CustomFields** | [**ContactResponseCustomFields**](ContactResponseCustomFields.md) | | -**SegmentIds** | **[]string** | IDs of all segments the contact is part of |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/docs/ContactResponseCustomFields.md b/rest/api/v3/mc_segments/docs/ContactResponseCustomFields.md deleted file mode 100644 index 0fc838a2..00000000 --- a/rest/api/v3/mc_segments/docs/ContactResponseCustomFields.md +++ /dev/null @@ -1,12 +0,0 @@ -# ContactResponseCustomFields - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CustomFieldName1** | **string** | |[optional] -**CustomFieldName2** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/docs/DeleteSegment.md b/rest/api/v3/mc_segments/docs/DeleteSegment.md deleted file mode 100644 index 786d0f08..00000000 --- a/rest/api/v3/mc_segments/docs/DeleteSegment.md +++ /dev/null @@ -1,51 +0,0 @@ -# DeleteSegment - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteSegment**](DeleteSegment.md#DeleteSegment) | **Delete** /v3/marketing/segments/{SegmentId} | Delete Segment - - - -## DeleteSegment - -> map[string]interface{} DeleteSegment(ctx, SegmentId) - -Delete Segment - -**This endpoint allows you to delete a segment by `segment_id`.** Note that deleting a segment does not delete the contacts associated with the segment by default. Contacts associated with a deleted segment will remain in your list of all contacts and any other segments they belong to. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SegmentId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteSegmentParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_segments/docs/ErrorResponse.md b/rest/api/v3/mc_segments/docs/ErrorResponse.md deleted file mode 100644 index ec2d41f6..00000000 --- a/rest/api/v3/mc_segments/docs/ErrorResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] -**Id** | **string** | When applicable, this property value will be an error ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/docs/ErrorResponseErrorsInner.md b/rest/api/v3/mc_segments/docs/ErrorResponseErrorsInner.md deleted file mode 100644 index 5449c685..00000000 --- a/rest/api/v3/mc_segments/docs/ErrorResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | An error message. |[optional] -**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] -**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/docs/FullSegment.md b/rest/api/v3/mc_segments/docs/FullSegment.md deleted file mode 100644 index f0eb54e4..00000000 --- a/rest/api/v3/mc_segments/docs/FullSegment.md +++ /dev/null @@ -1,22 +0,0 @@ -# FullSegment - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | -**ContactsCount** | **int32** | | -**CreatedAt** | [**time.Time**](time.Time.md) | ISO8601 of created timestamp | -**Name** | **string** | Name of the segment. | -**ParentListId** | **string** | The id of the list if this segment is a child of a list. This implies the query `AND CONTAINS(list_ids, ${parent_list_id})` |[optional] -**SampleUpdatedAt** | [**time.Time**](time.Time.md) | ISO8601 timestamp the sample was last updated | -**UpdatedAt** | [**time.Time**](time.Time.md) | ISO8601 timestamp the object was last updated | -**NextSampleUpdate** | **string** | ISO8601 string that is equal to `sample_updated_at` plus an internally calculated offset that depends on how often contacts enter or exit segments as the scheduled pipeline updates the samples. |[optional] -**ContactsSample** | [**[]ContactResponse**](ContactResponse.md) | | -**QueryJson** | **map[string]interface{}** | AST representation of the query DSL |[optional] -**ParentListIds** | **[]string** | The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future |[optional] -**QueryDsl** | **string** | SQL query which will filter contacts based on the conditions provided | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/docs/GetSegment.md b/rest/api/v3/mc_segments/docs/GetSegment.md deleted file mode 100644 index c735c438..00000000 --- a/rest/api/v3/mc_segments/docs/GetSegment.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetSegment - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetSegment**](GetSegment.md#GetSegment) | **Get** /v3/marketing/segments/{SegmentId} | Get Segment by ID - - - -## GetSegment - -> FullSegment GetSegment(ctx, SegmentIdoptional) - -Get Segment by ID - -**This endpoint allows you to retrieve a single segment by ID.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SegmentId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a GetSegmentParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**QueryJson** | **bool** | Defaults to `false`. Set to `true` to return the parsed SQL AST as a JSON object in the field `query_json` - -### Return type - -[**FullSegment**](FullSegment.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_segments/docs/GetSegment404Response.md b/rest/api/v3/mc_segments/docs/GetSegment404Response.md deleted file mode 100644 index 1f7701d9..00000000 --- a/rest/api/v3/mc_segments/docs/GetSegment404Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSegment404Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]GetSegment404ResponseErrorsInner**](GetSegment404ResponseErrorsInner.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/docs/GetSegment404ResponseErrorsInner.md b/rest/api/v3/mc_segments/docs/GetSegment404ResponseErrorsInner.md deleted file mode 100644 index 77220d8b..00000000 --- a/rest/api/v3/mc_segments/docs/GetSegment404ResponseErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetSegment404ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | | -**Field** | **string** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/docs/ListSegment.md b/rest/api/v3/mc_segments/docs/ListSegment.md deleted file mode 100644 index 21a8bd88..00000000 --- a/rest/api/v3/mc_segments/docs/ListSegment.md +++ /dev/null @@ -1,50 +0,0 @@ -# ListSegment - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSegment**](ListSegment.md#ListSegment) | **Get** /v3/marketing/segments | Get List of Segments - - - -## ListSegment - -> ListSegment200Response ListSegment(ctx, optional) - -Get List of Segments - -**This endpoint allows you to retrieve a list of segments.** The query param `parent_list_ids` is treated as a filter. Any match will be returned. Zero matches will return a response code of 200 with an empty `results` array. `parent_list_ids` | `no_parent_list_id` | `ids` | `result` -----------------:|:--------------------:|:-------------:|:-------------: empty | false | empty | all segments values list_ids | false | empty | segments filtered by list_ids values list_ids |true | empty | segments filtered by list_ids and segments with no parent list_ids empty empty | true | empty | segments with no parent list_ids anything | anything | ids | segments with matching segment ids | - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSegmentParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Ids** | **[]string** | A list of segment IDs to retrieve. When this parameter is included, the `no_parent_list_ids` and `parent_list_ids` parameters are ignored and only segments with given IDs are returned. -**ParentListIds** | **string** | A comma separated list of list ids to be used when searching for segments with the specified parent_list_id, no more than 50 is allowed -**NoParentListId** | **bool** | If set to `true` segments with an empty value of `parent_list_id` will be returned in the filter. If the value is not present it defaults to 'false'. - -### Return type - -[**ListSegment200Response**](ListSegment200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_segments/docs/ListSegment200Response.md b/rest/api/v3/mc_segments/docs/ListSegment200Response.md deleted file mode 100644 index a943da3b..00000000 --- a/rest/api/v3/mc_segments/docs/ListSegment200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListSegment200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Results** | [**[]SegmentSummary**](SegmentSummary.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/docs/ListSegment500Response.md b/rest/api/v3/mc_segments/docs/ListSegment500Response.md deleted file mode 100644 index 169e9d8c..00000000 --- a/rest/api/v3/mc_segments/docs/ListSegment500Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListSegment500Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ListSegment500ResponseErrorsInner**](ListSegment500ResponseErrorsInner.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/docs/ListSegment500ResponseErrorsInner.md b/rest/api/v3/mc_segments/docs/ListSegment500ResponseErrorsInner.md deleted file mode 100644 index ecd184d9..00000000 --- a/rest/api/v3/mc_segments/docs/ListSegment500ResponseErrorsInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListSegment500ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/docs/SegmentSummary.md b/rest/api/v3/mc_segments/docs/SegmentSummary.md deleted file mode 100644 index 64484678..00000000 --- a/rest/api/v3/mc_segments/docs/SegmentSummary.md +++ /dev/null @@ -1,18 +0,0 @@ -# SegmentSummary - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | -**ContactsCount** | **int32** | | -**CreatedAt** | [**time.Time**](time.Time.md) | ISO8601 of created timestamp | -**Name** | **string** | |[optional] -**ParentListId** | **string** | The id of the list if this segment is a child of a list. This implies the query `AND CONTAINS(list_ids, ${parent_list_id})` |[optional] -**SampleUpdatedAt** | [**time.Time**](time.Time.md) | ISO8601 timestamp the sample was last updated | -**UpdatedAt** | [**time.Time**](time.Time.md) | ISO8601 timestamp the object was last updated | -**NextSampleUpdate** | **string** | ISO8601 string that is equal to `sample_updated_at` plus an internally calculated offset that depends on how often contacts enter or exit segments as the scheduled pipeline updates the samples. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/docs/SegmentWriteV2.md b/rest/api/v3/mc_segments/docs/SegmentWriteV2.md deleted file mode 100644 index 25cdc2d6..00000000 --- a/rest/api/v3/mc_segments/docs/SegmentWriteV2.md +++ /dev/null @@ -1,13 +0,0 @@ -# SegmentWriteV2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Name of the segment. | -**ParentListIds** | **[]string** | The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future |[optional] -**QueryDsl** | **string** | SQL query which will filter contacts based on the conditions provided | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/model_contact_response.go b/rest/api/v3/mc_segments/model_contact_response.go deleted file mode 100644 index 6977993a..00000000 --- a/rest/api/v3/mc_segments/model_contact_response.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactResponse struct for ContactResponse -type ContactResponse struct { - // ID assigned to a contact when added to the system. - Id string `json:"id"` - // Email of the contact. This is a reserved field. - Email *string `json:"email,omitempty"` - // The contact's Phone Number ID. This must be a valid phone number. - PhoneNumberId *string `json:"phone_number_id,omitempty"` - // The contact's External ID. - ExternalId *string `json:"external_id,omitempty"` - // The contact's Anonymous ID. - AnonymousId *string `json:"anonymous_id,omitempty"` - // Alternate emails of the contact. This is a reserved field. - AlternateEmails []string `json:"alternate_emails"` - // First name of the contact. This is a reserved field. - FirstName string `json:"first_name"` - // Last name of the contact. This is a reserved field. - LastName string `json:"last_name"` - // First line of address of the contact. This is a reserved field. - AddressLine1 string `json:"address_line_1"` - // Second line of address of the contact. This is a reserved field. - AddressLine2 string `json:"address_line_2"` - // City associated with the contact. This is a reserved field. - City string `json:"city"` - // State associated with the contact. This is a reserved field. - StateProvinceRegion string `json:"state_province_region"` - // Zipcode associated with the address of the contact. This is a reserved field. - PostalCode int32 `json:"postal_code"` - // Country associated with the address of the contact. This is a reserved field. - Country string `json:"country"` - // IDs of all lists the contact is part of - ListIds *[]string `json:"list_ids,omitempty"` - CustomFields ContactResponseCustomFields `json:"custom_fields"` - // IDs of all segments the contact is part of - SegmentIds *[]string `json:"segment_ids,omitempty"` -} diff --git a/rest/api/v3/mc_segments/model_contact_response_custom_fields.go b/rest/api/v3/mc_segments/model_contact_response_custom_fields.go deleted file mode 100644 index 2a736fc7..00000000 --- a/rest/api/v3/mc_segments/model_contact_response_custom_fields.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactResponseCustomFields The user may choose to create up to 120 custom fields or none at all. This is not a reserved field. -type ContactResponseCustomFields struct { - CustomFieldName1 *string `json:"custom_field_name1,omitempty"` - CustomFieldName2 *string `json:"custom_field_name2,omitempty"` -} diff --git a/rest/api/v3/mc_segments/model_error_response.go b/rest/api/v3/mc_segments/model_error_response.go deleted file mode 100644 index e178f466..00000000 --- a/rest/api/v3/mc_segments/model_error_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` - // When applicable, this property value will be an error ID. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/mc_segments/model_error_response_errors_inner.go b/rest/api/v3/mc_segments/model_error_response_errors_inner.go deleted file mode 100644 index b41f116b..00000000 --- a/rest/api/v3/mc_segments/model_error_response_errors_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner -type ErrorResponseErrorsInner struct { - // An error message. - Message *string `json:"message,omitempty"` - // When applicable, this property value will be the field that generated the error. - Field *string `json:"field,omitempty"` - // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. - Help *map[string]interface{} `json:"help,omitempty"` -} diff --git a/rest/api/v3/mc_segments/model_full_segment.go b/rest/api/v3/mc_segments/model_full_segment.go deleted file mode 100644 index f365e55c..00000000 --- a/rest/api/v3/mc_segments/model_full_segment.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "time" -) - -// FullSegment struct for FullSegment -type FullSegment struct { - Id string `json:"id"` - ContactsCount int32 `json:"contacts_count"` - // ISO8601 of created timestamp - CreatedAt time.Time `json:"created_at"` - // Name of the segment. - Name string `json:"name"` - // The id of the list if this segment is a child of a list. This implies the query `AND CONTAINS(list_ids, ${parent_list_id})` - ParentListId *string `json:"parent_list_id,omitempty"` - // ISO8601 timestamp the sample was last updated - SampleUpdatedAt time.Time `json:"sample_updated_at"` - // ISO8601 timestamp the object was last updated - UpdatedAt time.Time `json:"updated_at"` - // ISO8601 string that is equal to `sample_updated_at` plus an internally calculated offset that depends on how often contacts enter or exit segments as the scheduled pipeline updates the samples. - NextSampleUpdate *string `json:"next_sample_update,omitempty"` - ContactsSample []ContactResponse `json:"contacts_sample"` - // AST representation of the query DSL - QueryJson *map[string]interface{} `json:"query_json,omitempty"` - // The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future - ParentListIds *[]string `json:"parent_list_ids,omitempty"` - // SQL query which will filter contacts based on the conditions provided - QueryDsl string `json:"query_dsl"` -} diff --git a/rest/api/v3/mc_segments/model_get_segment_404_response.go b/rest/api/v3/mc_segments/model_get_segment_404_response.go deleted file mode 100644 index b6987ee5..00000000 --- a/rest/api/v3/mc_segments/model_get_segment_404_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetSegment404Response struct for GetSegment404Response -type GetSegment404Response struct { - Errors []GetSegment404ResponseErrorsInner `json:"errors"` -} diff --git a/rest/api/v3/mc_segments/model_get_segment_404_response_errors_inner.go b/rest/api/v3/mc_segments/model_get_segment_404_response_errors_inner.go deleted file mode 100644 index 97445b5f..00000000 --- a/rest/api/v3/mc_segments/model_get_segment_404_response_errors_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetSegment404ResponseErrorsInner struct for GetSegment404ResponseErrorsInner -type GetSegment404ResponseErrorsInner struct { - Message string `json:"message"` - Field string `json:"field"` -} diff --git a/rest/api/v3/mc_segments/model_list_segment_200_response.go b/rest/api/v3/mc_segments/model_list_segment_200_response.go deleted file mode 100644 index 44c6533a..00000000 --- a/rest/api/v3/mc_segments/model_list_segment_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSegment200Response struct for ListSegment200Response -type ListSegment200Response struct { - Results []SegmentSummary `json:"results"` -} diff --git a/rest/api/v3/mc_segments/model_list_segment_500_response.go b/rest/api/v3/mc_segments/model_list_segment_500_response.go deleted file mode 100644 index 38b58e34..00000000 --- a/rest/api/v3/mc_segments/model_list_segment_500_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSegment500Response struct for ListSegment500Response -type ListSegment500Response struct { - Errors []ListSegment500ResponseErrorsInner `json:"errors"` -} diff --git a/rest/api/v3/mc_segments/model_list_segment_500_response_errors_inner.go b/rest/api/v3/mc_segments/model_list_segment_500_response_errors_inner.go deleted file mode 100644 index 37a40fb1..00000000 --- a/rest/api/v3/mc_segments/model_list_segment_500_response_errors_inner.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSegment500ResponseErrorsInner struct for ListSegment500ResponseErrorsInner -type ListSegment500ResponseErrorsInner struct { - Message string `json:"message"` -} diff --git a/rest/api/v3/mc_segments/model_segment_summary.go b/rest/api/v3/mc_segments/model_segment_summary.go deleted file mode 100644 index c54aa9da..00000000 --- a/rest/api/v3/mc_segments/model_segment_summary.go +++ /dev/null @@ -1,35 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "time" -) - -// SegmentSummary struct for SegmentSummary -type SegmentSummary struct { - Id string `json:"id"` - ContactsCount int32 `json:"contacts_count"` - // ISO8601 of created timestamp - CreatedAt time.Time `json:"created_at"` - Name *string `json:"name,omitempty"` - // The id of the list if this segment is a child of a list. This implies the query `AND CONTAINS(list_ids, ${parent_list_id})` - ParentListId *string `json:"parent_list_id,omitempty"` - // ISO8601 timestamp the sample was last updated - SampleUpdatedAt time.Time `json:"sample_updated_at"` - // ISO8601 timestamp the object was last updated - UpdatedAt time.Time `json:"updated_at"` - // ISO8601 string that is equal to `sample_updated_at` plus an internally calculated offset that depends on how often contacts enter or exit segments as the scheduled pipeline updates the samples. - NextSampleUpdate *string `json:"next_sample_update,omitempty"` -} diff --git a/rest/api/v3/mc_segments/model_segment_write_v2.go b/rest/api/v3/mc_segments/model_segment_write_v2.go deleted file mode 100644 index 04aa8f81..00000000 --- a/rest/api/v3/mc_segments/model_segment_write_v2.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SegmentWriteV2 struct for SegmentWriteV2 -type SegmentWriteV2 struct { - // Name of the segment. - Name string `json:"name"` - // The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future - ParentListIds *[]string `json:"parent_list_ids,omitempty"` - // SQL query which will filter contacts based on the conditions provided - QueryDsl string `json:"query_dsl"` -} diff --git a/rest/api/v3/mc_segments_2/README.md b/rest/api/v3/mc_segments_2/README.md index a4abdf89..d62047d4 100644 --- a/rest/api/v3/mc_segments_2/README.md +++ b/rest/api/v3/mc_segments_2/README.md @@ -17,7 +17,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:02.151058+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.295022+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/mc_segments_2/api_service.go b/rest/api/v3/mc_segments_2/api_service.go index 6eb18a06..83115d97 100644 --- a/rest/api/v3/mc_segments_2/api_service.go +++ b/rest/api/v3/mc_segments_2/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/mc_senders/README.md b/rest/api/v3/mc_senders/README.md index 716cda89..3f05f452 100644 --- a/rest/api/v3/mc_senders/README.md +++ b/rest/api/v3/mc_senders/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:02.193378+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.282058+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/mc_senders/api_service.go b/rest/api/v3/mc_senders/api_service.go index d8fd91ab..cb523076 100644 --- a/rest/api/v3/mc_senders/api_service.go +++ b/rest/api/v3/mc_senders/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/mc_singlesends/README.md b/rest/api/v3/mc_singlesends/README.md index c6ab60e7..207581fe 100644 --- a/rest/api/v3/mc_singlesends/README.md +++ b/rest/api/v3/mc_singlesends/README.md @@ -13,7 +13,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:02.231486+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.371975+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/mc_singlesends/api_service.go b/rest/api/v3/mc_singlesends/api_service.go index dbf3b326..7fb4e965 100644 --- a/rest/api/v3/mc_singlesends/api_service.go +++ b/rest/api/v3/mc_singlesends/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/mc_stats/README.md b/rest/api/v3/mc_stats/README.md index bf3ec742..6b84b9d3 100644 --- a/rest/api/v3/mc_stats/README.md +++ b/rest/api/v3/mc_stats/README.md @@ -9,7 +9,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:02.236131+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.380125+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/mc_stats/api_service.go b/rest/api/v3/mc_stats/api_service.go index 913b3580..f5f00173 100644 --- a/rest/api/v3/mc_stats/api_service.go +++ b/rest/api/v3/mc_stats/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/mc_test/README.md b/rest/api/v3/mc_test/README.md index 2bf6a68d..53746b22 100644 --- a/rest/api/v3/mc_test/README.md +++ b/rest/api/v3/mc_test/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:02.229382+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.401517+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/mc_test/api_service.go b/rest/api/v3/mc_test/api_service.go index 352104a5..256a2a03 100644 --- a/rest/api/v3/mc_test/api_service.go +++ b/rest/api/v3/mc_test/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/partner/README.md b/rest/api/v3/partner/README.md index 2de743a8..8a8ed1d2 100644 --- a/rest/api/v3/partner/README.md +++ b/rest/api/v3/partner/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:02.288735+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.403736+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/partner/api_service.go b/rest/api/v3/partner/api_service.go index f4bf0ab0..cf4eed5d 100644 --- a/rest/api/v3/partner/api_service.go +++ b/rest/api/v3/partner/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/recipients_data_erasure/README.md b/rest/api/v3/recipients_data_erasure/README.md index 79de6829..a200a8d9 100644 --- a/rest/api/v3/recipients_data_erasure/README.md +++ b/rest/api/v3/recipients_data_erasure/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:02.362527+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.411312+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/recipients_data_erasure/api_service.go b/rest/api/v3/recipients_data_erasure/api_service.go index b823caa4..3ece5663 100644 --- a/rest/api/v3/recipients_data_erasure/api_service.go +++ b/rest/api/v3/recipients_data_erasure/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/reverse_dns/README.md b/rest/api/v3/reverse_dns/README.md index d3767ab4..a4c90bd4 100644 --- a/rest/api/v3/reverse_dns/README.md +++ b/rest/api/v3/reverse_dns/README.md @@ -15,7 +15,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:02.347891+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.445684+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/reverse_dns/api_service.go b/rest/api/v3/reverse_dns/api_service.go index 6e1bfe2b..551c93bf 100644 --- a/rest/api/v3/reverse_dns/api_service.go +++ b/rest/api/v3/reverse_dns/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/scheduled_sends/README.md b/rest/api/v3/scheduled_sends/README.md index 8c2cd905..6dcfcb72 100644 --- a/rest/api/v3/scheduled_sends/README.md +++ b/rest/api/v3/scheduled_sends/README.md @@ -17,7 +17,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:02.346578+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.476491+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/scheduled_sends/api_service.go b/rest/api/v3/scheduled_sends/api_service.go index e86bc8be..ba8388ce 100644 --- a/rest/api/v3/scheduled_sends/api_service.go +++ b/rest/api/v3/scheduled_sends/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/scopes/README.md b/rest/api/v3/scopes/README.md index f7d951c0..03fafaba 100644 --- a/rest/api/v3/scopes/README.md +++ b/rest/api/v3/scopes/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:02.375456+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.473575+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/scopes/api_service.go b/rest/api/v3/scopes/api_service.go index bc846141..4a989209 100644 --- a/rest/api/v3/scopes/api_service.go +++ b/rest/api/v3/scopes/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/seq/README.md b/rest/api/v3/seq/README.md index 0f4e4cb4..86419826 100644 --- a/rest/api/v3/seq/README.md +++ b/rest/api/v3/seq/README.md @@ -13,7 +13,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:02.378456+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.514132+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/seq/api_service.go b/rest/api/v3/seq/api_service.go index 5a7df229..b8ba0bc4 100644 --- a/rest/api/v3/seq/api_service.go +++ b/rest/api/v3/seq/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/sso/README.md b/rest/api/v3/sso/README.md index f754ac08..344472aa 100644 --- a/rest/api/v3/sso/README.md +++ b/rest/api/v3/sso/README.md @@ -13,7 +13,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:02.408909+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.526067+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/sso/api_service.go b/rest/api/v3/sso/api_service.go index 1564dab4..5057a0d3 100644 --- a/rest/api/v3/sso/api_service.go +++ b/rest/api/v3/sso/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/stats/README.md b/rest/api/v3/stats/README.md index cbe90f58..8f1d6b3f 100644 --- a/rest/api/v3/stats/README.md +++ b/rest/api/v3/stats/README.md @@ -15,7 +15,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:02.483887+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.534542+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/stats/api_service.go b/rest/api/v3/stats/api_service.go index 29d8f9f5..17b1d087 100644 --- a/rest/api/v3/stats/api_service.go +++ b/rest/api/v3/stats/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/subusers/README.md b/rest/api/v3/subusers/README.md index 69ea0a1d..fc0069d9 100644 --- a/rest/api/v3/subusers/README.md +++ b/rest/api/v3/subusers/README.md @@ -9,7 +9,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:02.509910+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.551574+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/subusers/api_service.go b/rest/api/v3/subusers/api_service.go index 7169b7eb..f16a63b0 100644 --- a/rest/api/v3/subusers/api_service.go +++ b/rest/api/v3/subusers/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/teammates/README.md b/rest/api/v3/teammates/README.md deleted file mode 100644 index 8fc932cd..00000000 --- a/rest/api/v3/teammates/README.md +++ /dev/null @@ -1,89 +0,0 @@ -# Go API client for - -The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T18:29:02.490087+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DeletePendingTeammate* | [**DeletePendingTeammate**](docs/DeletePendingTeammate.md#deletependingteammate) | **Delete** /v3/teammates/pending/{Token} | Delete pending teammate -*DeleteTeammate* | [**DeleteTeammate**](docs/DeleteTeammate.md#deleteteammate) | **Delete** /v3/teammates/{Username} | Delete teammate -*GetTeammate* | [**GetTeammate**](docs/GetTeammate.md#getteammate) | **Get** /v3/teammates/{Username} | Retrieve specific teammate -*InviteTeammate* | [**InviteTeammate**](docs/InviteTeammate.md#inviteteammate) | **Post** /v3/teammates | Invite teammate -*ListPendingTeammate* | [**ListPendingTeammate**](docs/ListPendingTeammate.md#listpendingteammate) | **Get** /v3/teammates/pending | Retrieve all pending teammates -*ListSubuserByTemplate* | [**ListSubuserByTemplate**](docs/ListSubuserByTemplate.md#listsubuserbytemplate) | **Get** /v3/teammates/{TeammateName}/subuser_access | Get Teammate Subuser Access -*ListTeammate* | [**ListTeammate**](docs/ListTeammate.md#listteammate) | **Get** /v3/teammates | Retrieve all teammates -*ResendTeammateInvite* | [**ResendTeammateInvite**](docs/ResendTeammateInvite.md#resendteammateinvite) | **Post** /v3/teammates/pending/{Token}/resend | Resend teammate invite -*UpdateTeammate* | [**UpdateTeammate**](docs/UpdateTeammate.md#updateteammate) | **Patch** /v3/teammates/{Username} | Update teammate's permissions - - -## Documentation For Models - - - [GetTeammate200Response](GetTeammate200Response.md) - - [InviteTeammate201Response](InviteTeammate201Response.md) - - [InviteTeammate400Response](InviteTeammate400Response.md) - - [InviteTeammate400ResponseErrorsInner](InviteTeammate400ResponseErrorsInner.md) - - [InviteTeammateRequest](InviteTeammateRequest.md) - - [ListPendingTeammate200Response](ListPendingTeammate200Response.md) - - [ListPendingTeammate200ResponseResultInner](ListPendingTeammate200ResponseResultInner.md) - - [ListSubuserByTemplate200Response](ListSubuserByTemplate200Response.md) - - [ListSubuserByTemplate200ResponseMetadata](ListSubuserByTemplate200ResponseMetadata.md) - - [ListSubuserByTemplate200ResponseMetadataNextParams](ListSubuserByTemplate200ResponseMetadataNextParams.md) - - [ListSubuserByTemplate200ResponseSubuserAccessInner](ListSubuserByTemplate200ResponseSubuserAccessInner.md) - - [ListSubuserByTemplate400Response](ListSubuserByTemplate400Response.md) - - [ListSubuserByTemplate400ResponseErrorsInner](ListSubuserByTemplate400ResponseErrorsInner.md) - - [ListTeammate200Response](ListTeammate200Response.md) - - [ListTeammate200ResponseResultInner](ListTeammate200ResponseResultInner.md) - - [PermissionType](PermissionType.md) - - [ResendTeammateInvite200Response](ResendTeammateInvite200Response.md) - - [UpdateTeammate200Response](UpdateTeammate200Response.md) - - [UpdateTeammateRequest](UpdateTeammateRequest.md) - - [UserType](UserType.md) - - [UserType1](UserType1.md) - - [UserType2](UserType2.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/teammates/api_delete_pending_teammate.go b/rest/api/v3/teammates/api_delete_pending_teammate.go deleted file mode 100644 index 0bb4e0dd..00000000 --- a/rest/api/v3/teammates/api_delete_pending_teammate.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeletePendingTeammateParam struct { - // The token for the invite you want to delete. - Token *string `json:"token"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeletePendingTeammateParam) SetToken(Token string) *DeletePendingTeammateParam { - params.Token = &Token - return params -} -func (params *DeletePendingTeammateParam) SetOnbehalfof(Onbehalfof string) *DeletePendingTeammateParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to delete a pending teammate invite.** -func (c *ApiService) DeletePendingTeammate(params *DeletePendingTeammateParam) (interface{}, error) { - path := "/v3/teammates/pending/{Token}" - if params != nil && params.Token != nil { - path = strings.Replace(path, "{"+"Token"+"}", *params.Token, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 404 { - ps := &InviteTeammate400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil -} diff --git a/rest/api/v3/teammates/api_delete_teammate.go b/rest/api/v3/teammates/api_delete_teammate.go deleted file mode 100644 index 16e08595..00000000 --- a/rest/api/v3/teammates/api_delete_teammate.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteTeammateParam struct { - // The username of the teammate that you want to retrieve. - Username *string `json:"username"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteTeammateParam) SetUsername(Username string) *DeleteTeammateParam { - params.Username = &Username - return params -} -func (params *DeleteTeammateParam) SetOnbehalfof(Onbehalfof string) *DeleteTeammateParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to delete a teammate.** **Only the parent user or an admin teammate can delete another teammate.** -func (c *ApiService) DeleteTeammate(params *DeleteTeammateParam) (interface{}, error) { - path := "/v3/teammates/{Username}" - if params != nil && params.Username != nil { - path = strings.Replace(path, "{"+"Username"+"}", *params.Username, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 404 { - ps := &InviteTeammate400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil -} diff --git a/rest/api/v3/teammates/api_get_teammate.go b/rest/api/v3/teammates/api_get_teammate.go deleted file mode 100644 index c80fb7ae..00000000 --- a/rest/api/v3/teammates/api_get_teammate.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetTeammateParam struct { - // The username of the teammate that you want to retrieve. - Username *string `json:"username"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetTeammateParam) SetUsername(Username string) *GetTeammateParam { - params.Username = &Username - return params -} -func (params *GetTeammateParam) SetOnbehalfof(Onbehalfof string) *GetTeammateParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a specific Teammate by username.** You can retrieve the username's for each of your Teammates using the \"Retrieve all Teammates\" endpoint. -func (c *ApiService) GetTeammate(params *GetTeammateParam) (interface{}, error) { - path := "/v3/teammates/{Username}" - if params != nil && params.Username != nil { - path = strings.Replace(path, "{"+"Username"+"}", *params.Username, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GetTeammate200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil -} diff --git a/rest/api/v3/teammates/api_invite_teammate.go b/rest/api/v3/teammates/api_invite_teammate.go deleted file mode 100644 index 90b19902..00000000 --- a/rest/api/v3/teammates/api_invite_teammate.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type InviteTeammateParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - InviteTeammateRequest *InviteTeammateRequest `json:"InviteTeammateRequest,omitempty"` -} - -func (params *InviteTeammateParam) SetOnbehalfof(Onbehalfof string) *InviteTeammateParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *InviteTeammateParam) SetInviteTeammateRequest(InviteTeammateRequest InviteTeammateRequest) *InviteTeammateParam { - params.InviteTeammateRequest = &InviteTeammateRequest - return params -} - -// **This endpoint allows you to invite a Teammate to your account via email.** You can set a Teammate's initial permissions using the `scopes` array in the request body. Teammate's will receive a minimum set of scopes from Twilio SendGrid that are necessary for the Teammate to function. **Note:** A teammate invite will expire after 7 days, but you may resend the invitation at any time to reset the expiration date. -func (c *ApiService) InviteTeammate(params *InviteTeammateParam) (interface{}, error) { - path := "/v3/teammates" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.InviteTeammateRequest != nil { - b, err := json.Marshal(*params.InviteTeammateRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &InviteTeammate201Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &InviteTeammate400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil -} diff --git a/rest/api/v3/teammates/api_list_pending_teammate.go b/rest/api/v3/teammates/api_list_pending_teammate.go deleted file mode 100644 index 2fefdcea..00000000 --- a/rest/api/v3/teammates/api_list_pending_teammate.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListPendingTeammateParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListPendingTeammateParam) SetOnbehalfof(Onbehalfof string) *ListPendingTeammateParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a list of all pending Teammate invitations.** Each teammate invitation is valid for 7 days. Users may resend the invitation to refresh the expiration date. -func (c *ApiService) ListPendingTeammate(params *ListPendingTeammateParam) (interface{}, error) { - path := "/v3/teammates/pending" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListPendingTeammate200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil -} diff --git a/rest/api/v3/teammates/api_list_subuser_by_template.go b/rest/api/v3/teammates/api_list_subuser_by_template.go deleted file mode 100644 index fcd7c60f..00000000 --- a/rest/api/v3/teammates/api_list_subuser_by_template.go +++ /dev/null @@ -1,122 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type ListSubuserByTemplateParam struct { - // The username of the Teammate for whom you want to retrieve Subuser access information. - TeammateName *string `json:"teammate_name"` - // The Subuser ID from which the API request will begin retrieving Subusers. This query parameter can be used in successive API calls to retrieve additional Subusers. - AfterSubuserId *int32 `json:"after_subuser_id,omitempty"` - // Limit the number of Subusers to be returned. The default `limit` is `100` per request. - Limit *int32 `json:"limit,omitempty"` - // A Subuser's username that will be used to filter the returned result. - Username *string `json:"username,omitempty"` -} - -func (params *ListSubuserByTemplateParam) SetTeammateName(TeammateName string) *ListSubuserByTemplateParam { - params.TeammateName = &TeammateName - return params -} -func (params *ListSubuserByTemplateParam) SetAfterSubuserId(AfterSubuserId int32) *ListSubuserByTemplateParam { - params.AfterSubuserId = &AfterSubuserId - return params -} -func (params *ListSubuserByTemplateParam) SetLimit(Limit int32) *ListSubuserByTemplateParam { - params.Limit = &Limit - return params -} -func (params *ListSubuserByTemplateParam) SetUsername(Username string) *ListSubuserByTemplateParam { - params.Username = &Username - return params -} - -// **This operation allows you to retrieve the Subusers that can be accessed by a specified Teammate.** This operation will return the Subusers available to a Teammate, including the scopes available. If the Teammate is an administrator, all Subusers will be returned. -func (c *ApiService) ListSubuserByTemplate(params *ListSubuserByTemplateParam) (interface{}, error) { - path := "/v3/teammates/{TeammateName}/subuser_access" - if params != nil && params.TeammateName != nil { - path = strings.Replace(path, "{"+"TeammateName"+"}", *params.TeammateName, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.AfterSubuserId != nil { - data.Set("after_subuser_id", fmt.Sprint(*params.AfterSubuserId)) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Username != nil { - data.Set("username", *params.Username) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListSubuserByTemplate200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ListSubuserByTemplate400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ListSubuserByTemplate400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ListSubuserByTemplate400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ListSubuserByTemplate400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil -} diff --git a/rest/api/v3/teammates/api_list_teammate.go b/rest/api/v3/teammates/api_list_teammate.go deleted file mode 100644 index 32d03d2b..00000000 --- a/rest/api/v3/teammates/api_list_teammate.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListTeammateParam struct { - // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. - Limit *int32 `json:"limit,omitempty"` - // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. - Offset *int32 `json:"offset,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListTeammateParam) SetLimit(Limit int32) *ListTeammateParam { - params.Limit = &Limit - return params -} -func (params *ListTeammateParam) SetOffset(Offset int32) *ListTeammateParam { - params.Offset = &Offset - return params -} -func (params *ListTeammateParam) SetOnbehalfof(Onbehalfof string) *ListTeammateParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a paginated list of all current Teammates.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. -func (c *ApiService) ListTeammate(params *ListTeammateParam) (interface{}, error) { - path := "/v3/teammates" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListTeammate200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil -} diff --git a/rest/api/v3/teammates/api_resend_teammate_invite.go b/rest/api/v3/teammates/api_resend_teammate_invite.go deleted file mode 100644 index fc8e2137..00000000 --- a/rest/api/v3/teammates/api_resend_teammate_invite.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type ResendTeammateInviteParam struct { - // The token for the invite that you want to resend. - Token *string `json:"token"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ResendTeammateInviteParam) SetToken(Token string) *ResendTeammateInviteParam { - params.Token = &Token - return params -} -func (params *ResendTeammateInviteParam) SetOnbehalfof(Onbehalfof string) *ResendTeammateInviteParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to resend a Teammate invitation.** Teammate invitations will expire after 7 days. Resending an invitation will reset the expiration date. -func (c *ApiService) ResendTeammateInvite(params *ResendTeammateInviteParam) (interface{}, error) { - path := "/v3/teammates/pending/{Token}/resend" - if params != nil && params.Token != nil { - path = strings.Replace(path, "{"+"Token"+"}", *params.Token, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ResendTeammateInvite200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &InviteTeammate400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil -} diff --git a/rest/api/v3/teammates/api_service.go b/rest/api/v3/teammates/api_service.go deleted file mode 100644 index 9ffc80f5..00000000 --- a/rest/api/v3/teammates/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/teammates/api_update_teammate.go b/rest/api/v3/teammates/api_update_teammate.go deleted file mode 100644 index e3146553..00000000 --- a/rest/api/v3/teammates/api_update_teammate.go +++ /dev/null @@ -1,101 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateTeammateParam struct { - // The username of the teammate that you want to retrieve. - Username *string `json:"username"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UpdateTeammateRequest *UpdateTeammateRequest `json:"UpdateTeammateRequest,omitempty"` -} - -func (params *UpdateTeammateParam) SetUsername(Username string) *UpdateTeammateParam { - params.Username = &Username - return params -} -func (params *UpdateTeammateParam) SetOnbehalfof(Onbehalfof string) *UpdateTeammateParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateTeammateParam) SetUpdateTeammateRequest(UpdateTeammateRequest UpdateTeammateRequest) *UpdateTeammateParam { - params.UpdateTeammateRequest = &UpdateTeammateRequest - return params -} - -// **This endpoint allows you to update a teammate’s permissions.** To turn a teammate into an admin, the request body should contain an `is_admin` set to `true`. Otherwise, set `is_admin` to `false` and pass in all the scopes that a teammate should have. **Only the parent user or other admin teammates can update another teammate’s permissions.** **Admin users can only update permissions.** -func (c *ApiService) UpdateTeammate(params *UpdateTeammateParam) (interface{}, error) { - path := "/v3/teammates/{Username}" - if params != nil && params.Username != nil { - path = strings.Replace(path, "{"+"Username"+"}", *params.Username, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateTeammateRequest != nil { - b, err := json.Marshal(*params.UpdateTeammateRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &UpdateTeammate200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &InviteTeammate400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &InviteTeammate400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil -} diff --git a/rest/api/v3/teammates/docs/DeletePendingTeammate.md b/rest/api/v3/teammates/docs/DeletePendingTeammate.md deleted file mode 100644 index c2dfe25e..00000000 --- a/rest/api/v3/teammates/docs/DeletePendingTeammate.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeletePendingTeammate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeletePendingTeammate**](DeletePendingTeammate.md#DeletePendingTeammate) | **Delete** /v3/teammates/pending/{Token} | Delete pending teammate - - - -## DeletePendingTeammate - -> DeletePendingTeammate(ctx, Tokenoptional) - -Delete pending teammate - -**This endpoint allows you to delete a pending teammate invite.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Token** | **string** | The token for the invite you want to delete. - -### Other Parameters - -Other parameters are passed through a pointer to a DeletePendingTeammateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/teammates/docs/DeleteTeammate.md b/rest/api/v3/teammates/docs/DeleteTeammate.md deleted file mode 100644 index 49d1d4d4..00000000 --- a/rest/api/v3/teammates/docs/DeleteTeammate.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteTeammate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteTeammate**](DeleteTeammate.md#DeleteTeammate) | **Delete** /v3/teammates/{Username} | Delete teammate - - - -## DeleteTeammate - -> DeleteTeammate(ctx, Usernameoptional) - -Delete teammate - -**This endpoint allows you to delete a teammate.** **Only the parent user or an admin teammate can delete another teammate.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Username** | **string** | The username of the teammate that you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteTeammateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/teammates/docs/GetTeammate.md b/rest/api/v3/teammates/docs/GetTeammate.md deleted file mode 100644 index 9a3c21dd..00000000 --- a/rest/api/v3/teammates/docs/GetTeammate.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetTeammate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetTeammate**](GetTeammate.md#GetTeammate) | **Get** /v3/teammates/{Username} | Retrieve specific teammate - - - -## GetTeammate - -> GetTeammate200Response GetTeammate(ctx, Usernameoptional) - -Retrieve specific teammate - -**This endpoint allows you to retrieve a specific Teammate by username.** You can retrieve the username's for each of your Teammates using the \"Retrieve all Teammates\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Username** | **string** | The username of the teammate that you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a GetTeammateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**GetTeammate200Response**](GetTeammate200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/teammates/docs/GetTeammate200Response.md b/rest/api/v3/teammates/docs/GetTeammate200Response.md deleted file mode 100644 index 96209510..00000000 --- a/rest/api/v3/teammates/docs/GetTeammate200Response.md +++ /dev/null @@ -1,25 +0,0 @@ -# GetTeammate200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Username** | **string** | Teammate's username |[optional] -**FirstName** | **string** | Teammate's first name |[optional] -**LastName** | **string** | Teammate's last name |[optional] -**Email** | **string** | Teammate's email |[optional] -**Scopes** | **[]interface{}** | Scopes associated to teammate |[optional] -**UserType** | [**UserType1**](UserType1.md) | Indicate the type of user: account owner, teammate admin user, or normal teammate |[optional] -**IsAdmin** | **bool** | Set to true if teammate has admin privileges |[optional] -**Phone** | **string** | (optional) Teammate's phone number |[optional] -**Website** | **string** | (optional) Teammate's website |[optional] -**Address** | **string** | (optional) Teammate's address |[optional] -**Address2** | **string** | (optional) Teammate's address |[optional] -**City** | **string** | (optional) Teammate's city |[optional] -**State** | **string** | (optional) Teammate's state |[optional] -**Zip** | **string** | (optional) Teammate's zip |[optional] -**Country** | **string** | (optional) Teammate's country |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/InviteTeammate.md b/rest/api/v3/teammates/docs/InviteTeammate.md deleted file mode 100644 index c4041719..00000000 --- a/rest/api/v3/teammates/docs/InviteTeammate.md +++ /dev/null @@ -1,49 +0,0 @@ -# InviteTeammate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**InviteTeammate**](InviteTeammate.md#InviteTeammate) | **Post** /v3/teammates | Invite teammate - - - -## InviteTeammate - -> InviteTeammate201Response InviteTeammate(ctx, optional) - -Invite teammate - -**This endpoint allows you to invite a Teammate to your account via email.** You can set a Teammate's initial permissions using the `scopes` array in the request body. Teammate's will receive a minimum set of scopes from Twilio SendGrid that are necessary for the Teammate to function. **Note:** A teammate invite will expire after 7 days, but you may resend the invitation at any time to reset the expiration date. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a InviteTeammateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**InviteTeammateRequest** | [**InviteTeammateRequest**](InviteTeammateRequest.md) | - -### Return type - -[**InviteTeammate201Response**](InviteTeammate201Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/teammates/docs/InviteTeammate201Response.md b/rest/api/v3/teammates/docs/InviteTeammate201Response.md deleted file mode 100644 index 63648c38..00000000 --- a/rest/api/v3/teammates/docs/InviteTeammate201Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# InviteTeammate201Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Token** | **string** | Token to identify invite |[optional] -**Email** | **string** | Teammate's email address |[optional] -**Scopes** | **[]interface{}** | Initial set of permissions to give to teammate if they accept the invite |[optional] -**IsAdmin** | **bool** | Set to true if teammate should have admin privileges |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/InviteTeammate400Response.md b/rest/api/v3/teammates/docs/InviteTeammate400Response.md deleted file mode 100644 index 7d0f0c73..00000000 --- a/rest/api/v3/teammates/docs/InviteTeammate400Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# InviteTeammate400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]InviteTeammate400ResponseErrorsInner**](InviteTeammate400ResponseErrorsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/InviteTeammate400ResponseErrorsInner.md b/rest/api/v3/teammates/docs/InviteTeammate400ResponseErrorsInner.md deleted file mode 100644 index 6bf97048..00000000 --- a/rest/api/v3/teammates/docs/InviteTeammate400ResponseErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# InviteTeammate400ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | |[optional] -**Field** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/InviteTeammateRequest.md b/rest/api/v3/teammates/docs/InviteTeammateRequest.md deleted file mode 100644 index 5d3912fd..00000000 --- a/rest/api/v3/teammates/docs/InviteTeammateRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# InviteTeammateRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | New teammate's email | -**Scopes** | **[]string** | Set to specify list of scopes that teammate should have. Should be empty if teammate is an admin. | -**IsAdmin** | **bool** | Set to true if teammate should be an admin user |[default to false] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/ListPendingTeammate.md b/rest/api/v3/teammates/docs/ListPendingTeammate.md deleted file mode 100644 index 84312df6..00000000 --- a/rest/api/v3/teammates/docs/ListPendingTeammate.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListPendingTeammate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListPendingTeammate**](ListPendingTeammate.md#ListPendingTeammate) | **Get** /v3/teammates/pending | Retrieve all pending teammates - - - -## ListPendingTeammate - -> ListPendingTeammate200Response ListPendingTeammate(ctx, optional) - -Retrieve all pending teammates - -**This endpoint allows you to retrieve a list of all pending Teammate invitations.** Each teammate invitation is valid for 7 days. Users may resend the invitation to refresh the expiration date. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListPendingTeammateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListPendingTeammate200Response**](ListPendingTeammate200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/teammates/docs/ListPendingTeammate200Response.md b/rest/api/v3/teammates/docs/ListPendingTeammate200Response.md deleted file mode 100644 index acaf8ee6..00000000 --- a/rest/api/v3/teammates/docs/ListPendingTeammate200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListPendingTeammate200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]ListPendingTeammate200ResponseResultInner**](ListPendingTeammate200ResponseResultInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/ListPendingTeammate200ResponseResultInner.md b/rest/api/v3/teammates/docs/ListPendingTeammate200ResponseResultInner.md deleted file mode 100644 index e5ea2c9c..00000000 --- a/rest/api/v3/teammates/docs/ListPendingTeammate200ResponseResultInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListPendingTeammate200ResponseResultInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | Email address teammate invite will be sent to |[optional] -**Scopes** | **[]string** | List of permissions to give teammate if they accept |[optional] -**IsAdmin** | **bool** | Set to true to indicate teammate should have the same set of permissions as parent user |[optional] -**Token** | **string** | Invitation token used to identify user |[optional] -**ExpirationDate** | **int32** | timestamp indicates when invite will expire. Expiration is 7 days after invite creation |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate.md deleted file mode 100644 index 828e71ce..00000000 --- a/rest/api/v3/teammates/docs/ListSubuserByTemplate.md +++ /dev/null @@ -1,54 +0,0 @@ -# ListSubuserByTemplate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSubuserByTemplate**](ListSubuserByTemplate.md#ListSubuserByTemplate) | **Get** /v3/teammates/{TeammateName}/subuser_access | Get Teammate Subuser Access - - - -## ListSubuserByTemplate - -> ListSubuserByTemplate200Response ListSubuserByTemplate(ctx, TeammateNameoptional) - -Get Teammate Subuser Access - -**This operation allows you to retrieve the Subusers that can be accessed by a specified Teammate.** This operation will return the Subusers available to a Teammate, including the scopes available. If the Teammate is an administrator, all Subusers will be returned. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**TeammateName** | **string** | The username of the Teammate for whom you want to retrieve Subuser access information. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSubuserByTemplateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**AfterSubuserId** | **int32** | The Subuser ID from which the API request will begin retrieving Subusers. This query parameter can be used in successive API calls to retrieve additional Subusers. -**Limit** | **int32** | Limit the number of Subusers to be returned. The default `limit` is `100` per request. -**Username** | **string** | A Subuser's username that will be used to filter the returned result. - -### Return type - -[**ListSubuserByTemplate200Response**](ListSubuserByTemplate200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate200Response.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate200Response.md deleted file mode 100644 index 491b1817..00000000 --- a/rest/api/v3/teammates/docs/ListSubuserByTemplate200Response.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListSubuserByTemplate200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**HasRestrictedSubuserAccess** | **bool** | When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. |[optional] -**SubuserAccess** | [**[]ListSubuserByTemplate200ResponseSubuserAccessInner**](ListSubuserByTemplate200ResponseSubuserAccessInner.md) | Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. |[optional] -**Metadata** | [**ListSubuserByTemplate200ResponseMetadata**](ListSubuserByTemplate200ResponseMetadata.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadata.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadata.md deleted file mode 100644 index ed90d06a..00000000 --- a/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadata.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListSubuserByTemplate200ResponseMetadata - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**NextParams** | [**ListSubuserByTemplate200ResponseMetadataNextParams**](ListSubuserByTemplate200ResponseMetadataNextParams.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadataNextParams.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadataNextParams.md deleted file mode 100644 index 66b7c05d..00000000 --- a/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadataNextParams.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListSubuserByTemplate200ResponseMetadataNextParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Limit** | **int32** | The limit specified in the `limit` query parameter to constrain the number of Subusers returned. |[optional] -**AfterSubuserId** | **int32** | The `after_subuser_id` property represents the last processed Subuser. If the `after_subuser_id` property is `null`, there are no more entries available. |[optional] -**Username** | **string** | The username of a Subuser passed in the `name` query parameter to filter results by username. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseSubuserAccessInner.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseSubuserAccessInner.md deleted file mode 100644 index 2264a516..00000000 --- a/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseSubuserAccessInner.md +++ /dev/null @@ -1,16 +0,0 @@ -# ListSubuserByTemplate200ResponseSubuserAccessInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | The ID of a Subuser to which the Teammate has access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). |[optional] -**Username** | **string** | The username of a Subuser to which the Teammate has access. |[optional] -**Email** | **string** | The email address of a Subuser to which the Teammate has access. |[optional] -**Disabled** | **bool** | Indicates if the Subuser is active for the SendGrid account. |[optional] -**PermissionType** | [**PermissionType**](PermissionType.md) | The level of access the Teammate has to the specified Subuser. This property value may be either `admin` or `restricted`. When is property is set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. |[optional] -**Scopes** | **[]string** | The permissions or scopes that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate400Response.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate400Response.md deleted file mode 100644 index cce6bfd0..00000000 --- a/rest/api/v3/teammates/docs/ListSubuserByTemplate400Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListSubuserByTemplate400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ListSubuserByTemplate400ResponseErrorsInner**](ListSubuserByTemplate400ResponseErrorsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate400ResponseErrorsInner.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate400ResponseErrorsInner.md deleted file mode 100644 index e82f043b..00000000 --- a/rest/api/v3/teammates/docs/ListSubuserByTemplate400ResponseErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListSubuserByTemplate400ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | The message representing the error from the API. |[optional] -**Field** | **string** | The field associated with the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/ListTeammate.md b/rest/api/v3/teammates/docs/ListTeammate.md deleted file mode 100644 index b2747274..00000000 --- a/rest/api/v3/teammates/docs/ListTeammate.md +++ /dev/null @@ -1,50 +0,0 @@ -# ListTeammate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListTeammate**](ListTeammate.md#ListTeammate) | **Get** /v3/teammates | Retrieve all teammates - - - -## ListTeammate - -> ListTeammate200Response ListTeammate(ctx, optional) - -Retrieve all teammates - -**This endpoint allows you to retrieve a paginated list of all current Teammates.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListTeammateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. -**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListTeammate200Response**](ListTeammate200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/teammates/docs/ListTeammate200Response.md b/rest/api/v3/teammates/docs/ListTeammate200Response.md deleted file mode 100644 index 8bbca76d..00000000 --- a/rest/api/v3/teammates/docs/ListTeammate200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListTeammate200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]ListTeammate200ResponseResultInner**](ListTeammate200ResponseResultInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/ListTeammate200ResponseResultInner.md b/rest/api/v3/teammates/docs/ListTeammate200ResponseResultInner.md deleted file mode 100644 index d7a2c068..00000000 --- a/rest/api/v3/teammates/docs/ListTeammate200ResponseResultInner.md +++ /dev/null @@ -1,24 +0,0 @@ -# ListTeammate200ResponseResultInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Username** | **string** | Teammate's username |[optional] -**Email** | **string** | Teammate's email |[optional] -**FirstName** | **string** | Teammate's first name |[optional] -**LastName** | **string** | Teammate's last name |[optional] -**UserType** | [**UserType**](UserType.md) | Indicate the type of user: owner user, teammate admin user, or normal teammate |[optional] -**IsAdmin** | **bool** | Set to true if teammate has admin privileges |[optional] -**Phone** | **string** | (optional) Teammate's phone number |[optional] -**Website** | **string** | (optional) Teammate's website |[optional] -**Address** | **string** | (optional) Teammate's address |[optional] -**Address2** | **string** | (optional) Teammate's address |[optional] -**City** | **string** | (optional) Teammate's city |[optional] -**State** | **string** | (optional) Teammate's state |[optional] -**Zip** | **string** | (optional) Teammate's zip |[optional] -**Country** | **string** | (optional) Teammate's country |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/PermissionType.md b/rest/api/v3/teammates/docs/PermissionType.md deleted file mode 100644 index da44f853..00000000 --- a/rest/api/v3/teammates/docs/PermissionType.md +++ /dev/null @@ -1,13 +0,0 @@ -# PermissionType - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**ADMIN** | string | (value: `"admin"`) -**RESTRICTED** | string | (value: `"restricted"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/ResendTeammateInvite.md b/rest/api/v3/teammates/docs/ResendTeammateInvite.md deleted file mode 100644 index 24f8e42d..00000000 --- a/rest/api/v3/teammates/docs/ResendTeammateInvite.md +++ /dev/null @@ -1,52 +0,0 @@ -# ResendTeammateInvite - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ResendTeammateInvite**](ResendTeammateInvite.md#ResendTeammateInvite) | **Post** /v3/teammates/pending/{Token}/resend | Resend teammate invite - - - -## ResendTeammateInvite - -> ResendTeammateInvite200Response ResendTeammateInvite(ctx, Tokenoptional) - -Resend teammate invite - -**This endpoint allows you to resend a Teammate invitation.** Teammate invitations will expire after 7 days. Resending an invitation will reset the expiration date. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Token** | **string** | The token for the invite that you want to resend. - -### Other Parameters - -Other parameters are passed through a pointer to a ResendTeammateInviteParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ResendTeammateInvite200Response**](ResendTeammateInvite200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/teammates/docs/ResendTeammateInvite200Response.md b/rest/api/v3/teammates/docs/ResendTeammateInvite200Response.md deleted file mode 100644 index c203789a..00000000 --- a/rest/api/v3/teammates/docs/ResendTeammateInvite200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# ResendTeammateInvite200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Token** | **string** | ID to identify invite |[optional] -**Email** | **string** | Teammate's email address |[optional] -**Scopes** | **[]string** | Initial set of permissions to give to teammate if they accept the invite |[optional] -**IsAdmin** | **bool** | Set to true if teammate should have admin privileges |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/UpdateTeammate.md b/rest/api/v3/teammates/docs/UpdateTeammate.md deleted file mode 100644 index 593e02cd..00000000 --- a/rest/api/v3/teammates/docs/UpdateTeammate.md +++ /dev/null @@ -1,53 +0,0 @@ -# UpdateTeammate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateTeammate**](UpdateTeammate.md#UpdateTeammate) | **Patch** /v3/teammates/{Username} | Update teammate's permissions - - - -## UpdateTeammate - -> UpdateTeammate200Response UpdateTeammate(ctx, Usernameoptional) - -Update teammate's permissions - -**This endpoint allows you to update a teammate’s permissions.** To turn a teammate into an admin, the request body should contain an `is_admin` set to `true`. Otherwise, set `is_admin` to `false` and pass in all the scopes that a teammate should have. **Only the parent user or other admin teammates can update another teammate’s permissions.** **Admin users can only update permissions.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Username** | **string** | The username of the teammate that you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateTeammateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UpdateTeammateRequest** | [**UpdateTeammateRequest**](UpdateTeammateRequest.md) | - -### Return type - -[**UpdateTeammate200Response**](UpdateTeammate200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/teammates/docs/UpdateTeammate200Response.md b/rest/api/v3/teammates/docs/UpdateTeammate200Response.md deleted file mode 100644 index 65414c2e..00000000 --- a/rest/api/v3/teammates/docs/UpdateTeammate200Response.md +++ /dev/null @@ -1,25 +0,0 @@ -# UpdateTeammate200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Username** | **string** | Teammate's username |[optional] -**FirstName** | **string** | Teammate's first name |[optional] -**LastName** | **string** | Teammate's last name |[optional] -**Email** | **string** | Teammate's email address |[optional] -**Scopes** | **[]string** | Scopes given to teammate |[optional] -**UserType** | [**UserType2**](UserType2.md) | Indicate the type of user: owner user, teammate admin user, or normal teammate |[optional] -**IsAdmin** | **bool** | Set to true if teammate has admin priveleges |[optional] -**Phone** | **string** | (optional) Teammate's phone number |[optional] -**Website** | **string** | (optional) Teammate's website |[optional] -**Address** | **string** | (optional) Teammate's address |[optional] -**Address2** | **string** | (optional) Teammate's address |[optional] -**City** | **string** | (optional) Teammate's city |[optional] -**State** | **string** | (optional) Teammate's state |[optional] -**Zip** | **string** | (optional) Teammate's zip |[optional] -**Country** | **string** | (optional) Teammate's country |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/UpdateTeammateRequest.md b/rest/api/v3/teammates/docs/UpdateTeammateRequest.md deleted file mode 100644 index ca9956e0..00000000 --- a/rest/api/v3/teammates/docs/UpdateTeammateRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# UpdateTeammateRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Scopes** | **[]string** | Provide list of scopes that should be given to teammate. If specifying list of scopes, is_admin should be set to False. | -**IsAdmin** | **bool** | Set to True if this teammate should be promoted to an admin user. If True, scopes should be an empty array. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/UserType.md b/rest/api/v3/teammates/docs/UserType.md deleted file mode 100644 index f9f8db1d..00000000 --- a/rest/api/v3/teammates/docs/UserType.md +++ /dev/null @@ -1,14 +0,0 @@ -# UserType - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**ADMIN** | string | (value: `"admin"`) -**OWNER** | string | (value: `"owner"`) -**TEAMMATE** | string | (value: `"teammate"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/UserType1.md b/rest/api/v3/teammates/docs/UserType1.md deleted file mode 100644 index 008e09e1..00000000 --- a/rest/api/v3/teammates/docs/UserType1.md +++ /dev/null @@ -1,14 +0,0 @@ -# UserType1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**ADMIN** | string | (value: `"admin"`) -**OWNER** | string | (value: `"owner"`) -**TEAMMATE** | string | (value: `"teammate"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/UserType2.md b/rest/api/v3/teammates/docs/UserType2.md deleted file mode 100644 index 59679096..00000000 --- a/rest/api/v3/teammates/docs/UserType2.md +++ /dev/null @@ -1,14 +0,0 @@ -# UserType2 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**ADMIN** | string | (value: `"admin"`) -**OWNER** | string | (value: `"owner"`) -**TEAMMATE** | string | (value: `"teammate"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/model_get_teammate_200_response.go b/rest/api/v3/teammates/model_get_teammate_200_response.go deleted file mode 100644 index a1c30f71..00000000 --- a/rest/api/v3/teammates/model_get_teammate_200_response.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetTeammate200Response struct for GetTeammate200Response -type GetTeammate200Response struct { - // Teammate's username - Username *string `json:"username,omitempty"` - // Teammate's first name - FirstName *string `json:"first_name,omitempty"` - // Teammate's last name - LastName *string `json:"last_name,omitempty"` - // Teammate's email - Email *string `json:"email,omitempty"` - // Scopes associated to teammate - Scopes *[]interface{} `json:"scopes,omitempty"` - // Indicate the type of user: account owner, teammate admin user, or normal teammate - UserType *UserType1 `json:"user_type,omitempty"` - // Set to true if teammate has admin privileges - IsAdmin *bool `json:"is_admin,omitempty"` - // (optional) Teammate's phone number - Phone *string `json:"phone,omitempty"` - // (optional) Teammate's website - Website *string `json:"website,omitempty"` - // (optional) Teammate's address - Address *string `json:"address,omitempty"` - // (optional) Teammate's address - Address2 *string `json:"address2,omitempty"` - // (optional) Teammate's city - City *string `json:"city,omitempty"` - // (optional) Teammate's state - State *string `json:"state,omitempty"` - // (optional) Teammate's zip - Zip *string `json:"zip,omitempty"` - // (optional) Teammate's country - Country *string `json:"country,omitempty"` -} diff --git a/rest/api/v3/teammates/model_invite_teammate_201_response.go b/rest/api/v3/teammates/model_invite_teammate_201_response.go deleted file mode 100644 index ae183bf4..00000000 --- a/rest/api/v3/teammates/model_invite_teammate_201_response.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// InviteTeammate201Response struct for InviteTeammate201Response -type InviteTeammate201Response struct { - // Token to identify invite - Token *string `json:"token,omitempty"` - // Teammate's email address - Email *string `json:"email,omitempty"` - // Initial set of permissions to give to teammate if they accept the invite - Scopes *[]interface{} `json:"scopes,omitempty"` - // Set to true if teammate should have admin privileges - IsAdmin *bool `json:"is_admin,omitempty"` -} diff --git a/rest/api/v3/teammates/model_invite_teammate_400_response.go b/rest/api/v3/teammates/model_invite_teammate_400_response.go deleted file mode 100644 index f3bd0fd1..00000000 --- a/rest/api/v3/teammates/model_invite_teammate_400_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// InviteTeammate400Response struct for InviteTeammate400Response -type InviteTeammate400Response struct { - Errors *[]InviteTeammate400ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/teammates/model_invite_teammate_400_response_errors_inner.go b/rest/api/v3/teammates/model_invite_teammate_400_response_errors_inner.go deleted file mode 100644 index e21587e5..00000000 --- a/rest/api/v3/teammates/model_invite_teammate_400_response_errors_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// InviteTeammate400ResponseErrorsInner struct for InviteTeammate400ResponseErrorsInner -type InviteTeammate400ResponseErrorsInner struct { - Message *string `json:"message,omitempty"` - Field *string `json:"field,omitempty"` -} diff --git a/rest/api/v3/teammates/model_invite_teammate_request.go b/rest/api/v3/teammates/model_invite_teammate_request.go deleted file mode 100644 index ee0342cd..00000000 --- a/rest/api/v3/teammates/model_invite_teammate_request.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// InviteTeammateRequest struct for InviteTeammateRequest -type InviteTeammateRequest struct { - // New teammate's email - Email string `json:"email"` - // Set to specify list of scopes that teammate should have. Should be empty if teammate is an admin. - Scopes []string `json:"scopes"` - // Set to true if teammate should be an admin user - IsAdmin bool `json:"is_admin"` -} diff --git a/rest/api/v3/teammates/model_list_pending_teammate_200_response.go b/rest/api/v3/teammates/model_list_pending_teammate_200_response.go deleted file mode 100644 index e23aa0d5..00000000 --- a/rest/api/v3/teammates/model_list_pending_teammate_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListPendingTeammate200Response struct for ListPendingTeammate200Response -type ListPendingTeammate200Response struct { - Result *[]ListPendingTeammate200ResponseResultInner `json:"result,omitempty"` -} diff --git a/rest/api/v3/teammates/model_list_pending_teammate_200_response_result_inner.go b/rest/api/v3/teammates/model_list_pending_teammate_200_response_result_inner.go deleted file mode 100644 index 2ec83181..00000000 --- a/rest/api/v3/teammates/model_list_pending_teammate_200_response_result_inner.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListPendingTeammate200ResponseResultInner struct for ListPendingTeammate200ResponseResultInner -type ListPendingTeammate200ResponseResultInner struct { - // Email address teammate invite will be sent to - Email *string `json:"email,omitempty"` - // List of permissions to give teammate if they accept - Scopes *[]string `json:"scopes,omitempty"` - // Set to true to indicate teammate should have the same set of permissions as parent user - IsAdmin *bool `json:"is_admin,omitempty"` - // Invitation token used to identify user - Token *string `json:"token,omitempty"` - // timestamp indicates when invite will expire. Expiration is 7 days after invite creation - ExpirationDate *int32 `json:"expiration_date,omitempty"` -} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_200_response.go b/rest/api/v3/teammates/model_list_subuser_by_template_200_response.go deleted file mode 100644 index 6b55158e..00000000 --- a/rest/api/v3/teammates/model_list_subuser_by_template_200_response.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSubuserByTemplate200Response struct for ListSubuserByTemplate200Response -type ListSubuserByTemplate200Response struct { - // When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. - HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` - // Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. - SubuserAccess *[]ListSubuserByTemplate200ResponseSubuserAccessInner `json:"subuser_access,omitempty"` - Metadata *ListSubuserByTemplate200ResponseMetadata `json:"_metadata,omitempty"` -} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata.go b/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata.go deleted file mode 100644 index 4c207d5e..00000000 --- a/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSubuserByTemplate200ResponseMetadata This object contains response metadata. The presence of the `after_subuser_id` property in the metadata indicates that some items are still outstanding and have not been retrieved. You can use the `after_subuser_id` value to retrieve additional items with another request. -type ListSubuserByTemplate200ResponseMetadata struct { - NextParams *ListSubuserByTemplate200ResponseMetadataNextParams `json:"next_params,omitempty"` -} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata_next_params.go b/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata_next_params.go deleted file mode 100644 index c28bf633..00000000 --- a/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata_next_params.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSubuserByTemplate200ResponseMetadataNextParams struct for ListSubuserByTemplate200ResponseMetadataNextParams -type ListSubuserByTemplate200ResponseMetadataNextParams struct { - // The limit specified in the `limit` query parameter to constrain the number of Subusers returned. - Limit *int32 `json:"limit,omitempty"` - // The `after_subuser_id` property represents the last processed Subuser. If the `after_subuser_id` property is `null`, there are no more entries available. - AfterSubuserId *int32 `json:"after_subuser_id,omitempty"` - // The username of a Subuser passed in the `name` query parameter to filter results by username. - Username *string `json:"username,omitempty"` -} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_200_response_subuser_access_inner.go b/rest/api/v3/teammates/model_list_subuser_by_template_200_response_subuser_access_inner.go deleted file mode 100644 index 100906bb..00000000 --- a/rest/api/v3/teammates/model_list_subuser_by_template_200_response_subuser_access_inner.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSubuserByTemplate200ResponseSubuserAccessInner An array of Subusers to which the Teammate has access. -type ListSubuserByTemplate200ResponseSubuserAccessInner struct { - // The ID of a Subuser to which the Teammate has access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). - Id *int32 `json:"id,omitempty"` - // The username of a Subuser to which the Teammate has access. - Username *string `json:"username,omitempty"` - // The email address of a Subuser to which the Teammate has access. - Email *string `json:"email,omitempty"` - // Indicates if the Subuser is active for the SendGrid account. - Disabled *bool `json:"disabled,omitempty"` - // The level of access the Teammate has to the specified Subuser. This property value may be either `admin` or `restricted`. When is property is set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. - PermissionType *PermissionType `json:"permission_type,omitempty"` - // The permissions or scopes that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. - Scopes *[]string `json:"scopes,omitempty"` -} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_400_response.go b/rest/api/v3/teammates/model_list_subuser_by_template_400_response.go deleted file mode 100644 index a404698d..00000000 --- a/rest/api/v3/teammates/model_list_subuser_by_template_400_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSubuserByTemplate400Response An object containing an array of errors objects. -type ListSubuserByTemplate400Response struct { - Errors *[]ListSubuserByTemplate400ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_400_response_errors_inner.go b/rest/api/v3/teammates/model_list_subuser_by_template_400_response_errors_inner.go deleted file mode 100644 index 8a442ec9..00000000 --- a/rest/api/v3/teammates/model_list_subuser_by_template_400_response_errors_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSubuserByTemplate400ResponseErrorsInner struct for ListSubuserByTemplate400ResponseErrorsInner -type ListSubuserByTemplate400ResponseErrorsInner struct { - // The message representing the error from the API. - Message *string `json:"message,omitempty"` - // The field associated with the error. - Field *string `json:"field,omitempty"` -} diff --git a/rest/api/v3/teammates/model_list_teammate_200_response.go b/rest/api/v3/teammates/model_list_teammate_200_response.go deleted file mode 100644 index 09609911..00000000 --- a/rest/api/v3/teammates/model_list_teammate_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListTeammate200Response struct for ListTeammate200Response -type ListTeammate200Response struct { - Result *[]ListTeammate200ResponseResultInner `json:"result,omitempty"` -} diff --git a/rest/api/v3/teammates/model_list_teammate_200_response_result_inner.go b/rest/api/v3/teammates/model_list_teammate_200_response_result_inner.go deleted file mode 100644 index c0a8d40c..00000000 --- a/rest/api/v3/teammates/model_list_teammate_200_response_result_inner.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListTeammate200ResponseResultInner struct for ListTeammate200ResponseResultInner -type ListTeammate200ResponseResultInner struct { - // Teammate's username - Username *string `json:"username,omitempty"` - // Teammate's email - Email *string `json:"email,omitempty"` - // Teammate's first name - FirstName *string `json:"first_name,omitempty"` - // Teammate's last name - LastName *string `json:"last_name,omitempty"` - // Indicate the type of user: owner user, teammate admin user, or normal teammate - UserType *UserType `json:"user_type,omitempty"` - // Set to true if teammate has admin privileges - IsAdmin *bool `json:"is_admin,omitempty"` - // (optional) Teammate's phone number - Phone *string `json:"phone,omitempty"` - // (optional) Teammate's website - Website *string `json:"website,omitempty"` - // (optional) Teammate's address - Address *string `json:"address,omitempty"` - // (optional) Teammate's address - Address2 *string `json:"address2,omitempty"` - // (optional) Teammate's city - City *string `json:"city,omitempty"` - // (optional) Teammate's state - State *string `json:"state,omitempty"` - // (optional) Teammate's zip - Zip *string `json:"zip,omitempty"` - // (optional) Teammate's country - Country *string `json:"country,omitempty"` -} diff --git a/rest/api/v3/teammates/model_permission_type.go b/rest/api/v3/teammates/model_permission_type.go deleted file mode 100644 index b581984f..00000000 --- a/rest/api/v3/teammates/model_permission_type.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// PermissionType the model 'PermissionType' -type PermissionType string - -// List of PermissionType -const ( - PERMISSIONTYPE_ADMIN PermissionType = "admin" - PERMISSIONTYPE_RESTRICTED PermissionType = "restricted" -) diff --git a/rest/api/v3/teammates/model_resend_teammate_invite_200_response.go b/rest/api/v3/teammates/model_resend_teammate_invite_200_response.go deleted file mode 100644 index a229bfa2..00000000 --- a/rest/api/v3/teammates/model_resend_teammate_invite_200_response.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ResendTeammateInvite200Response struct for ResendTeammateInvite200Response -type ResendTeammateInvite200Response struct { - // ID to identify invite - Token *string `json:"token,omitempty"` - // Teammate's email address - Email *string `json:"email,omitempty"` - // Initial set of permissions to give to teammate if they accept the invite - Scopes *[]string `json:"scopes,omitempty"` - // Set to true if teammate should have admin privileges - IsAdmin *bool `json:"is_admin,omitempty"` -} diff --git a/rest/api/v3/teammates/model_update_teammate_200_response.go b/rest/api/v3/teammates/model_update_teammate_200_response.go deleted file mode 100644 index 37332bfe..00000000 --- a/rest/api/v3/teammates/model_update_teammate_200_response.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateTeammate200Response struct for UpdateTeammate200Response -type UpdateTeammate200Response struct { - // Teammate's username - Username *string `json:"username,omitempty"` - // Teammate's first name - FirstName *string `json:"first_name,omitempty"` - // Teammate's last name - LastName *string `json:"last_name,omitempty"` - // Teammate's email address - Email *string `json:"email,omitempty"` - // Scopes given to teammate - Scopes *[]string `json:"scopes,omitempty"` - // Indicate the type of user: owner user, teammate admin user, or normal teammate - UserType *UserType2 `json:"user_type,omitempty"` - // Set to true if teammate has admin priveleges - IsAdmin *bool `json:"is_admin,omitempty"` - // (optional) Teammate's phone number - Phone *string `json:"phone,omitempty"` - // (optional) Teammate's website - Website *string `json:"website,omitempty"` - // (optional) Teammate's address - Address *string `json:"address,omitempty"` - // (optional) Teammate's address - Address2 *string `json:"address2,omitempty"` - // (optional) Teammate's city - City *string `json:"city,omitempty"` - // (optional) Teammate's state - State *string `json:"state,omitempty"` - // (optional) Teammate's zip - Zip *string `json:"zip,omitempty"` - // (optional) Teammate's country - Country *string `json:"country,omitempty"` -} diff --git a/rest/api/v3/teammates/model_update_teammate_request.go b/rest/api/v3/teammates/model_update_teammate_request.go deleted file mode 100644 index a7869ed0..00000000 --- a/rest/api/v3/teammates/model_update_teammate_request.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateTeammateRequest struct for UpdateTeammateRequest -type UpdateTeammateRequest struct { - // Provide list of scopes that should be given to teammate. If specifying list of scopes, is_admin should be set to False. - Scopes []string `json:"scopes"` - // Set to True if this teammate should be promoted to an admin user. If True, scopes should be an empty array. - IsAdmin bool `json:"is_admin"` -} diff --git a/rest/api/v3/teammates/model_user_type.go b/rest/api/v3/teammates/model_user_type.go deleted file mode 100644 index ca06b801..00000000 --- a/rest/api/v3/teammates/model_user_type.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UserType the model 'UserType' -type UserType string - -// List of UserType -const ( - USERTYPE_ADMIN UserType = "admin" - USERTYPE_OWNER UserType = "owner" - USERTYPE_TEAMMATE UserType = "teammate" -) diff --git a/rest/api/v3/teammates/model_user_type1.go b/rest/api/v3/teammates/model_user_type1.go deleted file mode 100644 index 133a3591..00000000 --- a/rest/api/v3/teammates/model_user_type1.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UserType1 the model 'UserType1' -type UserType1 string - -// List of UserType1 -const ( - USERTYPE1_ADMIN UserType1 = "admin" - USERTYPE1_OWNER UserType1 = "owner" - USERTYPE1_TEAMMATE UserType1 = "teammate" -) diff --git a/rest/api/v3/teammates/model_user_type2.go b/rest/api/v3/teammates/model_user_type2.go deleted file mode 100644 index 4dcb15df..00000000 --- a/rest/api/v3/teammates/model_user_type2.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UserType2 the model 'UserType2' -type UserType2 string - -// List of UserType2 -const ( - USERTYPE2_ADMIN UserType2 = "admin" - USERTYPE2_OWNER UserType2 = "owner" - USERTYPE2_TEAMMATE UserType2 = "teammate" -) diff --git a/rest/api/v3/templates/README.md b/rest/api/v3/templates/README.md index a3219329..a9d5b274 100644 --- a/rest/api/v3/templates/README.md +++ b/rest/api/v3/templates/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:02.479210+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.547954+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/templates/api_service.go b/rest/api/v3/templates/api_service.go index 3716cd28..b43e5b40 100644 --- a/rest/api/v3/templates/api_service.go +++ b/rest/api/v3/templates/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/tracking_settings/README.md b/rest/api/v3/tracking_settings/README.md index c7da454a..9168c2e9 100644 --- a/rest/api/v3/tracking_settings/README.md +++ b/rest/api/v3/tracking_settings/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:02.489222+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.568813+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/tracking_settings/api_service.go b/rest/api/v3/tracking_settings/api_service.go index 66f5e1d2..b4dce825 100644 --- a/rest/api/v3/tracking_settings/api_service.go +++ b/rest/api/v3/tracking_settings/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/user/README.md b/rest/api/v3/user/README.md index c97dd8f9..3cbe02e7 100644 --- a/rest/api/v3/user/README.md +++ b/rest/api/v3/user/README.md @@ -9,7 +9,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:02.512612+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.575258+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/user/api_service.go b/rest/api/v3/user/api_service.go index 67bbc6b4..dd2fc0c1 100644 --- a/rest/api/v3/user/api_service.go +++ b/rest/api/v3/user/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/verified_senders/README.md b/rest/api/v3/verified_senders/README.md index f2f60a3e..1733df4c 100644 --- a/rest/api/v3/verified_senders/README.md +++ b/rest/api/v3/verified_senders/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:02.559197+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.654170+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/verified_senders/api_service.go b/rest/api/v3/verified_senders/api_service.go index 4ef324e5..150cbc0a 100644 --- a/rest/api/v3/verified_senders/api_service.go +++ b/rest/api/v3/verified_senders/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/rest/api/v3/webhooks/README.md b/rest/api/v3/webhooks/README.md index 4eedcf03..d29170e2 100644 --- a/rest/api/v3/webhooks/README.md +++ b/rest/api/v3/webhooks/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T18:29:02.588795+05:30[Asia/Kolkata] +- Build date: 2024-10-04T22:46:44.677700+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/webhooks/api_service.go b/rest/api/v3/webhooks/api_service.go index a92477c0..04a41518 100644 --- a/rest/api/v3/webhooks/api_service.go +++ b/rest/api/v3/webhooks/api_service.go @@ -14,7 +14,7 @@ package openapi import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" + sendgrid "github.com/sendgrid/sendgrid-go/v4/client" ) type ApiService struct { diff --git a/sendgrid.go b/sendgrid.go index 5dd16ea0..c67a1543 100644 --- a/sendgrid.go +++ b/sendgrid.go @@ -17,49 +17,47 @@ import ( "time" "github.com/sendgrid/rest" - "github.com/sendgrid/sendgrid-go/client" - AccountProvisioningV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/account_provisioning" - AlertsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/alerts" - ApiKeysV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/api_keys" - DomainAuthenticationV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/domain_authentication" - EmailActivityV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/email_activity" - EmailValidationV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/email_validation" - EnforcedTlsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/enforced_tls" - IntegrationsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/integrations" - IpAccessManagementV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/ip_access_management" - IpAddressManagementV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/ip_address_management" - IpWarmupV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/ip_warmup" - IpsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/ips" - LinkBrandingV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/link_branding" - LmcCampaignsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/lmc_campaigns" - LmcContactdbV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/lmc_contactdb" - LmcSendersV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/lmc_senders" - MailV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mail" - MailSettingsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mail_settings" - McCustomFieldsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_custom_fields" - McDesignsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_designs" - McListsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_lists" - McSegmentsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_segments" - McSegments2V3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_segments_2" - McSendersV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_senders" - McSinglesendsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_singlesends" - McStatsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_stats" - McTestV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_test" - PartnerV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/partner" - RecipientsDataErasureV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/recipients_data_erasure" - ReverseDnsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/reverse_dns" - ScheduledSendsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/scheduled_sends" - ScopesV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/scopes" - SeqV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/seq" - SsoV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/sso" - StatsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/stats" - SubusersV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/subusers" - TeammatesV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/teammates" - TemplatesV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/templates" - TrackingSettingsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/tracking_settings" - UserV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/user" - VerifiedSendersV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/verified_senders" - WebhooksV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/webhooks" + "github.com/sendgrid/sendgrid-go/v4/client" + AccountProvisioningV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/account_provisioning" + AlertsV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/alerts" + ApiKeysV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/api_keys" + DomainAuthenticationV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/domain_authentication" + EmailActivityV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/email_activity" + EmailValidationV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/email_validation" + EnforcedTlsV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/enforced_tls" + IntegrationsV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/integrations" + IpAccessManagementV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/ip_access_management" + IpAddressManagementV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/ip_address_management" + IpWarmupV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/ip_warmup" + IpsV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/ips" + LinkBrandingV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/link_branding" + LmcCampaignsV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/lmc_campaigns" + LmcContactdbV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/lmc_contactdb" + LmcSendersV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/lmc_senders" + MailV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/mail" + MailSettingsV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/mail_settings" + McCustomFieldsV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/mc_custom_fields" + McDesignsV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/mc_designs" + McListsV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/mc_lists" + McSegments2V3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/mc_segments_2" + McSendersV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/mc_senders" + McSinglesendsV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/mc_singlesends" + McStatsV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/mc_stats" + McTestV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/mc_test" + PartnerV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/partner" + RecipientsDataErasureV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/recipients_data_erasure" + ReverseDnsV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/reverse_dns" + ScheduledSendsV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/scheduled_sends" + ScopesV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/scopes" + SeqV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/seq" + SsoV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/sso" + StatsV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/stats" + SubusersV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/subusers" + TemplatesV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/templates" + TrackingSettingsV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/tracking_settings" + UserV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/user" + VerifiedSendersV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/verified_senders" + WebhooksV3 "github.com/sendgrid/sendgrid-go/v4/rest/api/v3/webhooks" ) // RestClient provides access to Sendgrid services. @@ -86,7 +84,6 @@ type RestClient struct { McCustomFieldsV3 *McCustomFieldsV3.ApiService McDesignsV3 *McDesignsV3.ApiService McListsV3 *McListsV3.ApiService - McSegmentsV3 *McSegmentsV3.ApiService McSegments2V3 *McSegments2V3.ApiService McSendersV3 *McSendersV3.ApiService McSinglesendsV3 *McSinglesendsV3.ApiService @@ -101,7 +98,6 @@ type RestClient struct { SsoV3 *SsoV3.ApiService StatsV3 *StatsV3.ApiService SubusersV3 *SubusersV3.ApiService - TeammatesV3 *TeammatesV3.ApiService TemplatesV3 *TemplatesV3.ApiService TrackingSettingsV3 *TrackingSettingsV3.ApiService UserV3 *UserV3.ApiService @@ -217,7 +213,6 @@ func NewRestClientWithParams(params ClientParams) *RestClient { c.McCustomFieldsV3 = McCustomFieldsV3.NewApiService(c.RequestHandler) c.McDesignsV3 = McDesignsV3.NewApiService(c.RequestHandler) c.McListsV3 = McListsV3.NewApiService(c.RequestHandler) - c.McSegmentsV3 = McSegmentsV3.NewApiService(c.RequestHandler) c.McSegments2V3 = McSegments2V3.NewApiService(c.RequestHandler) c.McSendersV3 = McSendersV3.NewApiService(c.RequestHandler) c.McSinglesendsV3 = McSinglesendsV3.NewApiService(c.RequestHandler) @@ -232,7 +227,6 @@ func NewRestClientWithParams(params ClientParams) *RestClient { c.SsoV3 = SsoV3.NewApiService(c.RequestHandler) c.StatsV3 = StatsV3.NewApiService(c.RequestHandler) c.SubusersV3 = SubusersV3.NewApiService(c.RequestHandler) - c.TeammatesV3 = TeammatesV3.NewApiService(c.RequestHandler) c.TemplatesV3 = TemplatesV3.NewApiService(c.RequestHandler) c.TrackingSettingsV3 = TrackingSettingsV3.NewApiService(c.RequestHandler) c.UserV3 = UserV3.NewApiService(c.RequestHandler)