diff --git a/lib/model_create_domain_model.go b/lib/model_create_domain_model.go index 00ceef4..0847437 100644 --- a/lib/model_create_domain_model.go +++ b/lib/model_create_domain_model.go @@ -1,7 +1,7 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com @@ -18,6 +18,6 @@ type CreateDomainModel struct { // Domain Provider DomainProvider string `json:"domain_provider,omitempty"` // Success message - Message string `json:"message,omitempty"` + Message string `json:"message,omitempty"` DnsRecords *CreateDomainModelDnsRecords `json:"dns_records,omitempty"` } diff --git a/lib/model_create_sender.go b/lib/model_create_sender.go index e2a73bd..094ff38 100644 --- a/lib/model_create_sender.go +++ b/lib/model_create_sender.go @@ -1,7 +1,7 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com diff --git a/lib/model_create_sender_model.go b/lib/model_create_sender_model.go index be72393..54d0019 100644 --- a/lib/model_create_sender_model.go +++ b/lib/model_create_sender_model.go @@ -1,7 +1,7 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com diff --git a/lib/model_otp.go b/lib/model_otp.go index e5dfca1..10208f7 100644 --- a/lib/model_otp.go +++ b/lib/model_otp.go @@ -1,7 +1,7 @@ /* * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * API version: 3.0.0 * Contact: contact@brevo.com @@ -12,5 +12,5 @@ package swagger type Otp struct { // 6 digit OTP received on email - Name int32 `json:"name,omitempty"` + Otp int32 `json:"otp,omitempty"` } diff --git a/test.go b/test.go deleted file mode 100644 index b59c02d..0000000 --- a/test.go +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "context" - "fmt" - - brevo "github.com/getbrevo/brevo-go/lib" -) - -func main() { - var ctx context.Context - cfg := brevo.NewConfiguration() - //Configure API key authorization: api-key - cfg.AddDefaultHeader("api-key", "{api-key}") - //Configure API key authorization: partner-key - //cfg.AddDefaultHeader("partner-key", "YOUR_API_KEY") - - br := brevo.NewAPIClient(cfg) - - resp, err := br.ContactsApi.UpdateContact(ctx, "697", brevo.UpdateContact{ - Attributes: map[string]interface{}{ - "Email": "test-brevo@test.com", - }, - }) - if err != nil { - fmt.Println("Error ", err.Error()) - return - } - fmt.Println("resp:", resp) - //fmt.Printf("%+v", result.Contacts) - //fmt.Println("=============\n\n\n", result.Contacts, result.Contacts.Failure, result.Contacts.Success) - return -}