diff --git a/lib/api_account.go b/lib/api_account.go
index 15ab5a8..044226a 100644
--- a/lib/api_account.go
+++ b/lib/api_account.go
@@ -1,22 +1,22 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "github.com/antihax/optional"
)
// Linger please
@@ -26,18 +26,18 @@ var (
type AccountApiService service
-/*
+/*
AccountApiService Get your account information, plan and credits details
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return GetAccount
*/
func (a *AccountApiService) GetAccount(ctx context.Context) (GetAccount, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetAccount
)
@@ -75,7 +75,7 @@ func (a *AccountApiService) GetAccount(ctx context.Context) (GetAccount, *http.R
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -88,7 +88,7 @@ func (a *AccountApiService) GetAccount(ctx context.Context) (GetAccount, *http.R
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -109,36 +109,36 @@ func (a *AccountApiService) GetAccount(ctx context.Context) (GetAccount, *http.R
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetAccount
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
AccountApiService Get user activity logs
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *GetAccountActivityOpts - Optional Parameters:
@@ -150,19 +150,19 @@ AccountApiService Get user activity logs
@return GetAccountActivity
*/
-type GetAccountActivityOpts struct {
+type GetAccountActivityOpts struct {
StartDate optional.String
- EndDate optional.String
- Limit optional.Int64
- Offset optional.Int64
+ EndDate optional.String
+ Limit optional.Int64
+ Offset optional.Int64
}
func (a *AccountApiService) GetAccountActivity(ctx context.Context, localVarOptionals *GetAccountActivityOpts) (GetAccountActivity, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetAccountActivity
)
@@ -212,7 +212,7 @@ func (a *AccountApiService) GetAccountActivity(ctx context.Context, localVarOpti
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -225,7 +225,7 @@ func (a *AccountApiService) GetAccountActivity(ctx context.Context, localVarOpti
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -246,40 +246,40 @@ func (a *AccountApiService) GetAccountActivity(ctx context.Context, localVarOpti
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetAccountActivity
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
diff --git a/lib/api_companies.go b/lib/api_companies.go
index d61cebd..cae79f2 100644
--- a/lib/api_companies.go
+++ b/lib/api_companies.go
@@ -1,23 +1,23 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "fmt"
+ "github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "fmt"
- "github.com/antihax/optional"
)
// Linger please
@@ -27,18 +27,18 @@ var (
type CompaniesApiService service
-/*
+/*
CompaniesApiService Get company attributes
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return CompanyAttributes
*/
func (a *CompaniesApiService) CompaniesAttributesGet(ctx context.Context) (CompanyAttributes, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CompanyAttributes
)
@@ -76,7 +76,7 @@ func (a *CompaniesApiService) CompaniesAttributesGet(ctx context.Context) (Compa
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -89,7 +89,7 @@ func (a *CompaniesApiService) CompaniesAttributesGet(ctx context.Context) (Compa
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -110,36 +110,36 @@ func (a *CompaniesApiService) CompaniesAttributesGet(ctx context.Context) (Compa
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v CompanyAttributes
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
CompaniesApiService Get all companies
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *CompaniesGetOpts - Optional Parameters:
@@ -154,22 +154,22 @@ CompaniesApiService Get all companies
@return CompaniesList
*/
-type CompaniesGetOpts struct {
- Filters optional.String
+type CompaniesGetOpts struct {
+ Filters optional.String
LinkedContactsIds optional.Int64
- LinkedDealsIds optional.String
- Page optional.Int64
- Limit optional.Int64
- Sort optional.String
- SortBy optional.String
+ LinkedDealsIds optional.String
+ Page optional.Int64
+ Limit optional.Int64
+ Sort optional.String
+ SortBy optional.String
}
func (a *CompaniesApiService) CompaniesGet(ctx context.Context, localVarOptionals *CompaniesGetOpts) (CompaniesList, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CompaniesList
)
@@ -228,7 +228,7 @@ func (a *CompaniesApiService) CompaniesGet(ctx context.Context, localVarOptional
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -241,7 +241,7 @@ func (a *CompaniesApiService) CompaniesGet(ctx context.Context, localVarOptional
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -262,52 +262,50 @@ func (a *CompaniesApiService) CompaniesGet(ctx context.Context, localVarOptional
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v CompaniesList
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
CompaniesApiService Delete a company
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id
*/
func (a *CompaniesApiService) CompaniesIdDelete(ctx context.Context, id string) (*http.Response, error) {
var (
@@ -315,7 +313,6 @@ func (a *CompaniesApiService) CompaniesIdDelete(ctx context.Context, id string)
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -353,7 +350,7 @@ func (a *CompaniesApiService) CompaniesIdDelete(ctx context.Context, id string)
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -366,7 +363,7 @@ func (a *CompaniesApiService) CompaniesIdDelete(ctx context.Context, id string)
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -385,54 +382,53 @@ func (a *CompaniesApiService) CompaniesIdDelete(ctx context.Context, id string)
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
CompaniesApiService Get a company
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id
@return Company
*/
func (a *CompaniesApiService) CompaniesIdGet(ctx context.Context, id string) (Company, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue Company
)
@@ -471,7 +467,7 @@ func (a *CompaniesApiService) CompaniesIdGet(ctx context.Context, id string) (Co
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -484,7 +480,7 @@ func (a *CompaniesApiService) CompaniesIdGet(ctx context.Context, id string) (Co
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -505,71 +501,71 @@ func (a *CompaniesApiService) CompaniesIdGet(ctx context.Context, id string) (Co
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v Company
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
CompaniesApiService Update a company
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id
- * @param body Updated company details.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id
+ - @param body Updated company details.
@return Company
*/
func (a *CompaniesApiService) CompaniesIdPatch(ctx context.Context, id string, body Body6) (Company, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Patch")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Patch")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue Company
)
@@ -610,7 +606,7 @@ func (a *CompaniesApiService) CompaniesIdPatch(ctx context.Context, id string, b
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -623,7 +619,7 @@ func (a *CompaniesApiService) CompaniesIdPatch(ctx context.Context, id string, b
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -644,64 +640,62 @@ func (a *CompaniesApiService) CompaniesIdPatch(ctx context.Context, id string, b
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v Company
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
CompaniesApiService Link and Unlink company with contacts and deals
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id
- * @param body Linked / Unlinked contacts and deals ids.
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id
+ - @param body Linked / Unlinked contacts and deals ids.
*/
func (a *CompaniesApiService) CompaniesLinkUnlinkIdPatch(ctx context.Context, id string, body Body7) (*http.Response, error) {
var (
@@ -709,7 +703,6 @@ func (a *CompaniesApiService) CompaniesLinkUnlinkIdPatch(ctx context.Context, id
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -749,7 +742,7 @@ func (a *CompaniesApiService) CompaniesLinkUnlinkIdPatch(ctx context.Context, id
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -762,7 +755,7 @@ func (a *CompaniesApiService) CompaniesLinkUnlinkIdPatch(ctx context.Context, id
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -781,43 +774,42 @@ func (a *CompaniesApiService) CompaniesLinkUnlinkIdPatch(ctx context.Context, id
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
CompaniesApiService Create a company
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param body Company create data.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param body Company create data.
@return InlineResponse2002
*/
func (a *CompaniesApiService) CompaniesPost(ctx context.Context, body Body5) (InlineResponse2002, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue InlineResponse2002
)
@@ -857,7 +849,7 @@ func (a *CompaniesApiService) CompaniesPost(ctx context.Context, body Body5) (In
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -870,7 +862,7 @@ func (a *CompaniesApiService) CompaniesPost(ctx context.Context, body Body5) (In
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -891,29 +883,29 @@ func (a *CompaniesApiService) CompaniesPost(ctx context.Context, body Body5) (In
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v InlineResponse2002
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
diff --git a/lib/api_contacts.go b/lib/api_contacts.go
index beb5840..89c3932 100644
--- a/lib/api_contacts.go
+++ b/lib/api_contacts.go
@@ -1,23 +1,23 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "fmt"
+ "github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "fmt"
- "github.com/antihax/optional"
)
// Linger please
@@ -27,20 +27,20 @@ var (
type ContactsApiService service
-/*
+/*
ContactsApiService Add existing contacts to a list
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param listId Id of the list
- * @param contactEmails Emails addresses OR IDs of the contacts
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param listId Id of the list
+ - @param contactEmails Emails addresses OR IDs of the contacts
@return PostContactInfo
*/
func (a *ContactsApiService) AddContactToList(ctx context.Context, listId int64, contactEmails AddContactToList) (PostContactInfo, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue PostContactInfo
)
@@ -81,7 +81,7 @@ func (a *ContactsApiService) AddContactToList(ctx context.Context, listId int64,
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -94,7 +94,7 @@ func (a *ContactsApiService) AddContactToList(ctx context.Context, listId int64,
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -115,65 +115,63 @@ func (a *ContactsApiService) AddContactToList(ctx context.Context, listId int64,
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v PostContactInfo
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Create contact attribute
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param attributeCategory Category of the attribute
- * @param attributeName Name of the attribute
- * @param createAttribute Values to create an attribute
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param attributeCategory Category of the attribute
+ - @param attributeName Name of the attribute
+ - @param createAttribute Values to create an attribute
*/
func (a *ContactsApiService) CreateAttribute(ctx context.Context, attributeCategory string, attributeName string, createAttribute CreateAttribute) (*http.Response, error) {
var (
@@ -181,7 +179,6 @@ func (a *ContactsApiService) CreateAttribute(ctx context.Context, attributeCateg
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -222,7 +219,7 @@ func (a *ContactsApiService) CreateAttribute(ctx context.Context, attributeCateg
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -235,7 +232,7 @@ func (a *ContactsApiService) CreateAttribute(ctx context.Context, attributeCateg
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -254,43 +251,42 @@ func (a *ContactsApiService) CreateAttribute(ctx context.Context, attributeCateg
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Create a contact
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param createContact Values to create a contact
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param createContact Values to create a contact
@return CreateUpdateContactModel
*/
func (a *ContactsApiService) CreateContact(ctx context.Context, createContact CreateContact) (CreateUpdateContactModel, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreateUpdateContactModel
)
@@ -330,7 +326,7 @@ func (a *ContactsApiService) CreateContact(ctx context.Context, createContact Cr
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -343,7 +339,7 @@ func (a *ContactsApiService) CreateContact(ctx context.Context, createContact Cr
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -364,52 +360,50 @@ func (a *ContactsApiService) CreateContact(ctx context.Context, createContact Cr
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v CreateUpdateContactModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Create Contact via DOI (Double-Opt-In) Flow
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param createDoiContact Values to create the Double opt-in (DOI) contact
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param createDoiContact Values to create the Double opt-in (DOI) contact
*/
func (a *ContactsApiService) CreateDoiContact(ctx context.Context, createDoiContact CreateDoiContact) (*http.Response, error) {
var (
@@ -417,7 +411,6 @@ func (a *ContactsApiService) CreateDoiContact(ctx context.Context, createDoiCont
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -456,7 +449,7 @@ func (a *ContactsApiService) CreateDoiContact(ctx context.Context, createDoiCont
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -469,7 +462,7 @@ func (a *ContactsApiService) CreateDoiContact(ctx context.Context, createDoiCont
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -488,43 +481,42 @@ func (a *ContactsApiService) CreateDoiContact(ctx context.Context, createDoiCont
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Create a folder
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param createFolder Name of the folder
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param createFolder Name of the folder
@return CreateModel
*/
func (a *ContactsApiService) CreateFolder(ctx context.Context, createFolder CreateUpdateFolder) (CreateModel, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreateModel
)
@@ -564,7 +556,7 @@ func (a *ContactsApiService) CreateFolder(ctx context.Context, createFolder Crea
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -577,7 +569,7 @@ func (a *ContactsApiService) CreateFolder(ctx context.Context, createFolder Crea
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -598,59 +590,59 @@ func (a *ContactsApiService) CreateFolder(ctx context.Context, createFolder Crea
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v CreateModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Create a list
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param createList Values to create a list
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param createList Values to create a list
@return CreateModel
*/
func (a *ContactsApiService) CreateList(ctx context.Context, createList CreateList) (CreateModel, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreateModel
)
@@ -690,7 +682,7 @@ func (a *ContactsApiService) CreateList(ctx context.Context, createList CreateLi
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -703,7 +695,7 @@ func (a *ContactsApiService) CreateList(ctx context.Context, createList CreateLi
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -724,53 +716,51 @@ func (a *ContactsApiService) CreateList(ctx context.Context, createList CreateLi
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v CreateModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Delete an attribute
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param attributeCategory Category of the attribute
- * @param attributeName Name of the existing attribute
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param attributeCategory Category of the attribute
+ - @param attributeName Name of the existing attribute
*/
func (a *ContactsApiService) DeleteAttribute(ctx context.Context, attributeCategory string, attributeName string) (*http.Response, error) {
var (
@@ -778,7 +768,6 @@ func (a *ContactsApiService) DeleteAttribute(ctx context.Context, attributeCateg
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -817,7 +806,7 @@ func (a *ContactsApiService) DeleteAttribute(ctx context.Context, attributeCateg
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -830,7 +819,7 @@ func (a *ContactsApiService) DeleteAttribute(ctx context.Context, attributeCateg
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -849,47 +838,44 @@ func (a *ContactsApiService) DeleteAttribute(ctx context.Context, attributeCateg
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Delete a contact
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param identifier Email (urlencoded) OR ID of the contact
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param identifier Email (urlencoded) OR ID of the contact
*/
func (a *ContactsApiService) DeleteContact(ctx context.Context, identifier string) (*http.Response, error) {
var (
@@ -897,7 +883,6 @@ func (a *ContactsApiService) DeleteContact(ctx context.Context, identifier strin
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -935,7 +920,7 @@ func (a *ContactsApiService) DeleteContact(ctx context.Context, identifier strin
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -948,7 +933,7 @@ func (a *ContactsApiService) DeleteContact(ctx context.Context, identifier strin
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -967,58 +952,55 @@ func (a *ContactsApiService) DeleteContact(ctx context.Context, identifier strin
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 405 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Delete a folder (and all its lists)
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param folderId Id of the folder
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param folderId Id of the folder
*/
func (a *ContactsApiService) DeleteFolder(ctx context.Context, folderId int64) (*http.Response, error) {
var (
@@ -1026,7 +1008,6 @@ func (a *ContactsApiService) DeleteFolder(ctx context.Context, folderId int64) (
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -1064,7 +1045,7 @@ func (a *ContactsApiService) DeleteFolder(ctx context.Context, folderId int64) (
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1077,7 +1058,7 @@ func (a *ContactsApiService) DeleteFolder(ctx context.Context, folderId int64) (
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1096,47 +1077,44 @@ func (a *ContactsApiService) DeleteFolder(ctx context.Context, folderId int64) (
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Delete a list
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param listId Id of the list
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param listId Id of the list
*/
func (a *ContactsApiService) DeleteList(ctx context.Context, listId int64) (*http.Response, error) {
var (
@@ -1144,7 +1122,6 @@ func (a *ContactsApiService) DeleteList(ctx context.Context, listId int64) (*htt
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -1182,7 +1159,7 @@ func (a *ContactsApiService) DeleteList(ctx context.Context, listId int64) (*htt
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1195,7 +1172,7 @@ func (a *ContactsApiService) DeleteList(ctx context.Context, listId int64) (*htt
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1214,53 +1191,52 @@ func (a *ContactsApiService) DeleteList(ctx context.Context, listId int64) (*htt
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService List all attributes
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return GetAttributes
*/
func (a *ContactsApiService) GetAttributes(ctx context.Context) (GetAttributes, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetAttributes
)
@@ -1298,7 +1274,7 @@ func (a *ContactsApiService) GetAttributes(ctx context.Context) (GetAttributes,
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1311,7 +1287,7 @@ func (a *ContactsApiService) GetAttributes(ctx context.Context) (GetAttributes,
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1332,58 +1308,58 @@ func (a *ContactsApiService) GetAttributes(ctx context.Context) (GetAttributes,
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetAttributes
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Get a contact's details
Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats (https://developers.brevo.com/reference/contacts-7#getcontactstats) endpoint with the appropriate date ranges.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value
* @param optional nil or *GetContactInfoOpts - Optional Parameters:
- * @param "StartDate" (optional.String) - **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate
- * @param "EndDate" (optional.String) - **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate.
+ * @param "StartDate" (optional.String) - **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate
+ * @param "EndDate" (optional.String) - **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate.
@return GetExtendedContactDetails
*/
-type GetContactInfoOpts struct {
+type GetContactInfoOpts struct {
StartDate optional.String
- EndDate optional.String
+ EndDate optional.String
}
func (a *ContactsApiService) GetContactInfo(ctx context.Context, identifier string, localVarOptionals *GetContactInfoOpts) (GetExtendedContactDetails, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetExtendedContactDetails
)
@@ -1428,7 +1404,7 @@ func (a *ContactsApiService) GetContactInfo(ctx context.Context, identifier stri
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1441,7 +1417,7 @@ func (a *ContactsApiService) GetContactInfo(ctx context.Context, identifier stri
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1462,58 +1438,58 @@ func (a *ContactsApiService) GetContactInfo(ctx context.Context, identifier stri
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetExtendedContactDetails
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Get email campaigns' statistics for a contact
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param identifier Email (urlencoded) OR ID of the contact
@@ -1524,17 +1500,17 @@ ContactsApiService Get email campaigns' statistics for a contact
@return GetContactCampaignStats
*/
-type GetContactStatsOpts struct {
+type GetContactStatsOpts struct {
StartDate optional.String
- EndDate optional.String
+ EndDate optional.String
}
func (a *ContactsApiService) GetContactStats(ctx context.Context, identifier string, localVarOptionals *GetContactStatsOpts) (GetContactCampaignStats, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetContactCampaignStats
)
@@ -1579,7 +1555,7 @@ func (a *ContactsApiService) GetContactStats(ctx context.Context, identifier str
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1592,7 +1568,7 @@ func (a *ContactsApiService) GetContactStats(ctx context.Context, identifier str
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1613,58 +1589,58 @@ func (a *ContactsApiService) GetContactStats(ctx context.Context, identifier str
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetContactCampaignStats
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Get all the contacts
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *GetContactsOpts - Optional Parameters:
@@ -1675,28 +1651,28 @@ ContactsApiService Get all the contacts
* @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
* @param "SegmentId" (optional.Int64) - Id of the segment. **Either listIds or segmentId can be passed.**
* @param "ListIds" (optional.Interface of []int64) - Ids of the list. **Either listIds or segmentId can be passed.**
- * @param "Filter" (optional.String) - Filter the contacts on the basis of attributes. **Allowed operator: equals. (e.g. filter=equals(FIRSTNAME,\"Antoine\"), filter=equals(B1, true), filter=equals(DOB, \"1989-11-23\"))**
+ * @param "Filter" (optional.String) - Filter the contacts on the basis of attributes. **Allowed operator: equals. (e.g. filter=equals(FIRSTNAME,\"Antoine\"), filter=equals(B1, true), filter=equals(DOB, \"1989-11-23\"))**
@return GetContacts
*/
-type GetContactsOpts struct {
- Limit optional.Int64
- Offset optional.Int64
+type GetContactsOpts struct {
+ Limit optional.Int64
+ Offset optional.Int64
ModifiedSince optional.String
- CreatedSince optional.String
- Sort optional.String
- SegmentId optional.Int64
- ListIds optional.Interface
- Filter optional.String
+ CreatedSince optional.String
+ Sort optional.String
+ SegmentId optional.Int64
+ ListIds optional.Interface
+ Filter optional.String
}
func (a *ContactsApiService) GetContacts(ctx context.Context, localVarOptionals *GetContactsOpts) (GetContacts, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetContacts
)
@@ -1758,7 +1734,7 @@ func (a *ContactsApiService) GetContacts(ctx context.Context, localVarOptionals
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1771,7 +1747,7 @@ func (a *ContactsApiService) GetContacts(ctx context.Context, localVarOptionals
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1792,47 +1768,47 @@ func (a *ContactsApiService) GetContacts(ctx context.Context, localVarOptionals
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetContacts
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Get contacts in a list
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param listId Id of the list
@@ -1845,19 +1821,19 @@ ContactsApiService Get contacts in a list
@return GetContacts
*/
-type GetContactsFromListOpts struct {
+type GetContactsFromListOpts struct {
ModifiedSince optional.String
- Limit optional.Int64
- Offset optional.Int64
- Sort optional.String
+ Limit optional.Int64
+ Offset optional.Int64
+ Sort optional.String
}
func (a *ContactsApiService) GetContactsFromList(ctx context.Context, listId int64, localVarOptionals *GetContactsFromListOpts) (GetContacts, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetContacts
)
@@ -1908,7 +1884,7 @@ func (a *ContactsApiService) GetContactsFromList(ctx context.Context, listId int
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1921,7 +1897,7 @@ func (a *ContactsApiService) GetContactsFromList(ctx context.Context, listId int
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1942,70 +1918,70 @@ func (a *ContactsApiService) GetContactsFromList(ctx context.Context, listId int
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetContacts
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Returns a folder's details
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param folderId id of the folder
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param folderId id of the folder
@return GetFolder
*/
func (a *ContactsApiService) GetFolder(ctx context.Context, folderId int64) (GetFolder, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetFolder
)
@@ -2044,7 +2020,7 @@ func (a *ContactsApiService) GetFolder(ctx context.Context, folderId int64) (Get
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2057,7 +2033,7 @@ func (a *ContactsApiService) GetFolder(ctx context.Context, folderId int64) (Get
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2078,58 +2054,58 @@ func (a *ContactsApiService) GetFolder(ctx context.Context, folderId int64) (Get
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetFolder
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Get lists in a folder
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param folderId Id of the folder
@@ -2141,18 +2117,18 @@ ContactsApiService Get lists in a folder
@return GetFolderLists
*/
-type GetFolderListsOpts struct {
- Limit optional.Int64
+type GetFolderListsOpts struct {
+ Limit optional.Int64
Offset optional.Int64
- Sort optional.String
+ Sort optional.String
}
func (a *ContactsApiService) GetFolderLists(ctx context.Context, folderId int64, localVarOptionals *GetFolderListsOpts) (GetFolderLists, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetFolderLists
)
@@ -2200,7 +2176,7 @@ func (a *ContactsApiService) GetFolderLists(ctx context.Context, folderId int64,
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2213,7 +2189,7 @@ func (a *ContactsApiService) GetFolderLists(ctx context.Context, folderId int64,
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2234,58 +2210,58 @@ func (a *ContactsApiService) GetFolderLists(ctx context.Context, folderId int64,
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetFolderLists
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Get all folders
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param limit Number of documents per page
@@ -2296,16 +2272,16 @@ ContactsApiService Get all folders
@return GetFolders
*/
-type GetFoldersOpts struct {
+type GetFoldersOpts struct {
Sort optional.String
}
func (a *ContactsApiService) GetFolders(ctx context.Context, limit int64, offset int64, localVarOptionals *GetFoldersOpts) (GetFolders, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetFolders
)
@@ -2354,7 +2330,7 @@ func (a *ContactsApiService) GetFolders(ctx context.Context, limit int64, offset
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2367,7 +2343,7 @@ func (a *ContactsApiService) GetFolders(ctx context.Context, limit int64, offset
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2388,47 +2364,47 @@ func (a *ContactsApiService) GetFolders(ctx context.Context, limit int64, offset
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetFolders
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Get a list's details
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param listId Id of the list
@@ -2439,17 +2415,17 @@ ContactsApiService Get a list's details
@return GetExtendedList
*/
-type GetListOpts struct {
+type GetListOpts struct {
StartDate optional.String
- EndDate optional.String
+ EndDate optional.String
}
func (a *ContactsApiService) GetList(ctx context.Context, listId int64, localVarOptionals *GetListOpts) (GetExtendedList, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetExtendedList
)
@@ -2494,7 +2470,7 @@ func (a *ContactsApiService) GetList(ctx context.Context, listId int64, localVar
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2507,7 +2483,7 @@ func (a *ContactsApiService) GetList(ctx context.Context, listId int64, localVar
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2528,58 +2504,58 @@ func (a *ContactsApiService) GetList(ctx context.Context, listId int64, localVar
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetExtendedList
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Get all the lists
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *GetListsOpts - Optional Parameters:
@@ -2590,18 +2566,18 @@ ContactsApiService Get all the lists
@return GetLists
*/
-type GetListsOpts struct {
- Limit optional.Int64
+type GetListsOpts struct {
+ Limit optional.Int64
Offset optional.Int64
- Sort optional.String
+ Sort optional.String
}
func (a *ContactsApiService) GetLists(ctx context.Context, localVarOptionals *GetListsOpts) (GetLists, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetLists
)
@@ -2648,7 +2624,7 @@ func (a *ContactsApiService) GetLists(ctx context.Context, localVarOptionals *Ge
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2661,7 +2637,7 @@ func (a *ContactsApiService) GetLists(ctx context.Context, localVarOptionals *Ge
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2682,47 +2658,47 @@ func (a *ContactsApiService) GetLists(ctx context.Context, localVarOptionals *Ge
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetLists
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Get all the Segments
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param limit Number of documents per page
@@ -2733,16 +2709,16 @@ ContactsApiService Get all the Segments
@return GetSegments
*/
-type GetSegmentsOpts struct {
+type GetSegmentsOpts struct {
Sort optional.String
}
func (a *ContactsApiService) GetSegments(ctx context.Context, limit int64, offset int64, localVarOptionals *GetSegmentsOpts) (GetSegments, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetSegments
)
@@ -2791,7 +2767,7 @@ func (a *ContactsApiService) GetSegments(ctx context.Context, limit int64, offse
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2804,7 +2780,7 @@ func (a *ContactsApiService) GetSegments(ctx context.Context, limit int64, offse
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2825,60 +2801,60 @@ func (a *ContactsApiService) GetSegments(ctx context.Context, limit int64, offse
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetSegments
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Import contacts
-It returns the background process ID which on completion calls the notify URL that you have set in the input. **Note**: - Any contact attribute that doesn't exist in your account will be ignored at import end.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param requestContactImport Values to import contacts in Brevo. To know more about the expected format, please have a look at ``https://help.brevo.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns``
+It returns the background process ID which on completion calls the notify URL that you have set in the input. **Note**: - Any contact attribute that doesn't exist in your account will be ignored at import end.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param requestContactImport Values to import contacts in Brevo. To know more about the expected format, please have a look at ``https://help.brevo.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns``
@return CreatedProcessId
*/
func (a *ContactsApiService) ImportContacts(ctx context.Context, requestContactImport RequestContactImport) (CreatedProcessId, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreatedProcessId
)
@@ -2918,7 +2894,7 @@ func (a *ContactsApiService) ImportContacts(ctx context.Context, requestContactI
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2931,7 +2907,7 @@ func (a *ContactsApiService) ImportContacts(ctx context.Context, requestContactI
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2952,60 +2928,60 @@ func (a *ContactsApiService) ImportContacts(ctx context.Context, requestContactI
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 202 {
var v CreatedProcessId
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Delete a contact from a list
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param listId Id of the list
- * @param contactEmails Emails addresses OR IDs of the contacts
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param listId Id of the list
+ - @param contactEmails Emails addresses OR IDs of the contacts
@return PostContactInfo
*/
func (a *ContactsApiService) RemoveContactFromList(ctx context.Context, listId int64, contactEmails RemoveContactFromList) (PostContactInfo, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue PostContactInfo
)
@@ -3046,7 +3022,7 @@ func (a *ContactsApiService) RemoveContactFromList(ctx context.Context, listId i
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -3059,7 +3035,7 @@ func (a *ContactsApiService) RemoveContactFromList(ctx context.Context, listId i
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -3080,71 +3056,71 @@ func (a *ContactsApiService) RemoveContactFromList(ctx context.Context, listId i
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v PostContactInfo
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Export contacts
It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param requestContactExport Values to request a contact export
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param requestContactExport Values to request a contact export
@return CreatedProcessId
*/
func (a *ContactsApiService) RequestContactExport(ctx context.Context, requestContactExport RequestContactExport) (CreatedProcessId, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreatedProcessId
)
@@ -3184,7 +3160,7 @@ func (a *ContactsApiService) RequestContactExport(ctx context.Context, requestCo
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -3197,7 +3173,7 @@ func (a *ContactsApiService) RequestContactExport(ctx context.Context, requestCo
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -3218,54 +3194,52 @@ func (a *ContactsApiService) RequestContactExport(ctx context.Context, requestCo
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 202 {
var v CreatedProcessId
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Update contact attribute
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param attributeCategory Category of the attribute
- * @param attributeName Name of the existing attribute
- * @param updateAttribute Values to update an attribute
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param attributeCategory Category of the attribute
+ - @param attributeName Name of the existing attribute
+ - @param updateAttribute Values to update an attribute
*/
func (a *ContactsApiService) UpdateAttribute(ctx context.Context, attributeCategory string, attributeName string, updateAttribute UpdateAttribute) (*http.Response, error) {
var (
@@ -3273,7 +3247,6 @@ func (a *ContactsApiService) UpdateAttribute(ctx context.Context, attributeCateg
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -3314,7 +3287,7 @@ func (a *ContactsApiService) UpdateAttribute(ctx context.Context, attributeCateg
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -3327,7 +3300,7 @@ func (a *ContactsApiService) UpdateAttribute(ctx context.Context, attributeCateg
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -3346,47 +3319,44 @@ func (a *ContactsApiService) UpdateAttribute(ctx context.Context, attributeCateg
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Update multiple contacts
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param updateBatchContacts Values to update multiple contacts
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param updateBatchContacts Values to update multiple contacts
*/
func (a *ContactsApiService) UpdateBatchContacts(ctx context.Context, updateBatchContacts UpdateBatchContacts) (*http.Response, error) {
var (
@@ -3394,7 +3364,6 @@ func (a *ContactsApiService) UpdateBatchContacts(ctx context.Context, updateBatc
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -3433,7 +3402,7 @@ func (a *ContactsApiService) UpdateBatchContacts(ctx context.Context, updateBatc
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -3446,7 +3415,7 @@ func (a *ContactsApiService) UpdateBatchContacts(ctx context.Context, updateBatc
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -3465,37 +3434,34 @@ func (a *ContactsApiService) UpdateBatchContacts(ctx context.Context, updateBatc
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Update a contact
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param identifier Email (urlencoded) OR ID of the contact
- * @param updateContact Values to update a contact
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param identifier Email (urlencoded) OR ID of the contact
+ - @param updateContact Values to update a contact
*/
func (a *ContactsApiService) UpdateContact(ctx context.Context, identifier string, updateContact UpdateContact) (*http.Response, error) {
var (
@@ -3503,7 +3469,6 @@ func (a *ContactsApiService) UpdateContact(ctx context.Context, identifier strin
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -3543,7 +3508,7 @@ func (a *ContactsApiService) UpdateContact(ctx context.Context, identifier strin
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -3556,7 +3521,7 @@ func (a *ContactsApiService) UpdateContact(ctx context.Context, identifier strin
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -3575,48 +3540,45 @@ func (a *ContactsApiService) UpdateContact(ctx context.Context, identifier strin
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Update a folder
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param folderId Id of the folder
- * @param updateFolder Name of the folder
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param folderId Id of the folder
+ - @param updateFolder Name of the folder
*/
func (a *ContactsApiService) UpdateFolder(ctx context.Context, folderId int64, updateFolder CreateUpdateFolder) (*http.Response, error) {
var (
@@ -3624,7 +3586,6 @@ func (a *ContactsApiService) UpdateFolder(ctx context.Context, folderId int64, u
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -3664,7 +3625,7 @@ func (a *ContactsApiService) UpdateFolder(ctx context.Context, folderId int64, u
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -3677,7 +3638,7 @@ func (a *ContactsApiService) UpdateFolder(ctx context.Context, folderId int64, u
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -3696,48 +3657,45 @@ func (a *ContactsApiService) UpdateFolder(ctx context.Context, folderId int64, u
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
ContactsApiService Update a list
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param listId Id of the list
- * @param updateList Values to update a list
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param listId Id of the list
+ - @param updateList Values to update a list
*/
func (a *ContactsApiService) UpdateList(ctx context.Context, listId int64, updateList UpdateList) (*http.Response, error) {
var (
@@ -3745,7 +3703,6 @@ func (a *ContactsApiService) UpdateList(ctx context.Context, listId int64, updat
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -3785,7 +3742,7 @@ func (a *ContactsApiService) UpdateList(ctx context.Context, listId int64, updat
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -3798,7 +3755,7 @@ func (a *ContactsApiService) UpdateList(ctx context.Context, listId int64, updat
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -3817,35 +3774,34 @@ func (a *ContactsApiService) UpdateList(ctx context.Context, listId int64, updat
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
diff --git a/lib/api_conversations.go b/lib/api_conversations.go
index d1396f1..c491fb7 100644
--- a/lib/api_conversations.go
+++ b/lib/api_conversations.go
@@ -1,22 +1,22 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "fmt"
)
// Linger please
@@ -26,13 +26,11 @@ var (
type ConversationsApiService service
-/*
+/*
ConversationsApiService Sets agent’s status to online for 2-3 minutes
We recommend pinging this endpoint every minute for as long as the agent has to be considered online.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param body Agent fields.
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param body Agent fields.
*/
func (a *ConversationsApiService) ConversationsAgentOnlinePingPost(ctx context.Context, body Body17) (*http.Response, error) {
var (
@@ -40,7 +38,6 @@ func (a *ConversationsApiService) ConversationsAgentOnlinePingPost(ctx context.C
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -79,7 +76,7 @@ func (a *ConversationsApiService) ConversationsAgentOnlinePingPost(ctx context.C
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -92,7 +89,7 @@ func (a *ConversationsApiService) ConversationsAgentOnlinePingPost(ctx context.C
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -111,37 +108,34 @@ func (a *ConversationsApiService) ConversationsAgentOnlinePingPost(ctx context.C
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
ConversationsApiService Delete a message sent by an agent
Only agents’ messages can be deleted.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id ID of the message
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id ID of the message
*/
func (a *ConversationsApiService) ConversationsMessagesIdDelete(ctx context.Context, id string) (*http.Response, error) {
var (
@@ -149,7 +143,6 @@ func (a *ConversationsApiService) ConversationsMessagesIdDelete(ctx context.Cont
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -187,7 +180,7 @@ func (a *ConversationsApiService) ConversationsMessagesIdDelete(ctx context.Cont
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -200,7 +193,7 @@ func (a *ConversationsApiService) ConversationsMessagesIdDelete(ctx context.Cont
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -219,54 +212,53 @@ func (a *ConversationsApiService) ConversationsMessagesIdDelete(ctx context.Cont
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
ConversationsApiService Get a message
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id ID of the message
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id ID of the message
@return ConversationsMessage
*/
func (a *ConversationsApiService) ConversationsMessagesIdGet(ctx context.Context, id string) (ConversationsMessage, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue ConversationsMessage
)
@@ -305,7 +297,7 @@ func (a *ConversationsApiService) ConversationsMessagesIdGet(ctx context.Context
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -318,7 +310,7 @@ func (a *ConversationsApiService) ConversationsMessagesIdGet(ctx context.Context
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -339,78 +331,78 @@ func (a *ConversationsApiService) ConversationsMessagesIdGet(ctx context.Context
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v ConversationsMessage
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ConversationsApiService Update a message sent by an agent
Only agents’ messages can be edited.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param id ID of the message
* @param optional nil or *ConversationsMessagesIdPutOpts - Optional Parameters:
- * @param "Body" (optional.Interface of Body14) -
+ * @param "Body" (optional.Interface of Body14) -
@return ConversationsMessage
*/
-type ConversationsMessagesIdPutOpts struct {
+type ConversationsMessagesIdPutOpts struct {
Body optional.Interface
}
func (a *ConversationsApiService) ConversationsMessagesIdPut(ctx context.Context, id string, localVarOptionals *ConversationsMessagesIdPutOpts) (ConversationsMessage, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Put")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Put")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue ConversationsMessage
)
@@ -441,10 +433,10 @@ func (a *ConversationsApiService) ConversationsMessagesIdPut(ctx context.Context
}
// body params
if localVarOptionals != nil && localVarOptionals.Body.IsSet() {
-
+
localVarOptionalBody, localVarOptionalBodyok := localVarOptionals.Body.Value().(Body14)
if !localVarOptionalBodyok {
- return localVarReturnValue, nil, reportError("body should be Body14")
+ return localVarReturnValue, nil, reportError("body should be Body14")
}
localVarPostBody = &localVarOptionalBody
}
@@ -458,7 +450,7 @@ func (a *ConversationsApiService) ConversationsMessagesIdPut(ctx context.Context
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -471,7 +463,7 @@ func (a *ConversationsApiService) ConversationsMessagesIdPut(ctx context.Context
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -492,70 +484,70 @@ func (a *ConversationsApiService) ConversationsMessagesIdPut(ctx context.Context
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v ConversationsMessage
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ConversationsApiService Send a message as an agent
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param body Message fields.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param body Message fields.
@return ConversationsMessage
*/
func (a *ConversationsApiService) ConversationsMessagesPost(ctx context.Context, body Body13) (ConversationsMessage, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue ConversationsMessage
)
@@ -595,7 +587,7 @@ func (a *ConversationsApiService) ConversationsMessagesPost(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -608,7 +600,7 @@ func (a *ConversationsApiService) ConversationsMessagesPost(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -629,52 +621,50 @@ func (a *ConversationsApiService) ConversationsMessagesPost(ctx context.Context,
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v ConversationsMessage
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ConversationsApiService Delete an automated message
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id ID of the message
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id ID of the message
*/
func (a *ConversationsApiService) ConversationsPushedMessagesIdDelete(ctx context.Context, id string) (*http.Response, error) {
var (
@@ -682,7 +672,6 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdDelete(ctx contex
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -720,7 +709,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdDelete(ctx contex
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -733,7 +722,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdDelete(ctx contex
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -752,54 +741,53 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdDelete(ctx contex
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
ConversationsApiService Get an automated message
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id ID of the message sent previously
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id ID of the message sent previously
@return ConversationsMessage
*/
func (a *ConversationsApiService) ConversationsPushedMessagesIdGet(ctx context.Context, id string) (ConversationsMessage, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue ConversationsMessage
)
@@ -838,7 +826,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdGet(ctx context.C
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -851,7 +839,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdGet(ctx context.C
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -872,71 +860,71 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdGet(ctx context.C
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v ConversationsMessage
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ConversationsApiService Update an automated message
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id ID of the message
- * @param body
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id ID of the message
+ - @param body
@return ConversationsMessage
*/
func (a *ConversationsApiService) ConversationsPushedMessagesIdPut(ctx context.Context, id string, body Body16) (ConversationsMessage, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Put")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Put")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue ConversationsMessage
)
@@ -977,7 +965,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdPut(ctx context.C
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -990,7 +978,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdPut(ctx context.C
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1011,71 +999,71 @@ func (a *ConversationsApiService) ConversationsPushedMessagesIdPut(ctx context.C
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v ConversationsMessage
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ConversationsApiService Send an automated message to a visitor
Example of automated messages: order status, announce new features in your web app, etc.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param body
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param body
@return ConversationsMessage
*/
func (a *ConversationsApiService) ConversationsPushedMessagesPost(ctx context.Context, body Body15) (ConversationsMessage, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue ConversationsMessage
)
@@ -1115,7 +1103,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesPost(ctx context.Co
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1128,7 +1116,7 @@ func (a *ConversationsApiService) ConversationsPushedMessagesPost(ctx context.Co
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1149,40 +1137,40 @@ func (a *ConversationsApiService) ConversationsPushedMessagesPost(ctx context.Co
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v ConversationsMessage
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
diff --git a/lib/api_coupons.go b/lib/api_coupons.go
index 473c7d2..9b11f6e 100644
--- a/lib/api_coupons.go
+++ b/lib/api_coupons.go
@@ -1,23 +1,23 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "fmt"
+ "github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "fmt"
- "github.com/antihax/optional"
)
// Linger please
@@ -27,19 +27,19 @@ var (
type CouponsApiService service
-/*
+/*
CouponsApiService Create а coupon collection
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param createCouponCollection Values to create a coupon collection
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param createCouponCollection Values to create a coupon collection
@return InlineResponse2013
*/
func (a *CouponsApiService) CreateCouponCollection(ctx context.Context, createCouponCollection CreateCouponCollection) (InlineResponse2013, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue InlineResponse2013
)
@@ -79,7 +79,7 @@ func (a *CouponsApiService) CreateCouponCollection(ctx context.Context, createCo
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -92,7 +92,7 @@ func (a *CouponsApiService) CreateCouponCollection(ctx context.Context, createCo
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -113,63 +113,61 @@ func (a *CouponsApiService) CreateCouponCollection(ctx context.Context, createCo
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v InlineResponse2013
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 401 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
CouponsApiService Create coupons for a coupon collection
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param createCoupons Values to create coupons
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param createCoupons Values to create coupons
*/
func (a *CouponsApiService) CreateCoupons(ctx context.Context, createCoupons CreateCoupons) (*http.Response, error) {
var (
@@ -177,7 +175,6 @@ func (a *CouponsApiService) CreateCoupons(ctx context.Context, createCoupons Cre
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -216,7 +213,7 @@ func (a *CouponsApiService) CreateCoupons(ctx context.Context, createCoupons Cre
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -229,7 +226,7 @@ func (a *CouponsApiService) CreateCoupons(ctx context.Context, createCoupons Cre
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -248,65 +245,64 @@ func (a *CouponsApiService) CreateCoupons(ctx context.Context, createCoupons Cre
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 401 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
CouponsApiService Get a coupon collection by id
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id Id of the collection to return
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id Id of the collection to return
@return GetCouponCollection
*/
func (a *CouponsApiService) GetCouponCollection(ctx context.Context, id string) (GetCouponCollection, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetCouponCollection
)
@@ -345,7 +341,7 @@ func (a *CouponsApiService) GetCouponCollection(ctx context.Context, id string)
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -358,7 +354,7 @@ func (a *CouponsApiService) GetCouponCollection(ctx context.Context, id string)
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -379,69 +375,69 @@ func (a *CouponsApiService) GetCouponCollection(ctx context.Context, id string)
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetCouponCollection
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 401 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
CouponsApiService Get all your coupon collections
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *GetCouponCollectionsOpts - Optional Parameters:
@@ -453,19 +449,19 @@ CouponsApiService Get all your coupon collections
@return GetCouponCollection
*/
-type GetCouponCollectionsOpts struct {
- Limit optional.Int64
+type GetCouponCollectionsOpts struct {
+ Limit optional.Int64
Offset optional.Int64
- Sort optional.String
+ Sort optional.String
SortBy optional.String
}
func (a *CouponsApiService) GetCouponCollections(ctx context.Context, localVarOptionals *GetCouponCollectionsOpts) (GetCouponCollection, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetCouponCollection
)
@@ -515,7 +511,7 @@ func (a *CouponsApiService) GetCouponCollections(ctx context.Context, localVarOp
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -528,7 +524,7 @@ func (a *CouponsApiService) GetCouponCollections(ctx context.Context, localVarOp
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -549,69 +545,69 @@ func (a *CouponsApiService) GetCouponCollections(ctx context.Context, localVarOp
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetCouponCollection
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 401 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
CouponsApiService Update a coupon collection by id
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param id Id of the collection to update
@@ -621,16 +617,16 @@ CouponsApiService Update a coupon collection by id
@return InlineResponse2008
*/
-type UpdateCouponCollectionOpts struct {
+type UpdateCouponCollectionOpts struct {
UpdateCouponCollection optional.Interface
}
func (a *CouponsApiService) UpdateCouponCollection(ctx context.Context, id string, localVarOptionals *UpdateCouponCollectionOpts) (InlineResponse2008, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Patch")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Patch")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue InlineResponse2008
)
@@ -661,10 +657,10 @@ func (a *CouponsApiService) UpdateCouponCollection(ctx context.Context, id strin
}
// body params
if localVarOptionals != nil && localVarOptionals.UpdateCouponCollection.IsSet() {
-
+
localVarOptionalUpdateCouponCollection, localVarOptionalUpdateCouponCollectionok := localVarOptionals.UpdateCouponCollection.Value().(UpdateCouponCollection)
if !localVarOptionalUpdateCouponCollectionok {
- return localVarReturnValue, nil, reportError("updateCouponCollection should be UpdateCouponCollection")
+ return localVarReturnValue, nil, reportError("updateCouponCollection should be UpdateCouponCollection")
}
localVarPostBody = &localVarOptionalUpdateCouponCollection
}
@@ -678,7 +674,7 @@ func (a *CouponsApiService) UpdateCouponCollection(ctx context.Context, id strin
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -691,7 +687,7 @@ func (a *CouponsApiService) UpdateCouponCollection(ctx context.Context, id strin
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -712,51 +708,51 @@ func (a *CouponsApiService) UpdateCouponCollection(ctx context.Context, id strin
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v InlineResponse2008
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 401 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
diff --git a/lib/api_deals.go b/lib/api_deals.go
index 332caa9..b5be9bb 100644
--- a/lib/api_deals.go
+++ b/lib/api_deals.go
@@ -1,24 +1,24 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "fmt"
+ "github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
- "strings"
- "fmt"
- "github.com/antihax/optional"
"os"
+ "strings"
)
// Linger please
@@ -28,18 +28,18 @@ var (
type DealsApiService service
-/*
+/*
DealsApiService Get deal attributes
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return DealAttributes
*/
func (a *DealsApiService) CrmAttributesDealsGet(ctx context.Context) (DealAttributes, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue DealAttributes
)
@@ -77,7 +77,7 @@ func (a *DealsApiService) CrmAttributesDealsGet(ctx context.Context) (DealAttrib
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -90,7 +90,7 @@ func (a *DealsApiService) CrmAttributesDealsGet(ctx context.Context) (DealAttrib
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -111,36 +111,36 @@ func (a *DealsApiService) CrmAttributesDealsGet(ctx context.Context) (DealAttrib
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v DealAttributes
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
DealsApiService Get all deals
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *CrmDealsGetOpts - Optional Parameters:
@@ -155,22 +155,22 @@ DealsApiService Get all deals
@return DealsList
*/
-type CrmDealsGetOpts struct {
+type CrmDealsGetOpts struct {
FiltersAttributesDealName optional.String
FiltersLinkedCompaniesIds optional.String
- FiltersLinkedContactsIds optional.String
- Offset optional.Int64
- Limit optional.Int64
- Sort optional.String
- SortBy optional.String
+ FiltersLinkedContactsIds optional.String
+ Offset optional.Int64
+ Limit optional.Int64
+ Sort optional.String
+ SortBy optional.String
}
func (a *DealsApiService) CrmDealsGet(ctx context.Context, localVarOptionals *CrmDealsGetOpts) (DealsList, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue DealsList
)
@@ -229,7 +229,7 @@ func (a *DealsApiService) CrmDealsGet(ctx context.Context, localVarOptionals *Cr
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -242,7 +242,7 @@ func (a *DealsApiService) CrmDealsGet(ctx context.Context, localVarOptionals *Cr
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -263,52 +263,50 @@ func (a *DealsApiService) CrmDealsGet(ctx context.Context, localVarOptionals *Cr
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v DealsList
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
DealsApiService Delete a deal
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id
*/
func (a *DealsApiService) CrmDealsIdDelete(ctx context.Context, id string) (*http.Response, error) {
var (
@@ -316,7 +314,6 @@ func (a *DealsApiService) CrmDealsIdDelete(ctx context.Context, id string) (*htt
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -354,7 +351,7 @@ func (a *DealsApiService) CrmDealsIdDelete(ctx context.Context, id string) (*htt
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -367,7 +364,7 @@ func (a *DealsApiService) CrmDealsIdDelete(ctx context.Context, id string) (*htt
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -386,54 +383,53 @@ func (a *DealsApiService) CrmDealsIdDelete(ctx context.Context, id string) (*htt
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
DealsApiService Get a deal
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id
@return Deal
*/
func (a *DealsApiService) CrmDealsIdGet(ctx context.Context, id string) (Deal, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue Deal
)
@@ -472,7 +468,7 @@ func (a *DealsApiService) CrmDealsIdGet(ctx context.Context, id string) (Deal, *
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -485,7 +481,7 @@ func (a *DealsApiService) CrmDealsIdGet(ctx context.Context, id string) (Deal, *
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -506,64 +502,62 @@ func (a *DealsApiService) CrmDealsIdGet(ctx context.Context, id string) (Deal, *
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v Deal
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
DealsApiService Update a deal
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id
- * @param body Updated deal details.
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id
+ - @param body Updated deal details.
*/
func (a *DealsApiService) CrmDealsIdPatch(ctx context.Context, id string, body Body9) (*http.Response, error) {
var (
@@ -571,7 +565,6 @@ func (a *DealsApiService) CrmDealsIdPatch(ctx context.Context, id string, body B
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -611,7 +604,7 @@ func (a *DealsApiService) CrmDealsIdPatch(ctx context.Context, id string, body B
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -624,7 +617,7 @@ func (a *DealsApiService) CrmDealsIdPatch(ctx context.Context, id string, body B
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -643,56 +636,55 @@ func (a *DealsApiService) CrmDealsIdPatch(ctx context.Context, id string, body B
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
DealsApiService Import deals(creation and updation)
Import deals from a CSV file with mapping options.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param file The CSV file to upload.The file should have the first row as the mapping attribute. Some default attribute names are (a) deal_id [brevo mongoID to update deals] (b) associated_contact (c) associated_company (f) any other attribute with internal name
- * @param mapping The mapping options in JSON format. json { \"link_entities\": true, // Determines whether to link related entities during the import process \"unlink_entities\": false, //Determines whether to unlink related entities during the import process. \"update_existing_records\": true, // Determines whether to update based on deal ID or treat every row as create \"unset_empty_attributes\": false // Determines whether unset a specific attribute during update if values input is blank }
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param file The CSV file to upload.The file should have the first row as the mapping attribute. Some default attribute names are (a) deal_id [brevo mongoID to update deals] (b) associated_contact (c) associated_company (f) any other attribute with internal name
+ - @param mapping The mapping options in JSON format. json { \"link_entities\": true, // Determines whether to link related entities during the import process \"unlink_entities\": false, //Determines whether to unlink related entities during the import process. \"update_existing_records\": true, // Determines whether to update based on deal ID or treat every row as create \"unset_empty_attributes\": false // Determines whether unset a specific attribute during update if values input is blank }
@return InlineResponse2003
*/
func (a *DealsApiService) CrmDealsImportPost(ctx context.Context, file *os.File, mapping string) (InlineResponse2003, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue InlineResponse2003
)
@@ -738,7 +730,7 @@ func (a *DealsApiService) CrmDealsImportPost(ctx context.Context, file *os.File,
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -751,7 +743,7 @@ func (a *DealsApiService) CrmDealsImportPost(ctx context.Context, file *os.File,
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -772,53 +764,51 @@ func (a *DealsApiService) CrmDealsImportPost(ctx context.Context, file *os.File,
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v InlineResponse2003
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v InlineResponse400
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
DealsApiService Link and Unlink a deal with contacts and companies
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id
- * @param body Linked / Unlinked contacts and companies ids.
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id
+ - @param body Linked / Unlinked contacts and companies ids.
*/
func (a *DealsApiService) CrmDealsLinkUnlinkIdPatch(ctx context.Context, id string, body Body10) (*http.Response, error) {
var (
@@ -826,7 +816,6 @@ func (a *DealsApiService) CrmDealsLinkUnlinkIdPatch(ctx context.Context, id stri
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -866,7 +855,7 @@ func (a *DealsApiService) CrmDealsLinkUnlinkIdPatch(ctx context.Context, id stri
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -879,7 +868,7 @@ func (a *DealsApiService) CrmDealsLinkUnlinkIdPatch(ctx context.Context, id stri
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -898,43 +887,42 @@ func (a *DealsApiService) CrmDealsLinkUnlinkIdPatch(ctx context.Context, id stri
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
DealsApiService Create a deal
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param body Deal create data.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param body Deal create data.
@return InlineResponse2011
*/
func (a *DealsApiService) CrmDealsPost(ctx context.Context, body Body8) (InlineResponse2011, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue InlineResponse2011
)
@@ -974,7 +962,7 @@ func (a *DealsApiService) CrmDealsPost(ctx context.Context, body Body8) (InlineR
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -987,7 +975,7 @@ func (a *DealsApiService) CrmDealsPost(ctx context.Context, body Body8) (InlineR
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1008,47 +996,47 @@ func (a *DealsApiService) CrmDealsPost(ctx context.Context, body Body8) (InlineR
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v InlineResponse2011
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
DealsApiService Get all pipelines
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return Pipelines
*/
func (a *DealsApiService) CrmPipelineDetailsAllGet(ctx context.Context) (Pipelines, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue Pipelines
)
@@ -1086,7 +1074,7 @@ func (a *DealsApiService) CrmPipelineDetailsAllGet(ctx context.Context) (Pipelin
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1099,7 +1087,7 @@ func (a *DealsApiService) CrmPipelineDetailsAllGet(ctx context.Context) (Pipelin
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1120,59 +1108,59 @@ func (a *DealsApiService) CrmPipelineDetailsAllGet(ctx context.Context) (Pipelin
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v Pipelines
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
DealsApiService Get pipeline stages
This endpoint is deprecated. Prefer /crm/pipeline/details/{pipelineID} instead.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return Pipeline
*/
func (a *DealsApiService) CrmPipelineDetailsGet(ctx context.Context) (Pipeline, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue Pipeline
)
@@ -1210,7 +1198,7 @@ func (a *DealsApiService) CrmPipelineDetailsGet(ctx context.Context) (Pipeline,
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1223,7 +1211,7 @@ func (a *DealsApiService) CrmPipelineDetailsGet(ctx context.Context) (Pipeline,
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1244,48 +1232,48 @@ func (a *DealsApiService) CrmPipelineDetailsGet(ctx context.Context) (Pipeline,
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v Pipeline
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
DealsApiService Get a pipeline
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param pipelineID
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param pipelineID
@return Pipelines
*/
func (a *DealsApiService) CrmPipelineDetailsPipelineIDGet(ctx context.Context, pipelineID string) (Pipelines, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue Pipelines
)
@@ -1324,7 +1312,7 @@ func (a *DealsApiService) CrmPipelineDetailsPipelineIDGet(ctx context.Context, p
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1337,7 +1325,7 @@ func (a *DealsApiService) CrmPipelineDetailsPipelineIDGet(ctx context.Context, p
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1358,40 +1346,40 @@ func (a *DealsApiService) CrmPipelineDetailsPipelineIDGet(ctx context.Context, p
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v Pipelines
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
diff --git a/lib/api_domains.go b/lib/api_domains.go
index dbe3f0a..00e49d1 100644
--- a/lib/api_domains.go
+++ b/lib/api_domains.go
@@ -1,22 +1,22 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "fmt"
)
// Linger please
@@ -26,19 +26,19 @@ var (
type DomainsApiService service
-/*
+/*
DomainsApiService Authenticate a domain
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param domainName Domain name
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param domainName Domain name
@return AuthenticateDomainModel
*/
func (a *DomainsApiService) AuthenticateDomain(ctx context.Context, domainName string) (AuthenticateDomainModel, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Put")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Put")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue AuthenticateDomainModel
)
@@ -77,7 +77,7 @@ func (a *DomainsApiService) AuthenticateDomain(ctx context.Context, domainName s
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -90,7 +90,7 @@ func (a *DomainsApiService) AuthenticateDomain(ctx context.Context, domainName s
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -111,58 +111,58 @@ func (a *DomainsApiService) AuthenticateDomain(ctx context.Context, domainName s
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v AuthenticateDomainModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
DomainsApiService Create a new domain
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *CreateDomainOpts - Optional Parameters:
@@ -171,16 +171,16 @@ DomainsApiService Create a new domain
@return CreateDomainModel
*/
-type CreateDomainOpts struct {
+type CreateDomainOpts struct {
DomainName optional.Interface
}
func (a *DomainsApiService) CreateDomain(ctx context.Context, localVarOptionals *CreateDomainOpts) (CreateDomainModel, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreateDomainModel
)
@@ -210,10 +210,10 @@ func (a *DomainsApiService) CreateDomain(ctx context.Context, localVarOptionals
}
// body params
if localVarOptionals != nil && localVarOptionals.DomainName.IsSet() {
-
+
localVarOptionalDomainName, localVarOptionalDomainNameok := localVarOptionals.DomainName.Value().(CreateDomain)
if !localVarOptionalDomainNameok {
- return localVarReturnValue, nil, reportError("domainName should be CreateDomain")
+ return localVarReturnValue, nil, reportError("domainName should be CreateDomain")
}
localVarPostBody = &localVarOptionalDomainName
}
@@ -227,7 +227,7 @@ func (a *DomainsApiService) CreateDomain(ctx context.Context, localVarOptionals
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -240,7 +240,7 @@ func (a *DomainsApiService) CreateDomain(ctx context.Context, localVarOptionals
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -261,52 +261,50 @@ func (a *DomainsApiService) CreateDomain(ctx context.Context, localVarOptionals
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v CreateDomainModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
DomainsApiService Delete a domain
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param domainName Domain name
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param domainName Domain name
*/
func (a *DomainsApiService) DeleteDomain(ctx context.Context, domainName string) (*http.Response, error) {
var (
@@ -314,7 +312,6 @@ func (a *DomainsApiService) DeleteDomain(ctx context.Context, domainName string)
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -352,7 +349,7 @@ func (a *DomainsApiService) DeleteDomain(ctx context.Context, domainName string)
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -365,7 +362,7 @@ func (a *DomainsApiService) DeleteDomain(ctx context.Context, domainName string)
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -384,54 +381,53 @@ func (a *DomainsApiService) DeleteDomain(ctx context.Context, domainName string)
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
DomainsApiService Validate domain configuration
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param domainName Domain name
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param domainName Domain name
@return GetDomainConfigurationModel
*/
func (a *DomainsApiService) GetDomainConfiguration(ctx context.Context, domainName string) (GetDomainConfigurationModel, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetDomainConfigurationModel
)
@@ -470,7 +466,7 @@ func (a *DomainsApiService) GetDomainConfiguration(ctx context.Context, domainNa
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -483,7 +479,7 @@ func (a *DomainsApiService) GetDomainConfiguration(ctx context.Context, domainNa
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -504,69 +500,69 @@ func (a *DomainsApiService) GetDomainConfiguration(ctx context.Context, domainNa
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetDomainConfigurationModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
DomainsApiService Get the list of all your domains
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return GetDomainsList
*/
func (a *DomainsApiService) GetDomains(ctx context.Context) (GetDomainsList, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetDomainsList
)
@@ -604,7 +600,7 @@ func (a *DomainsApiService) GetDomains(ctx context.Context) (GetDomainsList, *ht
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -617,7 +613,7 @@ func (a *DomainsApiService) GetDomains(ctx context.Context) (GetDomainsList, *ht
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -638,40 +634,40 @@ func (a *DomainsApiService) GetDomains(ctx context.Context) (GetDomainsList, *ht
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetDomainsList
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
diff --git a/lib/api_ecommerce.go b/lib/api_ecommerce.go
index f0a410f..1f2820e 100644
--- a/lib/api_ecommerce.go
+++ b/lib/api_ecommerce.go
@@ -1,23 +1,23 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "fmt"
+ "github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "fmt"
- "github.com/antihax/optional"
)
// Linger please
@@ -27,13 +27,11 @@ var (
type EcommerceApiService service
-/*
+/*
EcommerceApiService Create orders in batch
Create multiple orders at one time instead of one order at a time
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param orderBatch
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param orderBatch
*/
func (a *EcommerceApiService) CreateBatchOrder(ctx context.Context, orderBatch OrderBatch) (*http.Response, error) {
var (
@@ -41,7 +39,6 @@ func (a *EcommerceApiService) CreateBatchOrder(ctx context.Context, orderBatch O
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -80,7 +77,7 @@ func (a *EcommerceApiService) CreateBatchOrder(ctx context.Context, orderBatch O
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -93,7 +90,7 @@ func (a *EcommerceApiService) CreateBatchOrder(ctx context.Context, orderBatch O
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -112,37 +109,34 @@ func (a *EcommerceApiService) CreateBatchOrder(ctx context.Context, orderBatch O
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
EcommerceApiService Managing the status of the order
Manages the transactional status of the order
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param order
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param order
*/
func (a *EcommerceApiService) CreateOrder(ctx context.Context, order Order) (*http.Response, error) {
var (
@@ -150,7 +144,6 @@ func (a *EcommerceApiService) CreateOrder(ctx context.Context, order Order) (*ht
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -189,7 +182,7 @@ func (a *EcommerceApiService) CreateOrder(ctx context.Context, order Order) (*ht
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -202,7 +195,7 @@ func (a *EcommerceApiService) CreateOrder(ctx context.Context, order Order) (*ht
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -221,43 +214,42 @@ func (a *EcommerceApiService) CreateOrder(ctx context.Context, order Order) (*ht
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
EcommerceApiService Create categories in batch
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param createUpdateBatchCategory Values to create a batch of categories
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param createUpdateBatchCategory Values to create a batch of categories
@return CreateUpdateBatchCategoryModel
*/
func (a *EcommerceApiService) CreateUpdateBatchCategory(ctx context.Context, createUpdateBatchCategory CreateUpdateBatchCategory) (CreateUpdateBatchCategoryModel, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreateUpdateBatchCategoryModel
)
@@ -297,7 +289,7 @@ func (a *EcommerceApiService) CreateUpdateBatchCategory(ctx context.Context, cre
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -310,7 +302,7 @@ func (a *EcommerceApiService) CreateUpdateBatchCategory(ctx context.Context, cre
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -331,59 +323,59 @@ func (a *EcommerceApiService) CreateUpdateBatchCategory(ctx context.Context, cre
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v CreateUpdateBatchCategoryModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
EcommerceApiService Create products in batch
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param createUpdateBatchProducts Values to create a batch of products
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param createUpdateBatchProducts Values to create a batch of products
@return CreateUpdateBatchProductsModel
*/
func (a *EcommerceApiService) CreateUpdateBatchProducts(ctx context.Context, createUpdateBatchProducts CreateUpdateBatchProducts) (CreateUpdateBatchProductsModel, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreateUpdateBatchProductsModel
)
@@ -423,7 +415,7 @@ func (a *EcommerceApiService) CreateUpdateBatchProducts(ctx context.Context, cre
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -436,7 +428,7 @@ func (a *EcommerceApiService) CreateUpdateBatchProducts(ctx context.Context, cre
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -457,59 +449,59 @@ func (a *EcommerceApiService) CreateUpdateBatchProducts(ctx context.Context, cre
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v CreateUpdateBatchProductsModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
EcommerceApiService Create/Update a category
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param createUpdateCategory Values to create/update a category
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param createUpdateCategory Values to create/update a category
@return CreateCategoryModel
*/
func (a *EcommerceApiService) CreateUpdateCategory(ctx context.Context, createUpdateCategory CreateUpdateCategory) (CreateCategoryModel, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreateCategoryModel
)
@@ -549,7 +541,7 @@ func (a *EcommerceApiService) CreateUpdateCategory(ctx context.Context, createUp
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -562,7 +554,7 @@ func (a *EcommerceApiService) CreateUpdateCategory(ctx context.Context, createUp
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -583,59 +575,59 @@ func (a *EcommerceApiService) CreateUpdateCategory(ctx context.Context, createUp
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v CreateCategoryModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
EcommerceApiService Create/Update a product
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param createUpdateProduct Values to create/update a product
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param createUpdateProduct Values to create/update a product
@return CreateProductModel
*/
func (a *EcommerceApiService) CreateUpdateProduct(ctx context.Context, createUpdateProduct CreateUpdateProduct) (CreateProductModel, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreateProductModel
)
@@ -675,7 +667,7 @@ func (a *EcommerceApiService) CreateUpdateProduct(ctx context.Context, createUpd
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -688,7 +680,7 @@ func (a *EcommerceApiService) CreateUpdateProduct(ctx context.Context, createUpd
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -709,52 +701,50 @@ func (a *EcommerceApiService) CreateUpdateProduct(ctx context.Context, createUpd
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v CreateProductModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
EcommerceApiService Activate the eCommerce app
Getting access to Brevo eCommerce.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
*/
func (a *EcommerceApiService) EcommerceActivatePost(ctx context.Context) (*http.Response, error) {
var (
@@ -762,7 +752,6 @@ func (a *EcommerceApiService) EcommerceActivatePost(ctx context.Context) (*http.
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -799,7 +788,7 @@ func (a *EcommerceApiService) EcommerceActivatePost(ctx context.Context) (*http.
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -812,7 +801,7 @@ func (a *EcommerceApiService) EcommerceActivatePost(ctx context.Context) (*http.
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -831,55 +820,54 @@ func (a *EcommerceApiService) EcommerceActivatePost(ctx context.Context) (*http.
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 401 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
EcommerceApiService Get detailed attribution metrics for a single Brevo campaign
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param conversionSource The Brevo campaign type for which data will be retrieved
- * @param conversionSourceId The Brevo campaign id for which data will be retrieved
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param conversionSource The Brevo campaign type for which data will be retrieved
+ - @param conversionSourceId The Brevo campaign id for which data will be retrieved
@return InlineResponse2006
*/
func (a *EcommerceApiService) EcommerceAttributionMetricsConversionSourceConversionSourceIdGet(ctx context.Context, conversionSource string, conversionSourceId float32) (InlineResponse2006, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue InlineResponse2006
)
@@ -919,7 +907,7 @@ func (a *EcommerceApiService) EcommerceAttributionMetricsConversionSourceConvers
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -932,7 +920,7 @@ func (a *EcommerceApiService) EcommerceAttributionMetricsConversionSourceConvers
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -953,47 +941,47 @@ func (a *EcommerceApiService) EcommerceAttributionMetricsConversionSourceConvers
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v InlineResponse2006
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
EcommerceApiService Get attribution metrics for one or more Brevo campaigns
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *EcommerceAttributionMetricsGetOpts - Optional Parameters:
@@ -1004,18 +992,18 @@ EcommerceApiService Get attribution metrics for one or more Brevo campaigns
@return InlineResponse2005
*/
-type EcommerceAttributionMetricsGetOpts struct {
- PeriodFrom optional.Time
- PeriodTo optional.Time
+type EcommerceAttributionMetricsGetOpts struct {
+ PeriodFrom optional.Time
+ PeriodTo optional.Time
EmailCampaignId optional.Interface
}
func (a *EcommerceApiService) EcommerceAttributionMetricsGet(ctx context.Context, localVarOptionals *EcommerceAttributionMetricsGetOpts) (InlineResponse2005, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue InlineResponse2005
)
@@ -1062,7 +1050,7 @@ func (a *EcommerceApiService) EcommerceAttributionMetricsGet(ctx context.Context
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1075,7 +1063,7 @@ func (a *EcommerceApiService) EcommerceAttributionMetricsGet(ctx context.Context
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1096,60 +1084,60 @@ func (a *EcommerceApiService) EcommerceAttributionMetricsGet(ctx context.Context
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v InlineResponse2005
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
EcommerceApiService Get attributed product sales for a single Brevo campaign
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param conversionSource The Brevo campaign type for which data will be retrieved
- * @param conversionSourceId The Brevo campaign id for which data will be retrieved
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param conversionSource The Brevo campaign type for which data will be retrieved
+ - @param conversionSourceId The Brevo campaign id for which data will be retrieved
@return InlineResponse2007
*/
func (a *EcommerceApiService) EcommerceAttributionProductsConversionSourceConversionSourceIdGet(ctx context.Context, conversionSource string, conversionSourceId float32) (InlineResponse2007, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue InlineResponse2007
)
@@ -1189,7 +1177,7 @@ func (a *EcommerceApiService) EcommerceAttributionProductsConversionSourceConver
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1202,7 +1190,7 @@ func (a *EcommerceApiService) EcommerceAttributionProductsConversionSourceConver
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1223,58 +1211,58 @@ func (a *EcommerceApiService) EcommerceAttributionProductsConversionSourceConver
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v InlineResponse2007
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
EcommerceApiService Get the ISO 4217 compliant display currency code for your Brevo account
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return InlineResponse2004
*/
func (a *EcommerceApiService) EcommerceConfigDisplayCurrencyGet(ctx context.Context) (InlineResponse2004, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue InlineResponse2004
)
@@ -1312,7 +1300,7 @@ func (a *EcommerceApiService) EcommerceConfigDisplayCurrencyGet(ctx context.Cont
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1325,7 +1313,7 @@ func (a *EcommerceApiService) EcommerceConfigDisplayCurrencyGet(ctx context.Cont
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1346,69 +1334,69 @@ func (a *EcommerceApiService) EcommerceConfigDisplayCurrencyGet(ctx context.Cont
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v InlineResponse2004
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 401 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
EcommerceApiService Return all your categories
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *GetCategoriesOpts - Optional Parameters:
@@ -1417,28 +1405,28 @@ EcommerceApiService Return all your categories
* @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
* @param "Ids" (optional.Interface of []string) - Filter by category ids
* @param "Name" (optional.String) - Filter by category name
- * @param "ModifiedSince" (optional.String) - Filter (urlencoded) the categories modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**
- * @param "CreatedSince" (optional.String) - Filter (urlencoded) the categories created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**
+ * @param "ModifiedSince" (optional.String) - Filter (urlencoded) the categories modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**
+ * @param "CreatedSince" (optional.String) - Filter (urlencoded) the categories created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**
@return GetCategories
*/
-type GetCategoriesOpts struct {
- Limit optional.Int64
- Offset optional.Int64
- Sort optional.String
- Ids optional.Interface
- Name optional.String
+type GetCategoriesOpts struct {
+ Limit optional.Int64
+ Offset optional.Int64
+ Sort optional.String
+ Ids optional.Interface
+ Name optional.String
ModifiedSince optional.String
- CreatedSince optional.String
+ CreatedSince optional.String
}
func (a *EcommerceApiService) GetCategories(ctx context.Context, localVarOptionals *GetCategoriesOpts) (GetCategories, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetCategories
)
@@ -1497,7 +1485,7 @@ func (a *EcommerceApiService) GetCategories(ctx context.Context, localVarOptiona
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1510,7 +1498,7 @@ func (a *EcommerceApiService) GetCategories(ctx context.Context, localVarOptiona
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1531,59 +1519,59 @@ func (a *EcommerceApiService) GetCategories(ctx context.Context, localVarOptiona
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetCategories
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
EcommerceApiService Get a category details
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id Category ID
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id Category ID
@return GetCategoryDetails
*/
func (a *EcommerceApiService) GetCategoryInfo(ctx context.Context, id string) (GetCategoryDetails, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetCategoryDetails
)
@@ -1622,7 +1610,7 @@ func (a *EcommerceApiService) GetCategoryInfo(ctx context.Context, id string) (G
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1635,7 +1623,7 @@ func (a *EcommerceApiService) GetCategoryInfo(ctx context.Context, id string) (G
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1656,58 +1644,58 @@ func (a *EcommerceApiService) GetCategoryInfo(ctx context.Context, id string) (G
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetCategoryDetails
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
EcommerceApiService Get order details
Get all the orders
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -1715,26 +1703,26 @@ Get all the orders
* @param "Limit" (optional.Int64) - Number of documents per page
* @param "Offset" (optional.Int64) - Index of the first document in the page
* @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
- * @param "ModifiedSince" (optional.String) - Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**
- * @param "CreatedSince" (optional.String) - Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**
+ * @param "ModifiedSince" (optional.String) - Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**
+ * @param "CreatedSince" (optional.String) - Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**
@return GetOrders
*/
-type GetOrdersOpts struct {
- Limit optional.Int64
- Offset optional.Int64
- Sort optional.String
+type GetOrdersOpts struct {
+ Limit optional.Int64
+ Offset optional.Int64
+ Sort optional.String
ModifiedSince optional.String
- CreatedSince optional.String
+ CreatedSince optional.String
}
func (a *EcommerceApiService) GetOrders(ctx context.Context, localVarOptionals *GetOrdersOpts) (GetOrders, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetOrders
)
@@ -1787,7 +1775,7 @@ func (a *EcommerceApiService) GetOrders(ctx context.Context, localVarOptionals *
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1800,7 +1788,7 @@ func (a *EcommerceApiService) GetOrders(ctx context.Context, localVarOptionals *
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1821,59 +1809,59 @@ func (a *EcommerceApiService) GetOrders(ctx context.Context, localVarOptionals *
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetOrders
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
EcommerceApiService Get a product's details
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id Product ID
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id Product ID
@return GetProductDetails
*/
func (a *EcommerceApiService) GetProductInfo(ctx context.Context, id string) (GetProductDetails, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetProductDetails
)
@@ -1912,7 +1900,7 @@ func (a *EcommerceApiService) GetProductInfo(ctx context.Context, id string) (Ge
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1925,7 +1913,7 @@ func (a *EcommerceApiService) GetProductInfo(ctx context.Context, id string) (Ge
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1946,58 +1934,58 @@ func (a *EcommerceApiService) GetProductInfo(ctx context.Context, id string) (Ge
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetProductDetails
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
EcommerceApiService Return all your products
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *GetProductsOpts - Optional Parameters:
@@ -2013,35 +2001,35 @@ EcommerceApiService Return all your products
* @param "PriceEq" (optional.Float32) - Price filter for products equals to particular amount
* @param "PriceNe" (optional.Float32) - Price filter for products not equals to particular amount
* @param "Categories" (optional.Interface of []string) - Filter by category ids
- * @param "ModifiedSince" (optional.String) - Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**
- * @param "CreatedSince" (optional.String) - Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**
+ * @param "ModifiedSince" (optional.String) - Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**
+ * @param "CreatedSince" (optional.String) - Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**
@return GetProducts
*/
-type GetProductsOpts struct {
- Limit optional.Int64
- Offset optional.Int64
- Sort optional.String
- Ids optional.Interface
- Name optional.String
- PriceLte optional.Float32
- PriceGte optional.Float32
- PriceLt optional.Float32
- PriceGt optional.Float32
- PriceEq optional.Float32
- PriceNe optional.Float32
- Categories optional.Interface
+type GetProductsOpts struct {
+ Limit optional.Int64
+ Offset optional.Int64
+ Sort optional.String
+ Ids optional.Interface
+ Name optional.String
+ PriceLte optional.Float32
+ PriceGte optional.Float32
+ PriceLt optional.Float32
+ PriceGt optional.Float32
+ PriceEq optional.Float32
+ PriceNe optional.Float32
+ Categories optional.Interface
ModifiedSince optional.String
- CreatedSince optional.String
+ CreatedSince optional.String
}
func (a *EcommerceApiService) GetProducts(ctx context.Context, localVarOptionals *GetProductsOpts) (GetProducts, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetProducts
)
@@ -2121,7 +2109,7 @@ func (a *EcommerceApiService) GetProducts(ctx context.Context, localVarOptionals
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2134,7 +2122,7 @@ func (a *EcommerceApiService) GetProducts(ctx context.Context, localVarOptionals
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2155,59 +2143,59 @@ func (a *EcommerceApiService) GetProducts(ctx context.Context, localVarOptionals
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetProducts
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
EcommerceApiService Set the ISO 4217 compliant display currency code for your Brevo account
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param setConfigDisplayCurrency set ISO 4217 compliant display currency code payload
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param setConfigDisplayCurrency set ISO 4217 compliant display currency code payload
@return SetConfigDisplayCurrency
*/
func (a *EcommerceApiService) SetConfigDisplayCurrency(ctx context.Context, setConfigDisplayCurrency SetConfigDisplayCurrency) (SetConfigDisplayCurrency, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue SetConfigDisplayCurrency
)
@@ -2247,7 +2235,7 @@ func (a *EcommerceApiService) SetConfigDisplayCurrency(ctx context.Context, setC
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2260,7 +2248,7 @@ func (a *EcommerceApiService) SetConfigDisplayCurrency(ctx context.Context, setC
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2281,73 +2269,73 @@ func (a *EcommerceApiService) SetConfigDisplayCurrency(ctx context.Context, setC
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v SetConfigDisplayCurrency
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 401 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 422 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
diff --git a/lib/api_email_campaigns.go b/lib/api_email_campaigns.go
index 15815b8..8f1aa59 100644
--- a/lib/api_email_campaigns.go
+++ b/lib/api_email_campaigns.go
@@ -1,23 +1,23 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "fmt"
+ "github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "fmt"
- "github.com/antihax/optional"
)
// Linger please
@@ -27,19 +27,19 @@ var (
type EmailCampaignsApiService service
-/*
+/*
EmailCampaignsApiService Create an email campaign
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param emailCampaigns Values to create a campaign
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param emailCampaigns Values to create a campaign
@return CreateModel
*/
func (a *EmailCampaignsApiService) CreateEmailCampaign(ctx context.Context, emailCampaigns CreateEmailCampaign) (CreateModel, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreateModel
)
@@ -79,7 +79,7 @@ func (a *EmailCampaignsApiService) CreateEmailCampaign(ctx context.Context, emai
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -92,7 +92,7 @@ func (a *EmailCampaignsApiService) CreateEmailCampaign(ctx context.Context, emai
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -113,52 +113,50 @@ func (a *EmailCampaignsApiService) CreateEmailCampaign(ctx context.Context, emai
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v CreateModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
EmailCampaignsApiService Delete an email campaign
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param campaignId id of the campaign
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param campaignId id of the campaign
*/
func (a *EmailCampaignsApiService) DeleteEmailCampaign(ctx context.Context, campaignId int64) (*http.Response, error) {
var (
@@ -166,7 +164,6 @@ func (a *EmailCampaignsApiService) DeleteEmailCampaign(ctx context.Context, camp
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -204,7 +201,7 @@ func (a *EmailCampaignsApiService) DeleteEmailCampaign(ctx context.Context, camp
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -217,7 +214,7 @@ func (a *EmailCampaignsApiService) DeleteEmailCampaign(ctx context.Context, camp
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -236,42 +233,41 @@ func (a *EmailCampaignsApiService) DeleteEmailCampaign(ctx context.Context, camp
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
EmailCampaignsApiService Export the recipients of an email campaign
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param campaignId Id of the campaign
@@ -281,16 +277,16 @@ EmailCampaignsApiService Export the recipients of an email campaign
@return CreatedProcessId
*/
-type EmailExportRecipientsOpts struct {
+type EmailExportRecipientsOpts struct {
RecipientExport optional.Interface
}
func (a *EmailCampaignsApiService) EmailExportRecipients(ctx context.Context, campaignId int64, localVarOptionals *EmailExportRecipientsOpts) (CreatedProcessId, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreatedProcessId
)
@@ -321,10 +317,10 @@ func (a *EmailCampaignsApiService) EmailExportRecipients(ctx context.Context, ca
}
// body params
if localVarOptionals != nil && localVarOptionals.RecipientExport.IsSet() {
-
+
localVarOptionalRecipientExport, localVarOptionalRecipientExportok := localVarOptionals.RecipientExport.Value().(EmailExportRecipients)
if !localVarOptionalRecipientExportok {
- return localVarReturnValue, nil, reportError("recipientExport should be EmailExportRecipients")
+ return localVarReturnValue, nil, reportError("recipientExport should be EmailExportRecipients")
}
localVarPostBody = &localVarOptionalRecipientExport
}
@@ -338,7 +334,7 @@ func (a *EmailCampaignsApiService) EmailExportRecipients(ctx context.Context, ca
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -351,7 +347,7 @@ func (a *EmailCampaignsApiService) EmailExportRecipients(ctx context.Context, ca
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -372,71 +368,71 @@ func (a *EmailCampaignsApiService) EmailExportRecipients(ctx context.Context, ca
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 202 {
var v CreatedProcessId
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
EmailCampaignsApiService Get an A/B test email campaign results
Obtain winning version of an A/B test email campaign
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param campaignId Id of the A/B test campaign
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param campaignId Id of the A/B test campaign
@return AbTestCampaignResult
*/
func (a *EmailCampaignsApiService) GetAbTestCampaignResult(ctx context.Context, campaignId int64) (AbTestCampaignResult, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue AbTestCampaignResult
)
@@ -475,7 +471,7 @@ func (a *EmailCampaignsApiService) GetAbTestCampaignResult(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -488,7 +484,7 @@ func (a *EmailCampaignsApiService) GetAbTestCampaignResult(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -509,69 +505,69 @@ func (a *EmailCampaignsApiService) GetAbTestCampaignResult(ctx context.Context,
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v AbTestCampaignResult
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 405 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
EmailCampaignsApiService Get an email campaign report
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param campaignId Id of the campaign
@@ -581,16 +577,16 @@ EmailCampaignsApiService Get an email campaign report
@return GetEmailCampaign
*/
-type GetEmailCampaignOpts struct {
+type GetEmailCampaignOpts struct {
Statistics optional.String
}
func (a *EmailCampaignsApiService) GetEmailCampaign(ctx context.Context, campaignId int64, localVarOptionals *GetEmailCampaignOpts) (GetEmailCampaign, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetEmailCampaign
)
@@ -632,7 +628,7 @@ func (a *EmailCampaignsApiService) GetEmailCampaign(ctx context.Context, campaig
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -645,7 +641,7 @@ func (a *EmailCampaignsApiService) GetEmailCampaign(ctx context.Context, campaig
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -666,58 +662,58 @@ func (a *EmailCampaignsApiService) GetEmailCampaign(ctx context.Context, campaig
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetEmailCampaign
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
EmailCampaignsApiService Return all your created email campaigns
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *GetEmailCampaignsOpts - Optional Parameters:
@@ -734,24 +730,24 @@ EmailCampaignsApiService Return all your created email campaigns
@return GetEmailCampaigns
*/
-type GetEmailCampaignsOpts struct {
- Type_ optional.String
- Status optional.String
- Statistics optional.String
- StartDate optional.String
- EndDate optional.String
- Limit optional.Int64
- Offset optional.Int64
- Sort optional.String
+type GetEmailCampaignsOpts struct {
+ Type_ optional.String
+ Status optional.String
+ Statistics optional.String
+ StartDate optional.String
+ EndDate optional.String
+ Limit optional.Int64
+ Offset optional.Int64
+ Sort optional.String
ExcludeHtmlContent optional.Bool
}
func (a *EmailCampaignsApiService) GetEmailCampaigns(ctx context.Context, localVarOptionals *GetEmailCampaignsOpts) (GetEmailCampaigns, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetEmailCampaigns
)
@@ -816,7 +812,7 @@ func (a *EmailCampaignsApiService) GetEmailCampaigns(ctx context.Context, localV
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -829,7 +825,7 @@ func (a *EmailCampaignsApiService) GetEmailCampaigns(ctx context.Context, localV
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -850,60 +846,60 @@ func (a *EmailCampaignsApiService) GetEmailCampaigns(ctx context.Context, localV
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetEmailCampaigns
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
EmailCampaignsApiService Get a shared template url
Get a unique URL to share & import an email template from one Brevo account to another.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param campaignId Id of the campaign or template
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param campaignId Id of the campaign or template
@return GetSharedTemplateUrl
*/
func (a *EmailCampaignsApiService) GetSharedTemplateUrl(ctx context.Context, campaignId int64) (GetSharedTemplateUrl, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetSharedTemplateUrl
)
@@ -942,7 +938,7 @@ func (a *EmailCampaignsApiService) GetSharedTemplateUrl(ctx context.Context, cam
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -955,7 +951,7 @@ func (a *EmailCampaignsApiService) GetSharedTemplateUrl(ctx context.Context, cam
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -976,63 +972,61 @@ func (a *EmailCampaignsApiService) GetSharedTemplateUrl(ctx context.Context, cam
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetSharedTemplateUrl
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
EmailCampaignsApiService Send an email campaign immediately, based on campaignId
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param campaignId Id of the campaign
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param campaignId Id of the campaign
*/
func (a *EmailCampaignsApiService) SendEmailCampaignNow(ctx context.Context, campaignId int64) (*http.Response, error) {
var (
@@ -1040,7 +1034,6 @@ func (a *EmailCampaignsApiService) SendEmailCampaignNow(ctx context.Context, cam
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -1078,7 +1071,7 @@ func (a *EmailCampaignsApiService) SendEmailCampaignNow(ctx context.Context, cam
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1091,7 +1084,7 @@ func (a *EmailCampaignsApiService) SendEmailCampaignNow(ctx context.Context, cam
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1110,60 +1103,57 @@ func (a *EmailCampaignsApiService) SendEmailCampaignNow(ctx context.Context, cam
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 402 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
EmailCampaignsApiService Send the report of a campaign
A PDF will be sent to the specified email addresses
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param campaignId Id of the campaign
- * @param sendReport Values for send a report
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param campaignId Id of the campaign
+ - @param sendReport Values for send a report
*/
func (a *EmailCampaignsApiService) SendReport(ctx context.Context, campaignId int64, sendReport SendReport) (*http.Response, error) {
var (
@@ -1171,7 +1161,6 @@ func (a *EmailCampaignsApiService) SendReport(ctx context.Context, campaignId in
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -1211,7 +1200,7 @@ func (a *EmailCampaignsApiService) SendReport(ctx context.Context, campaignId in
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1224,7 +1213,7 @@ func (a *EmailCampaignsApiService) SendReport(ctx context.Context, campaignId in
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1243,48 +1232,45 @@ func (a *EmailCampaignsApiService) SendReport(ctx context.Context, campaignId in
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
EmailCampaignsApiService Send an email campaign to your test list
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param campaignId Id of the campaign
- * @param emailTo
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param campaignId Id of the campaign
+ - @param emailTo
*/
func (a *EmailCampaignsApiService) SendTestEmail(ctx context.Context, campaignId int64, emailTo SendTestEmail) (*http.Response, error) {
var (
@@ -1292,7 +1278,6 @@ func (a *EmailCampaignsApiService) SendTestEmail(ctx context.Context, campaignId
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -1332,7 +1317,7 @@ func (a *EmailCampaignsApiService) SendTestEmail(ctx context.Context, campaignId
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1345,7 +1330,7 @@ func (a *EmailCampaignsApiService) SendTestEmail(ctx context.Context, campaignId
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1364,48 +1349,45 @@ func (a *EmailCampaignsApiService) SendTestEmail(ctx context.Context, campaignId
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v PostSendFailed
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
EmailCampaignsApiService Update an email campaign status
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param campaignId Id of the campaign
- * @param status Status of the campaign
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param campaignId Id of the campaign
+ - @param status Status of the campaign
*/
func (a *EmailCampaignsApiService) UpdateCampaignStatus(ctx context.Context, campaignId int64, status UpdateCampaignStatus) (*http.Response, error) {
var (
@@ -1413,7 +1395,6 @@ func (a *EmailCampaignsApiService) UpdateCampaignStatus(ctx context.Context, cam
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -1453,7 +1434,7 @@ func (a *EmailCampaignsApiService) UpdateCampaignStatus(ctx context.Context, cam
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1466,7 +1447,7 @@ func (a *EmailCampaignsApiService) UpdateCampaignStatus(ctx context.Context, cam
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1485,48 +1466,45 @@ func (a *EmailCampaignsApiService) UpdateCampaignStatus(ctx context.Context, cam
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
EmailCampaignsApiService Update an email campaign
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param campaignId Id of the campaign
- * @param emailCampaign Values to update a campaign
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param campaignId Id of the campaign
+ - @param emailCampaign Values to update a campaign
*/
func (a *EmailCampaignsApiService) UpdateEmailCampaign(ctx context.Context, campaignId int64, emailCampaign UpdateEmailCampaign) (*http.Response, error) {
var (
@@ -1534,7 +1512,6 @@ func (a *EmailCampaignsApiService) UpdateEmailCampaign(ctx context.Context, camp
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -1574,7 +1551,7 @@ func (a *EmailCampaignsApiService) UpdateEmailCampaign(ctx context.Context, camp
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1587,7 +1564,7 @@ func (a *EmailCampaignsApiService) UpdateEmailCampaign(ctx context.Context, camp
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1606,54 +1583,53 @@ func (a *EmailCampaignsApiService) UpdateEmailCampaign(ctx context.Context, camp
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
EmailCampaignsApiService Upload an image to your account's image gallery
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param uploadImage Parameters to upload an image
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param uploadImage Parameters to upload an image
@return UploadImageModel
*/
func (a *EmailCampaignsApiService) UploadImageToGallery(ctx context.Context, uploadImage UploadImageToGallery) (UploadImageModel, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue UploadImageModel
)
@@ -1693,7 +1669,7 @@ func (a *EmailCampaignsApiService) UploadImageToGallery(ctx context.Context, upl
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1706,7 +1682,7 @@ func (a *EmailCampaignsApiService) UploadImageToGallery(ctx context.Context, upl
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1727,40 +1703,40 @@ func (a *EmailCampaignsApiService) UploadImageToGallery(ctx context.Context, upl
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v UploadImageModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
diff --git a/lib/api_events.go b/lib/api_events.go
index b36ba6f..5a6ac91 100644
--- a/lib/api_events.go
+++ b/lib/api_events.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
@@ -25,13 +25,11 @@ var (
type EventsApiService service
-/*
+/*
EventsApiService Create an event
Create an event to track a contact's interaction.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param event
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param event
*/
func (a *EventsApiService) CreateEvent(ctx context.Context, event Event) (*http.Response, error) {
var (
@@ -39,7 +37,6 @@ func (a *EventsApiService) CreateEvent(ctx context.Context, event Event) (*http.
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -78,7 +75,7 @@ func (a *EventsApiService) CreateEvent(ctx context.Context, event Event) (*http.
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -91,7 +88,7 @@ func (a *EventsApiService) CreateEvent(ctx context.Context, event Event) (*http.
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -110,35 +107,34 @@ func (a *EventsApiService) CreateEvent(ctx context.Context, event Event) (*http.
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 401 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
diff --git a/lib/api_external_feeds.go b/lib/api_external_feeds.go
index d37aade..3529b1f 100644
--- a/lib/api_external_feeds.go
+++ b/lib/api_external_feeds.go
@@ -1,23 +1,23 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "fmt"
+ "github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "fmt"
- "github.com/antihax/optional"
)
// Linger please
@@ -27,20 +27,20 @@ var (
type ExternalFeedsApiService service
-/*
+/*
ExternalFeedsApiService Create an external feed
This endpoint will create an external feed.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param createExternalFeed Values to create a feed
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param createExternalFeed Values to create a feed
@return InlineResponse2015
*/
func (a *ExternalFeedsApiService) CreateExternalFeed(ctx context.Context, createExternalFeed CreateExternalFeed) (InlineResponse2015, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue InlineResponse2015
)
@@ -80,7 +80,7 @@ func (a *ExternalFeedsApiService) CreateExternalFeed(ctx context.Context, create
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -93,7 +93,7 @@ func (a *ExternalFeedsApiService) CreateExternalFeed(ctx context.Context, create
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -114,53 +114,51 @@ func (a *ExternalFeedsApiService) CreateExternalFeed(ctx context.Context, create
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v InlineResponse2015
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ExternalFeedsApiService Delete an external feed
This endpoint will delete an external feed.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param uuid UUID of the feed to delete
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param uuid UUID of the feed to delete
*/
func (a *ExternalFeedsApiService) DeleteExternalFeed(ctx context.Context, uuid string) (*http.Response, error) {
var (
@@ -168,7 +166,6 @@ func (a *ExternalFeedsApiService) DeleteExternalFeed(ctx context.Context, uuid s
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -206,7 +203,7 @@ func (a *ExternalFeedsApiService) DeleteExternalFeed(ctx context.Context, uuid s
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -219,7 +216,7 @@ func (a *ExternalFeedsApiService) DeleteExternalFeed(ctx context.Context, uuid s
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -238,42 +235,41 @@ func (a *ExternalFeedsApiService) DeleteExternalFeed(ctx context.Context, uuid s
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
ExternalFeedsApiService Fetch all external feeds
This endpoint can fetch all created external feeds.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -289,22 +285,22 @@ This endpoint can fetch all created external feeds.
@return GetAllExternalFeeds
*/
-type GetAllExternalFeedsOpts struct {
- Search optional.String
+type GetAllExternalFeedsOpts struct {
+ Search optional.String
StartDate optional.String
- EndDate optional.String
- Sort optional.String
- AuthType optional.String
- Limit optional.Int64
- Offset optional.Int64
+ EndDate optional.String
+ Sort optional.String
+ AuthType optional.String
+ Limit optional.Int64
+ Offset optional.Int64
}
func (a *ExternalFeedsApiService) GetAllExternalFeeds(ctx context.Context, localVarOptionals *GetAllExternalFeedsOpts) (GetAllExternalFeeds, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetAllExternalFeeds
)
@@ -363,7 +359,7 @@ func (a *ExternalFeedsApiService) GetAllExternalFeeds(ctx context.Context, local
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -376,7 +372,7 @@ func (a *ExternalFeedsApiService) GetAllExternalFeeds(ctx context.Context, local
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -397,71 +393,71 @@ func (a *ExternalFeedsApiService) GetAllExternalFeeds(ctx context.Context, local
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetAllExternalFeeds
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ExternalFeedsApiService Get an external feed by UUID
This endpoint will update an external feed.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param uuid UUID of the feed to fetch
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param uuid UUID of the feed to fetch
@return GetExternalFeedByUuid
*/
func (a *ExternalFeedsApiService) GetExternalFeedByUUID(ctx context.Context, uuid string) (GetExternalFeedByUuid, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetExternalFeedByUuid
)
@@ -500,7 +496,7 @@ func (a *ExternalFeedsApiService) GetExternalFeedByUUID(ctx context.Context, uui
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -513,7 +509,7 @@ func (a *ExternalFeedsApiService) GetExternalFeedByUUID(ctx context.Context, uui
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -534,65 +530,63 @@ func (a *ExternalFeedsApiService) GetExternalFeedByUUID(ctx context.Context, uui
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetExternalFeedByUuid
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ExternalFeedsApiService Update an external feed
This endpoint will update an external feed.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param uuid UUID of the feed to update
- * @param updateExternalFeed Values to update a feed
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param uuid UUID of the feed to update
+ - @param updateExternalFeed Values to update a feed
*/
func (a *ExternalFeedsApiService) UpdateExternalFeed(ctx context.Context, uuid string, updateExternalFeed UpdateExternalFeed) (*http.Response, error) {
var (
@@ -600,7 +594,6 @@ func (a *ExternalFeedsApiService) UpdateExternalFeed(ctx context.Context, uuid s
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -640,7 +633,7 @@ func (a *ExternalFeedsApiService) UpdateExternalFeed(ctx context.Context, uuid s
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -653,7 +646,7 @@ func (a *ExternalFeedsApiService) UpdateExternalFeed(ctx context.Context, uuid s
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -672,35 +665,34 @@ func (a *ExternalFeedsApiService) UpdateExternalFeed(ctx context.Context, uuid s
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
diff --git a/lib/api_files.go b/lib/api_files.go
index 6c084ac..0e5c108 100644
--- a/lib/api_files.go
+++ b/lib/api_files.go
@@ -1,24 +1,24 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "fmt"
+ "github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
- "strings"
- "fmt"
- "github.com/antihax/optional"
"os"
+ "strings"
)
// Linger please
@@ -28,7 +28,7 @@ var (
type FilesApiService service
-/*
+/*
FilesApiService Get all files
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *CrmFilesGetOpts - Optional Parameters:
@@ -43,22 +43,22 @@ FilesApiService Get all files
@return FileList
*/
-type CrmFilesGetOpts struct {
- Entity optional.String
+type CrmFilesGetOpts struct {
+ Entity optional.String
EntityIds optional.String
- DateFrom optional.Int32
- DateTo optional.Int32
- Offset optional.Int64
- Limit optional.Int64
- Sort optional.String
+ DateFrom optional.Int32
+ DateTo optional.Int32
+ Offset optional.Int64
+ Limit optional.Int64
+ Sort optional.String
}
func (a *FilesApiService) CrmFilesGet(ctx context.Context, localVarOptionals *CrmFilesGetOpts) (FileList, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue FileList
)
@@ -117,7 +117,7 @@ func (a *FilesApiService) CrmFilesGet(ctx context.Context, localVarOptionals *Cr
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -130,7 +130,7 @@ func (a *FilesApiService) CrmFilesGet(ctx context.Context, localVarOptionals *Cr
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -151,59 +151,59 @@ func (a *FilesApiService) CrmFilesGet(ctx context.Context, localVarOptionals *Cr
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v FileList
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
FilesApiService Get file details
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id File id to get file data.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id File id to get file data.
@return FileData
*/
func (a *FilesApiService) CrmFilesIdDataGet(ctx context.Context, id string) (FileData, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue FileData
)
@@ -242,7 +242,7 @@ func (a *FilesApiService) CrmFilesIdDataGet(ctx context.Context, id string) (Fil
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -255,7 +255,7 @@ func (a *FilesApiService) CrmFilesIdDataGet(ctx context.Context, id string) (Fil
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -276,63 +276,61 @@ func (a *FilesApiService) CrmFilesIdDataGet(ctx context.Context, id string) (Fil
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v FileData
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
FilesApiService Delete a file
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id File id to delete.
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id File id to delete.
*/
func (a *FilesApiService) CrmFilesIdDelete(ctx context.Context, id string) (*http.Response, error) {
var (
@@ -340,7 +338,6 @@ func (a *FilesApiService) CrmFilesIdDelete(ctx context.Context, id string) (*htt
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -378,7 +375,7 @@ func (a *FilesApiService) CrmFilesIdDelete(ctx context.Context, id string) (*htt
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -391,7 +388,7 @@ func (a *FilesApiService) CrmFilesIdDelete(ctx context.Context, id string) (*htt
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -410,54 +407,53 @@ func (a *FilesApiService) CrmFilesIdDelete(ctx context.Context, id string) (*htt
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
FilesApiService Download a file
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id File id to download.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id File id to download.
@return FileDownloadableLink
*/
func (a *FilesApiService) CrmFilesIdGet(ctx context.Context, id string) (FileDownloadableLink, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue FileDownloadableLink
)
@@ -496,7 +492,7 @@ func (a *FilesApiService) CrmFilesIdGet(ctx context.Context, id string) (FileDow
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -509,7 +505,7 @@ func (a *FilesApiService) CrmFilesIdGet(ctx context.Context, id string) (FileDow
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -530,58 +526,58 @@ func (a *FilesApiService) CrmFilesIdGet(ctx context.Context, id string) (FileDow
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v FileDownloadableLink
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
FilesApiService Upload a file
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param file File data to create a file.
@@ -593,18 +589,18 @@ FilesApiService Upload a file
@return FileData
*/
-type CrmFilesPostOpts struct {
- DealId optional.String
+type CrmFilesPostOpts struct {
+ DealId optional.String
ContactId optional.Int64
CompanyId optional.String
}
func (a *FilesApiService) CrmFilesPost(ctx context.Context, file *os.File, localVarOptionals *CrmFilesPostOpts) (FileData, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue FileData
)
@@ -658,7 +654,7 @@ func (a *FilesApiService) CrmFilesPost(ctx context.Context, file *os.File, local
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -671,7 +667,7 @@ func (a *FilesApiService) CrmFilesPost(ctx context.Context, file *os.File, local
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -692,40 +688,40 @@ func (a *FilesApiService) CrmFilesPost(ctx context.Context, file *os.File, local
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v FileData
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
diff --git a/lib/api_inbound_parsing.go b/lib/api_inbound_parsing.go
index f276bda..9560e6f 100644
--- a/lib/api_inbound_parsing.go
+++ b/lib/api_inbound_parsing.go
@@ -1,23 +1,23 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "fmt"
+ "github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "fmt"
- "github.com/antihax/optional"
)
// Linger please
@@ -27,20 +27,20 @@ var (
type InboundParsingApiService service
-/*
+/*
InboundParsingApiService Retrieve inbound attachment with download token.
This endpoint will retrieve inbound attachment with download token.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param downloadToken Token to fetch a particular attachment
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param downloadToken Token to fetch a particular attachment
@return *os.File
*/
func (a *InboundParsingApiService) GetInboundEmailAttachment(ctx context.Context, downloadToken string) (*os.File, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue *os.File
)
@@ -79,7 +79,7 @@ func (a *InboundParsingApiService) GetInboundEmailAttachment(ctx context.Context
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -92,7 +92,7 @@ func (a *InboundParsingApiService) GetInboundEmailAttachment(ctx context.Context
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -113,58 +113,58 @@ func (a *InboundParsingApiService) GetInboundEmailAttachment(ctx context.Context
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v *os.File
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
InboundParsingApiService Get the list of all the events for the received emails.
This endpoint will show the list of all the events for the received emails.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -179,21 +179,21 @@ This endpoint will show the list of all the events for the received emails.
@return GetInboundEmailEvents
*/
-type GetInboundEmailEventsOpts struct {
- Sender optional.String
+type GetInboundEmailEventsOpts struct {
+ Sender optional.String
StartDate optional.String
- EndDate optional.String
- Limit optional.Int64
- Offset optional.Int64
- Sort optional.String
+ EndDate optional.String
+ Limit optional.Int64
+ Offset optional.Int64
+ Sort optional.String
}
func (a *InboundParsingApiService) GetInboundEmailEvents(ctx context.Context, localVarOptionals *GetInboundEmailEventsOpts) (GetInboundEmailEvents, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetInboundEmailEvents
)
@@ -249,7 +249,7 @@ func (a *InboundParsingApiService) GetInboundEmailEvents(ctx context.Context, lo
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -262,7 +262,7 @@ func (a *InboundParsingApiService) GetInboundEmailEvents(ctx context.Context, lo
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -283,60 +283,60 @@ func (a *InboundParsingApiService) GetInboundEmailEvents(ctx context.Context, lo
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetInboundEmailEvents
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
InboundParsingApiService Fetch all events history for one particular received email.
This endpoint will show the list of all events history for one particular received email.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param uuid UUID to fetch events specific to recieved email
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param uuid UUID to fetch events specific to recieved email
@return GetInboundEmailEventsByUuid
*/
func (a *InboundParsingApiService) GetInboundEmailEventsByUuid(ctx context.Context, uuid string) (GetInboundEmailEventsByUuid, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetInboundEmailEventsByUuid
)
@@ -375,7 +375,7 @@ func (a *InboundParsingApiService) GetInboundEmailEventsByUuid(ctx context.Conte
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -388,7 +388,7 @@ func (a *InboundParsingApiService) GetInboundEmailEventsByUuid(ctx context.Conte
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -409,40 +409,40 @@ func (a *InboundParsingApiService) GetInboundEmailEventsByUuid(ctx context.Conte
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetInboundEmailEventsByUuid
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
diff --git a/lib/api_master_account.go b/lib/api_master_account.go
index 549e167..ec6d874 100644
--- a/lib/api_master_account.go
+++ b/lib/api_master_account.go
@@ -1,23 +1,23 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "fmt"
+ "github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "fmt"
- "github.com/antihax/optional"
)
// Linger please
@@ -27,13 +27,11 @@ var (
type MasterAccountApiService service
-/*
+/*
MasterAccountApiService Delete a group
This endpoint allows you to delete a group of sub-organizations. When a group is deleted, the sub-organizations are no longer part of this group. The users associated with the group are no longer associated with the group once deleted.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id Id of the group
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id Id of the group
*/
func (a *MasterAccountApiService) CorporateGroupIdDelete(ctx context.Context, id string) (*http.Response, error) {
var (
@@ -41,7 +39,6 @@ func (a *MasterAccountApiService) CorporateGroupIdDelete(ctx context.Context, id
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -79,7 +76,7 @@ func (a *MasterAccountApiService) CorporateGroupIdDelete(ctx context.Context, id
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -92,7 +89,7 @@ func (a *MasterAccountApiService) CorporateGroupIdDelete(ctx context.Context, id
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -111,44 +108,43 @@ func (a *MasterAccountApiService) CorporateGroupIdDelete(ctx context.Context, id
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
MasterAccountApiService GET a group details
This endpoint allows you to retrieve a specific group’s information such as the list of sub-organizations and the user associated with the group.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id Id of the group of sub-organization
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id Id of the group of sub-organization
@return CorporateGroupDetailsResponse
*/
func (a *MasterAccountApiService) CorporateGroupIdGet(ctx context.Context, id string) (CorporateGroupDetailsResponse, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CorporateGroupDetailsResponse
)
@@ -187,7 +183,7 @@ func (a *MasterAccountApiService) CorporateGroupIdGet(ctx context.Context, id st
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -200,7 +196,7 @@ func (a *MasterAccountApiService) CorporateGroupIdGet(ctx context.Context, id st
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -221,43 +217,41 @@ func (a *MasterAccountApiService) CorporateGroupIdGet(ctx context.Context, id st
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v CorporateGroupDetailsResponse
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
MasterAccountApiService Update a group of sub-accounts
This endpoint allows you to update a group of sub-accounts
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id Id of the group
- * @param body Group details to be updated.
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id Id of the group
+ - @param body Group details to be updated.
*/
func (a *MasterAccountApiService) CorporateGroupIdPut(ctx context.Context, id string, body Body3) (*http.Response, error) {
var (
@@ -265,7 +259,6 @@ func (a *MasterAccountApiService) CorporateGroupIdPut(ctx context.Context, id st
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -305,7 +298,7 @@ func (a *MasterAccountApiService) CorporateGroupIdPut(ctx context.Context, id st
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -318,7 +311,7 @@ func (a *MasterAccountApiService) CorporateGroupIdPut(ctx context.Context, id st
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -337,44 +330,43 @@ func (a *MasterAccountApiService) CorporateGroupIdPut(ctx context.Context, id st
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
MasterAccountApiService Create a new group of sub-accounts
This endpoint allows to create a group of sub-accounts
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param body Group details to be created.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param body Group details to be created.
@return InlineResponse201
*/
func (a *MasterAccountApiService) CorporateGroupPost(ctx context.Context, body Body) (InlineResponse201, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue InlineResponse201
)
@@ -414,7 +406,7 @@ func (a *MasterAccountApiService) CorporateGroupPost(ctx context.Context, body B
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -427,7 +419,7 @@ func (a *MasterAccountApiService) CorporateGroupPost(ctx context.Context, body B
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -448,54 +440,52 @@ func (a *MasterAccountApiService) CorporateGroupPost(ctx context.Context, body B
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v InlineResponse201
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
MasterAccountApiService Delete sub-account from group
This endpoint allows you to remove a sub-organization from a group.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param groupId Id of the group
- * @param body List of sub-account ids
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param groupId Id of the group
+ - @param body List of sub-account ids
*/
func (a *MasterAccountApiService) CorporateGroupUnlinkGroupIdSubAccountsPut(ctx context.Context, groupId string, body Body4) (*http.Response, error) {
var (
@@ -503,7 +493,6 @@ func (a *MasterAccountApiService) CorporateGroupUnlinkGroupIdSubAccountsPut(ctx
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -543,7 +532,7 @@ func (a *MasterAccountApiService) CorporateGroupUnlinkGroupIdSubAccountsPut(ctx
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -556,7 +545,7 @@ func (a *MasterAccountApiService) CorporateGroupUnlinkGroupIdSubAccountsPut(ctx
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -575,43 +564,42 @@ func (a *MasterAccountApiService) CorporateGroupUnlinkGroupIdSubAccountsPut(ctx
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
MasterAccountApiService Get the details of requested master account
This endpoint will provide the details of the master account.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return MasterDetailsResponse
*/
func (a *MasterAccountApiService) CorporateMasterAccountGet(ctx context.Context) (MasterDetailsResponse, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue MasterDetailsResponse
)
@@ -649,7 +637,7 @@ func (a *MasterAccountApiService) CorporateMasterAccountGet(ctx context.Context)
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -662,7 +650,7 @@ func (a *MasterAccountApiService) CorporateMasterAccountGet(ctx context.Context)
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -683,60 +671,60 @@ func (a *MasterAccountApiService) CorporateMasterAccountGet(ctx context.Context)
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v MasterDetailsResponse
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
MasterAccountApiService Generate SSO token to access admin account
This endpoint generates an SSO token to authenticate and access the admin account using the endpoint https://account-app.brevo.com/account/login/corporate/sso/[token], where [token] will be replaced by the actual token.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param ssoTokenRequestCorporate User email of admin account
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param ssoTokenRequestCorporate User email of admin account
@return GetSsoToken
*/
func (a *MasterAccountApiService) CorporateSsoTokenPost(ctx context.Context, ssoTokenRequestCorporate SsoTokenRequestCorporate) (GetSsoToken, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetSsoToken
)
@@ -776,7 +764,7 @@ func (a *MasterAccountApiService) CorporateSsoTokenPost(ctx context.Context, sso
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -789,7 +777,7 @@ func (a *MasterAccountApiService) CorporateSsoTokenPost(ctx context.Context, sso
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -810,72 +798,72 @@ func (a *MasterAccountApiService) CorporateSsoTokenPost(ctx context.Context, sso
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetSsoToken
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
MasterAccountApiService Get the list of all the sub-accounts of the master account.
This endpoint will provide the list all the sub-accounts of the master account.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param offset Index of the first sub-account in the page
- * @param limit Number of sub-accounts to be displayed on each page
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param offset Index of the first sub-account in the page
+ - @param limit Number of sub-accounts to be displayed on each page
@return SubAccountsResponse
*/
func (a *MasterAccountApiService) CorporateSubAccountGet(ctx context.Context, offset int32, limit int32) (SubAccountsResponse, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue SubAccountsResponse
)
@@ -915,7 +903,7 @@ func (a *MasterAccountApiService) CorporateSubAccountGet(ctx context.Context, of
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -928,7 +916,7 @@ func (a *MasterAccountApiService) CorporateSubAccountGet(ctx context.Context, of
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -949,54 +937,52 @@ func (a *MasterAccountApiService) CorporateSubAccountGet(ctx context.Context, of
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v SubAccountsResponse
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
MasterAccountApiService Enable/disable sub-account application(s)
API endpoint for the Corporate owner to enable/disable applications on the sub-account
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id Id of the sub-account organization (mandatory)
- * @param toggleApplications List of applications to activate or deactivate on a sub-account
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id Id of the sub-account organization (mandatory)
+ - @param toggleApplications List of applications to activate or deactivate on a sub-account
*/
func (a *MasterAccountApiService) CorporateSubAccountIdApplicationsTogglePut(ctx context.Context, id int64, toggleApplications SubAccountAppsToggleRequest) (*http.Response, error) {
var (
@@ -1004,7 +990,6 @@ func (a *MasterAccountApiService) CorporateSubAccountIdApplicationsTogglePut(ctx
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -1044,7 +1029,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIdApplicationsTogglePut(ctx
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1057,7 +1042,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIdApplicationsTogglePut(ctx
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1076,47 +1061,44 @@ func (a *MasterAccountApiService) CorporateSubAccountIdApplicationsTogglePut(ctx
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
MasterAccountApiService Delete a sub-account
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id Id of the sub-account organization to be deleted
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id Id of the sub-account organization to be deleted
*/
func (a *MasterAccountApiService) CorporateSubAccountIdDelete(ctx context.Context, id int64) (*http.Response, error) {
var (
@@ -1124,7 +1106,6 @@ func (a *MasterAccountApiService) CorporateSubAccountIdDelete(ctx context.Contex
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -1162,7 +1143,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIdDelete(ctx context.Contex
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1175,7 +1156,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIdDelete(ctx context.Contex
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1194,33 +1175,32 @@ func (a *MasterAccountApiService) CorporateSubAccountIdDelete(ctx context.Contex
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
MasterAccountApiService Get sub-account details
This endpoint will provide the details for the specified sub-account company
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id Id of the sub-account organization
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id Id of the sub-account organization
@return SubAccountDetailsResponse
*/
func (a *MasterAccountApiService) CorporateSubAccountIdGet(ctx context.Context, id int64) (SubAccountDetailsResponse, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue SubAccountDetailsResponse
)
@@ -1259,7 +1239,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIdGet(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1272,7 +1252,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIdGet(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1293,43 +1273,41 @@ func (a *MasterAccountApiService) CorporateSubAccountIdGet(ctx context.Context,
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v SubAccountDetailsResponse
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
MasterAccountApiService Update sub-account plan
This endpoint will update the sub-account plan. On the Corporate solution new version v2, you can set an unlimited number of credits in your sub-organization. Please pass the value “-1\" to set the consumable in unlimited mode.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id Id of the sub-account organization
- * @param updatePlanDetails Values to update a sub-account plan
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id Id of the sub-account organization
+ - @param updatePlanDetails Values to update a sub-account plan
*/
func (a *MasterAccountApiService) CorporateSubAccountIdPlanPut(ctx context.Context, id int64, updatePlanDetails SubAccountUpdatePlanRequest) (*http.Response, error) {
var (
@@ -1337,7 +1315,6 @@ func (a *MasterAccountApiService) CorporateSubAccountIdPlanPut(ctx context.Conte
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -1377,7 +1354,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIdPlanPut(ctx context.Conte
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1390,7 +1367,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIdPlanPut(ctx context.Conte
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1409,55 +1386,54 @@ func (a *MasterAccountApiService) CorporateSubAccountIdPlanPut(ctx context.Conte
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
MasterAccountApiService Associate an IP to sub-accounts
This endpoint allows to associate an IP to sub-accounts
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param body Ip address association details
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param body Ip address association details
@return interface{}
*/
func (a *MasterAccountApiService) CorporateSubAccountIpAssociatePost(ctx context.Context, body Body1) (interface{}, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue interface{}
)
@@ -1497,7 +1473,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIpAssociatePost(ctx context
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1510,7 +1486,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIpAssociatePost(ctx context
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1531,53 +1507,51 @@ func (a *MasterAccountApiService) CorporateSubAccountIpAssociatePost(ctx context
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v interface{}
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
MasterAccountApiService Dissociate an IP from sub-accounts
This endpoint allows to dissociate an IP from sub-accounts
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param body Ip address dissociation details
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param body Ip address dissociation details
*/
func (a *MasterAccountApiService) CorporateSubAccountIpDissociatePut(ctx context.Context, body Body2) (*http.Response, error) {
var (
@@ -1585,7 +1559,6 @@ func (a *MasterAccountApiService) CorporateSubAccountIpDissociatePut(ctx context
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -1624,7 +1597,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIpDissociatePut(ctx context
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1637,7 +1610,7 @@ func (a *MasterAccountApiService) CorporateSubAccountIpDissociatePut(ctx context
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1656,44 +1629,43 @@ func (a *MasterAccountApiService) CorporateSubAccountIpDissociatePut(ctx context
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
MasterAccountApiService Create an API key for a sub-account
This endpoint will generate an API v3 key for a sub account
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param createApiKeyRequest Values to generate API key for sub-account
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param createApiKeyRequest Values to generate API key for sub-account
@return CreateApiKeyResponse
*/
func (a *MasterAccountApiService) CorporateSubAccountKeyPost(ctx context.Context, createApiKeyRequest CreateApiKeyRequest) (CreateApiKeyResponse, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreateApiKeyResponse
)
@@ -1733,7 +1705,7 @@ func (a *MasterAccountApiService) CorporateSubAccountKeyPost(ctx context.Context
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1746,7 +1718,7 @@ func (a *MasterAccountApiService) CorporateSubAccountKeyPost(ctx context.Context
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1767,60 +1739,60 @@ func (a *MasterAccountApiService) CorporateSubAccountKeyPost(ctx context.Context
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v CreateApiKeyResponse
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
MasterAccountApiService Create a new sub-account under a master account.
This endpoint will create a new sub-account under a master account
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param subAccountCreate values to create new sub-account
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param subAccountCreate values to create new sub-account
@return CreateSubAccountResponse
*/
func (a *MasterAccountApiService) CorporateSubAccountPost(ctx context.Context, subAccountCreate CreateSubAccount) (CreateSubAccountResponse, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreateSubAccountResponse
)
@@ -1860,7 +1832,7 @@ func (a *MasterAccountApiService) CorporateSubAccountPost(ctx context.Context, s
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1873,7 +1845,7 @@ func (a *MasterAccountApiService) CorporateSubAccountPost(ctx context.Context, s
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1894,60 +1866,60 @@ func (a *MasterAccountApiService) CorporateSubAccountPost(ctx context.Context, s
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v CreateSubAccountResponse
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
MasterAccountApiService Generate SSO token to access sub-account
This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://account-app.brevo.com/account/login/sub-account/sso/[token], where [token] will be replaced by the actual token.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param ssoTokenRequest Values to generate SSO token for sub-account
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param ssoTokenRequest Values to generate SSO token for sub-account
@return GetSsoToken
*/
func (a *MasterAccountApiService) CorporateSubAccountSsoTokenPost(ctx context.Context, ssoTokenRequest SsoTokenRequest) (GetSsoToken, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetSsoToken
)
@@ -1987,7 +1959,7 @@ func (a *MasterAccountApiService) CorporateSubAccountSsoTokenPost(ctx context.Co
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2000,7 +1972,7 @@ func (a *MasterAccountApiService) CorporateSubAccountSsoTokenPost(ctx context.Co
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2021,72 +1993,72 @@ func (a *MasterAccountApiService) CorporateSubAccountSsoTokenPost(ctx context.Co
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetSsoToken
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
MasterAccountApiService Resend / cancel admin user invitation
-This endpoint will allow the user to: - Resend an admin user invitation - Cancel an admin user invitation
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param action Action to be performed (cancel / resend)
- * @param email Email address of the recipient
+This endpoint will allow the user to: - Resend an admin user invitation - Cancel an admin user invitation
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param action Action to be performed (cancel / resend)
+ - @param email Email address of the recipient
@return InlineResponse200
*/
func (a *MasterAccountApiService) CorporateUserInvitationActionEmailPut(ctx context.Context, action string, email string) (InlineResponse200, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Put")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Put")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue InlineResponse200
)
@@ -2126,7 +2098,7 @@ func (a *MasterAccountApiService) CorporateUserInvitationActionEmailPut(ctx cont
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2139,7 +2111,7 @@ func (a *MasterAccountApiService) CorporateUserInvitationActionEmailPut(ctx cont
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2160,53 +2132,51 @@ func (a *MasterAccountApiService) CorporateUserInvitationActionEmailPut(ctx cont
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v InlineResponse200
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
MasterAccountApiService Revoke an admin user
This endpoint allows to revoke/remove an invited member of your Admin account
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param email Email of the invited user
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param email Email of the invited user
*/
func (a *MasterAccountApiService) CorporateUserRevokeEmailDelete(ctx context.Context, email string) (*http.Response, error) {
var (
@@ -2214,7 +2184,6 @@ func (a *MasterAccountApiService) CorporateUserRevokeEmailDelete(ctx context.Con
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -2252,7 +2221,7 @@ func (a *MasterAccountApiService) CorporateUserRevokeEmailDelete(ctx context.Con
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2265,7 +2234,7 @@ func (a *MasterAccountApiService) CorporateUserRevokeEmailDelete(ctx context.Con
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2284,31 +2253,30 @@ func (a *MasterAccountApiService) CorporateUserRevokeEmailDelete(ctx context.Con
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
MasterAccountApiService Get user activity logs
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *GetAccountActivityOpts - Optional Parameters:
@@ -2320,19 +2288,19 @@ MasterAccountApiService Get user activity logs
@return GetAccountActivity
*/
-type GetAccountActivityOpts struct {
+type GetAccountActivityOpts struct {
StartDate optional.String
- EndDate optional.String
- Limit optional.Int64
- Offset optional.Int64
+ EndDate optional.String
+ Limit optional.Int64
+ Offset optional.Int64
}
func (a *MasterAccountApiService) GetAccountActivity(ctx context.Context, localVarOptionals *GetAccountActivityOpts) (GetAccountActivity, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetAccountActivity
)
@@ -2382,7 +2350,7 @@ func (a *MasterAccountApiService) GetAccountActivity(ctx context.Context, localV
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2395,7 +2363,7 @@ func (a *MasterAccountApiService) GetAccountActivity(ctx context.Context, localV
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2416,59 +2384,59 @@ func (a *MasterAccountApiService) GetAccountActivity(ctx context.Context, localV
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetAccountActivity
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
MasterAccountApiService Get the list of all admin users
This endpoint allows you to list all Admin users of your Admin account
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return GetCorporateInvitedUsersList
*/
func (a *MasterAccountApiService) GetCorporateInvitedUsersList(ctx context.Context) (GetCorporateInvitedUsersList, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetCorporateInvitedUsersList
)
@@ -2506,7 +2474,7 @@ func (a *MasterAccountApiService) GetCorporateInvitedUsersList(ctx context.Conte
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2519,7 +2487,7 @@ func (a *MasterAccountApiService) GetCorporateInvitedUsersList(ctx context.Conte
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2540,59 +2508,59 @@ func (a *MasterAccountApiService) GetCorporateInvitedUsersList(ctx context.Conte
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetCorporateInvitedUsersList
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
MasterAccountApiService Check admin user permissions
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param email Email of the invited user
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param email Email of the invited user
@return GetCorporateUserPermission
*/
func (a *MasterAccountApiService) GetCorporateUserPermission(ctx context.Context, email string) (GetCorporateUserPermission, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetCorporateUserPermission
)
@@ -2631,7 +2599,7 @@ func (a *MasterAccountApiService) GetCorporateUserPermission(ctx context.Context
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2644,7 +2612,7 @@ func (a *MasterAccountApiService) GetCorporateUserPermission(ctx context.Context
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2665,59 +2633,59 @@ func (a *MasterAccountApiService) GetCorporateUserPermission(ctx context.Context
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetCorporateUserPermission
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
MasterAccountApiService Get the list of groups
This endpoint allows you to list all groups created on your Admin account.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return []InlineResponse2001
*/
func (a *MasterAccountApiService) GetSubAccountGroups(ctx context.Context) ([]InlineResponse2001, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue []InlineResponse2001
)
@@ -2755,7 +2723,7 @@ func (a *MasterAccountApiService) GetSubAccountGroups(ctx context.Context) ([]In
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2768,7 +2736,7 @@ func (a *MasterAccountApiService) GetSubAccountGroups(ctx context.Context) ([]In
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2789,60 +2757,60 @@ func (a *MasterAccountApiService) GetSubAccountGroups(ctx context.Context) ([]In
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v []InlineResponse2001
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
MasterAccountApiService Send invitation to an admin user
-`This endpoint allows you to invite a member to manage the Admin account Features and their respective permissions are as below: - `my_plan`: - \"all\" - `api`: - \"none\" - `user_management`: - \"all\" - `app_management` | Not available in ENTv2: - \"all\" **Note**: - If `all_features_access: false` then only privileges are required otherwise if `true` then it's assumed that all permissions will be there for the invited admin user.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param sendInvitation Payload to send an invitation
+`This endpoint allows you to invite a member to manage the Admin account Features and their respective permissions are as below: - `my_plan`: - \"all\" - `api`: - \"none\" - `user_management`: - \"all\" - `app_management` | Not available in ENTv2: - \"all\" **Note**: - If `all_features_access: false` then only privileges are required otherwise if `true` then it's assumed that all permissions will be there for the invited admin user.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param sendInvitation Payload to send an invitation
@return InviteAdminUser
*/
func (a *MasterAccountApiService) InviteAdminUser(ctx context.Context, sendInvitation InviteAdminUser) (InviteAdminUser, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue InviteAdminUser
)
@@ -2882,7 +2850,7 @@ func (a *MasterAccountApiService) InviteAdminUser(ctx context.Context, sendInvit
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2895,7 +2863,7 @@ func (a *MasterAccountApiService) InviteAdminUser(ctx context.Context, sendInvit
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2916,40 +2884,40 @@ func (a *MasterAccountApiService) InviteAdminUser(ctx context.Context, sendInvit
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v InviteAdminUser
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
diff --git a/lib/api_notes.go b/lib/api_notes.go
index 2b6661d..88c0544 100644
--- a/lib/api_notes.go
+++ b/lib/api_notes.go
@@ -1,23 +1,23 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "fmt"
+ "github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "fmt"
- "github.com/antihax/optional"
)
// Linger please
@@ -27,7 +27,7 @@ var (
type NotesApiService service
-/*
+/*
NotesApiService Get all notes
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *CrmNotesGetOpts - Optional Parameters:
@@ -42,22 +42,22 @@ NotesApiService Get all notes
@return NoteList
*/
-type CrmNotesGetOpts struct {
- Entity optional.String
+type CrmNotesGetOpts struct {
+ Entity optional.String
EntityIds optional.String
- DateFrom optional.Int32
- DateTo optional.Int32
- Offset optional.Int64
- Limit optional.Int64
- Sort optional.String
+ DateFrom optional.Int32
+ DateTo optional.Int32
+ Offset optional.Int64
+ Limit optional.Int64
+ Sort optional.String
}
func (a *NotesApiService) CrmNotesGet(ctx context.Context, localVarOptionals *CrmNotesGetOpts) (NoteList, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue NoteList
)
@@ -116,7 +116,7 @@ func (a *NotesApiService) CrmNotesGet(ctx context.Context, localVarOptionals *Cr
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -129,7 +129,7 @@ func (a *NotesApiService) CrmNotesGet(ctx context.Context, localVarOptionals *Cr
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -150,52 +150,50 @@ func (a *NotesApiService) CrmNotesGet(ctx context.Context, localVarOptionals *Cr
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v NoteList
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
NotesApiService Delete a note
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id Note ID to delete
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id Note ID to delete
*/
func (a *NotesApiService) CrmNotesIdDelete(ctx context.Context, id string) (*http.Response, error) {
var (
@@ -203,7 +201,6 @@ func (a *NotesApiService) CrmNotesIdDelete(ctx context.Context, id string) (*htt
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -241,7 +238,7 @@ func (a *NotesApiService) CrmNotesIdDelete(ctx context.Context, id string) (*htt
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -254,7 +251,7 @@ func (a *NotesApiService) CrmNotesIdDelete(ctx context.Context, id string) (*htt
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -273,54 +270,53 @@ func (a *NotesApiService) CrmNotesIdDelete(ctx context.Context, id string) (*htt
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
NotesApiService Get a note
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id Note ID to get
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id Note ID to get
@return Note
*/
func (a *NotesApiService) CrmNotesIdGet(ctx context.Context, id string) (Note, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue Note
)
@@ -359,7 +355,7 @@ func (a *NotesApiService) CrmNotesIdGet(ctx context.Context, id string) (Note, *
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -372,7 +368,7 @@ func (a *NotesApiService) CrmNotesIdGet(ctx context.Context, id string) (Note, *
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -393,64 +389,62 @@ func (a *NotesApiService) CrmNotesIdGet(ctx context.Context, id string) (Note, *
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v Note
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
NotesApiService Update a note
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id Note ID to update
- * @param body Note data to update a note
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id Note ID to update
+ - @param body Note data to update a note
*/
func (a *NotesApiService) CrmNotesIdPatch(ctx context.Context, id string, body NoteData) (*http.Response, error) {
var (
@@ -458,7 +452,6 @@ func (a *NotesApiService) CrmNotesIdPatch(ctx context.Context, id string, body N
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -498,7 +491,7 @@ func (a *NotesApiService) CrmNotesIdPatch(ctx context.Context, id string, body N
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -511,7 +504,7 @@ func (a *NotesApiService) CrmNotesIdPatch(ctx context.Context, id string, body N
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -530,65 +523,64 @@ func (a *NotesApiService) CrmNotesIdPatch(ctx context.Context, id string, body N
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 415 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
NotesApiService Create a note
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param body Note data to create a note.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param body Note data to create a note.
@return NoteId
*/
func (a *NotesApiService) CrmNotesPost(ctx context.Context, body NoteData) (NoteId, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue NoteId
)
@@ -628,7 +620,7 @@ func (a *NotesApiService) CrmNotesPost(ctx context.Context, body NoteData) (Note
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -641,7 +633,7 @@ func (a *NotesApiService) CrmNotesPost(ctx context.Context, body NoteData) (Note
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -662,51 +654,51 @@ func (a *NotesApiService) CrmNotesPost(ctx context.Context, body NoteData) (Note
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v NoteId
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 415 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
diff --git a/lib/api_payments.go b/lib/api_payments.go
index 55983d2..78e9532 100644
--- a/lib/api_payments.go
+++ b/lib/api_payments.go
@@ -1,22 +1,22 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "fmt"
)
// Linger please
@@ -26,19 +26,19 @@ var (
type PaymentsApiService service
-/*
+/*
PaymentsApiService Create a payment request
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param createPaymentRquest Create a payment request
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param createPaymentRquest Create a payment request
@return CreatePaymentResponse
*/
func (a *PaymentsApiService) CreatePaymentRequest(ctx context.Context, createPaymentRquest CreatePaymentRequest) (CreatePaymentResponse, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreatePaymentResponse
)
@@ -78,7 +78,7 @@ func (a *PaymentsApiService) CreatePaymentRequest(ctx context.Context, createPay
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -91,7 +91,7 @@ func (a *PaymentsApiService) CreatePaymentRequest(ctx context.Context, createPay
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -112,74 +112,72 @@ func (a *PaymentsApiService) CreatePaymentRequest(ctx context.Context, createPay
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v CreatePaymentResponse
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 401 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
PaymentsApiService Delete a payment request.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id ID of the payment request.
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id ID of the payment request.
*/
func (a *PaymentsApiService) DeletePaymentRequest(ctx context.Context, id string) (*http.Response, error) {
var (
@@ -187,7 +185,6 @@ func (a *PaymentsApiService) DeletePaymentRequest(ctx context.Context, id string
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -225,7 +222,7 @@ func (a *PaymentsApiService) DeletePaymentRequest(ctx context.Context, id string
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -238,7 +235,7 @@ func (a *PaymentsApiService) DeletePaymentRequest(ctx context.Context, id string
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -257,65 +254,64 @@ func (a *PaymentsApiService) DeletePaymentRequest(ctx context.Context, id string
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 401 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
PaymentsApiService Get payment request details
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id Id of the payment Request
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id Id of the payment Request
@return GetPaymentRequest
*/
func (a *PaymentsApiService) GetPaymentRequest(ctx context.Context, id string) (GetPaymentRequest, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetPaymentRequest
)
@@ -354,7 +350,7 @@ func (a *PaymentsApiService) GetPaymentRequest(ctx context.Context, id string) (
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -367,7 +363,7 @@ func (a *PaymentsApiService) GetPaymentRequest(ctx context.Context, id string) (
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -388,73 +384,73 @@ func (a *PaymentsApiService) GetPaymentRequest(ctx context.Context, id string) (
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetPaymentRequest
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 401 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
diff --git a/lib/api_process.go b/lib/api_process.go
index a4e0cf5..f93686b 100644
--- a/lib/api_process.go
+++ b/lib/api_process.go
@@ -1,23 +1,23 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "fmt"
+ "github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "fmt"
- "github.com/antihax/optional"
)
// Linger please
@@ -27,19 +27,19 @@ var (
type ProcessApiService service
-/*
+/*
ProcessApiService Return the informations for a process
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param processId Id of the process
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param processId Id of the process
@return GetProcess
*/
func (a *ProcessApiService) GetProcess(ctx context.Context, processId int64) (GetProcess, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetProcess
)
@@ -78,7 +78,7 @@ func (a *ProcessApiService) GetProcess(ctx context.Context, processId int64) (Ge
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -91,7 +91,7 @@ func (a *ProcessApiService) GetProcess(ctx context.Context, processId int64) (Ge
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -112,58 +112,58 @@ func (a *ProcessApiService) GetProcess(ctx context.Context, processId int64) (Ge
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetProcess
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ProcessApiService Return all the processes for your account
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *GetProcessesOpts - Optional Parameters:
@@ -174,18 +174,18 @@ ProcessApiService Return all the processes for your account
@return GetProcesses
*/
-type GetProcessesOpts struct {
- Limit optional.Int64
+type GetProcessesOpts struct {
+ Limit optional.Int64
Offset optional.Int64
- Sort optional.String
+ Sort optional.String
}
func (a *ProcessApiService) GetProcesses(ctx context.Context, localVarOptionals *GetProcessesOpts) (GetProcesses, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetProcesses
)
@@ -232,7 +232,7 @@ func (a *ProcessApiService) GetProcesses(ctx context.Context, localVarOptionals
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -245,7 +245,7 @@ func (a *ProcessApiService) GetProcesses(ctx context.Context, localVarOptionals
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -266,40 +266,40 @@ func (a *ProcessApiService) GetProcesses(ctx context.Context, localVarOptionals
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetProcesses
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
diff --git a/lib/api_reseller.go b/lib/api_reseller.go
index 78312d2..570138c 100644
--- a/lib/api_reseller.go
+++ b/lib/api_reseller.go
@@ -1,23 +1,23 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "fmt"
+ "github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "fmt"
- "github.com/antihax/optional"
)
// Linger please
@@ -27,20 +27,20 @@ var (
type ResellerApiService service
-/*
+/*
ResellerApiService Add Email and/or SMS credits to a specific child account
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param childIdentifier Either auth key or id of reseller's child
- * @param addCredits Values to post to add credit to a specific child account
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param childIdentifier Either auth key or id of reseller's child
+ - @param addCredits Values to post to add credit to a specific child account
@return RemainingCreditModel
*/
func (a *ResellerApiService) AddCredits(ctx context.Context, childIdentifier string, addCredits AddCredits) (RemainingCreditModel, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue RemainingCreditModel
)
@@ -81,7 +81,7 @@ func (a *ResellerApiService) AddCredits(ctx context.Context, childIdentifier str
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -94,7 +94,7 @@ func (a *ResellerApiService) AddCredits(ctx context.Context, childIdentifier str
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -115,75 +115,73 @@ func (a *ResellerApiService) AddCredits(ctx context.Context, childIdentifier str
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v RemainingCreditModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ResellerApiService Associate a dedicated IP to the child
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param childIdentifier Either auth key or id of reseller's child
- * @param ip IP to associate
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param childIdentifier Either auth key or id of reseller's child
+ - @param ip IP to associate
*/
func (a *ResellerApiService) AssociateIpToChild(ctx context.Context, childIdentifier string, ip ManageIp) (*http.Response, error) {
var (
@@ -191,7 +189,6 @@ func (a *ResellerApiService) AssociateIpToChild(ctx context.Context, childIdenti
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -231,7 +228,7 @@ func (a *ResellerApiService) AssociateIpToChild(ctx context.Context, childIdenti
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -244,7 +241,7 @@ func (a *ResellerApiService) AssociateIpToChild(ctx context.Context, childIdenti
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -263,48 +260,45 @@ func (a *ResellerApiService) AssociateIpToChild(ctx context.Context, childIdenti
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
ResellerApiService Create a domain for a child account
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param childIdentifier Either auth key or id of reseller's child
- * @param addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account.
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param childIdentifier Either auth key or id of reseller's child
+ - @param addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account.
*/
func (a *ResellerApiService) CreateChildDomain(ctx context.Context, childIdentifier string, addChildDomain AddChildDomain) (*http.Response, error) {
var (
@@ -312,7 +306,6 @@ func (a *ResellerApiService) CreateChildDomain(ctx context.Context, childIdentif
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -352,7 +345,7 @@ func (a *ResellerApiService) CreateChildDomain(ctx context.Context, childIdentif
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -365,7 +358,7 @@ func (a *ResellerApiService) CreateChildDomain(ctx context.Context, childIdentif
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -384,53 +377,52 @@ func (a *ResellerApiService) CreateChildDomain(ctx context.Context, childIdentif
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
ResellerApiService Creates a reseller child
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *CreateResellerChildOpts - Optional Parameters:
@@ -439,16 +431,16 @@ ResellerApiService Creates a reseller child
@return CreateReseller
*/
-type CreateResellerChildOpts struct {
+type CreateResellerChildOpts struct {
ResellerChild optional.Interface
}
func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOptionals *CreateResellerChildOpts) (CreateReseller, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreateReseller
)
@@ -478,10 +470,10 @@ func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOp
}
// body params
if localVarOptionals != nil && localVarOptionals.ResellerChild.IsSet() {
-
+
localVarOptionalResellerChild, localVarOptionalResellerChildok := localVarOptionals.ResellerChild.Value().(CreateChild)
if !localVarOptionalResellerChildok {
- return localVarReturnValue, nil, reportError("resellerChild should be CreateChild")
+ return localVarReturnValue, nil, reportError("resellerChild should be CreateChild")
}
localVarPostBody = &localVarOptionalResellerChild
}
@@ -495,7 +487,7 @@ func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOp
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -508,7 +500,7 @@ func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOp
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -529,64 +521,62 @@ func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOp
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v CreateReseller
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ResellerApiService Delete the sender domain of the reseller child based on the childIdentifier and domainName passed
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param childIdentifier Either auth key or id of reseller's child
- * @param domainName Pass the existing domain that needs to be deleted
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param childIdentifier Either auth key or id of reseller's child
+ - @param domainName Pass the existing domain that needs to be deleted
*/
func (a *ResellerApiService) DeleteChildDomain(ctx context.Context, childIdentifier string, domainName string) (*http.Response, error) {
var (
@@ -594,7 +584,6 @@ func (a *ResellerApiService) DeleteChildDomain(ctx context.Context, childIdentif
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -633,7 +622,7 @@ func (a *ResellerApiService) DeleteChildDomain(ctx context.Context, childIdentif
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -646,7 +635,7 @@ func (a *ResellerApiService) DeleteChildDomain(ctx context.Context, childIdentif
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -665,58 +654,55 @@ func (a *ResellerApiService) DeleteChildDomain(ctx context.Context, childIdentif
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
ResellerApiService Delete a single reseller child based on the child identifier supplied
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param childIdentifier Either auth key or child id of reseller's child
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param childIdentifier Either auth key or child id of reseller's child
*/
func (a *ResellerApiService) DeleteResellerChild(ctx context.Context, childIdentifier string) (*http.Response, error) {
var (
@@ -724,7 +710,6 @@ func (a *ResellerApiService) DeleteResellerChild(ctx context.Context, childIdent
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -762,7 +747,7 @@ func (a *ResellerApiService) DeleteResellerChild(ctx context.Context, childIdent
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -775,7 +760,7 @@ func (a *ResellerApiService) DeleteResellerChild(ctx context.Context, childIdent
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -794,59 +779,56 @@ func (a *ResellerApiService) DeleteResellerChild(ctx context.Context, childIdent
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
ResellerApiService Dissociate a dedicated IP to the child
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param childIdentifier Either auth key or id of reseller's child
- * @param ip IP to dissociate
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param childIdentifier Either auth key or id of reseller's child
+ - @param ip IP to dissociate
*/
func (a *ResellerApiService) DissociateIpFromChild(ctx context.Context, childIdentifier string, ip ManageIp) (*http.Response, error) {
var (
@@ -854,7 +836,6 @@ func (a *ResellerApiService) DissociateIpFromChild(ctx context.Context, childIde
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -894,7 +875,7 @@ func (a *ResellerApiService) DissociateIpFromChild(ctx context.Context, childIde
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -907,7 +888,7 @@ func (a *ResellerApiService) DissociateIpFromChild(ctx context.Context, childIde
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -926,54 +907,53 @@ func (a *ResellerApiService) DissociateIpFromChild(ctx context.Context, childIde
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
ResellerApiService Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param childIdentifier Either auth key or id of reseller's child
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param childIdentifier Either auth key or id of reseller's child
@return GetChildAccountCreationStatus
*/
func (a *ResellerApiService) GetChildAccountCreationStatus(ctx context.Context, childIdentifier string) (GetChildAccountCreationStatus, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetChildAccountCreationStatus
)
@@ -1012,7 +992,7 @@ func (a *ResellerApiService) GetChildAccountCreationStatus(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1025,7 +1005,7 @@ func (a *ResellerApiService) GetChildAccountCreationStatus(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1046,81 +1026,81 @@ func (a *ResellerApiService) GetChildAccountCreationStatus(ctx context.Context,
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetChildAccountCreationStatus
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ResellerApiService Get all sender domains for a specific child account
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param childIdentifier Either auth key or id of reseller's child
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param childIdentifier Either auth key or id of reseller's child
@return GetChildDomains
*/
func (a *ResellerApiService) GetChildDomains(ctx context.Context, childIdentifier string) (GetChildDomains, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetChildDomains
)
@@ -1159,7 +1139,7 @@ func (a *ResellerApiService) GetChildDomains(ctx context.Context, childIdentifie
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1172,7 +1152,7 @@ func (a *ResellerApiService) GetChildDomains(ctx context.Context, childIdentifie
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1193,81 +1173,81 @@ func (a *ResellerApiService) GetChildDomains(ctx context.Context, childIdentifie
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetChildDomains
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ResellerApiService Get a child account's details
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param childIdentifier Either auth key or id of reseller's child
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param childIdentifier Either auth key or id of reseller's child
@return GetChildInfo
*/
func (a *ResellerApiService) GetChildInfo(ctx context.Context, childIdentifier string) (GetChildInfo, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetChildInfo
)
@@ -1306,7 +1286,7 @@ func (a *ResellerApiService) GetChildInfo(ctx context.Context, childIdentifier s
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1319,7 +1299,7 @@ func (a *ResellerApiService) GetChildInfo(ctx context.Context, childIdentifier s
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1340,69 +1320,69 @@ func (a *ResellerApiService) GetChildInfo(ctx context.Context, childIdentifier s
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetChildInfo
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ResellerApiService Get the list of all children accounts
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *GetResellerChildsOpts - Optional Parameters:
@@ -1412,17 +1392,17 @@ ResellerApiService Get the list of all children accounts
@return GetChildrenList
*/
-type GetResellerChildsOpts struct {
- Limit optional.Int64
+type GetResellerChildsOpts struct {
+ Limit optional.Int64
Offset optional.Int64
}
func (a *ResellerApiService) GetResellerChilds(ctx context.Context, localVarOptionals *GetResellerChildsOpts) (GetChildrenList, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetChildrenList
)
@@ -1466,7 +1446,7 @@ func (a *ResellerApiService) GetResellerChilds(ctx context.Context, localVarOpti
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1479,7 +1459,7 @@ func (a *ResellerApiService) GetResellerChilds(ctx context.Context, localVarOpti
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1500,60 +1480,60 @@ func (a *ResellerApiService) GetResellerChilds(ctx context.Context, localVarOpti
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetChildrenList
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ResellerApiService Get session token to access Brevo (SSO)
It returns a session [token] which will remain valid for a short period of time. A child account will be able to access a white-labeled section by using the following url pattern => https:/email.mydomain.com/login/sso?token=[token]
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param childIdentifier Either auth key or id of reseller's child
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param childIdentifier Either auth key or id of reseller's child
@return GetSsoToken
*/
func (a *ResellerApiService) GetSsoToken(ctx context.Context, childIdentifier string) (GetSsoToken, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetSsoToken
)
@@ -1592,7 +1572,7 @@ func (a *ResellerApiService) GetSsoToken(ctx context.Context, childIdentifier st
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1605,7 +1585,7 @@ func (a *ResellerApiService) GetSsoToken(ctx context.Context, childIdentifier st
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1626,82 +1606,82 @@ func (a *ResellerApiService) GetSsoToken(ctx context.Context, childIdentifier st
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetSsoToken
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ResellerApiService Remove Email and/or SMS credits from a specific child account
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param childIdentifier Either auth key or id of reseller's child
- * @param removeCredits Values to post to remove email or SMS credits from a specific child account
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param childIdentifier Either auth key or id of reseller's child
+ - @param removeCredits Values to post to remove email or SMS credits from a specific child account
@return RemainingCreditModel
*/
func (a *ResellerApiService) RemoveCredits(ctx context.Context, childIdentifier string, removeCredits RemoveCredits) (RemainingCreditModel, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue RemainingCreditModel
)
@@ -1742,7 +1722,7 @@ func (a *ResellerApiService) RemoveCredits(ctx context.Context, childIdentifier
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1755,7 +1735,7 @@ func (a *ResellerApiService) RemoveCredits(ctx context.Context, childIdentifier
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1776,75 +1756,73 @@ func (a *ResellerApiService) RemoveCredits(ctx context.Context, childIdentifier
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v RemainingCreditModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
ResellerApiService Update info of reseller's child account status based on the childIdentifier supplied
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param childIdentifier Either auth key or id of reseller's child
- * @param updateChildAccountStatus values to update in child account status
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param childIdentifier Either auth key or id of reseller's child
+ - @param updateChildAccountStatus values to update in child account status
*/
func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, childIdentifier string, updateChildAccountStatus UpdateChildAccountStatus) (*http.Response, error) {
var (
@@ -1852,7 +1830,6 @@ func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, child
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -1892,7 +1869,7 @@ func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, child
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1905,7 +1882,7 @@ func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, child
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1924,60 +1901,57 @@ func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, child
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
ResellerApiService Update the sender domain of reseller's child based on the childIdentifier and domainName passed
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param childIdentifier Either auth key or id of reseller's child
- * @param domainName Pass the existing domain that needs to be updated
- * @param updateChildDomain value to update for sender domain
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param childIdentifier Either auth key or id of reseller's child
+ - @param domainName Pass the existing domain that needs to be updated
+ - @param updateChildDomain value to update for sender domain
*/
func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, childIdentifier string, domainName string, updateChildDomain UpdateChildDomain) (*http.Response, error) {
var (
@@ -1985,7 +1959,6 @@ func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, childIdentif
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -2026,7 +1999,7 @@ func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, childIdentif
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2039,7 +2012,7 @@ func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, childIdentif
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2058,59 +2031,56 @@ func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, childIdentif
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
ResellerApiService Update info of reseller's child based on the child identifier supplied
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param childIdentifier Either auth key or id of reseller's child
- * @param resellerChild values to update in child profile
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param childIdentifier Either auth key or id of reseller's child
+ - @param resellerChild values to update in child profile
*/
func (a *ResellerApiService) UpdateResellerChild(ctx context.Context, childIdentifier string, resellerChild UpdateChild) (*http.Response, error) {
var (
@@ -2118,7 +2088,6 @@ func (a *ResellerApiService) UpdateResellerChild(ctx context.Context, childIdent
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -2158,7 +2127,7 @@ func (a *ResellerApiService) UpdateResellerChild(ctx context.Context, childIdent
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2171,7 +2140,7 @@ func (a *ResellerApiService) UpdateResellerChild(ctx context.Context, childIdent
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2190,46 +2159,45 @@ func (a *ResellerApiService) UpdateResellerChild(ctx context.Context, childIdent
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
diff --git a/lib/api_senders.go b/lib/api_senders.go
index 7032b5b..e394ae9 100644
--- a/lib/api_senders.go
+++ b/lib/api_senders.go
@@ -1,23 +1,23 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "fmt"
+ "github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "fmt"
- "github.com/antihax/optional"
)
// Linger please
@@ -27,7 +27,7 @@ var (
type SendersApiService service
-/*
+/*
SendersApiService Create a new sender
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *CreateSenderOpts - Optional Parameters:
@@ -36,16 +36,16 @@ SendersApiService Create a new sender
@return CreateSenderModel
*/
-type CreateSenderOpts struct {
+type CreateSenderOpts struct {
Sender optional.Interface
}
func (a *SendersApiService) CreateSender(ctx context.Context, localVarOptionals *CreateSenderOpts) (CreateSenderModel, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreateSenderModel
)
@@ -75,10 +75,10 @@ func (a *SendersApiService) CreateSender(ctx context.Context, localVarOptionals
}
// body params
if localVarOptionals != nil && localVarOptionals.Sender.IsSet() {
-
+
localVarOptionalSender, localVarOptionalSenderok := localVarOptionals.Sender.Value().(CreateSender)
if !localVarOptionalSenderok {
- return localVarReturnValue, nil, reportError("sender should be CreateSender")
+ return localVarReturnValue, nil, reportError("sender should be CreateSender")
}
localVarPostBody = &localVarOptionalSender
}
@@ -92,7 +92,7 @@ func (a *SendersApiService) CreateSender(ctx context.Context, localVarOptionals
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -105,7 +105,7 @@ func (a *SendersApiService) CreateSender(ctx context.Context, localVarOptionals
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -126,52 +126,50 @@ func (a *SendersApiService) CreateSender(ctx context.Context, localVarOptionals
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v CreateSenderModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
SendersApiService Delete a sender
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param senderId Id of the sender
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param senderId Id of the sender
*/
func (a *SendersApiService) DeleteSender(ctx context.Context, senderId int64) (*http.Response, error) {
var (
@@ -179,7 +177,6 @@ func (a *SendersApiService) DeleteSender(ctx context.Context, senderId int64) (*
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -217,7 +214,7 @@ func (a *SendersApiService) DeleteSender(ctx context.Context, senderId int64) (*
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -230,7 +227,7 @@ func (a *SendersApiService) DeleteSender(ctx context.Context, senderId int64) (*
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -249,53 +246,52 @@ func (a *SendersApiService) DeleteSender(ctx context.Context, senderId int64) (*
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
SendersApiService Get all the dedicated IPs for your account
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return GetIps
*/
func (a *SendersApiService) GetIps(ctx context.Context) (GetIps, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetIps
)
@@ -333,7 +329,7 @@ func (a *SendersApiService) GetIps(ctx context.Context) (GetIps, *http.Response,
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -346,7 +342,7 @@ func (a *SendersApiService) GetIps(ctx context.Context) (GetIps, *http.Response,
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -367,48 +363,48 @@ func (a *SendersApiService) GetIps(ctx context.Context) (GetIps, *http.Response,
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetIps
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
SendersApiService Get all the dedicated IPs for a sender
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param senderId Id of the sender
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param senderId Id of the sender
@return GetIpsFromSender
*/
func (a *SendersApiService) GetIpsFromSender(ctx context.Context, senderId int64) (GetIpsFromSender, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetIpsFromSender
)
@@ -447,7 +443,7 @@ func (a *SendersApiService) GetIpsFromSender(ctx context.Context, senderId int64
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -460,7 +456,7 @@ func (a *SendersApiService) GetIpsFromSender(ctx context.Context, senderId int64
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -481,58 +477,58 @@ func (a *SendersApiService) GetIpsFromSender(ctx context.Context, senderId int64
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetIpsFromSender
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
SendersApiService Get the list of all your senders
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *GetSendersOpts - Optional Parameters:
@@ -542,17 +538,17 @@ SendersApiService Get the list of all your senders
@return GetSendersList
*/
-type GetSendersOpts struct {
- Ip optional.String
+type GetSendersOpts struct {
+ Ip optional.String
Domain optional.String
}
func (a *SendersApiService) GetSenders(ctx context.Context, localVarOptionals *GetSendersOpts) (GetSendersList, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetSendersList
)
@@ -596,7 +592,7 @@ func (a *SendersApiService) GetSenders(ctx context.Context, localVarOptionals *G
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -609,7 +605,7 @@ func (a *SendersApiService) GetSenders(ctx context.Context, localVarOptionals *G
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -630,47 +626,47 @@ func (a *SendersApiService) GetSenders(ctx context.Context, localVarOptionals *G
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetSendersList
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
SendersApiService Update a sender
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param senderId Id of the sender
@@ -680,7 +676,7 @@ SendersApiService Update a sender
*/
-type UpdateSenderOpts struct {
+type UpdateSenderOpts struct {
Sender optional.Interface
}
@@ -690,7 +686,6 @@ func (a *SendersApiService) UpdateSender(ctx context.Context, senderId int64, lo
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -720,10 +715,10 @@ func (a *SendersApiService) UpdateSender(ctx context.Context, senderId int64, lo
}
// body params
if localVarOptionals != nil && localVarOptionals.Sender.IsSet() {
-
+
localVarOptionalSender, localVarOptionalSenderok := localVarOptionals.Sender.Value().(UpdateSender)
if !localVarOptionalSenderok {
- return nil, reportError("sender should be UpdateSender")
+ return nil, reportError("sender should be UpdateSender")
}
localVarPostBody = &localVarOptionalSender
}
@@ -737,7 +732,7 @@ func (a *SendersApiService) UpdateSender(ctx context.Context, senderId int64, lo
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -750,7 +745,7 @@ func (a *SendersApiService) UpdateSender(ctx context.Context, senderId int64, lo
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -769,42 +764,41 @@ func (a *SendersApiService) UpdateSender(ctx context.Context, senderId int64, lo
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
SendersApiService Update a sender
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param senderId Id of the sender
@@ -814,7 +808,7 @@ SendersApiService Update a sender
*/
-type ValidateSenderByOTPOpts struct {
+type ValidateSenderByOTPOpts struct {
Otp optional.Interface
}
@@ -824,7 +818,6 @@ func (a *SendersApiService) ValidateSenderByOTP(ctx context.Context, senderId in
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -854,10 +847,10 @@ func (a *SendersApiService) ValidateSenderByOTP(ctx context.Context, senderId in
}
// body params
if localVarOptionals != nil && localVarOptionals.Otp.IsSet() {
-
+
localVarOptionalOtp, localVarOptionalOtpok := localVarOptionals.Otp.Value().(Otp)
if !localVarOptionalOtpok {
- return nil, reportError("otp should be Otp")
+ return nil, reportError("otp should be Otp")
}
localVarPostBody = &localVarOptionalOtp
}
@@ -871,7 +864,7 @@ func (a *SendersApiService) ValidateSenderByOTP(ctx context.Context, senderId in
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -884,7 +877,7 @@ func (a *SendersApiService) ValidateSenderByOTP(ctx context.Context, senderId in
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -903,35 +896,34 @@ func (a *SendersApiService) ValidateSenderByOTP(ctx context.Context, senderId in
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
diff --git a/lib/api_sms_campaigns.go b/lib/api_sms_campaigns.go
index 71e90d2..405f53f 100644
--- a/lib/api_sms_campaigns.go
+++ b/lib/api_sms_campaigns.go
@@ -1,23 +1,23 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "fmt"
+ "github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "fmt"
- "github.com/antihax/optional"
)
// Linger please
@@ -27,19 +27,19 @@ var (
type SMSCampaignsApiService service
-/*
+/*
SMSCampaignsApiService Creates an SMS campaign
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param createSmsCampaign Values to create an SMS Campaign
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param createSmsCampaign Values to create an SMS Campaign
@return CreateModel
*/
func (a *SMSCampaignsApiService) CreateSmsCampaign(ctx context.Context, createSmsCampaign CreateSmsCampaign) (CreateModel, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreateModel
)
@@ -79,7 +79,7 @@ func (a *SMSCampaignsApiService) CreateSmsCampaign(ctx context.Context, createSm
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -92,7 +92,7 @@ func (a *SMSCampaignsApiService) CreateSmsCampaign(ctx context.Context, createSm
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -113,52 +113,50 @@ func (a *SMSCampaignsApiService) CreateSmsCampaign(ctx context.Context, createSm
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v CreateModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
SMSCampaignsApiService Delete an SMS campaign
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param campaignId id of the SMS campaign
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param campaignId id of the SMS campaign
*/
func (a *SMSCampaignsApiService) DeleteSmsCampaign(ctx context.Context, campaignId int64) (*http.Response, error) {
var (
@@ -166,7 +164,6 @@ func (a *SMSCampaignsApiService) DeleteSmsCampaign(ctx context.Context, campaign
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -204,7 +201,7 @@ func (a *SMSCampaignsApiService) DeleteSmsCampaign(ctx context.Context, campaign
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -217,7 +214,7 @@ func (a *SMSCampaignsApiService) DeleteSmsCampaign(ctx context.Context, campaign
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -236,54 +233,53 @@ func (a *SMSCampaignsApiService) DeleteSmsCampaign(ctx context.Context, campaign
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
SMSCampaignsApiService Get an SMS campaign
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param campaignId id of the SMS campaign
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param campaignId id of the SMS campaign
@return GetSmsCampaign
*/
func (a *SMSCampaignsApiService) GetSmsCampaign(ctx context.Context, campaignId int64) (GetSmsCampaign, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetSmsCampaign
)
@@ -322,7 +318,7 @@ func (a *SMSCampaignsApiService) GetSmsCampaign(ctx context.Context, campaignId
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -335,7 +331,7 @@ func (a *SMSCampaignsApiService) GetSmsCampaign(ctx context.Context, campaignId
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -356,58 +352,58 @@ func (a *SMSCampaignsApiService) GetSmsCampaign(ctx context.Context, campaignId
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetSmsCampaign
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
SMSCampaignsApiService Returns the information for all your created SMS campaigns
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *GetSmsCampaignsOpts - Optional Parameters:
@@ -421,21 +417,21 @@ SMSCampaignsApiService Returns the information for all your created SMS campaign
@return GetSmsCampaigns
*/
-type GetSmsCampaignsOpts struct {
- Status optional.String
+type GetSmsCampaignsOpts struct {
+ Status optional.String
StartDate optional.String
- EndDate optional.String
- Limit optional.Int64
- Offset optional.Int64
- Sort optional.String
+ EndDate optional.String
+ Limit optional.Int64
+ Offset optional.Int64
+ Sort optional.String
}
func (a *SMSCampaignsApiService) GetSmsCampaigns(ctx context.Context, localVarOptionals *GetSmsCampaignsOpts) (GetSmsCampaigns, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetSmsCampaigns
)
@@ -491,7 +487,7 @@ func (a *SMSCampaignsApiService) GetSmsCampaigns(ctx context.Context, localVarOp
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -504,7 +500,7 @@ func (a *SMSCampaignsApiService) GetSmsCampaigns(ctx context.Context, localVarOp
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -525,47 +521,47 @@ func (a *SMSCampaignsApiService) GetSmsCampaigns(ctx context.Context, localVarOp
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetSmsCampaigns
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
SMSCampaignsApiService Export an SMS campaign's recipients
It returns the background process ID which on completion calls the notify URL that you have set in the input.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -576,16 +572,16 @@ It returns the background process ID which on completion calls the notify URL th
@return CreatedProcessId
*/
-type RequestSmsRecipientExportOpts struct {
+type RequestSmsRecipientExportOpts struct {
RecipientExport optional.Interface
}
func (a *SMSCampaignsApiService) RequestSmsRecipientExport(ctx context.Context, campaignId int64, localVarOptionals *RequestSmsRecipientExportOpts) (CreatedProcessId, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreatedProcessId
)
@@ -616,10 +612,10 @@ func (a *SMSCampaignsApiService) RequestSmsRecipientExport(ctx context.Context,
}
// body params
if localVarOptionals != nil && localVarOptionals.RecipientExport.IsSet() {
-
+
localVarOptionalRecipientExport, localVarOptionalRecipientExportok := localVarOptionals.RecipientExport.Value().(RequestSmsRecipientExport)
if !localVarOptionalRecipientExportok {
- return localVarReturnValue, nil, reportError("recipientExport should be RequestSmsRecipientExport")
+ return localVarReturnValue, nil, reportError("recipientExport should be RequestSmsRecipientExport")
}
localVarPostBody = &localVarOptionalRecipientExport
}
@@ -633,7 +629,7 @@ func (a *SMSCampaignsApiService) RequestSmsRecipientExport(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -646,7 +642,7 @@ func (a *SMSCampaignsApiService) RequestSmsRecipientExport(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -667,63 +663,61 @@ func (a *SMSCampaignsApiService) RequestSmsRecipientExport(ctx context.Context,
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 202 {
var v CreatedProcessId
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
SMSCampaignsApiService Send your SMS campaign immediately
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param campaignId id of the campaign
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param campaignId id of the campaign
*/
func (a *SMSCampaignsApiService) SendSmsCampaignNow(ctx context.Context, campaignId int64) (*http.Response, error) {
var (
@@ -731,7 +725,6 @@ func (a *SMSCampaignsApiService) SendSmsCampaignNow(ctx context.Context, campaig
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -769,7 +762,7 @@ func (a *SMSCampaignsApiService) SendSmsCampaignNow(ctx context.Context, campaig
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -782,7 +775,7 @@ func (a *SMSCampaignsApiService) SendSmsCampaignNow(ctx context.Context, campaig
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -801,60 +794,57 @@ func (a *SMSCampaignsApiService) SendSmsCampaignNow(ctx context.Context, campaig
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 402 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
SMSCampaignsApiService Send an SMS campaign's report
Send report of Sent and Archived campaign, to the specified email addresses, with respective data and a pdf attachment in detail.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param campaignId id of the campaign
- * @param sendReport Values for send a report
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param campaignId id of the campaign
+ - @param sendReport Values for send a report
*/
func (a *SMSCampaignsApiService) SendSmsReport(ctx context.Context, campaignId int64, sendReport SendReport) (*http.Response, error) {
var (
@@ -862,7 +852,6 @@ func (a *SMSCampaignsApiService) SendSmsReport(ctx context.Context, campaignId i
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -902,7 +891,7 @@ func (a *SMSCampaignsApiService) SendSmsReport(ctx context.Context, campaignId i
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -915,7 +904,7 @@ func (a *SMSCampaignsApiService) SendSmsReport(ctx context.Context, campaignId i
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -934,48 +923,45 @@ func (a *SMSCampaignsApiService) SendSmsReport(ctx context.Context, campaignId i
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
SMSCampaignsApiService Send a test SMS campaign
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param campaignId Id of the SMS campaign
- * @param phoneNumber Mobile number of the recipient with the country code. This number must belong to one of your contacts in Brevo account and must not be blacklisted
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param campaignId Id of the SMS campaign
+ - @param phoneNumber Mobile number of the recipient with the country code. This number must belong to one of your contacts in Brevo account and must not be blacklisted
*/
func (a *SMSCampaignsApiService) SendTestSms(ctx context.Context, campaignId int64, phoneNumber SendTestSms) (*http.Response, error) {
var (
@@ -983,7 +969,6 @@ func (a *SMSCampaignsApiService) SendTestSms(ctx context.Context, campaignId int
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -1023,7 +1008,7 @@ func (a *SMSCampaignsApiService) SendTestSms(ctx context.Context, campaignId int
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1036,7 +1021,7 @@ func (a *SMSCampaignsApiService) SendTestSms(ctx context.Context, campaignId int
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1055,48 +1040,45 @@ func (a *SMSCampaignsApiService) SendTestSms(ctx context.Context, campaignId int
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v PostSendSmsTestFailed
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
SMSCampaignsApiService Update an SMS campaign
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param campaignId id of the SMS campaign
- * @param updateSmsCampaign Values to update an SMS Campaign
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param campaignId id of the SMS campaign
+ - @param updateSmsCampaign Values to update an SMS Campaign
*/
func (a *SMSCampaignsApiService) UpdateSmsCampaign(ctx context.Context, campaignId int64, updateSmsCampaign UpdateSmsCampaign) (*http.Response, error) {
var (
@@ -1104,7 +1086,6 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaign(ctx context.Context, campaign
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -1144,7 +1125,7 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaign(ctx context.Context, campaign
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1157,7 +1138,7 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaign(ctx context.Context, campaign
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1176,48 +1157,45 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaign(ctx context.Context, campaign
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
SMSCampaignsApiService Update a campaign's status
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param campaignId id of the campaign
- * @param status Status of the campaign.
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param campaignId id of the campaign
+ - @param status Status of the campaign.
*/
func (a *SMSCampaignsApiService) UpdateSmsCampaignStatus(ctx context.Context, campaignId int64, status UpdateCampaignStatus) (*http.Response, error) {
var (
@@ -1225,7 +1203,6 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaignStatus(ctx context.Context, ca
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -1265,7 +1242,7 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaignStatus(ctx context.Context, ca
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1278,7 +1255,7 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaignStatus(ctx context.Context, ca
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1297,35 +1274,34 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaignStatus(ctx context.Context, ca
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
diff --git a/lib/api_tasks.go b/lib/api_tasks.go
index 2cd737f..d3f114f 100644
--- a/lib/api_tasks.go
+++ b/lib/api_tasks.go
@@ -1,23 +1,23 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "fmt"
+ "github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "fmt"
- "github.com/antihax/optional"
)
// Linger please
@@ -27,7 +27,7 @@ var (
type TasksApiService service
-/*
+/*
TasksApiService Get all tasks
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *CrmTasksGetOpts - Optional Parameters:
@@ -48,28 +48,28 @@ TasksApiService Get all tasks
@return TaskList
*/
-type CrmTasksGetOpts struct {
- FilterType optional.String
- FilterStatus optional.String
- FilterDate optional.String
- FilterAssignTo optional.String
- FilterContacts optional.String
- FilterDeals optional.String
+type CrmTasksGetOpts struct {
+ FilterType optional.String
+ FilterStatus optional.String
+ FilterDate optional.String
+ FilterAssignTo optional.String
+ FilterContacts optional.String
+ FilterDeals optional.String
FilterCompanies optional.String
- DateFrom optional.Int32
- DateTo optional.Int32
- Offset optional.Int64
- Limit optional.Int64
- Sort optional.String
- SortBy optional.String
+ DateFrom optional.Int32
+ DateTo optional.Int32
+ Offset optional.Int64
+ Limit optional.Int64
+ Sort optional.String
+ SortBy optional.String
}
func (a *TasksApiService) CrmTasksGet(ctx context.Context, localVarOptionals *CrmTasksGetOpts) (TaskList, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue TaskList
)
@@ -146,7 +146,7 @@ func (a *TasksApiService) CrmTasksGet(ctx context.Context, localVarOptionals *Cr
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -159,7 +159,7 @@ func (a *TasksApiService) CrmTasksGet(ctx context.Context, localVarOptionals *Cr
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -180,52 +180,50 @@ func (a *TasksApiService) CrmTasksGet(ctx context.Context, localVarOptionals *Cr
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v TaskList
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
TasksApiService Delete a task
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id
*/
func (a *TasksApiService) CrmTasksIdDelete(ctx context.Context, id string) (*http.Response, error) {
var (
@@ -233,7 +231,6 @@ func (a *TasksApiService) CrmTasksIdDelete(ctx context.Context, id string) (*htt
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -271,7 +268,7 @@ func (a *TasksApiService) CrmTasksIdDelete(ctx context.Context, id string) (*htt
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -284,7 +281,7 @@ func (a *TasksApiService) CrmTasksIdDelete(ctx context.Context, id string) (*htt
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -303,54 +300,53 @@ func (a *TasksApiService) CrmTasksIdDelete(ctx context.Context, id string) (*htt
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
TasksApiService Get a task
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id
@return Task
*/
func (a *TasksApiService) CrmTasksIdGet(ctx context.Context, id string) (Task, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue Task
)
@@ -389,7 +385,7 @@ func (a *TasksApiService) CrmTasksIdGet(ctx context.Context, id string) (Task, *
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -402,7 +398,7 @@ func (a *TasksApiService) CrmTasksIdGet(ctx context.Context, id string) (Task, *
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -423,64 +419,62 @@ func (a *TasksApiService) CrmTasksIdGet(ctx context.Context, id string) (Task, *
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v Task
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
TasksApiService Update a task
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id
- * @param body Updated task details.
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id
+ - @param body Updated task details.
*/
func (a *TasksApiService) CrmTasksIdPatch(ctx context.Context, id string, body Body12) (*http.Response, error) {
var (
@@ -488,7 +482,6 @@ func (a *TasksApiService) CrmTasksIdPatch(ctx context.Context, id string, body B
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -528,7 +521,7 @@ func (a *TasksApiService) CrmTasksIdPatch(ctx context.Context, id string, body B
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -541,7 +534,7 @@ func (a *TasksApiService) CrmTasksIdPatch(ctx context.Context, id string, body B
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -560,54 +553,53 @@ func (a *TasksApiService) CrmTasksIdPatch(ctx context.Context, id string, body B
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
TasksApiService Create a task
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param body Task name.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param body Task name.
@return InlineResponse2012
*/
func (a *TasksApiService) CrmTasksPost(ctx context.Context, body Body11) (InlineResponse2012, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue InlineResponse2012
)
@@ -647,7 +639,7 @@ func (a *TasksApiService) CrmTasksPost(ctx context.Context, body Body11) (Inline
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -660,7 +652,7 @@ func (a *TasksApiService) CrmTasksPost(ctx context.Context, body Body11) (Inline
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -681,47 +673,47 @@ func (a *TasksApiService) CrmTasksPost(ctx context.Context, body Body11) (Inline
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v InlineResponse2012
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
TasksApiService Get all task types
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return TaskTypes
*/
func (a *TasksApiService) CrmTasktypesGet(ctx context.Context) (TaskTypes, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue TaskTypes
)
@@ -759,7 +751,7 @@ func (a *TasksApiService) CrmTasktypesGet(ctx context.Context) (TaskTypes, *http
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -772,7 +764,7 @@ func (a *TasksApiService) CrmTasktypesGet(ctx context.Context) (TaskTypes, *http
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -793,29 +785,29 @@ func (a *TasksApiService) CrmTasktypesGet(ctx context.Context) (TaskTypes, *http
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v TaskTypes
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
diff --git a/lib/api_transactional_emails.go b/lib/api_transactional_emails.go
index c371d94..add1fe6 100644
--- a/lib/api_transactional_emails.go
+++ b/lib/api_transactional_emails.go
@@ -1,23 +1,23 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "fmt"
+ "github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "fmt"
- "github.com/antihax/optional"
)
// Linger please
@@ -27,13 +27,11 @@ var (
type TransactionalEmailsApiService service
-/*
+/*
TransactionalEmailsApiService Add a new domain to the list of blocked domains
Blocks a new domain in order to avoid messages being sent to the same
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param blockDomain
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param blockDomain
*/
func (a *TransactionalEmailsApiService) BlockNewDomain(ctx context.Context, blockDomain BlockDomain) (*http.Response, error) {
var (
@@ -41,7 +39,6 @@ func (a *TransactionalEmailsApiService) BlockNewDomain(ctx context.Context, bloc
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -80,7 +77,7 @@ func (a *TransactionalEmailsApiService) BlockNewDomain(ctx context.Context, bloc
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -93,7 +90,7 @@ func (a *TransactionalEmailsApiService) BlockNewDomain(ctx context.Context, bloc
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -112,43 +109,42 @@ func (a *TransactionalEmailsApiService) BlockNewDomain(ctx context.Context, bloc
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
TransactionalEmailsApiService Create an email template
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param smtpTemplate values to update in transactional email template
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param smtpTemplate values to update in transactional email template
@return CreateModel
*/
func (a *TransactionalEmailsApiService) CreateSmtpTemplate(ctx context.Context, smtpTemplate CreateSmtpTemplate) (CreateModel, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreateModel
)
@@ -188,7 +184,7 @@ func (a *TransactionalEmailsApiService) CreateSmtpTemplate(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -201,7 +197,7 @@ func (a *TransactionalEmailsApiService) CreateSmtpTemplate(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -222,53 +218,51 @@ func (a *TransactionalEmailsApiService) CreateSmtpTemplate(ctx context.Context,
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v CreateModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
TransactionalEmailsApiService Unblock an existing domain from the list of blocked domains
Unblocks an existing domain from the list of blocked domains
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param domain The name of the domain to be deleted
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param domain The name of the domain to be deleted
*/
func (a *TransactionalEmailsApiService) DeleteBlockedDomain(ctx context.Context, domain string) (*http.Response, error) {
var (
@@ -276,7 +270,6 @@ func (a *TransactionalEmailsApiService) DeleteBlockedDomain(ctx context.Context,
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -314,7 +307,7 @@ func (a *TransactionalEmailsApiService) DeleteBlockedDomain(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -327,7 +320,7 @@ func (a *TransactionalEmailsApiService) DeleteBlockedDomain(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -346,31 +339,30 @@ func (a *TransactionalEmailsApiService) DeleteBlockedDomain(ctx context.Context,
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
TransactionalEmailsApiService Delete hardbounces
Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures)
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -380,7 +372,7 @@ Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures)
*/
-type DeleteHardbouncesOpts struct {
+type DeleteHardbouncesOpts struct {
DeleteHardbounces optional.Interface
}
@@ -390,7 +382,6 @@ func (a *TransactionalEmailsApiService) DeleteHardbounces(ctx context.Context, l
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -419,10 +410,10 @@ func (a *TransactionalEmailsApiService) DeleteHardbounces(ctx context.Context, l
}
// body params
if localVarOptionals != nil && localVarOptionals.DeleteHardbounces.IsSet() {
-
+
localVarOptionalDeleteHardbounces, localVarOptionalDeleteHardbouncesok := localVarOptionals.DeleteHardbounces.Value().(DeleteHardbounces)
if !localVarOptionalDeleteHardbouncesok {
- return nil, reportError("deleteHardbounces should be DeleteHardbounces")
+ return nil, reportError("deleteHardbounces should be DeleteHardbounces")
}
localVarPostBody = &localVarOptionalDeleteHardbounces
}
@@ -436,7 +427,7 @@ func (a *TransactionalEmailsApiService) DeleteHardbounces(ctx context.Context, l
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -449,7 +440,7 @@ func (a *TransactionalEmailsApiService) DeleteHardbounces(ctx context.Context, l
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -468,37 +459,34 @@ func (a *TransactionalEmailsApiService) DeleteHardbounces(ctx context.Context, l
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
TransactionalEmailsApiService Delete scheduled emails by batchId or messageId
Delete scheduled batch of emails by batchId or single scheduled email by messageId
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email.
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email.
*/
func (a *TransactionalEmailsApiService) DeleteScheduledEmailById(ctx context.Context, identifier string) (*http.Response, error) {
var (
@@ -506,7 +494,6 @@ func (a *TransactionalEmailsApiService) DeleteScheduledEmailById(ctx context.Con
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -544,7 +531,7 @@ func (a *TransactionalEmailsApiService) DeleteScheduledEmailById(ctx context.Con
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -557,7 +544,7 @@ func (a *TransactionalEmailsApiService) DeleteScheduledEmailById(ctx context.Con
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -576,47 +563,44 @@ func (a *TransactionalEmailsApiService) DeleteScheduledEmailById(ctx context.Con
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
TransactionalEmailsApiService Delete an inactive email template
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param templateId id of the template
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param templateId id of the template
*/
func (a *TransactionalEmailsApiService) DeleteSmtpTemplate(ctx context.Context, templateId int64) (*http.Response, error) {
var (
@@ -624,7 +608,6 @@ func (a *TransactionalEmailsApiService) DeleteSmtpTemplate(ctx context.Context,
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -662,7 +645,7 @@ func (a *TransactionalEmailsApiService) DeleteSmtpTemplate(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -675,7 +658,7 @@ func (a *TransactionalEmailsApiService) DeleteSmtpTemplate(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -694,42 +677,41 @@ func (a *TransactionalEmailsApiService) DeleteSmtpTemplate(ctx context.Context,
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
TransactionalEmailsApiService Get your transactional email activity aggregated over a period of time
This endpoint will show the aggregated stats for past 90 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -742,19 +724,19 @@ This endpoint will show the aggregated stats for past 90 days by default if
@return GetAggregatedReport
*/
-type GetAggregatedSmtpReportOpts struct {
+type GetAggregatedSmtpReportOpts struct {
StartDate optional.String
- EndDate optional.String
- Days optional.Int64
- Tag optional.String
+ EndDate optional.String
+ Days optional.Int64
+ Tag optional.String
}
func (a *TransactionalEmailsApiService) GetAggregatedSmtpReport(ctx context.Context, localVarOptionals *GetAggregatedSmtpReportOpts) (GetAggregatedReport, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetAggregatedReport
)
@@ -804,7 +786,7 @@ func (a *TransactionalEmailsApiService) GetAggregatedSmtpReport(ctx context.Cont
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -817,7 +799,7 @@ func (a *TransactionalEmailsApiService) GetAggregatedSmtpReport(ctx context.Cont
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -838,59 +820,59 @@ func (a *TransactionalEmailsApiService) GetAggregatedSmtpReport(ctx context.Cont
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetAggregatedReport
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
TransactionalEmailsApiService Get the list of blocked domains
Get the list of blocked domains
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return GetBlockedDomains
*/
func (a *TransactionalEmailsApiService) GetBlockedDomains(ctx context.Context) (GetBlockedDomains, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetBlockedDomains
)
@@ -928,7 +910,7 @@ func (a *TransactionalEmailsApiService) GetBlockedDomains(ctx context.Context) (
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -941,7 +923,7 @@ func (a *TransactionalEmailsApiService) GetBlockedDomains(ctx context.Context) (
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -962,36 +944,36 @@ func (a *TransactionalEmailsApiService) GetBlockedDomains(ctx context.Context) (
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetBlockedDomains
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
TransactionalEmailsApiService Get all your transactional email activity (unaggregated events)
This endpoint will show the aggregated stats for past 30 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -1011,26 +993,26 @@ This endpoint will show the aggregated stats for past 30 days by default if
@return GetEmailEventReport
*/
-type GetEmailEventReportOpts struct {
- Limit optional.Int64
- Offset optional.Int64
- StartDate optional.String
- EndDate optional.String
- Days optional.Int64
- Email optional.String
- Event optional.String
- Tags optional.String
- MessageId optional.String
+type GetEmailEventReportOpts struct {
+ Limit optional.Int64
+ Offset optional.Int64
+ StartDate optional.String
+ EndDate optional.String
+ Days optional.Int64
+ Email optional.String
+ Event optional.String
+ Tags optional.String
+ MessageId optional.String
TemplateId optional.Int64
- Sort optional.String
+ Sort optional.String
}
func (a *TransactionalEmailsApiService) GetEmailEventReport(ctx context.Context, localVarOptionals *GetEmailEventReportOpts) (GetEmailEventReport, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetEmailEventReport
)
@@ -1101,7 +1083,7 @@ func (a *TransactionalEmailsApiService) GetEmailEventReport(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1114,7 +1096,7 @@ func (a *TransactionalEmailsApiService) GetEmailEventReport(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1135,47 +1117,47 @@ func (a *TransactionalEmailsApiService) GetEmailEventReport(ctx context.Context,
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetEmailEventReport
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
TransactionalEmailsApiService Fetch scheduled emails by batchId
Fetch scheduled batch of emails by batchId (Can retrieve data upto 30 days old)
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -1191,21 +1173,21 @@ Fetch scheduled batch of emails by batchId (Can retrieve data upto 30 days old)
@return GetScheduledEmailByBatchId
*/
-type GetScheduledEmailByBatchIdOpts struct {
+type GetScheduledEmailByBatchIdOpts struct {
StartDate optional.String
- EndDate optional.String
- Sort optional.String
- Status optional.String
- Limit optional.Int64
- Offset optional.Int64
+ EndDate optional.String
+ Sort optional.String
+ Status optional.String
+ Limit optional.Int64
+ Offset optional.Int64
}
func (a *TransactionalEmailsApiService) GetScheduledEmailByBatchId(ctx context.Context, batchId string, localVarOptionals *GetScheduledEmailByBatchIdOpts) (GetScheduledEmailByBatchId, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetScheduledEmailByBatchId
)
@@ -1262,7 +1244,7 @@ func (a *TransactionalEmailsApiService) GetScheduledEmailByBatchId(ctx context.C
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1275,7 +1257,7 @@ func (a *TransactionalEmailsApiService) GetScheduledEmailByBatchId(ctx context.C
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1296,58 +1278,58 @@ func (a *TransactionalEmailsApiService) GetScheduledEmailByBatchId(ctx context.C
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetScheduledEmailByBatchId
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
TransactionalEmailsApiService Fetch scheduled email by messageId
Fetch scheduled email by messageId (Can retrieve data upto 30 days old)
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -1359,17 +1341,17 @@ Fetch scheduled email by messageId (Can retrieve data upto 30 days old)
@return GetScheduledEmailByMessageId
*/
-type GetScheduledEmailByMessageIdOpts struct {
+type GetScheduledEmailByMessageIdOpts struct {
StartDate optional.String
- EndDate optional.String
+ EndDate optional.String
}
func (a *TransactionalEmailsApiService) GetScheduledEmailByMessageId(ctx context.Context, messageId string, localVarOptionals *GetScheduledEmailByMessageIdOpts) (GetScheduledEmailByMessageId, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetScheduledEmailByMessageId
)
@@ -1414,7 +1396,7 @@ func (a *TransactionalEmailsApiService) GetScheduledEmailByMessageId(ctx context
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1427,7 +1409,7 @@ func (a *TransactionalEmailsApiService) GetScheduledEmailByMessageId(ctx context
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1448,58 +1430,58 @@ func (a *TransactionalEmailsApiService) GetScheduledEmailByMessageId(ctx context
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetScheduledEmailByMessageId
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
TransactionalEmailsApiService Get your transactional email activity aggregated per day
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *GetSmtpReportOpts - Optional Parameters:
@@ -1514,22 +1496,22 @@ TransactionalEmailsApiService Get your transactional email activity aggregated p
@return GetReports
*/
-type GetSmtpReportOpts struct {
- Limit optional.Int64
- Offset optional.Int64
+type GetSmtpReportOpts struct {
+ Limit optional.Int64
+ Offset optional.Int64
StartDate optional.String
- EndDate optional.String
- Days optional.Int64
- Tag optional.String
- Sort optional.String
+ EndDate optional.String
+ Days optional.Int64
+ Tag optional.String
+ Sort optional.String
}
func (a *TransactionalEmailsApiService) GetSmtpReport(ctx context.Context, localVarOptionals *GetSmtpReportOpts) (GetReports, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetReports
)
@@ -1588,7 +1570,7 @@ func (a *TransactionalEmailsApiService) GetSmtpReport(ctx context.Context, local
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1601,7 +1583,7 @@ func (a *TransactionalEmailsApiService) GetSmtpReport(ctx context.Context, local
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1622,59 +1604,59 @@ func (a *TransactionalEmailsApiService) GetSmtpReport(ctx context.Context, local
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetReports
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
TransactionalEmailsApiService Returns the template information
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param templateId id of the template
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param templateId id of the template
@return GetSmtpTemplateOverview
*/
func (a *TransactionalEmailsApiService) GetSmtpTemplate(ctx context.Context, templateId int64) (GetSmtpTemplateOverview, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetSmtpTemplateOverview
)
@@ -1713,7 +1695,7 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplate(ctx context.Context, tem
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1726,7 +1708,7 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplate(ctx context.Context, tem
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1747,58 +1729,58 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplate(ctx context.Context, tem
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetSmtpTemplateOverview
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
TransactionalEmailsApiService Get the list of email templates
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *GetSmtpTemplatesOpts - Optional Parameters:
@@ -1810,19 +1792,19 @@ TransactionalEmailsApiService Get the list of email templates
@return GetSmtpTemplates
*/
-type GetSmtpTemplatesOpts struct {
+type GetSmtpTemplatesOpts struct {
TemplateStatus optional.Bool
- Limit optional.Int64
- Offset optional.Int64
- Sort optional.String
+ Limit optional.Int64
+ Offset optional.Int64
+ Sort optional.String
}
func (a *TransactionalEmailsApiService) GetSmtpTemplates(ctx context.Context, localVarOptionals *GetSmtpTemplatesOpts) (GetSmtpTemplates, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetSmtpTemplates
)
@@ -1872,7 +1854,7 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplates(ctx context.Context, lo
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1885,7 +1867,7 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplates(ctx context.Context, lo
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1906,47 +1888,47 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplates(ctx context.Context, lo
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetSmtpTemplates
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
TransactionalEmailsApiService Get the list of blocked or unsubscribed transactional contacts
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *GetTransacBlockedContactsOpts - Optional Parameters:
@@ -1960,21 +1942,21 @@ TransactionalEmailsApiService Get the list of blocked or unsubscribed transactio
@return GetTransacBlockedContacts
*/
-type GetTransacBlockedContactsOpts struct {
+type GetTransacBlockedContactsOpts struct {
StartDate optional.String
- EndDate optional.String
- Limit optional.Int64
- Offset optional.Int64
- Senders optional.Interface
- Sort optional.String
+ EndDate optional.String
+ Limit optional.Int64
+ Offset optional.Int64
+ Senders optional.Interface
+ Sort optional.String
}
func (a *TransactionalEmailsApiService) GetTransacBlockedContacts(ctx context.Context, localVarOptionals *GetTransacBlockedContactsOpts) (GetTransacBlockedContacts, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetTransacBlockedContacts
)
@@ -2030,7 +2012,7 @@ func (a *TransactionalEmailsApiService) GetTransacBlockedContacts(ctx context.Co
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2043,7 +2025,7 @@ func (a *TransactionalEmailsApiService) GetTransacBlockedContacts(ctx context.Co
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2064,59 +2046,59 @@ func (a *TransactionalEmailsApiService) GetTransacBlockedContacts(ctx context.Co
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetTransacBlockedContacts
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
TransactionalEmailsApiService Get the personalized content of a sent transactional email
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param uuid Unique id of the transactional email that has been sent to a particular contact
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param uuid Unique id of the transactional email that has been sent to a particular contact
@return GetTransacEmailContent
*/
func (a *TransactionalEmailsApiService) GetTransacEmailContent(ctx context.Context, uuid string) (GetTransacEmailContent, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetTransacEmailContent
)
@@ -2155,7 +2137,7 @@ func (a *TransactionalEmailsApiService) GetTransacEmailContent(ctx context.Conte
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2168,7 +2150,7 @@ func (a *TransactionalEmailsApiService) GetTransacEmailContent(ctx context.Conte
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2189,36 +2171,36 @@ func (a *TransactionalEmailsApiService) GetTransacEmailContent(ctx context.Conte
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetTransacEmailContent
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
TransactionalEmailsApiService Get the list of transactional emails on the basis of allowed filters
This endpoint will show the list of emails for past 30 days by default. To retrieve emails before that time, please pass startDate and endDate in query filters.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -2235,23 +2217,23 @@ This endpoint will show the list of emails for past 30 days by default. To retri
@return GetTransacEmailsList
*/
-type GetTransacEmailsListOpts struct {
- Email optional.String
+type GetTransacEmailsListOpts struct {
+ Email optional.String
TemplateId optional.Int64
- MessageId optional.String
- StartDate optional.String
- EndDate optional.String
- Sort optional.String
- Limit optional.Int64
- Offset optional.Int64
+ MessageId optional.String
+ StartDate optional.String
+ EndDate optional.String
+ Sort optional.String
+ Limit optional.Int64
+ Offset optional.Int64
}
func (a *TransactionalEmailsApiService) GetTransacEmailsList(ctx context.Context, localVarOptionals *GetTransacEmailsListOpts) (GetTransacEmailsList, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetTransacEmailsList
)
@@ -2313,7 +2295,7 @@ func (a *TransactionalEmailsApiService) GetTransacEmailsList(ctx context.Context
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2326,7 +2308,7 @@ func (a *TransactionalEmailsApiService) GetTransacEmailsList(ctx context.Context
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2347,53 +2329,51 @@ func (a *TransactionalEmailsApiService) GetTransacEmailsList(ctx context.Context
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetTransacEmailsList
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
TransactionalEmailsApiService Send a template to your test list
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param templateId Id of the template
- * @param sendTestEmail
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param templateId Id of the template
+ - @param sendTestEmail
*/
func (a *TransactionalEmailsApiService) SendTestTemplate(ctx context.Context, templateId int64, sendTestEmail SendTestEmail) (*http.Response, error) {
var (
@@ -2401,7 +2381,6 @@ func (a *TransactionalEmailsApiService) SendTestTemplate(ctx context.Context, te
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -2441,7 +2420,7 @@ func (a *TransactionalEmailsApiService) SendTestTemplate(ctx context.Context, te
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2454,7 +2433,7 @@ func (a *TransactionalEmailsApiService) SendTestTemplate(ctx context.Context, te
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2473,54 +2452,53 @@ func (a *TransactionalEmailsApiService) SendTestTemplate(ctx context.Context, te
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v PostSendFailed
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
TransactionalEmailsApiService Send a transactional email
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param sendSmtpEmail Values to send a transactional email
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param sendSmtpEmail Values to send a transactional email
@return CreateSmtpEmail
*/
func (a *TransactionalEmailsApiService) SendTransacEmail(ctx context.Context, sendSmtpEmail SendSmtpEmail) (CreateSmtpEmail, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreateSmtpEmail
)
@@ -2560,7 +2538,7 @@ func (a *TransactionalEmailsApiService) SendTransacEmail(ctx context.Context, se
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2573,7 +2551,7 @@ func (a *TransactionalEmailsApiService) SendTransacEmail(ctx context.Context, se
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2594,63 +2572,61 @@ func (a *TransactionalEmailsApiService) SendTransacEmail(ctx context.Context, se
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v CreateSmtpEmail
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 202 {
var v ScheduleSmtpEmail
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
TransactionalEmailsApiService Unblock or resubscribe a transactional contact
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param email contact email (urlencoded) to unblock.
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param email contact email (urlencoded) to unblock.
*/
func (a *TransactionalEmailsApiService) SmtpBlockedContactsEmailDelete(ctx context.Context, email string) (*http.Response, error) {
var (
@@ -2658,7 +2634,6 @@ func (a *TransactionalEmailsApiService) SmtpBlockedContactsEmailDelete(ctx conte
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -2696,7 +2671,7 @@ func (a *TransactionalEmailsApiService) SmtpBlockedContactsEmailDelete(ctx conte
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2709,7 +2684,7 @@ func (a *TransactionalEmailsApiService) SmtpBlockedContactsEmailDelete(ctx conte
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2728,47 +2703,44 @@ func (a *TransactionalEmailsApiService) SmtpBlockedContactsEmailDelete(ctx conte
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
TransactionalEmailsApiService Delete an SMTP transactional log
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param identifier MessageId or Email of the transactional log(s) to delete
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param identifier MessageId or Email of the transactional log(s) to delete
*/
func (a *TransactionalEmailsApiService) SmtpLogIdentifierDelete(ctx context.Context, identifier string) (*http.Response, error) {
var (
@@ -2776,7 +2748,6 @@ func (a *TransactionalEmailsApiService) SmtpLogIdentifierDelete(ctx context.Cont
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -2814,7 +2785,7 @@ func (a *TransactionalEmailsApiService) SmtpLogIdentifierDelete(ctx context.Cont
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2827,7 +2798,7 @@ func (a *TransactionalEmailsApiService) SmtpLogIdentifierDelete(ctx context.Cont
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2846,48 +2817,45 @@ func (a *TransactionalEmailsApiService) SmtpLogIdentifierDelete(ctx context.Cont
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
TransactionalEmailsApiService Update an email template
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param templateId id of the template
- * @param smtpTemplate values to update in transactional email template
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param templateId id of the template
+ - @param smtpTemplate values to update in transactional email template
*/
func (a *TransactionalEmailsApiService) UpdateSmtpTemplate(ctx context.Context, templateId int64, smtpTemplate UpdateSmtpTemplate) (*http.Response, error) {
var (
@@ -2895,7 +2863,6 @@ func (a *TransactionalEmailsApiService) UpdateSmtpTemplate(ctx context.Context,
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -2935,7 +2902,7 @@ func (a *TransactionalEmailsApiService) UpdateSmtpTemplate(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -2948,7 +2915,7 @@ func (a *TransactionalEmailsApiService) UpdateSmtpTemplate(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -2967,35 +2934,34 @@ func (a *TransactionalEmailsApiService) UpdateSmtpTemplate(ctx context.Context,
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
diff --git a/lib/api_transactional_sms.go b/lib/api_transactional_sms.go
index 621f5c9..6501926 100644
--- a/lib/api_transactional_sms.go
+++ b/lib/api_transactional_sms.go
@@ -1,22 +1,22 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "github.com/antihax/optional"
)
// Linger please
@@ -26,7 +26,7 @@ var (
type TransactionalSMSApiService service
-/*
+/*
TransactionalSMSApiService Get all your SMS activity (unaggregated events)
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *GetSmsEventsOpts - Optional Parameters:
@@ -43,24 +43,24 @@ TransactionalSMSApiService Get all your SMS activity (unaggregated events)
@return GetSmsEventReport
*/
-type GetSmsEventsOpts struct {
- Limit optional.Int64
- StartDate optional.String
- EndDate optional.String
- Offset optional.Int64
- Days optional.Int64
+type GetSmsEventsOpts struct {
+ Limit optional.Int64
+ StartDate optional.String
+ EndDate optional.String
+ Offset optional.Int64
+ Days optional.Int64
PhoneNumber optional.String
- Event optional.String
- Tags optional.String
- Sort optional.String
+ Event optional.String
+ Tags optional.String
+ Sort optional.String
}
func (a *TransactionalSMSApiService) GetSmsEvents(ctx context.Context, localVarOptionals *GetSmsEventsOpts) (GetSmsEventReport, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetSmsEventReport
)
@@ -125,7 +125,7 @@ func (a *TransactionalSMSApiService) GetSmsEvents(ctx context.Context, localVarO
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -138,7 +138,7 @@ func (a *TransactionalSMSApiService) GetSmsEvents(ctx context.Context, localVarO
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -159,47 +159,47 @@ func (a *TransactionalSMSApiService) GetSmsEvents(ctx context.Context, localVarO
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetSmsEventReport
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
TransactionalSMSApiService Get your SMS activity aggregated over a period of time
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *GetTransacAggregatedSmsReportOpts - Optional Parameters:
@@ -211,19 +211,19 @@ TransactionalSMSApiService Get your SMS activity aggregated over a period of tim
@return GetTransacAggregatedSmsReport
*/
-type GetTransacAggregatedSmsReportOpts struct {
+type GetTransacAggregatedSmsReportOpts struct {
StartDate optional.String
- EndDate optional.String
- Days optional.Int64
- Tag optional.String
+ EndDate optional.String
+ Days optional.Int64
+ Tag optional.String
}
func (a *TransactionalSMSApiService) GetTransacAggregatedSmsReport(ctx context.Context, localVarOptionals *GetTransacAggregatedSmsReportOpts) (GetTransacAggregatedSmsReport, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetTransacAggregatedSmsReport
)
@@ -273,7 +273,7 @@ func (a *TransactionalSMSApiService) GetTransacAggregatedSmsReport(ctx context.C
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -286,7 +286,7 @@ func (a *TransactionalSMSApiService) GetTransacAggregatedSmsReport(ctx context.C
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -307,47 +307,47 @@ func (a *TransactionalSMSApiService) GetTransacAggregatedSmsReport(ctx context.C
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetTransacAggregatedSmsReport
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
TransactionalSMSApiService Get your SMS activity aggregated per day
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *GetTransacSmsReportOpts - Optional Parameters:
@@ -360,20 +360,20 @@ TransactionalSMSApiService Get your SMS activity aggregated per day
@return GetTransacSmsReport
*/
-type GetTransacSmsReportOpts struct {
+type GetTransacSmsReportOpts struct {
StartDate optional.String
- EndDate optional.String
- Days optional.Int64
- Tag optional.String
- Sort optional.String
+ EndDate optional.String
+ Days optional.Int64
+ Tag optional.String
+ Sort optional.String
}
func (a *TransactionalSMSApiService) GetTransacSmsReport(ctx context.Context, localVarOptionals *GetTransacSmsReportOpts) (GetTransacSmsReport, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetTransacSmsReport
)
@@ -426,7 +426,7 @@ func (a *TransactionalSMSApiService) GetTransacSmsReport(ctx context.Context, lo
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -439,7 +439,7 @@ func (a *TransactionalSMSApiService) GetTransacSmsReport(ctx context.Context, lo
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -460,59 +460,59 @@ func (a *TransactionalSMSApiService) GetTransacSmsReport(ctx context.Context, lo
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetTransacSmsReport
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
TransactionalSMSApiService Send SMS message to a mobile number
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param sendTransacSms Values to send a transactional SMS
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param sendTransacSms Values to send a transactional SMS
@return SendSms
*/
func (a *TransactionalSMSApiService) SendTransacSms(ctx context.Context, sendTransacSms SendTransacSms) (SendSms, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue SendSms
)
@@ -552,7 +552,7 @@ func (a *TransactionalSMSApiService) SendTransacSms(ctx context.Context, sendTra
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -565,7 +565,7 @@ func (a *TransactionalSMSApiService) SendTransacSms(ctx context.Context, sendTra
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -586,51 +586,51 @@ func (a *TransactionalSMSApiService) SendTransacSms(ctx context.Context, sendTra
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v SendSms
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 402 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
diff --git a/lib/api_transactional_whats_app.go b/lib/api_transactional_whats_app.go
index 8064fee..d606498 100644
--- a/lib/api_transactional_whats_app.go
+++ b/lib/api_transactional_whats_app.go
@@ -1,22 +1,22 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "github.com/antihax/optional"
)
// Linger please
@@ -26,16 +26,16 @@ var (
type TransactionalWhatsAppApiService service
-/*
+/*
TransactionalWhatsAppApiService Get all your WhatsApp activity (unaggregated events)
This endpoint will show the unaggregated statistics for WhatsApp activity (30 days by default if `startDate` and `endDate` or `days` is not passed. The date range can not exceed 90 days)
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *GetWhatsappEventReportOpts - Optional Parameters:
* @param "Limit" (optional.Int64) - Number limitation for the result returned
* @param "Offset" (optional.Int64) - Beginning point in the list to retrieve from
- * @param "StartDate" (optional.String) - **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate
- * @param "EndDate" (optional.String) - **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate
- * @param "Days" (optional.Int64) - Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_
+ * @param "StartDate" (optional.String) - **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate
+ * @param "EndDate" (optional.String) - **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate
+ * @param "Days" (optional.Int64) - Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_
* @param "ContactNumber" (optional.String) - Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721)
* @param "Event" (optional.String) - Filter the report for a specific event type
* @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
@@ -43,23 +43,23 @@ This endpoint will show the unaggregated statistics for WhatsApp activity (30 da
@return GetWhatsappEventReport
*/
-type GetWhatsappEventReportOpts struct {
- Limit optional.Int64
- Offset optional.Int64
- StartDate optional.String
- EndDate optional.String
- Days optional.Int64
+type GetWhatsappEventReportOpts struct {
+ Limit optional.Int64
+ Offset optional.Int64
+ StartDate optional.String
+ EndDate optional.String
+ Days optional.Int64
ContactNumber optional.String
- Event optional.String
- Sort optional.String
+ Event optional.String
+ Sort optional.String
}
func (a *TransactionalWhatsAppApiService) GetWhatsappEventReport(ctx context.Context, localVarOptionals *GetWhatsappEventReportOpts) (GetWhatsappEventReport, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetWhatsappEventReport
)
@@ -121,7 +121,7 @@ func (a *TransactionalWhatsAppApiService) GetWhatsappEventReport(ctx context.Con
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -134,7 +134,7 @@ func (a *TransactionalWhatsAppApiService) GetWhatsappEventReport(ctx context.Con
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -155,60 +155,60 @@ func (a *TransactionalWhatsAppApiService) GetWhatsappEventReport(ctx context.Con
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetWhatsappEventReport
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
TransactionalWhatsAppApiService Send a WhatsApp message
This endpoint is used to send a WhatsApp message. <br/>(**The first message you send using the API must contain a Template ID. You must create a template on WhatsApp on the Brevo platform to fetch the Template ID.**)
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param sendWhatsappMessage Values to send WhatsApp message
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param sendWhatsappMessage Values to send WhatsApp message
@return InlineResponse2014
*/
func (a *TransactionalWhatsAppApiService) SendWhatsappMessage(ctx context.Context, sendWhatsappMessage SendWhatsappMessage) (InlineResponse2014, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue InlineResponse2014
)
@@ -248,7 +248,7 @@ func (a *TransactionalWhatsAppApiService) SendWhatsappMessage(ctx context.Contex
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -261,7 +261,7 @@ func (a *TransactionalWhatsAppApiService) SendWhatsappMessage(ctx context.Contex
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -282,40 +282,40 @@ func (a *TransactionalWhatsAppApiService) SendWhatsappMessage(ctx context.Contex
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v InlineResponse2014
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
diff --git a/lib/api_user.go b/lib/api_user.go
index e8a7e91..6712f9e 100644
--- a/lib/api_user.go
+++ b/lib/api_user.go
@@ -1,22 +1,22 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "fmt"
)
// Linger please
@@ -26,20 +26,20 @@ var (
type UserApiService service
-/*
+/*
UserApiService Update permission for a user
-`Feature` - A Feature represents a specific functionality like Email campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a user, determine which feature you want to manage access to. You must specify the feature accurately to avoid errors. `Permission` - A Permission defines the level of access or control a user has over a specific feature. While inviting user, decide on the permission level required for the selected feature. Make sure the chosen permission is related to the selected feature. Features and their respective permissions are as below: - `email_campaigns`: - \"create_edit_delete\" - \"send_schedule_suspend\" - `sms_campaigns`: - \"create_edit_delete\" - \"send_schedule_suspend\" - `contacts`: - \"view\" - \"create_edit_delete\" - \"import\" - \"export\" - \"list_and_attributes\" - \"forms\" - `templates`: - \"create_edit_delete\" - \"activate_deactivate\" - `workflows`: - \"create_edit_delete\" - \"activate_deactivate_pause\" - \"settings\" - `facebook_ads`: - \"create_edit_delete\" - \"schedule_pause\" - `landing_pages`: - \"all\" - `transactional_emails`: - \"settings\" - \"logs\" - `smtp_api`: - \"smtp\" - \"api_keys\" - \"authorized_ips\" - `user_management`: - \"all\" - `sales_platform`: - \"manage_owned_deals_tasks\" - \"manage_others_deals_tasks\" - \"reports\" - \"settings\" - `phone`: - \"all\" - `conversations`: - \"access\" - \"assign\" - \"configure\" - `senders_domains_dedicated_ips`: - \"senders_management\" - \"domains_management\" - \"dedicated_ips_management\" - `push_notifications`: - \"view\" - \"create_edit_delete\" - \"send\" - \"settings\" - `companies`: - \"manage_owned_companies\" - \"manage_other_companies\" - \"settings\" **Note**: - The privileges array remains the same as in the send invitation; the user simply needs to provide the permissions that need to be updated. - The availability of feature and its permission depends on your current plan. Please select the features and permissions accordingly.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param updatePermissions Values to update permissions for an invited user
+`Feature` - A Feature represents a specific functionality like Email campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a user, determine which feature you want to manage access to. You must specify the feature accurately to avoid errors. `Permission` - A Permission defines the level of access or control a user has over a specific feature. While inviting user, decide on the permission level required for the selected feature. Make sure the chosen permission is related to the selected feature. Features and their respective permissions are as below: - `email_campaigns`: - \"create_edit_delete\" - \"send_schedule_suspend\" - `sms_campaigns`: - \"create_edit_delete\" - \"send_schedule_suspend\" - `contacts`: - \"view\" - \"create_edit_delete\" - \"import\" - \"export\" - \"list_and_attributes\" - \"forms\" - `templates`: - \"create_edit_delete\" - \"activate_deactivate\" - `workflows`: - \"create_edit_delete\" - \"activate_deactivate_pause\" - \"settings\" - `facebook_ads`: - \"create_edit_delete\" - \"schedule_pause\" - `landing_pages`: - \"all\" - `transactional_emails`: - \"settings\" - \"logs\" - `smtp_api`: - \"smtp\" - \"api_keys\" - \"authorized_ips\" - `user_management`: - \"all\" - `sales_platform`: - \"manage_owned_deals_tasks\" - \"manage_others_deals_tasks\" - \"reports\" - \"settings\" - `phone`: - \"all\" - `conversations`: - \"access\" - \"assign\" - \"configure\" - `senders_domains_dedicated_ips`: - \"senders_management\" - \"domains_management\" - \"dedicated_ips_management\" - `push_notifications`: - \"view\" - \"create_edit_delete\" - \"send\" - \"settings\" - `companies`: - \"manage_owned_companies\" - \"manage_other_companies\" - \"settings\" **Note**: - The privileges array remains the same as in the send invitation; the user simply needs to provide the permissions that need to be updated. - The availability of feature and its permission depends on your current plan. Please select the features and permissions accordingly.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param updatePermissions Values to update permissions for an invited user
@return Inviteuser
*/
func (a *UserApiService) EditUserPermission(ctx context.Context, updatePermissions Inviteuser) (Inviteuser, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue Inviteuser
)
@@ -79,7 +79,7 @@ func (a *UserApiService) EditUserPermission(ctx context.Context, updatePermissio
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -92,7 +92,7 @@ func (a *UserApiService) EditUserPermission(ctx context.Context, updatePermissio
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -113,58 +113,58 @@ func (a *UserApiService) EditUserPermission(ctx context.Context, updatePermissio
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v Inviteuser
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
UserApiService Get the list of all your users
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return GetInvitedUsersList
*/
func (a *UserApiService) GetInvitedUsersList(ctx context.Context) (GetInvitedUsersList, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetInvitedUsersList
)
@@ -202,7 +202,7 @@ func (a *UserApiService) GetInvitedUsersList(ctx context.Context) (GetInvitedUse
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -215,7 +215,7 @@ func (a *UserApiService) GetInvitedUsersList(ctx context.Context) (GetInvitedUse
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -236,59 +236,59 @@ func (a *UserApiService) GetInvitedUsersList(ctx context.Context) (GetInvitedUse
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetInvitedUsersList
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
UserApiService Check user permission
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param email Email of the invited user.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param email Email of the invited user.
@return GetUserPermission
*/
func (a *UserApiService) GetUserPermission(ctx context.Context, email string) (GetUserPermission, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetUserPermission
)
@@ -327,7 +327,7 @@ func (a *UserApiService) GetUserPermission(ctx context.Context, email string) (G
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -340,7 +340,7 @@ func (a *UserApiService) GetUserPermission(ctx context.Context, email string) (G
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -361,60 +361,60 @@ func (a *UserApiService) GetUserPermission(ctx context.Context, email string) (G
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetUserPermission
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
UserApiService Send invitation to user
-`Feature` - A Feature represents a specific functionality like Email campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a user, determine which feature you want to manage access to. You must specify the feature accurately to avoid errors. `Permission` - A Permission defines the level of access or control a user has over a specific feature. While inviting user, decide on the permission level required for the selected feature. Make sure the chosen permission is related to the selected feature. Features and their respective permissions are as below: - `email_campaigns`: - \"create_edit_delete\" - \"send_schedule_suspend\" - `sms_campaigns`: - \"create_edit_delete\" - \"send_schedule_suspend\" - `contacts`: - \"view\" - \"create_edit_delete\" - \"import\" - \"export\" - \"list_and_attributes\" - \"forms\" - `templates`: - \"create_edit_delete\" - \"activate_deactivate\" - `workflows`: - \"create_edit_delete\" - \"activate_deactivate_pause\" - \"settings\" - `facebook_ads`: - \"create_edit_delete\" - \"schedule_pause\" - `landing_pages`: - \"all\" - `transactional_emails`: - \"settings\" - \"logs\" - `smtp_api`: - \"smtp\" - \"api_keys\" - \"authorized_ips\" - `user_management`: - \"all\" - `sales_platform`: - \"manage_owned_deals_tasks\" - \"manage_others_deals_tasks\" - \"reports\" - \"settings\" - `phone`: - \"all\" - `conversations`: - \"access\" - \"assign\" - \"configure\" - `senders_domains_dedicated_ips`: - \"senders_management\" - \"domains_management\" - \"dedicated_ips_management\" - `push_notifications`: - \"view\" - \"create_edit_delete\" - \"send\" - \"settings\" - `companies`: - \"manage_owned_companies\" - \"manage_other_companies\" - \"settings\" **Note**: - If `all_features_access: false` then only privileges are required otherwise if `true` then it's assumed that all permissions will be there for the invited user. - The availability of feature and its permission depends on your current plan. Please select the features and permissions accordingly.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param sendInvitation Values to create an invitation
+`Feature` - A Feature represents a specific functionality like Email campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a user, determine which feature you want to manage access to. You must specify the feature accurately to avoid errors. `Permission` - A Permission defines the level of access or control a user has over a specific feature. While inviting user, decide on the permission level required for the selected feature. Make sure the chosen permission is related to the selected feature. Features and their respective permissions are as below: - `email_campaigns`: - \"create_edit_delete\" - \"send_schedule_suspend\" - `sms_campaigns`: - \"create_edit_delete\" - \"send_schedule_suspend\" - `contacts`: - \"view\" - \"create_edit_delete\" - \"import\" - \"export\" - \"list_and_attributes\" - \"forms\" - `templates`: - \"create_edit_delete\" - \"activate_deactivate\" - `workflows`: - \"create_edit_delete\" - \"activate_deactivate_pause\" - \"settings\" - `facebook_ads`: - \"create_edit_delete\" - \"schedule_pause\" - `landing_pages`: - \"all\" - `transactional_emails`: - \"settings\" - \"logs\" - `smtp_api`: - \"smtp\" - \"api_keys\" - \"authorized_ips\" - `user_management`: - \"all\" - `sales_platform`: - \"manage_owned_deals_tasks\" - \"manage_others_deals_tasks\" - \"reports\" - \"settings\" - `phone`: - \"all\" - `conversations`: - \"access\" - \"assign\" - \"configure\" - `senders_domains_dedicated_ips`: - \"senders_management\" - \"domains_management\" - \"dedicated_ips_management\" - `push_notifications`: - \"view\" - \"create_edit_delete\" - \"send\" - \"settings\" - `companies`: - \"manage_owned_companies\" - \"manage_other_companies\" - \"settings\" **Note**: - If `all_features_access: false` then only privileges are required otherwise if `true` then it's assumed that all permissions will be there for the invited user. - The availability of feature and its permission depends on your current plan. Please select the features and permissions accordingly.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param sendInvitation Values to create an invitation
@return Inviteuser
*/
func (a *UserApiService) Inviteuser(ctx context.Context, sendInvitation Inviteuser) (Inviteuser, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue Inviteuser
)
@@ -454,7 +454,7 @@ func (a *UserApiService) Inviteuser(ctx context.Context, sendInvitation Inviteus
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -467,7 +467,7 @@ func (a *UserApiService) Inviteuser(ctx context.Context, sendInvitation Inviteus
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -488,59 +488,59 @@ func (a *UserApiService) Inviteuser(ctx context.Context, sendInvitation Inviteus
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v Inviteuser
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
UserApiService Revoke user permission
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param email Email of the invited user.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param email Email of the invited user.
@return PutRevokeUserPermission
*/
func (a *UserApiService) PutRevokeUserPermission(ctx context.Context, email string) (PutRevokeUserPermission, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Put")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Put")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue PutRevokeUserPermission
)
@@ -579,7 +579,7 @@ func (a *UserApiService) PutRevokeUserPermission(ctx context.Context, email stri
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -592,7 +592,7 @@ func (a *UserApiService) PutRevokeUserPermission(ctx context.Context, email stri
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -613,60 +613,60 @@ func (a *UserApiService) PutRevokeUserPermission(ctx context.Context, email stri
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v PutRevokeUserPermission
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
UserApiService Resend / Cancel invitation
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param action action
- * @param email Email of the invited user.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param action action
+ - @param email Email of the invited user.
@return Putresendcancelinvitation
*/
func (a *UserApiService) Putresendcancelinvitation(ctx context.Context, action string, email string) (Putresendcancelinvitation, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Put")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Put")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue Putresendcancelinvitation
)
@@ -706,7 +706,7 @@ func (a *UserApiService) Putresendcancelinvitation(ctx context.Context, action s
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -719,7 +719,7 @@ func (a *UserApiService) Putresendcancelinvitation(ctx context.Context, action s
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -740,40 +740,40 @@ func (a *UserApiService) Putresendcancelinvitation(ctx context.Context, action s
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v Putresendcancelinvitation
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 403 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
diff --git a/lib/api_webhooks.go b/lib/api_webhooks.go
index 7d5d3a9..b459fe3 100644
--- a/lib/api_webhooks.go
+++ b/lib/api_webhooks.go
@@ -1,23 +1,23 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "fmt"
+ "github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "fmt"
- "github.com/antihax/optional"
)
// Linger please
@@ -27,19 +27,19 @@ var (
type WebhooksApiService service
-/*
+/*
WebhooksApiService Create a webhook
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param createWebhook Values to create a webhook
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param createWebhook Values to create a webhook
@return CreateModel
*/
func (a *WebhooksApiService) CreateWebhook(ctx context.Context, createWebhook CreateWebhook) (CreateModel, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreateModel
)
@@ -79,7 +79,7 @@ func (a *WebhooksApiService) CreateWebhook(ctx context.Context, createWebhook Cr
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -92,7 +92,7 @@ func (a *WebhooksApiService) CreateWebhook(ctx context.Context, createWebhook Cr
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -113,52 +113,50 @@ func (a *WebhooksApiService) CreateWebhook(ctx context.Context, createWebhook Cr
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v CreateModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
WebhooksApiService Delete a webhook
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param webhookId Id of the webhook
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param webhookId Id of the webhook
*/
func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, webhookId int64) (*http.Response, error) {
var (
@@ -166,7 +164,6 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, webhookId int64)
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -204,7 +201,7 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, webhookId int64)
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -217,7 +214,7 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, webhookId int64)
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -236,55 +233,54 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, webhookId int64)
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
WebhooksApiService Export all webhook events
This endpoint will submit a request to get the history of webhooks in the CSV file. The link to download the CSV file will be sent to the webhook that was provided in the notifyURL.
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param exportWebhookHistory Values to submit for webhooks history
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param exportWebhookHistory Values to submit for webhooks history
@return CreatedProcessId
*/
func (a *WebhooksApiService) ExportWebhooksHistory(ctx context.Context, exportWebhookHistory ExportWebhooksHistory) (CreatedProcessId, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreatedProcessId
)
@@ -324,7 +320,7 @@ func (a *WebhooksApiService) ExportWebhooksHistory(ctx context.Context, exportWe
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -337,7 +333,7 @@ func (a *WebhooksApiService) ExportWebhooksHistory(ctx context.Context, exportWe
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -358,59 +354,59 @@ func (a *WebhooksApiService) ExportWebhooksHistory(ctx context.Context, exportWe
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 202 {
var v CreatedProcessId
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
WebhooksApiService Get a webhook details
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param webhookId Id of the webhook
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param webhookId Id of the webhook
@return GetWebhook
*/
func (a *WebhooksApiService) GetWebhook(ctx context.Context, webhookId int64) (GetWebhook, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetWebhook
)
@@ -449,7 +445,7 @@ func (a *WebhooksApiService) GetWebhook(ctx context.Context, webhookId int64) (G
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -462,7 +458,7 @@ func (a *WebhooksApiService) GetWebhook(ctx context.Context, webhookId int64) (G
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -483,58 +479,58 @@ func (a *WebhooksApiService) GetWebhook(ctx context.Context, webhookId int64) (G
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetWebhook
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
WebhooksApiService Get all webhooks
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *GetWebhooksOpts - Optional Parameters:
@@ -544,17 +540,17 @@ WebhooksApiService Get all webhooks
@return GetWebhooks
*/
-type GetWebhooksOpts struct {
+type GetWebhooksOpts struct {
Type_ optional.String
- Sort optional.String
+ Sort optional.String
}
func (a *WebhooksApiService) GetWebhooks(ctx context.Context, localVarOptionals *GetWebhooksOpts) (GetWebhooks, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetWebhooks
)
@@ -598,7 +594,7 @@ func (a *WebhooksApiService) GetWebhooks(ctx context.Context, localVarOptionals
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -611,7 +607,7 @@ func (a *WebhooksApiService) GetWebhooks(ctx context.Context, localVarOptionals
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -632,53 +628,51 @@ func (a *WebhooksApiService) GetWebhooks(ctx context.Context, localVarOptionals
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetWebhooks
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
WebhooksApiService Update a webhook
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param webhookId Id of the webhook
- * @param updateWebhook Values to update a webhook
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param webhookId Id of the webhook
+ - @param updateWebhook Values to update a webhook
*/
func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, webhookId int64, updateWebhook UpdateWebhook) (*http.Response, error) {
var (
@@ -686,7 +680,6 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, webhookId int64,
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -726,7 +719,7 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, webhookId int64,
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -739,7 +732,7 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, webhookId int64,
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -758,35 +751,34 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, webhookId int64,
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
diff --git a/lib/api_whats_app_campaigns.go b/lib/api_whats_app_campaigns.go
index a9ea966..707092b 100644
--- a/lib/api_whats_app_campaigns.go
+++ b/lib/api_whats_app_campaigns.go
@@ -1,23 +1,23 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"context"
+ "fmt"
+ "github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
- "fmt"
- "github.com/antihax/optional"
)
// Linger please
@@ -27,19 +27,19 @@ var (
type WhatsAppCampaignsApiService service
-/*
+/*
WhatsAppCampaignsApiService Create and Send a WhatsApp campaign
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param whatsAppCampaigns Values to create a campaign
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param whatsAppCampaigns Values to create a campaign
@return CreateModel
*/
func (a *WhatsAppCampaignsApiService) CreateWhatsAppCampaign(ctx context.Context, whatsAppCampaigns CreateWhatsAppCampaign) (CreateModel, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreateModel
)
@@ -79,7 +79,7 @@ func (a *WhatsAppCampaignsApiService) CreateWhatsAppCampaign(ctx context.Context
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -92,7 +92,7 @@ func (a *WhatsAppCampaignsApiService) CreateWhatsAppCampaign(ctx context.Context
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -113,59 +113,59 @@ func (a *WhatsAppCampaignsApiService) CreateWhatsAppCampaign(ctx context.Context
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v CreateModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
WhatsAppCampaignsApiService Create a WhatsApp template
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param whatsAppTemplates Values to create a template
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param whatsAppTemplates Values to create a template
@return CreateModel
*/
func (a *WhatsAppCampaignsApiService) CreateWhatsAppTemplate(ctx context.Context, whatsAppTemplates CreateWhatsAppTemplate) (CreateModel, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue CreateModel
)
@@ -205,7 +205,7 @@ func (a *WhatsAppCampaignsApiService) CreateWhatsAppTemplate(ctx context.Context
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -218,7 +218,7 @@ func (a *WhatsAppCampaignsApiService) CreateWhatsAppTemplate(ctx context.Context
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -239,52 +239,50 @@ func (a *WhatsAppCampaignsApiService) CreateWhatsAppTemplate(ctx context.Context
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 201 {
var v CreateModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
WhatsAppCampaignsApiService Delete a WhatsApp campaign
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param campaignId id of the campaign
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param campaignId id of the campaign
*/
func (a *WhatsAppCampaignsApiService) DeleteWhatsAppCampaign(ctx context.Context, campaignId int64) (*http.Response, error) {
var (
@@ -292,7 +290,6 @@ func (a *WhatsAppCampaignsApiService) DeleteWhatsAppCampaign(ctx context.Context
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -330,7 +327,7 @@ func (a *WhatsAppCampaignsApiService) DeleteWhatsAppCampaign(ctx context.Context
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -343,7 +340,7 @@ func (a *WhatsAppCampaignsApiService) DeleteWhatsAppCampaign(ctx context.Context
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -362,54 +359,53 @@ func (a *WhatsAppCampaignsApiService) DeleteWhatsAppCampaign(ctx context.Context
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
WhatsAppCampaignsApiService Get a WhatsApp campaign
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param campaignId Id of the campaign
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param campaignId Id of the campaign
@return GetWhatsappCampaignOverview
*/
func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaign(ctx context.Context, campaignId int64) (GetWhatsappCampaignOverview, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetWhatsappCampaignOverview
)
@@ -448,7 +444,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaign(ctx context.Context, c
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -461,7 +457,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaign(ctx context.Context, c
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -482,63 +478,63 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaign(ctx context.Context, c
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetWhatsappCampaignOverview
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
WhatsAppCampaignsApiService Return all your created WhatsApp campaigns
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *GetWhatsAppCampaignsOpts - Optional Parameters:
- * @param "StartDate" (optional.String) - **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the campaigns created. **Prefer to pass your timezone in date-time format for accurate result**
- * @param "EndDate" (optional.String) - **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the campaigns created. **Prefer to pass your timezone in date-time format for accurate result**
+ * @param "StartDate" (optional.String) - **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the campaigns created. **Prefer to pass your timezone in date-time format for accurate result**
+ * @param "EndDate" (optional.String) - **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the campaigns created. **Prefer to pass your timezone in date-time format for accurate result**
* @param "Limit" (optional.Int64) - Number of documents per page
* @param "Offset" (optional.Int64) - Index of the first document in the page
* @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed
@@ -546,20 +542,20 @@ WhatsAppCampaignsApiService Return all your created WhatsApp campaigns
@return GetWhatsappCampaigns
*/
-type GetWhatsAppCampaignsOpts struct {
+type GetWhatsAppCampaignsOpts struct {
StartDate optional.String
- EndDate optional.String
- Limit optional.Int64
- Offset optional.Int64
- Sort optional.String
+ EndDate optional.String
+ Limit optional.Int64
+ Offset optional.Int64
+ Sort optional.String
}
func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaigns(ctx context.Context, localVarOptionals *GetWhatsAppCampaignsOpts) (GetWhatsappCampaigns, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetWhatsappCampaigns
)
@@ -612,7 +608,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaigns(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -625,7 +621,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaigns(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -646,58 +642,58 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaigns(ctx context.Context,
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetWhatsappCampaigns
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
WhatsAppCampaignsApiService Get your WhatsApp API account information
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return GetWhatsAppConfig
*/
func (a *WhatsAppCampaignsApiService) GetWhatsAppConfig(ctx context.Context) (GetWhatsAppConfig, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetWhatsAppConfig
)
@@ -735,7 +731,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppConfig(ctx context.Context) (Ge
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -748,7 +744,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppConfig(ctx context.Context) (Ge
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -769,52 +765,52 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppConfig(ctx context.Context) (Ge
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetWhatsAppConfig
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
WhatsAppCampaignsApiService Return all your created WhatsApp templates
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *GetWhatsAppTemplatesOpts - Optional Parameters:
- * @param "StartDate" (optional.String) - **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result**
- * @param "EndDate" (optional.String) - **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result**
+ * @param "StartDate" (optional.String) - **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result**
+ * @param "EndDate" (optional.String) - **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result**
* @param "Limit" (optional.Int64) - Number of documents per page
* @param "Offset" (optional.Int64) - Index of the first document in the page
* @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed
@@ -823,21 +819,21 @@ WhatsAppCampaignsApiService Return all your created WhatsApp templates
@return GetWaTemplates
*/
-type GetWhatsAppTemplatesOpts struct {
+type GetWhatsAppTemplatesOpts struct {
StartDate optional.String
- EndDate optional.String
- Limit optional.Int64
- Offset optional.Int64
- Sort optional.String
- Source optional.String
+ EndDate optional.String
+ Limit optional.Int64
+ Offset optional.Int64
+ Sort optional.String
+ Source optional.String
}
func (a *WhatsAppCampaignsApiService) GetWhatsAppTemplates(ctx context.Context, localVarOptionals *GetWhatsAppTemplatesOpts) (GetWaTemplates, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
- localVarPostBody interface{}
- localVarFileName string
- localVarFileBytes []byte
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
localVarReturnValue GetWaTemplates
)
@@ -893,7 +889,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppTemplates(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -906,7 +902,7 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppTemplates(ctx context.Context,
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -927,52 +923,50 @@ func (a *WhatsAppCampaignsApiService) GetWhatsAppTemplates(ctx context.Context,
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
- err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 200 {
var v GetWaTemplates
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
}
-
+
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
WhatsAppCampaignsApiService Send your WhatsApp template for approval
- * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param templateId id of the campaign
-
-
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param templateId id of the campaign
*/
func (a *WhatsAppCampaignsApiService) SendWhatsAppTemplateApproval(ctx context.Context, templateId int64) (*http.Response, error) {
var (
@@ -980,7 +974,6 @@ func (a *WhatsAppCampaignsApiService) SendWhatsAppTemplateApproval(ctx context.C
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -1018,7 +1011,7 @@ func (a *WhatsAppCampaignsApiService) SendWhatsAppTemplateApproval(ctx context.C
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1031,7 +1024,7 @@ func (a *WhatsAppCampaignsApiService) SendWhatsAppTemplateApproval(ctx context.C
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1050,31 +1043,30 @@ func (a *WhatsAppCampaignsApiService) SendWhatsAppTemplateApproval(ctx context.C
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
-/*
+/*
WhatsAppCampaignsApiService Update a WhatsApp campaign
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param campaignId Id of the campaign
@@ -1084,7 +1076,7 @@ WhatsAppCampaignsApiService Update a WhatsApp campaign
*/
-type UpdateWhatsAppCampaignOpts struct {
+type UpdateWhatsAppCampaignOpts struct {
WhatsAppCampaign optional.Interface
}
@@ -1094,7 +1086,6 @@ func (a *WhatsAppCampaignsApiService) UpdateWhatsAppCampaign(ctx context.Context
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
-
)
// create path and map variables
@@ -1124,10 +1115,10 @@ func (a *WhatsAppCampaignsApiService) UpdateWhatsAppCampaign(ctx context.Context
}
// body params
if localVarOptionals != nil && localVarOptionals.WhatsAppCampaign.IsSet() {
-
+
localVarOptionalWhatsAppCampaign, localVarOptionalWhatsAppCampaignok := localVarOptionals.WhatsAppCampaign.Value().(UpdateWhatsAppCampaign)
if !localVarOptionalWhatsAppCampaignok {
- return nil, reportError("whatsAppCampaign should be UpdateWhatsAppCampaign")
+ return nil, reportError("whatsAppCampaign should be UpdateWhatsAppCampaign")
}
localVarPostBody = &localVarOptionalWhatsAppCampaign
}
@@ -1141,7 +1132,7 @@ func (a *WhatsAppCampaignsApiService) UpdateWhatsAppCampaign(ctx context.Context
key = auth.Key
}
localVarHeaderParams["api-key"] = key
-
+
}
}
if ctx != nil {
@@ -1154,7 +1145,7 @@ func (a *WhatsAppCampaignsApiService) UpdateWhatsAppCampaign(ctx context.Context
key = auth.Key
}
localVarHeaderParams["partner-key"] = key
-
+
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@@ -1173,35 +1164,34 @@ func (a *WhatsAppCampaignsApiService) UpdateWhatsAppCampaign(ctx context.Context
return localVarHttpResponse, err
}
-
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
- body: localVarBody,
+ body: localVarBody,
error: localVarHttpResponse.Status,
}
-
+
if localVarHttpResponse.StatusCode == 400 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
if localVarHttpResponse.StatusCode == 404 {
var v ErrorModel
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarHttpResponse, newErr
- }
- newErr.model = v
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
}
-
+
return localVarHttpResponse, newErr
}
diff --git a/lib/client.go b/lib/client.go
index 9b71b04..3ab97ff 100644
--- a/lib/client.go
+++ b/lib/client.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"bytes"
@@ -379,17 +379,17 @@ func (c *APIClient) prepareRequest(
}
func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) {
- if strings.Contains(contentType, "application/xml") {
- if err = xml.Unmarshal(b, v); err != nil {
- return err
- }
- return nil
- } else if strings.Contains(contentType, "application/json") {
- if err = json.Unmarshal(b, v); err != nil {
- return err
- }
- return nil
+ if strings.Contains(contentType, "application/xml") {
+ if err = xml.Unmarshal(b, v); err != nil {
+ return err
+ }
+ return nil
+ } else if strings.Contains(contentType, "application/json") {
+ if err = json.Unmarshal(b, v); err != nil {
+ return err
}
+ return nil
+ }
return errors.New("undefined response type")
}
@@ -540,4 +540,4 @@ func (e GenericSwaggerError) Body() []byte {
// Model returns the unpacked model of the error
func (e GenericSwaggerError) Model() interface{} {
return e.model
-}
\ No newline at end of file
+}
diff --git a/lib/configuration.go b/lib/configuration.go
index c248265..9fa1b0d 100644
--- a/lib/configuration.go
+++ b/lib/configuration.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"net/http"
@@ -63,7 +63,7 @@ func NewConfiguration() *Configuration {
cfg := &Configuration{
BasePath: "https://api.brevo.com/v3",
DefaultHeader: make(map[string]string),
- UserAgent: "Swagger-Codegen/1.0.0/go",
+ UserAgent: "brevo_clientAPI/v1.0.0/go",
}
return cfg
}
diff --git a/lib/model_ab_test_campaign_result.go b/lib/model_ab_test_campaign_result.go
index cc0f878..632ea99 100644
--- a/lib/model_ab_test_campaign_result.go
+++ b/lib/model_ab_test_campaign_result.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type AbTestCampaignResult struct {
// Winning Campaign Info. pending = Campaign has been picked for sending and winning version is yet to be decided, tie = A tie happened between both the versions, notAvailable = Campaign has not yet been picked for sending.
@@ -22,7 +22,7 @@ type AbTestCampaignResult struct {
// Click rate for current winning version
ClickRate string `json:"clickRate,omitempty"`
// Open/Click rate for the winner version
- WinningVersionRate string `json:"winningVersionRate,omitempty"`
- Statistics *AbTestCampaignResultStatistics `json:"statistics,omitempty"`
- ClickedLinks *AbTestCampaignResultClickedLinks `json:"clickedLinks,omitempty"`
+ WinningVersionRate string `json:"winningVersionRate,omitempty"`
+ Statistics *AbTestCampaignResultStatistics `json:"statistics,omitempty"`
+ ClickedLinks *AbTestCampaignResultClickedLinks `json:"clickedLinks,omitempty"`
}
diff --git a/lib/model_ab_test_campaign_result_clicked_links.go b/lib/model_ab_test_campaign_result_clicked_links.go
index 6482f57..893e654 100644
--- a/lib/model_ab_test_campaign_result_clicked_links.go
+++ b/lib/model_ab_test_campaign_result_clicked_links.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type AbTestCampaignResultClickedLinks struct {
VersionA *AbTestVersionClicks `json:"Version A"`
diff --git a/lib/model_ab_test_campaign_result_statistics.go b/lib/model_ab_test_campaign_result_statistics.go
index 9a9adb3..adbbeea 100644
--- a/lib/model_ab_test_campaign_result_statistics.go
+++ b/lib/model_ab_test_campaign_result_statistics.go
@@ -1,20 +1,20 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type AbTestCampaignResultStatistics struct {
- Openers *AbTestVersionStats `json:"openers"`
- Clicks *AbTestVersionStats `json:"clicks"`
+ Openers *AbTestVersionStats `json:"openers"`
+ Clicks *AbTestVersionStats `json:"clicks"`
Unsubscribed *AbTestVersionStats `json:"unsubscribed"`
- HardBounces *AbTestVersionStats `json:"hardBounces"`
- SoftBounces *AbTestVersionStats `json:"softBounces"`
- Complaints *AbTestVersionStats `json:"complaints"`
+ HardBounces *AbTestVersionStats `json:"hardBounces"`
+ SoftBounces *AbTestVersionStats `json:"softBounces"`
+ Complaints *AbTestVersionStats `json:"complaints"`
}
diff --git a/lib/model_ab_test_version_clicks.go b/lib/model_ab_test_version_clicks.go
index f11a070..8903164 100644
--- a/lib/model_ab_test_version_clicks.go
+++ b/lib/model_ab_test_version_clicks.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Information on clicked links for a particular version
type AbTestVersionClicks struct {
diff --git a/lib/model_ab_test_version_clicks_inner.go b/lib/model_ab_test_version_clicks_inner.go
index 2d87c65..e601120 100644
--- a/lib/model_ab_test_version_clicks_inner.go
+++ b/lib/model_ab_test_version_clicks_inner.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type AbTestVersionClicksInner struct {
// URL of the link
diff --git a/lib/model_ab_test_version_stats.go b/lib/model_ab_test_version_stats.go
index a358aed..318145b 100644
--- a/lib/model_ab_test_version_stats.go
+++ b/lib/model_ab_test_version_stats.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Percentage of a particular event for both versions
type AbTestVersionStats struct {
diff --git a/lib/model_add_child_domain.go b/lib/model_add_child_domain.go
index 37e80a8..87eea84 100644
--- a/lib/model_add_child_domain.go
+++ b/lib/model_add_child_domain.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type AddChildDomain struct {
// Sender domain to add for a specific child account
diff --git a/lib/model_add_contact_to_list.go b/lib/model_add_contact_to_list.go
index 74041db..2429f23 100644
--- a/lib/model_add_contact_to_list.go
+++ b/lib/model_add_contact_to_list.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type AddContactToList struct {
// Mandatory if IDs are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api.
diff --git a/lib/model_add_credits.go b/lib/model_add_credits.go
index 051dd5e..90ced29 100644
--- a/lib/model_add_credits.go
+++ b/lib/model_add_credits.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type AddCredits struct {
// Required if email credits are empty. SMS credits to be added to the child account
diff --git a/lib/model_authenticate_domain_model.go b/lib/model_authenticate_domain_model.go
index 48c251a..39dc1c2 100644
--- a/lib/model_authenticate_domain_model.go
+++ b/lib/model_authenticate_domain_model.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type AuthenticateDomainModel struct {
// Domain
diff --git a/lib/model_block_domain.go b/lib/model_block_domain.go
index cfb1430..13b7414 100644
--- a/lib/model_block_domain.go
+++ b/lib/model_block_domain.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type BlockDomain struct {
// name of the domain to be blocked
diff --git a/lib/model_body.go b/lib/model_body.go
index be74cb6..d708000 100644
--- a/lib/model_body.go
+++ b/lib/model_body.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type Body struct {
// The name of the group of sub-accounts
diff --git a/lib/model_body_1.go b/lib/model_body_1.go
index 3750e90..71fba90 100644
--- a/lib/model_body_1.go
+++ b/lib/model_body_1.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type Body1 struct {
// IP Address
diff --git a/lib/model_body_10.go b/lib/model_body_10.go
index da18f3d..8103097 100644
--- a/lib/model_body_10.go
+++ b/lib/model_body_10.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type Body10 struct {
// Contact ids for contacts to be linked with deal
diff --git a/lib/model_body_11.go b/lib/model_body_11.go
index d232b9e..99a5ea2 100644
--- a/lib/model_body_11.go
+++ b/lib/model_body_11.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"time"
@@ -34,6 +34,6 @@ type Body11 struct {
// Deal ids for deals a task is linked to
DealsIds []string `json:"dealsIds,omitempty"`
// Companies ids for companies a task is linked to
- CompaniesIds []string `json:"companiesIds,omitempty"`
- Reminder *TaskReminder `json:"reminder,omitempty"`
+ CompaniesIds []string `json:"companiesIds,omitempty"`
+ Reminder *TaskReminder `json:"reminder,omitempty"`
}
diff --git a/lib/model_body_12.go b/lib/model_body_12.go
index f8f216a..f068095 100644
--- a/lib/model_body_12.go
+++ b/lib/model_body_12.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"time"
diff --git a/lib/model_body_13.go b/lib/model_body_13.go
index 61702bd..af83acb 100644
--- a/lib/model_body_13.go
+++ b/lib/model_body_13.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type Body13 struct {
// visitor’s ID received from a webhook or generated by you to bind existing user account to Conversations
diff --git a/lib/model_body_14.go b/lib/model_body_14.go
index 8a9b20c..a505cb6 100644
--- a/lib/model_body_14.go
+++ b/lib/model_body_14.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type Body14 struct {
// edited message text
diff --git a/lib/model_body_15.go b/lib/model_body_15.go
index 642dd7a..2d70883 100644
--- a/lib/model_body_15.go
+++ b/lib/model_body_15.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type Body15 struct {
// visitor’s ID received from a webhook or generated by you to bind existing user account to Conversations
diff --git a/lib/model_body_16.go b/lib/model_body_16.go
index fb899a7..06a4632 100644
--- a/lib/model_body_16.go
+++ b/lib/model_body_16.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type Body16 struct {
// edited message text
diff --git a/lib/model_body_17.go b/lib/model_body_17.go
index e258872..404b64f 100644
--- a/lib/model_body_17.go
+++ b/lib/model_body_17.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type Body17 struct {
// agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required).
diff --git a/lib/model_body_2.go b/lib/model_body_2.go
index 275fd67..7c66dfe 100644
--- a/lib/model_body_2.go
+++ b/lib/model_body_2.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type Body2 struct {
// IP Address
diff --git a/lib/model_body_3.go b/lib/model_body_3.go
index 5ad4166..381f313 100644
--- a/lib/model_body_3.go
+++ b/lib/model_body_3.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type Body3 struct {
// The name of the group of sub-accounts
diff --git a/lib/model_body_4.go b/lib/model_body_4.go
index a952ff6..062307f 100644
--- a/lib/model_body_4.go
+++ b/lib/model_body_4.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type Body4 struct {
// List of sub-account ids
diff --git a/lib/model_body_5.go b/lib/model_body_5.go
index a5e50b4..044dfec 100644
--- a/lib/model_body_5.go
+++ b/lib/model_body_5.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type Body5 struct {
// Name of company
diff --git a/lib/model_body_6.go b/lib/model_body_6.go
index 82ff68e..5e8c636 100644
--- a/lib/model_body_6.go
+++ b/lib/model_body_6.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type Body6 struct {
// Name of company
diff --git a/lib/model_body_7.go b/lib/model_body_7.go
index e8e7667..b8b4c91 100644
--- a/lib/model_body_7.go
+++ b/lib/model_body_7.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type Body7 struct {
// Contact ids for contacts to be linked with company
diff --git a/lib/model_body_8.go b/lib/model_body_8.go
index cf92043..fc1e92c 100644
--- a/lib/model_body_8.go
+++ b/lib/model_body_8.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type Body8 struct {
// Name of deal
diff --git a/lib/model_body_9.go b/lib/model_body_9.go
index c5b45ea..3a426dd 100644
--- a/lib/model_body_9.go
+++ b/lib/model_body_9.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type Body9 struct {
// Name of deal
diff --git a/lib/model_body_variables_items.go b/lib/model_body_variables_items.go
index 930f21d..cc0511a 100644
--- a/lib/model_body_variables_items.go
+++ b/lib/model_body_variables_items.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type BodyVariablesItems struct {
}
diff --git a/lib/model_cart.go b/lib/model_cart.go
index b9b82bc..3d4c723 100644
--- a/lib/model_cart.go
+++ b/lib/model_cart.go
@@ -1,19 +1,19 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
-// Specify the payment currency and amount.
+// Specify the payment currency and amount.
type Cart struct {
- // Currency code for the payment amount.
+ // Currency code for the payment amount.
Currency string `json:"currency"`
- // Payment amount, in cents. e.g. if you want to request €12.00, then the amount in cents is 1200.
+ // Payment amount, in cents. e.g. if you want to request €12.00, then the amount in cents is 1200.
SpecificAmount int64 `json:"specificAmount"`
}
diff --git a/lib/model_companies_list.go b/lib/model_companies_list.go
index c2ce1f4..7574f1a 100644
--- a/lib/model_companies_list.go
+++ b/lib/model_companies_list.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// List of companies
type CompaniesList struct {
diff --git a/lib/model_company.go b/lib/model_company.go
index 01cd02d..9d3471d 100644
--- a/lib/model_company.go
+++ b/lib/model_company.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Company Details
type Company struct {
diff --git a/lib/model_company_attributes.go b/lib/model_company_attributes.go
index b807ac0..27fc28b 100644
--- a/lib/model_company_attributes.go
+++ b/lib/model_company_attributes.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// List of company attributes
type CompanyAttributes struct {
diff --git a/lib/model_company_attributes_inner.go b/lib/model_company_attributes_inner.go
index 7995148..bcde745 100644
--- a/lib/model_company_attributes_inner.go
+++ b/lib/model_company_attributes_inner.go
@@ -1,20 +1,20 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// List of attributes
type CompanyAttributesInner struct {
- InternalName string `json:"internalName,omitempty"`
- Label string `json:"label,omitempty"`
- AttributeTypeName string `json:"attributeTypeName,omitempty"`
- AttributeOptions []interface{} `json:"attributeOptions,omitempty"`
- IsRequired bool `json:"isRequired,omitempty"`
+ InternalName string `json:"internalName,omitempty"`
+ Label string `json:"label,omitempty"`
+ AttributeTypeName string `json:"attributeTypeName,omitempty"`
+ AttributeOptions []interface{} `json:"attributeOptions,omitempty"`
+ IsRequired bool `json:"isRequired,omitempty"`
}
diff --git a/lib/model_component_items.go b/lib/model_component_items.go
index 0514fed..0aa9461 100644
--- a/lib/model_component_items.go
+++ b/lib/model_component_items.go
@@ -1,16 +1,16 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type ComponentItems struct {
Type_ string `json:"type,omitempty"`
- Text string `json:"text,omitempty"`
+ Text string `json:"text,omitempty"`
}
diff --git a/lib/model_configuration.go b/lib/model_configuration.go
index ed7f675..8732fce 100644
--- a/lib/model_configuration.go
+++ b/lib/model_configuration.go
@@ -1,17 +1,17 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
-// Optional. Redirect contact to a custom success page once payment is successful. If empty the default Brevo page will be displayed once a payment is validated
+// Optional. Redirect contact to a custom success page once payment is successful. If empty the default Brevo page will be displayed once a payment is validated
type Configuration struct {
- // Absolute URL of the custom success page.
+ // Absolute URL of the custom success page.
CustomSuccessUrl string `json:"customSuccessUrl"`
}
diff --git a/lib/model_conversations_message.go b/lib/model_conversations_message.go
index eaff1bd..76dba76 100644
--- a/lib/model_conversations_message.go
+++ b/lib/model_conversations_message.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// a Conversations message
type ConversationsMessage struct {
@@ -29,6 +29,6 @@ type ConversationsMessage struct {
// `true` for pushed messages
IsPushed bool `json:"isPushed,omitempty"`
// In two-way integrations, messages sent via REST API can be marked with receivedFrom property and then filtered out when received in a webhook to avoid infinite loop.
- ReceivedFrom string `json:"receivedFrom,omitempty"`
- File *ConversationsMessageFile `json:"file,omitempty"`
+ ReceivedFrom string `json:"receivedFrom,omitempty"`
+ File *ConversationsMessageFile `json:"file,omitempty"`
}
diff --git a/lib/model_conversations_message_file.go b/lib/model_conversations_message_file.go
index 9422d15..b8b1e6b 100644
--- a/lib/model_conversations_message_file.go
+++ b/lib/model_conversations_message_file.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type ConversationsMessageFile struct {
// Name of the file
@@ -18,6 +18,6 @@ type ConversationsMessageFile struct {
// Whether the file is an image
IsImage bool `json:"isImage,omitempty"`
// URL of the file
- Url string `json:"url,omitempty"`
+ Url string `json:"url,omitempty"`
ImageInfo *ConversationsMessageFileImageInfo `json:"imageInfo,omitempty"`
}
diff --git a/lib/model_conversations_message_file_image_info.go b/lib/model_conversations_message_file_image_info.go
index 9bd685d..c47654b 100644
--- a/lib/model_conversations_message_file_image_info.go
+++ b/lib/model_conversations_message_file_image_info.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// image info is passed in case the file is an image
type ConversationsMessageFileImageInfo struct {
diff --git a/lib/model_conversion_source_metrics.go b/lib/model_conversion_source_metrics.go
index 226bf4e..a68409c 100644
--- a/lib/model_conversion_source_metrics.go
+++ b/lib/model_conversion_source_metrics.go
@@ -1,19 +1,19 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type ConversionSourceMetrics struct {
- Id float32 `json:"id"`
- ConversionSource string `json:"conversionSource"`
- OrdersCount float32 `json:"ordersCount"`
- Revenue float32 `json:"revenue"`
- AverageBasket float32 `json:"averageBasket"`
+ Id float32 `json:"id"`
+ ConversionSource string `json:"conversionSource"`
+ OrdersCount float32 `json:"ordersCount"`
+ Revenue float32 `json:"revenue"`
+ AverageBasket float32 `json:"averageBasket"`
}
diff --git a/lib/model_conversion_source_product.go b/lib/model_conversion_source_product.go
index 3522bd8..8dc93ea 100644
--- a/lib/model_conversion_source_product.go
+++ b/lib/model_conversion_source_product.go
@@ -1,22 +1,22 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type ConversionSourceProduct struct {
- Id string `json:"id"`
- Name string `json:"name,omitempty"`
- Sku string `json:"sku,omitempty"`
- Price float32 `json:"price,omitempty"`
- Url string `json:"url,omitempty"`
- ImageUrl string `json:"imageUrl,omitempty"`
- OrdersCount int32 `json:"ordersCount,omitempty"`
- Revenue float32 `json:"revenue,omitempty"`
+ Id string `json:"id"`
+ Name string `json:"name,omitempty"`
+ Sku string `json:"sku,omitempty"`
+ Price float32 `json:"price,omitempty"`
+ Url string `json:"url,omitempty"`
+ ImageUrl string `json:"imageUrl,omitempty"`
+ OrdersCount int32 `json:"ordersCount,omitempty"`
+ Revenue float32 `json:"revenue,omitempty"`
}
diff --git a/lib/model_corporate_group_details_response.go b/lib/model_corporate_group_details_response.go
index d22402b..0583d8d 100644
--- a/lib/model_corporate_group_details_response.go
+++ b/lib/model_corporate_group_details_response.go
@@ -1,17 +1,17 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CorporateGroupDetailsResponse struct {
- Group *CorporateGroupDetailsResponseGroup `json:"group,omitempty"`
+ Group *CorporateGroupDetailsResponseGroup `json:"group,omitempty"`
SubAccounts []CorporateGroupDetailsResponseSubaccounts `json:"sub-accounts,omitempty"`
- Users []CorporateGroupDetailsResponseUsers `json:"users,omitempty"`
+ Users []CorporateGroupDetailsResponseUsers `json:"users,omitempty"`
}
diff --git a/lib/model_corporate_group_details_response_group.go b/lib/model_corporate_group_details_response_group.go
index a00048b..6b804ab 100644
--- a/lib/model_corporate_group_details_response_group.go
+++ b/lib/model_corporate_group_details_response_group.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CorporateGroupDetailsResponseGroup struct {
// Group id
diff --git a/lib/model_corporate_group_details_response_subaccounts.go b/lib/model_corporate_group_details_response_subaccounts.go
index 48bba68..2e386af 100644
--- a/lib/model_corporate_group_details_response_subaccounts.go
+++ b/lib/model_corporate_group_details_response_subaccounts.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CorporateGroupDetailsResponseSubaccounts struct {
// Id of the sub-account organzation
diff --git a/lib/model_corporate_group_details_response_users.go b/lib/model_corporate_group_details_response_users.go
index a6cfaba..44a7bf7 100644
--- a/lib/model_corporate_group_details_response_users.go
+++ b/lib/model_corporate_group_details_response_users.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CorporateGroupDetailsResponseUsers struct {
// Email address of the user
diff --git a/lib/model_create_api_key_request.go b/lib/model_create_api_key_request.go
index 745a5b9..830f7e7 100644
--- a/lib/model_create_api_key_request.go
+++ b/lib/model_create_api_key_request.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateApiKeyRequest struct {
// Id of the sub-account organization
diff --git a/lib/model_create_api_key_response.go b/lib/model_create_api_key_response.go
index 285f60b..1950028 100644
--- a/lib/model_create_api_key_response.go
+++ b/lib/model_create_api_key_response.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateApiKeyResponse struct {
// Status of the API operation.
diff --git a/lib/model_create_attribute.go b/lib/model_create_attribute.go
index 6e36514..c03f9fe 100644
--- a/lib/model_create_attribute.go
+++ b/lib/model_create_attribute.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateAttribute struct {
// Value of the attribute. Use only if the attribute's category is 'calculated' or 'global'
@@ -17,7 +17,7 @@ type CreateAttribute struct {
IsRecurring bool `json:"isRecurring,omitempty"`
// List of values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}]
Enumeration []CreateAttributeEnumeration `json:"enumeration,omitempty"`
- // List of options you want to add for multiple-choice attribute. **Use only if the attribute's category is \"normal\" and attribute's type is \"multiple-choice\".** For example: **[\"USA\",\"INDIA\"]**
+ // List of options you want to add for multiple-choice attribute. **Use only if the attribute's category is \"normal\" and attribute's type is \"multiple-choice\".** For example: **[\"USA\",\"INDIA\"]**
MultiCategoryOptions []string `json:"multiCategoryOptions,omitempty"`
// Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' and 'multiple-choice' is only available if the category is 'normal' attribute, type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute )
Type_ string `json:"type,omitempty"`
diff --git a/lib/model_create_attribute_enumeration.go b/lib/model_create_attribute_enumeration.go
index 63e3b7e..05c3a5f 100644
--- a/lib/model_create_attribute_enumeration.go
+++ b/lib/model_create_attribute_enumeration.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateAttributeEnumeration struct {
// Id of the value
diff --git a/lib/model_create_category_model.go b/lib/model_create_category_model.go
index d8ec73a..b188e17 100644
--- a/lib/model_create_category_model.go
+++ b/lib/model_create_category_model.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateCategoryModel struct {
// ID of the category when a new category is created
diff --git a/lib/model_create_child.go b/lib/model_create_child.go
index 531c05c..eef462b 100644
--- a/lib/model_create_child.go
+++ b/lib/model_create_child.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateChild struct {
// Email address to create the child account
diff --git a/lib/model_create_contact.go b/lib/model_create_contact.go
index 09556d1..f7bfb8f 100644
--- a/lib/model_create_contact.go
+++ b/lib/model_create_contact.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateContact struct {
// Email address of the user. Mandatory if \"SMS\" field is not passed in \"attributes\" parameter. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"}
diff --git a/lib/model_create_coupon_collection.go b/lib/model_create_coupon_collection.go
index e6a164a..42da1b0 100644
--- a/lib/model_create_coupon_collection.go
+++ b/lib/model_create_coupon_collection.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"time"
diff --git a/lib/model_create_coupons.go b/lib/model_create_coupons.go
index c45df69..5442a32 100644
--- a/lib/model_create_coupons.go
+++ b/lib/model_create_coupons.go
@@ -1,17 +1,17 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateCoupons struct {
// The id of the coupon collection for which the coupons will be created
- CollectionId string `json:"collectionId"`
- Coupons []string `json:"coupons"`
+ CollectionId string `json:"collectionId"`
+ Coupons []string `json:"coupons"`
}
diff --git a/lib/model_create_doi_contact.go b/lib/model_create_doi_contact.go
index f8d3ebb..2ab3245 100644
--- a/lib/model_create_doi_contact.go
+++ b/lib/model_create_doi_contact.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateDoiContact struct {
// Email address where the confirmation email will be sent. This email address will be the identifier for all other contact attributes.
diff --git a/lib/model_create_domain.go b/lib/model_create_domain.go
index 34d1bd3..7ae3211 100644
--- a/lib/model_create_domain.go
+++ b/lib/model_create_domain.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateDomain struct {
// Domain name
diff --git a/lib/model_create_domain_model.go b/lib/model_create_domain_model.go
index 0847437..fa210fd 100644
--- a/lib/model_create_domain_model.go
+++ b/lib/model_create_domain_model.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateDomainModel struct {
// ID of the Domain created
diff --git a/lib/model_create_domain_model_dns_records.go b/lib/model_create_domain_model_dns_records.go
index 70bf409..cb2f1fe 100644
--- a/lib/model_create_domain_model_dns_records.go
+++ b/lib/model_create_domain_model_dns_records.go
@@ -1,17 +1,17 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateDomainModelDnsRecords struct {
- DkimRecord *CreateDomainModelDnsRecordsDkimRecord `json:"dkim_record,omitempty"`
- BrevoCode *CreateDomainModelDnsRecordsDkimRecord `json:"brevo_code,omitempty"`
+ DkimRecord *CreateDomainModelDnsRecordsDkimRecord `json:"dkim_record,omitempty"`
+ BrevoCode *CreateDomainModelDnsRecordsDkimRecord `json:"brevo_code,omitempty"`
DmarcRecord *CreateDomainModelDnsRecordsDkimRecord `json:"dmarc_record,omitempty"`
}
diff --git a/lib/model_create_domain_model_dns_records_dkim_record.go b/lib/model_create_domain_model_dns_records_dkim_record.go
index acebff2..835e065 100644
--- a/lib/model_create_domain_model_dns_records_dkim_record.go
+++ b/lib/model_create_domain_model_dns_records_dkim_record.go
@@ -1,18 +1,18 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateDomainModelDnsRecordsDkimRecord struct {
- Type_ string `json:"type,omitempty"`
- Value string `json:"value,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Value string `json:"value,omitempty"`
HostName string `json:"host_name,omitempty"`
- Status bool `json:"status,omitempty"`
+ Status bool `json:"status,omitempty"`
}
diff --git a/lib/model_create_email_campaign.go b/lib/model_create_email_campaign.go
index 133436e..9467095 100644
--- a/lib/model_create_email_campaign.go
+++ b/lib/model_create_email_campaign.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateEmailCampaign struct {
// Tag of the campaign
diff --git a/lib/model_create_email_campaign_recipients.go b/lib/model_create_email_campaign_recipients.go
index 6d301f6..801580f 100644
--- a/lib/model_create_email_campaign_recipients.go
+++ b/lib/model_create_email_campaign_recipients.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Segment ids and List ids to include/exclude from campaign
type CreateEmailCampaignRecipients struct {
diff --git a/lib/model_create_email_campaign_sender.go b/lib/model_create_email_campaign_sender.go
index ded43a1..c2ce207 100644
--- a/lib/model_create_email_campaign_sender.go
+++ b/lib/model_create_email_campaign_sender.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}`
type CreateEmailCampaignSender struct {
diff --git a/lib/model_create_external_feed.go b/lib/model_create_external_feed.go
index 8c56332..f82d9e8 100644
--- a/lib/model_create_external_feed.go
+++ b/lib/model_create_external_feed.go
@@ -1,21 +1,21 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateExternalFeed struct {
// Name of the feed
Name string `json:"name"`
// URL of the feed
Url string `json:"url"`
- // Auth type of the feed: * `basic` * `token` * `noAuth`
+ // Auth type of the feed: * `basic` * `token` * `noAuth`
AuthType string `json:"authType,omitempty"`
// Username for authType `basic`
Username string `json:"username,omitempty"`
diff --git a/lib/model_create_list.go b/lib/model_create_list.go
index b91addc..00a9266 100644
--- a/lib/model_create_list.go
+++ b/lib/model_create_list.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateList struct {
// Name of the list
diff --git a/lib/model_create_model.go b/lib/model_create_model.go
index 75c2038..5047659 100644
--- a/lib/model_create_model.go
+++ b/lib/model_create_model.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateModel struct {
// ID of the object created
diff --git a/lib/model_create_payment_request.go b/lib/model_create_payment_request.go
index 726c6c7..0540b3b 100644
--- a/lib/model_create_payment_request.go
+++ b/lib/model_create_payment_request.go
@@ -1,23 +1,23 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreatePaymentRequest struct {
- // Reference of the payment request, it will appear on the payment page.
+ // Reference of the payment request, it will appear on the payment page.
Reference string `json:"reference"`
- Cart *Cart `json:"cart"`
- // Brevo ID of the contact requested to pay.
+ Cart *Cart `json:"cart"`
+ // Brevo ID of the contact requested to pay.
ContactId int64 `json:"contactId"`
- // description of payment request.
- Description string `json:"description,omitempty"`
- Notification *Notification `json:"notification,omitempty"`
+ // description of payment request.
+ Description string `json:"description,omitempty"`
+ Notification *Notification `json:"notification,omitempty"`
Configuration *Configuration `json:"configuration,omitempty"`
}
diff --git a/lib/model_create_payment_response.go b/lib/model_create_payment_response.go
index 276da07..6b7fd1a 100644
--- a/lib/model_create_payment_response.go
+++ b/lib/model_create_payment_response.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreatePaymentResponse struct {
// ID of the object created
diff --git a/lib/model_create_product_model.go b/lib/model_create_product_model.go
index f1902f2..9660dba 100644
--- a/lib/model_create_product_model.go
+++ b/lib/model_create_product_model.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateProductModel struct {
// ID of the Product when a new product is created
diff --git a/lib/model_create_reseller.go b/lib/model_create_reseller.go
index caf4e52..b018bc8 100644
--- a/lib/model_create_reseller.go
+++ b/lib/model_create_reseller.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateReseller struct {
// AuthKey of Reseller child created
diff --git a/lib/model_create_sender.go b/lib/model_create_sender.go
index 094ff38..0ee910b 100644
--- a/lib/model_create_sender.go
+++ b/lib/model_create_sender.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateSender struct {
// From Name to use for the sender
diff --git a/lib/model_create_sender_ips.go b/lib/model_create_sender_ips.go
index f027446..cff6317 100644
--- a/lib/model_create_sender_ips.go
+++ b/lib/model_create_sender_ips.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateSenderIps struct {
// Dedicated IP available in your account
diff --git a/lib/model_create_sender_model.go b/lib/model_create_sender_model.go
index 54d0019..12f316c 100644
--- a/lib/model_create_sender_model.go
+++ b/lib/model_create_sender_model.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateSenderModel struct {
// ID of the Sender created
diff --git a/lib/model_create_sms_campaign.go b/lib/model_create_sms_campaign.go
index 0170843..c361201 100644
--- a/lib/model_create_sms_campaign.go
+++ b/lib/model_create_sms_campaign.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateSmsCampaign struct {
// Name of the campaign
@@ -16,7 +16,7 @@ type CreateSmsCampaign struct {
// Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters**
Sender string `json:"sender"`
// Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS
- Content string `json:"content"`
+ Content string `json:"content"`
Recipients *CreateSmsCampaignRecipients `json:"recipients,omitempty"`
// UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
ScheduledAt string `json:"scheduledAt,omitempty"`
diff --git a/lib/model_create_sms_campaign_recipients.go b/lib/model_create_sms_campaign_recipients.go
index c72fa30..6dd1b7b 100644
--- a/lib/model_create_sms_campaign_recipients.go
+++ b/lib/model_create_sms_campaign_recipients.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateSmsCampaignRecipients struct {
// Lists Ids to send the campaign to. REQUIRED if scheduledAt is not empty
diff --git a/lib/model_create_smtp_email.go b/lib/model_create_smtp_email.go
index e943eb2..f6cf765 100644
--- a/lib/model_create_smtp_email.go
+++ b/lib/model_create_smtp_email.go
@@ -1,17 +1,17 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateSmtpEmail struct {
// Message ID of the transactional email sent
- MessageId string `json:"messageId,omitempty"`
+ MessageId string `json:"messageId,omitempty"`
MessageIds []string `json:"messageIds,omitempty"`
}
diff --git a/lib/model_create_smtp_template.go b/lib/model_create_smtp_template.go
index 1b786f1..ad2a4e1 100644
--- a/lib/model_create_smtp_template.go
+++ b/lib/model_create_smtp_template.go
@@ -1,18 +1,18 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateSmtpTemplate struct {
// Tag of the template
- Tag string `json:"tag,omitempty"`
+ Tag string `json:"tag,omitempty"`
Sender *CreateSmtpTemplateSender `json:"sender"`
// Name of the template
TemplateName string `json:"templateName"`
diff --git a/lib/model_create_smtp_template_sender.go b/lib/model_create_smtp_template_sender.go
index 6e0226b..c67ff7e 100644
--- a/lib/model_create_smtp_template_sender.go
+++ b/lib/model_create_smtp_template_sender.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}`
type CreateSmtpTemplateSender struct {
diff --git a/lib/model_create_sub_account.go b/lib/model_create_sub_account.go
index 339e9e3..5e49fe9 100644
--- a/lib/model_create_sub_account.go
+++ b/lib/model_create_sub_account.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateSubAccount struct {
// Set the name of the sub-account company
diff --git a/lib/model_create_sub_account_response.go b/lib/model_create_sub_account_response.go
index e31fc6d..1bc1554 100644
--- a/lib/model_create_sub_account_response.go
+++ b/lib/model_create_sub_account_response.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateSubAccountResponse struct {
// ID of the sub-account created
diff --git a/lib/model_create_update_batch_category.go b/lib/model_create_update_batch_category.go
index 6c770bb..1d18e12 100644
--- a/lib/model_create_update_batch_category.go
+++ b/lib/model_create_update_batch_category.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateUpdateBatchCategory struct {
// array of categories objects
diff --git a/lib/model_create_update_batch_category_model.go b/lib/model_create_update_batch_category_model.go
index 881b654..1b9bc72 100644
--- a/lib/model_create_update_batch_category_model.go
+++ b/lib/model_create_update_batch_category_model.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateUpdateBatchCategoryModel struct {
// Number of the new created categories
diff --git a/lib/model_create_update_batch_products.go b/lib/model_create_update_batch_products.go
index c19a4bc..f2bfd7d 100644
--- a/lib/model_create_update_batch_products.go
+++ b/lib/model_create_update_batch_products.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateUpdateBatchProducts struct {
// array of products objects
diff --git a/lib/model_create_update_batch_products_model.go b/lib/model_create_update_batch_products_model.go
index 0d10327..4bca9bf 100644
--- a/lib/model_create_update_batch_products_model.go
+++ b/lib/model_create_update_batch_products_model.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateUpdateBatchProductsModel struct {
// Number of the new created products
diff --git a/lib/model_create_update_categories.go b/lib/model_create_update_categories.go
index 27109b6..800c5af 100644
--- a/lib/model_create_update_categories.go
+++ b/lib/model_create_update_categories.go
@@ -1,19 +1,19 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateUpdateCategories struct {
- // Unique Category ID as saved in the shop
+ // Unique Category ID as saved in the shop
Id string `json:"id"`
- // **Mandatory in case of creation**. Name of the Category, as displayed in the shop
+ // **Mandatory in case of creation**. Name of the Category, as displayed in the shop
Name string `json:"name,omitempty"`
// URL to the category
Url string `json:"url,omitempty"`
diff --git a/lib/model_create_update_category.go b/lib/model_create_update_category.go
index b9dd6d5..50f67e9 100644
--- a/lib/model_create_update_category.go
+++ b/lib/model_create_update_category.go
@@ -1,19 +1,19 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateUpdateCategory struct {
- // Unique Category ID as saved in the shop
+ // Unique Category ID as saved in the shop
Id string `json:"id"`
- // **Mandatory in case of creation**. Name of the Category, as displayed in the shop
+ // **Mandatory in case of creation**. Name of the Category, as displayed in the shop
Name string `json:"name,omitempty"`
// URL to the category
Url string `json:"url,omitempty"`
diff --git a/lib/model_create_update_contact_model.go b/lib/model_create_update_contact_model.go
index ef33de5..51da3a0 100644
--- a/lib/model_create_update_contact_model.go
+++ b/lib/model_create_update_contact_model.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateUpdateContactModel struct {
// ID of the contact when a new contact is created
diff --git a/lib/model_create_update_folder.go b/lib/model_create_update_folder.go
index 65f7179..9deb777 100644
--- a/lib/model_create_update_folder.go
+++ b/lib/model_create_update_folder.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateUpdateFolder struct {
// Name of the folder
diff --git a/lib/model_create_update_product.go b/lib/model_create_update_product.go
index b391a04..413848e 100644
--- a/lib/model_create_update_product.go
+++ b/lib/model_create_update_product.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateUpdateProduct struct {
// Product ID for which you requested the details
diff --git a/lib/model_create_update_products.go b/lib/model_create_update_products.go
index 19f6fbf..f690052 100644
--- a/lib/model_create_update_products.go
+++ b/lib/model_create_update_products.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateUpdateProducts struct {
// Product ID for which you requested the details
diff --git a/lib/model_create_webhook.go b/lib/model_create_webhook.go
index 8a24edc..01afa35 100644
--- a/lib/model_create_webhook.go
+++ b/lib/model_create_webhook.go
@@ -1,29 +1,29 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateWebhook struct {
// URL of the webhook
Url string `json:"url"`
// Description of the webhook
Description string `json:"description,omitempty"`
- // - Events triggering the webhook. Possible values for **Transactional** type webhook: #### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` - Possible values for **Marketing** type webhook: #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` - Possible values for **Inbound** type webhook: #### `inboundEmailProcessed`
+ // - Events triggering the webhook. Possible values for **Transactional** type webhook: #### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` - Possible values for **Marketing** type webhook: #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` - Possible values for **Inbound** type webhook: #### `inboundEmailProcessed`
Events []string `json:"events"`
// Type of the webhook
Type_ string `json:"type,omitempty"`
// Inbound domain of webhook, required in case of event type `inbound`
Domain string `json:"domain,omitempty"`
// To send batched webhooks
- Batched bool `json:"batched,omitempty"`
- Auth *GetWebhookAuth `json:"auth,omitempty"`
+ Batched bool `json:"batched,omitempty"`
+ Auth *GetWebhookAuth `json:"auth,omitempty"`
// Custom headers to be send with webhooks
Headers []GetWebhookHeaders `json:"headers,omitempty"`
}
diff --git a/lib/model_create_whats_app_campaign.go b/lib/model_create_whats_app_campaign.go
index e63ff0b..e8964fd 100644
--- a/lib/model_create_whats_app_campaign.go
+++ b/lib/model_create_whats_app_campaign.go
@@ -1,21 +1,21 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateWhatsAppCampaign struct {
// Name of the WhatsApp campaign creation
Name string `json:"name"`
// Id of the WhatsApp template in **approved** state
TemplateId int32 `json:"templateId"`
- // Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.For example: **2017-06-01T12:30:00+02:00**
- ScheduledAt string `json:"scheduledAt"`
- Recipients *CreateWhatsAppCampaignRecipients `json:"recipients"`
+ // Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.For example: **2017-06-01T12:30:00+02:00**
+ ScheduledAt string `json:"scheduledAt"`
+ Recipients *CreateWhatsAppCampaignRecipients `json:"recipients"`
}
diff --git a/lib/model_create_whats_app_campaign_recipients.go b/lib/model_create_whats_app_campaign_recipients.go
index c252e7e..937718b 100644
--- a/lib/model_create_whats_app_campaign_recipients.go
+++ b/lib/model_create_whats_app_campaign_recipients.go
@@ -1,21 +1,21 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Segment ids and List ids to include/exclude from campaign
type CreateWhatsAppCampaignRecipients struct {
// List ids to exclude from the campaign
ExcludedListIds []int64 `json:"excludedListIds,omitempty"`
- // **Mandatory if scheduledAt is not empty**. List Ids to send the campaign to
+ // **Mandatory if scheduledAt is not empty**. List Ids to send the campaign to
ListIds []int64 `json:"listIds,omitempty"`
- // **Mandatory if listIds are not used**. Segment ids to send the campaign to.
+ // **Mandatory if listIds are not used**. Segment ids to send the campaign to.
Segments []int64 `json:"segments,omitempty"`
}
diff --git a/lib/model_create_whats_app_template.go b/lib/model_create_whats_app_template.go
index b9e672c..60192d6 100644
--- a/lib/model_create_whats_app_template.go
+++ b/lib/model_create_whats_app_template.go
@@ -1,27 +1,27 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreateWhatsAppTemplate struct {
// Name of the template
Name string `json:"name"`
- // Language of the template. For Example : **en** for English
+ // Language of the template. For Example : **en** for English
Language string `json:"language"`
// Category of the template
Category string `json:"category"`
- // Absolute url of the media file **(no local file)** for the header. **Use this field in you want to add media in Template header and headerText is empty.** Allowed extensions for media files are: #### jpeg | png | mp4 | pdf
+ // Absolute url of the media file **(no local file)** for the header. **Use this field in you want to add media in Template header and headerText is empty.** Allowed extensions for media files are: #### jpeg | png | mp4 | pdf
MediaUrl string `json:"mediaUrl,omitempty"`
// Body of the template. **Maximum allowed characters are 1024**
BodyText string `json:"bodyText"`
- // Text content of the header in the template. **Maximum allowed characters are 45** **Use this field to add text content in template header and if mediaUrl is empty**
+ // Text content of the header in the template. **Maximum allowed characters are 45** **Use this field to add text content in template header and if mediaUrl is empty**
HeaderText string `json:"headerText,omitempty"`
// source of the template
Source string `json:"source,omitempty"`
diff --git a/lib/model_created_batch_id.go b/lib/model_created_batch_id.go
index a68e9a6..31ab9a6 100644
--- a/lib/model_created_batch_id.go
+++ b/lib/model_created_batch_id.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreatedBatchId struct {
// Batch ID of the request
diff --git a/lib/model_created_process_id.go b/lib/model_created_process_id.go
index c5cb0fd..eb03f2c 100644
--- a/lib/model_created_process_id.go
+++ b/lib/model_created_process_id.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type CreatedProcessId struct {
// Id of the process created
diff --git a/lib/model_deal.go b/lib/model_deal.go
index 12cba8a..26997c3 100644
--- a/lib/model_deal.go
+++ b/lib/model_deal.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Deal Details
type Deal struct {
diff --git a/lib/model_deal_attributes.go b/lib/model_deal_attributes.go
index 366f81c..6fc95d2 100644
--- a/lib/model_deal_attributes.go
+++ b/lib/model_deal_attributes.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// List of deal attributes
type DealAttributes struct {
diff --git a/lib/model_deal_attributes_inner.go b/lib/model_deal_attributes_inner.go
index d22beb2..72db5d0 100644
--- a/lib/model_deal_attributes_inner.go
+++ b/lib/model_deal_attributes_inner.go
@@ -1,20 +1,20 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// List of attributes
type DealAttributesInner struct {
- InternalName string `json:"internalName,omitempty"`
- Label string `json:"label,omitempty"`
- AttributeTypeName string `json:"attributeTypeName,omitempty"`
- AttributeOptions []interface{} `json:"attributeOptions,omitempty"`
- IsRequired bool `json:"isRequired,omitempty"`
+ InternalName string `json:"internalName,omitempty"`
+ Label string `json:"label,omitempty"`
+ AttributeTypeName string `json:"attributeTypeName,omitempty"`
+ AttributeOptions []interface{} `json:"attributeOptions,omitempty"`
+ IsRequired bool `json:"isRequired,omitempty"`
}
diff --git a/lib/model_deals_list.go b/lib/model_deals_list.go
index 03efd80..0e8034d 100644
--- a/lib/model_deals_list.go
+++ b/lib/model_deals_list.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// List of Deals
type DealsList struct {
diff --git a/lib/model_delete_hardbounces.go b/lib/model_delete_hardbounces.go
index 0279252..df3c168 100644
--- a/lib/model_delete_hardbounces.go
+++ b/lib/model_delete_hardbounces.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type DeleteHardbounces struct {
// Starting date (YYYY-MM-DD) of the time period for deletion. The hardbounces occurred after this date will be deleted. Must be less than or equal to the endDate
diff --git a/lib/model_email_export_recipients.go b/lib/model_email_export_recipients.go
index 929d913..1d10d64 100644
--- a/lib/model_email_export_recipients.go
+++ b/lib/model_email_export_recipients.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type EmailExportRecipients struct {
// Webhook called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479
diff --git a/lib/model_error_model.go b/lib/model_error_model.go
index 9df58f2..9ae08a6 100644
--- a/lib/model_error_model.go
+++ b/lib/model_error_model.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type ErrorModel struct {
// Error code displayed in case of a failure
diff --git a/lib/model_event.go b/lib/model_event.go
index 05acf56..41f6ba6 100644
--- a/lib/model_event.go
+++ b/lib/model_event.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type Event struct {
// The name of the event that occurred. This is how you will find your event in Brevo. Limited to 255 characters, alphanumerical characters and - _ only.
diff --git a/lib/model_event_identifiers.go b/lib/model_event_identifiers.go
index 66f249e..7424253 100644
--- a/lib/model_event_identifiers.go
+++ b/lib/model_event_identifiers.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Identifies the contact associated with the event. At least one identifier is required.
type EventIdentifiers struct {
diff --git a/lib/model_export_webhooks_history.go b/lib/model_export_webhooks_history.go
index 6c35218..33f8bd6 100644
--- a/lib/model_export_webhooks_history.go
+++ b/lib/model_export_webhooks_history.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type ExportWebhooksHistory struct {
// Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_
diff --git a/lib/model_file_data.go b/lib/model_file_data.go
index 194b5f4..02463f4 100644
--- a/lib/model_file_data.go
+++ b/lib/model_file_data.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"time"
diff --git a/lib/model_file_downloadable_link.go b/lib/model_file_downloadable_link.go
index b7ad916..bc990de 100644
--- a/lib/model_file_downloadable_link.go
+++ b/lib/model_file_downloadable_link.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type FileDownloadableLink struct {
// A unique link to download the requested file.
diff --git a/lib/model_file_list.go b/lib/model_file_list.go
index 3947965..f437e82 100644
--- a/lib/model_file_list.go
+++ b/lib/model_file_list.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// List of files
type FileList struct {
diff --git a/lib/model_get_account.go b/lib/model_get_account.go
index 6858cf3..7a089a3 100644
--- a/lib/model_get_account.go
+++ b/lib/model_get_account.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetAccount struct {
// Login Email
@@ -18,10 +18,10 @@ type GetAccount struct {
// Last Name
LastName string `json:"lastName"`
// Name of the company
- CompanyName string `json:"companyName"`
- Address *GetExtendedClientAddress `json:"address"`
+ CompanyName string `json:"companyName"`
+ Address *GetExtendedClientAddress `json:"address"`
// Information about your plans and credits
- Plan []GetAccountPlan `json:"plan"`
- Relay *GetAccountRelay `json:"relay"`
+ Plan []GetAccountPlan `json:"plan"`
+ Relay *GetAccountRelay `json:"relay"`
MarketingAutomation *GetAccountMarketingAutomation `json:"marketingAutomation,omitempty"`
}
diff --git a/lib/model_get_account_activity.go b/lib/model_get_account_activity.go
index 81737b5..cef4bf3 100644
--- a/lib/model_get_account_activity.go
+++ b/lib/model_get_account_activity.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetAccountActivity struct {
// Get user activity logs
diff --git a/lib/model_get_account_activity_logs.go b/lib/model_get_account_activity_logs.go
index 0f25a7d..f818850 100644
--- a/lib/model_get_account_activity_logs.go
+++ b/lib/model_get_account_activity_logs.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetAccountActivityLogs struct {
// Type of activity in the account.
diff --git a/lib/model_get_account_marketing_automation.go b/lib/model_get_account_marketing_automation.go
index eb26ddb..14809a0 100644
--- a/lib/model_get_account_marketing_automation.go
+++ b/lib/model_get_account_marketing_automation.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetAccountMarketingAutomation struct {
// Marketing Automation Tracker ID
diff --git a/lib/model_get_account_plan.go b/lib/model_get_account_plan.go
index 2794e93..e695bb7 100644
--- a/lib/model_get_account_plan.go
+++ b/lib/model_get_account_plan.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetAccountPlan struct {
// Displays the plan type of the user
diff --git a/lib/model_get_account_relay.go b/lib/model_get_account_relay.go
index 917fd28..ffd4b86 100644
--- a/lib/model_get_account_relay.go
+++ b/lib/model_get_account_relay.go
@@ -1,18 +1,18 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Information about your transactional email account
type GetAccountRelay struct {
// Status of your transactional email Account (true=Enabled, false=Disabled)
- Enabled bool `json:"enabled"`
- Data *GetAccountRelayData `json:"data"`
+ Enabled bool `json:"enabled"`
+ Data *GetAccountRelayData `json:"data"`
}
diff --git a/lib/model_get_account_relay_data.go b/lib/model_get_account_relay_data.go
index b426683..d47d691 100644
--- a/lib/model_get_account_relay_data.go
+++ b/lib/model_get_account_relay_data.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Data regarding the transactional email account
type GetAccountRelayData struct {
diff --git a/lib/model_get_aggregated_report.go b/lib/model_get_aggregated_report.go
index 984f5a3..d6b346e 100644
--- a/lib/model_get_aggregated_report.go
+++ b/lib/model_get_aggregated_report.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetAggregatedReport struct {
// Time frame of the report
diff --git a/lib/model_get_all_external_feeds.go b/lib/model_get_all_external_feeds.go
index 4586803..98aa857 100644
--- a/lib/model_get_all_external_feeds.go
+++ b/lib/model_get_all_external_feeds.go
@@ -1,17 +1,17 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetAllExternalFeeds struct {
// Total number of batches
- Count int32 `json:"count,omitempty"`
+ Count int32 `json:"count,omitempty"`
Feeds []GetAllExternalFeedsFeeds `json:"feeds,omitempty"`
}
diff --git a/lib/model_get_all_external_feeds_feeds.go b/lib/model_get_all_external_feeds_feeds.go
index c3e5a48..46aeef1 100644
--- a/lib/model_get_all_external_feeds_feeds.go
+++ b/lib/model_get_all_external_feeds_feeds.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"time"
@@ -21,7 +21,7 @@ type GetAllExternalFeedsFeeds struct {
Name string `json:"name"`
// URL of the feed
Url string `json:"url"`
- // Auth type of the feed: * `basic` * `token` * `noAuth`
+ // Auth type of the feed: * `basic` * `token` * `noAuth`
AuthType string `json:"authType"`
// Username for authType `basic`
Username string `json:"username,omitempty"`
diff --git a/lib/model_get_attributes.go b/lib/model_get_attributes.go
index cbf5b21..b53f7b6 100644
--- a/lib/model_get_attributes.go
+++ b/lib/model_get_attributes.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetAttributes struct {
// Listing of available contact attributes in your account
diff --git a/lib/model_get_attributes_attributes.go b/lib/model_get_attributes_attributes.go
index f338fff..3ee9779 100644
--- a/lib/model_get_attributes_attributes.go
+++ b/lib/model_get_attributes_attributes.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetAttributesAttributes struct {
// Name of the attribute
diff --git a/lib/model_get_attributes_enumeration.go b/lib/model_get_attributes_enumeration.go
index 31a0627..4269f5e 100644
--- a/lib/model_get_attributes_enumeration.go
+++ b/lib/model_get_attributes_enumeration.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetAttributesEnumeration struct {
// ID of Value of the \"category\" type attribute
diff --git a/lib/model_get_blocked_domains.go b/lib/model_get_blocked_domains.go
index 64a0ed7..e5b750f 100644
--- a/lib/model_get_blocked_domains.go
+++ b/lib/model_get_blocked_domains.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// list of blocked domains
type GetBlockedDomains struct {
diff --git a/lib/model_get_campaign_overview.go b/lib/model_get_campaign_overview.go
index 23f01f1..1f348fd 100644
--- a/lib/model_get_campaign_overview.go
+++ b/lib/model_get_campaign_overview.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetCampaignOverview struct {
// ID of the campaign
diff --git a/lib/model_get_campaign_recipients.go b/lib/model_get_campaign_recipients.go
index b99d44f..590b5f5 100644
--- a/lib/model_get_campaign_recipients.go
+++ b/lib/model_get_campaign_recipients.go
@@ -1,16 +1,16 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetCampaignRecipients struct {
- Lists []int64 `json:"lists"`
+ Lists []int64 `json:"lists"`
ExclusionLists []int64 `json:"exclusionLists"`
}
diff --git a/lib/model_get_campaign_stats.go b/lib/model_get_campaign_stats.go
index debacfe..c989478 100644
--- a/lib/model_get_campaign_stats.go
+++ b/lib/model_get_campaign_stats.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetCampaignStats struct {
// List Id of email campaign (only in case of get email campaign(s)(not for global stats))
diff --git a/lib/model_get_categories.go b/lib/model_get_categories.go
index b968e56..c510148 100644
--- a/lib/model_get_categories.go
+++ b/lib/model_get_categories.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetCategories struct {
Categories []interface{} `json:"categories"`
diff --git a/lib/model_get_category_details.go b/lib/model_get_category_details.go
index a6ddf8d..a2a4bde 100644
--- a/lib/model_get_category_details.go
+++ b/lib/model_get_category_details.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetCategoryDetails struct {
// Category ID for which you requested the details
diff --git a/lib/model_get_child_account_creation_status.go b/lib/model_get_child_account_creation_status.go
index 952d1b9..8625166 100644
--- a/lib/model_get_child_account_creation_status.go
+++ b/lib/model_get_child_account_creation_status.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetChildAccountCreationStatus struct {
// Status of child account creation whether it is successfully created (exists) or not.
diff --git a/lib/model_get_child_domain.go b/lib/model_get_child_domain.go
index bf85d78..44cb0a9 100644
--- a/lib/model_get_child_domain.go
+++ b/lib/model_get_child_domain.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetChildDomain struct {
// Sender domain
diff --git a/lib/model_get_child_domains.go b/lib/model_get_child_domains.go
index b9c93b5..c81833e 100644
--- a/lib/model_get_child_domains.go
+++ b/lib/model_get_child_domains.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetChildDomains struct {
}
diff --git a/lib/model_get_child_info.go b/lib/model_get_child_info.go
index e050b2d..a31211f 100644
--- a/lib/model_get_child_info.go
+++ b/lib/model_get_child_info.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetChildInfo struct {
// Login Email
@@ -18,12 +18,12 @@ type GetChildInfo struct {
// Last Name
LastName string `json:"lastName"`
// Name of the company
- CompanyName string `json:"companyName"`
- Credits *GetChildInfoCredits `json:"credits,omitempty"`
- Statistics *GetChildInfoStatistics `json:"statistics,omitempty"`
+ CompanyName string `json:"companyName"`
+ Credits *GetChildInfoCredits `json:"credits,omitempty"`
+ Statistics *GetChildInfoStatistics `json:"statistics,omitempty"`
// The encrypted password of child account
Password string `json:"password"`
// IP(s) associated to a child account user
- Ips []string `json:"ips,omitempty"`
+ Ips []string `json:"ips,omitempty"`
ApiKeys *GetChildInfoApiKeys `json:"apiKeys,omitempty"`
}
diff --git a/lib/model_get_child_info_api_keys.go b/lib/model_get_child_info_api_keys.go
index 37b7e05..c0ed4b5 100644
--- a/lib/model_get_child_info_api_keys.go
+++ b/lib/model_get_child_info_api_keys.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// API Keys associated to child account
type GetChildInfoApiKeys struct {
diff --git a/lib/model_get_child_info_api_keys_v2.go b/lib/model_get_child_info_api_keys_v2.go
index a0db018..4996644 100644
--- a/lib/model_get_child_info_api_keys_v2.go
+++ b/lib/model_get_child_info_api_keys_v2.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetChildInfoApiKeysV2 struct {
// Name of the key for version 2
diff --git a/lib/model_get_child_info_api_keys_v3.go b/lib/model_get_child_info_api_keys_v3.go
index 3075120..7cddabb 100644
--- a/lib/model_get_child_info_api_keys_v3.go
+++ b/lib/model_get_child_info_api_keys_v3.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetChildInfoApiKeysV3 struct {
// Name of the key for version 3
diff --git a/lib/model_get_child_info_credits.go b/lib/model_get_child_info_credits.go
index f7cd0d5..57dad20 100644
--- a/lib/model_get_child_info_credits.go
+++ b/lib/model_get_child_info_credits.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Credits available for your child
type GetChildInfoCredits struct {
diff --git a/lib/model_get_child_info_statistics.go b/lib/model_get_child_info_statistics.go
index 605a0de..5c64359 100644
--- a/lib/model_get_child_info_statistics.go
+++ b/lib/model_get_child_info_statistics.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Statistics about your child account activity
type GetChildInfoStatistics struct {
diff --git a/lib/model_get_children_list.go b/lib/model_get_children_list.go
index 14898b7..84d01fe 100644
--- a/lib/model_get_children_list.go
+++ b/lib/model_get_children_list.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetChildrenList struct {
// Your children's account information
diff --git a/lib/model_get_client.go b/lib/model_get_client.go
index 4e9455e..fb2ae57 100644
--- a/lib/model_get_client.go
+++ b/lib/model_get_client.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetClient struct {
// Login Email
diff --git a/lib/model_get_contact_campaign_stats.go b/lib/model_get_contact_campaign_stats.go
index 941ff6b..406eabf 100644
--- a/lib/model_get_contact_campaign_stats.go
+++ b/lib/model_get_contact_campaign_stats.go
@@ -1,24 +1,24 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Campaign Statistics for the contact
type GetContactCampaignStats struct {
- MessagesSent []GetExtendedContactDetailsStatisticsMessagesSent `json:"messagesSent,omitempty"`
- HardBounces []GetExtendedContactDetailsStatisticsMessagesSent `json:"hardBounces,omitempty"`
- SoftBounces []GetExtendedContactDetailsStatisticsMessagesSent `json:"softBounces,omitempty"`
- Complaints []GetExtendedContactDetailsStatisticsMessagesSent `json:"complaints,omitempty"`
- Unsubscriptions *GetContactCampaignStatsUnsubscriptions `json:"unsubscriptions,omitempty"`
- Opened []GetContactCampaignStatsOpened `json:"opened,omitempty"`
- Clicked []GetContactCampaignStatsClicked `json:"clicked,omitempty"`
- TransacAttributes []GetContactCampaignStatsTransacAttributes `json:"transacAttributes,omitempty"`
- Delivered []GetExtendedContactDetailsStatisticsMessagesSent `json:"delivered,omitempty"`
+ MessagesSent []GetExtendedContactDetailsStatisticsMessagesSent `json:"messagesSent,omitempty"`
+ HardBounces []GetExtendedContactDetailsStatisticsMessagesSent `json:"hardBounces,omitempty"`
+ SoftBounces []GetExtendedContactDetailsStatisticsMessagesSent `json:"softBounces,omitempty"`
+ Complaints []GetExtendedContactDetailsStatisticsMessagesSent `json:"complaints,omitempty"`
+ Unsubscriptions *GetContactCampaignStatsUnsubscriptions `json:"unsubscriptions,omitempty"`
+ Opened []GetContactCampaignStatsOpened `json:"opened,omitempty"`
+ Clicked []GetContactCampaignStatsClicked `json:"clicked,omitempty"`
+ TransacAttributes []GetContactCampaignStatsTransacAttributes `json:"transacAttributes,omitempty"`
+ Delivered []GetExtendedContactDetailsStatisticsMessagesSent `json:"delivered,omitempty"`
}
diff --git a/lib/model_get_contact_campaign_stats_clicked.go b/lib/model_get_contact_campaign_stats_clicked.go
index 5dda146..a0970fd 100644
--- a/lib/model_get_contact_campaign_stats_clicked.go
+++ b/lib/model_get_contact_campaign_stats_clicked.go
@@ -1,17 +1,17 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetContactCampaignStatsClicked struct {
// ID of the campaign which generated the event
- CampaignId int64 `json:"campaignId"`
- Links []GetExtendedContactDetailsStatisticsLinks `json:"links"`
+ CampaignId int64 `json:"campaignId"`
+ Links []GetExtendedContactDetailsStatisticsLinks `json:"links"`
}
diff --git a/lib/model_get_contact_campaign_stats_opened.go b/lib/model_get_contact_campaign_stats_opened.go
index 0623e1d..487bc3f 100644
--- a/lib/model_get_contact_campaign_stats_opened.go
+++ b/lib/model_get_contact_campaign_stats_opened.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetContactCampaignStatsOpened struct {
// ID of the campaign which generated the event
diff --git a/lib/model_get_contact_campaign_stats_transac_attributes.go b/lib/model_get_contact_campaign_stats_transac_attributes.go
index 63c42b3..01425af 100644
--- a/lib/model_get_contact_campaign_stats_transac_attributes.go
+++ b/lib/model_get_contact_campaign_stats_transac_attributes.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetContactCampaignStatsTransacAttributes struct {
// Date of the order
diff --git a/lib/model_get_contact_campaign_stats_unsubscriptions.go b/lib/model_get_contact_campaign_stats_unsubscriptions.go
index ce67dc2..b07c919 100644
--- a/lib/model_get_contact_campaign_stats_unsubscriptions.go
+++ b/lib/model_get_contact_campaign_stats_unsubscriptions.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetContactCampaignStatsUnsubscriptions struct {
// Contact has unsubscribed via the unsubscription link in the email
diff --git a/lib/model_get_contact_details.go b/lib/model_get_contact_details.go
index b9e1263..55a2a79 100644
--- a/lib/model_get_contact_details.go
+++ b/lib/model_get_contact_details.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetContactDetails struct {
// Email address of the contact for which you requested the details
diff --git a/lib/model_get_contacts.go b/lib/model_get_contacts.go
index 3a5ac11..71b48e3 100644
--- a/lib/model_get_contacts.go
+++ b/lib/model_get_contacts.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetContacts struct {
Contacts []interface{} `json:"contacts"`
diff --git a/lib/model_get_corporate_invited_users_list.go b/lib/model_get_corporate_invited_users_list.go
index c1bdb44..888bf28 100644
--- a/lib/model_get_corporate_invited_users_list.go
+++ b/lib/model_get_corporate_invited_users_list.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetCorporateInvitedUsersList struct {
// Get invited users list
diff --git a/lib/model_get_corporate_invited_users_list_feature_access.go b/lib/model_get_corporate_invited_users_list_feature_access.go
index cef2d60..049ef96 100644
--- a/lib/model_get_corporate_invited_users_list_feature_access.go
+++ b/lib/model_get_corporate_invited_users_list_feature_access.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Feature accessiblity given to the user. (Required only if status is active)
type GetCorporateInvitedUsersListFeatureAccess struct {
diff --git a/lib/model_get_corporate_invited_users_list_groups.go b/lib/model_get_corporate_invited_users_list_groups.go
index 9a235d1..79862a1 100644
--- a/lib/model_get_corporate_invited_users_list_groups.go
+++ b/lib/model_get_corporate_invited_users_list_groups.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Admin user groups list
type GetCorporateInvitedUsersListGroups struct {
diff --git a/lib/model_get_corporate_invited_users_list_users.go b/lib/model_get_corporate_invited_users_list_users.go
index a92565b..1d977de 100644
--- a/lib/model_get_corporate_invited_users_list_users.go
+++ b/lib/model_get_corporate_invited_users_list_users.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetCorporateInvitedUsersListUsers struct {
Groups *GetCorporateInvitedUsersListGroups `json:"groups"`
@@ -17,6 +17,6 @@ type GetCorporateInvitedUsersListUsers struct {
// Flag for indicating is user owner of the organization.
IsOwner string `json:"is_owner"`
// Status of the invited user.
- Status string `json:"status"`
+ Status string `json:"status"`
FeatureAccess *GetCorporateInvitedUsersListFeatureAccess `json:"feature_access"`
}
diff --git a/lib/model_get_corporate_user_permission.go b/lib/model_get_corporate_user_permission.go
index a88c804..b7ef5fa 100644
--- a/lib/model_get_corporate_user_permission.go
+++ b/lib/model_get_corporate_user_permission.go
@@ -1,21 +1,21 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Check admin user permissions
type GetCorporateUserPermission struct {
// Email address of the user.
Email string `json:"email"`
// Status of the invited user.
- Status string `json:"status"`
- Groups []GetCorporateUserPermissionGroups `json:"groups"`
+ Status string `json:"status"`
+ Groups []GetCorporateUserPermissionGroups `json:"groups"`
FeatureAccess *GetCorporateUserPermissionFeatureAccess `json:"feature_access"`
}
diff --git a/lib/model_get_corporate_user_permission_feature_access.go b/lib/model_get_corporate_user_permission_feature_access.go
index 425a9dd..4a96219 100644
--- a/lib/model_get_corporate_user_permission_feature_access.go
+++ b/lib/model_get_corporate_user_permission_feature_access.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Granular feature permissions given to the user.
type GetCorporateUserPermissionFeatureAccess struct {
diff --git a/lib/model_get_corporate_user_permission_groups.go b/lib/model_get_corporate_user_permission_groups.go
index 1fac6ce..6ebfd10 100644
--- a/lib/model_get_corporate_user_permission_groups.go
+++ b/lib/model_get_corporate_user_permission_groups.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Groups details
type GetCorporateUserPermissionGroups struct {
diff --git a/lib/model_get_coupon_collection.go b/lib/model_get_coupon_collection.go
index 958bbe2..1395ca6 100644
--- a/lib/model_get_coupon_collection.go
+++ b/lib/model_get_coupon_collection.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"time"
diff --git a/lib/model_get_device_browser_stats.go b/lib/model_get_device_browser_stats.go
index 5b12aee..09e53bc 100644
--- a/lib/model_get_device_browser_stats.go
+++ b/lib/model_get_device_browser_stats.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetDeviceBrowserStats struct {
// Number of total clicks for the campaign using the particular browser
diff --git a/lib/model_get_domain_configuration_model.go b/lib/model_get_domain_configuration_model.go
index 694b250..c559576 100644
--- a/lib/model_get_domain_configuration_model.go
+++ b/lib/model_get_domain_configuration_model.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetDomainConfigurationModel struct {
// Domain
@@ -16,6 +16,6 @@ type GetDomainConfigurationModel struct {
// Status of domain verification (true=verified, false=non verified)
Verified bool `json:"verified"`
// Status of domain authentication (true=authenticated, false=non authenticated)
- Authenticated bool `json:"authenticated"`
- DnsRecords *CreateDomainModelDnsRecords `json:"dns_records"`
+ Authenticated bool `json:"authenticated"`
+ DnsRecords *CreateDomainModelDnsRecords `json:"dns_records"`
}
diff --git a/lib/model_get_domains_list.go b/lib/model_get_domains_list.go
index fc9a615..7255f74 100644
--- a/lib/model_get_domains_list.go
+++ b/lib/model_get_domains_list.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetDomainsList struct {
// List of the domains available in your account
diff --git a/lib/model_get_domains_list_domains.go b/lib/model_get_domains_list_domains.go
index 04dd5bb..f61e0cf 100644
--- a/lib/model_get_domains_list_domains.go
+++ b/lib/model_get_domains_list_domains.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetDomainsListDomains struct {
// Id of the domain
diff --git a/lib/model_get_email_campaign.go b/lib/model_get_email_campaign.go
index 12af4a4..581e28e 100644
--- a/lib/model_get_email_campaign.go
+++ b/lib/model_get_email_campaign.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetEmailCampaign struct {
// ID of the campaign
diff --git a/lib/model_get_email_campaigns.go b/lib/model_get_email_campaigns.go
index 1116f36..b883587 100644
--- a/lib/model_get_email_campaigns.go
+++ b/lib/model_get_email_campaigns.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetEmailCampaigns struct {
Campaigns []interface{} `json:"campaigns,omitempty"`
diff --git a/lib/model_get_email_event_report.go b/lib/model_get_email_event_report.go
index 5dd9b1f..b58a559 100644
--- a/lib/model_get_email_event_report.go
+++ b/lib/model_get_email_event_report.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetEmailEventReport struct {
Events []GetEmailEventReportEvents `json:"events,omitempty"`
diff --git a/lib/model_get_email_event_report_events.go b/lib/model_get_email_event_report_events.go
index b0b5945..c1c8e76 100644
--- a/lib/model_get_email_event_report_events.go
+++ b/lib/model_get_email_event_report_events.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetEmailEventReportEvents struct {
// Email address which generates the event
diff --git a/lib/model_get_extended_campaign_overview.go b/lib/model_get_extended_campaign_overview.go
index b0f1527..eca4207 100644
--- a/lib/model_get_extended_campaign_overview.go
+++ b/lib/model_get_extended_campaign_overview.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetExtendedCampaignOverview struct {
// ID of the campaign
@@ -52,7 +52,7 @@ type GetExtendedCampaignOverview struct {
// Header of the campaign
Header string `json:"header"`
// Footer of the campaign
- Footer string `json:"footer"`
+ Footer string `json:"footer"`
Sender *GetExtendedCampaignOverviewSender `json:"sender"`
// Email defined as the \"Reply to\" of the campaign
ReplyTo string `json:"replyTo"`
diff --git a/lib/model_get_extended_campaign_overview_sender.go b/lib/model_get_extended_campaign_overview_sender.go
index 1eb74f8..1583e4f 100644
--- a/lib/model_get_extended_campaign_overview_sender.go
+++ b/lib/model_get_extended_campaign_overview_sender.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetExtendedCampaignOverviewSender struct {
// Sender name of the campaign
diff --git a/lib/model_get_extended_campaign_stats.go b/lib/model_get_extended_campaign_stats.go
index 75415c4..ba41d23 100644
--- a/lib/model_get_extended_campaign_stats.go
+++ b/lib/model_get_extended_campaign_stats.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetExtendedCampaignStats struct {
// Overall statistics of the campaign
diff --git a/lib/model_get_extended_client.go b/lib/model_get_extended_client.go
index 56a54e9..676c134 100644
--- a/lib/model_get_extended_client.go
+++ b/lib/model_get_extended_client.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetExtendedClient struct {
// Login Email
@@ -18,6 +18,6 @@ type GetExtendedClient struct {
// Last Name
LastName string `json:"lastName"`
// Name of the company
- CompanyName string `json:"companyName"`
- Address *GetExtendedClientAddress `json:"address"`
+ CompanyName string `json:"companyName"`
+ Address *GetExtendedClientAddress `json:"address"`
}
diff --git a/lib/model_get_extended_client_address.go b/lib/model_get_extended_client_address.go
index 84c734c..b58e959 100644
--- a/lib/model_get_extended_client_address.go
+++ b/lib/model_get_extended_client_address.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Address informations
type GetExtendedClientAddress struct {
diff --git a/lib/model_get_extended_contact_details.go b/lib/model_get_extended_contact_details.go
index 8a28171..3daffbc 100644
--- a/lib/model_get_extended_contact_details.go
+++ b/lib/model_get_extended_contact_details.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetExtendedContactDetails struct {
// Email address of the contact for which you requested the details
diff --git a/lib/model_get_extended_contact_details_statistics.go b/lib/model_get_extended_contact_details_statistics.go
index 0dcc253..10e8f37 100644
--- a/lib/model_get_extended_contact_details_statistics.go
+++ b/lib/model_get_extended_contact_details_statistics.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Campaign statistics of the contact
type GetExtendedContactDetailsStatistics struct {
@@ -19,7 +19,7 @@ type GetExtendedContactDetailsStatistics struct {
// Listing of the softbounes generated by the contact
SoftBounces []GetExtendedContactDetailsStatisticsMessagesSent `json:"softBounces,omitempty"`
// Listing of the complaints generated by the contact
- Complaints []GetExtendedContactDetailsStatisticsMessagesSent `json:"complaints,omitempty"`
+ Complaints []GetExtendedContactDetailsStatisticsMessagesSent `json:"complaints,omitempty"`
Unsubscriptions *GetExtendedContactDetailsStatisticsUnsubscriptions `json:"unsubscriptions,omitempty"`
// Listing of the openings generated by the contact
Opened []GetExtendedContactDetailsStatisticsOpened `json:"opened,omitempty"`
diff --git a/lib/model_get_extended_contact_details_statistics_clicked.go b/lib/model_get_extended_contact_details_statistics_clicked.go
index 4b9be39..ea0ba94 100644
--- a/lib/model_get_extended_contact_details_statistics_clicked.go
+++ b/lib/model_get_extended_contact_details_statistics_clicked.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetExtendedContactDetailsStatisticsClicked struct {
// ID of the campaign which generated the event
diff --git a/lib/model_get_extended_contact_details_statistics_delivered.go b/lib/model_get_extended_contact_details_statistics_delivered.go
index 4e9ec16..5495316 100644
--- a/lib/model_get_extended_contact_details_statistics_delivered.go
+++ b/lib/model_get_extended_contact_details_statistics_delivered.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetExtendedContactDetailsStatisticsDelivered struct {
// ID of the campaign which generated the event
diff --git a/lib/model_get_extended_contact_details_statistics_links.go b/lib/model_get_extended_contact_details_statistics_links.go
index 69b46af..155788f 100644
--- a/lib/model_get_extended_contact_details_statistics_links.go
+++ b/lib/model_get_extended_contact_details_statistics_links.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetExtendedContactDetailsStatisticsLinks struct {
// Number of clicks on this link for the campaign
diff --git a/lib/model_get_extended_contact_details_statistics_messages_sent.go b/lib/model_get_extended_contact_details_statistics_messages_sent.go
index a742d81..cd3ae30 100644
--- a/lib/model_get_extended_contact_details_statistics_messages_sent.go
+++ b/lib/model_get_extended_contact_details_statistics_messages_sent.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetExtendedContactDetailsStatisticsMessagesSent struct {
// ID of the campaign which generated the event
diff --git a/lib/model_get_extended_contact_details_statistics_opened.go b/lib/model_get_extended_contact_details_statistics_opened.go
index 315fd43..54898bb 100644
--- a/lib/model_get_extended_contact_details_statistics_opened.go
+++ b/lib/model_get_extended_contact_details_statistics_opened.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetExtendedContactDetailsStatisticsOpened struct {
// ID of the campaign which generated the event
diff --git a/lib/model_get_extended_contact_details_statistics_unsubscriptions.go b/lib/model_get_extended_contact_details_statistics_unsubscriptions.go
index 6682be7..84d2858 100644
--- a/lib/model_get_extended_contact_details_statistics_unsubscriptions.go
+++ b/lib/model_get_extended_contact_details_statistics_unsubscriptions.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Listing of the unsubscription for the contact
type GetExtendedContactDetailsStatisticsUnsubscriptions struct {
diff --git a/lib/model_get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.go b/lib/model_get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.go
index e7cc382..1a7ec2d 100644
--- a/lib/model_get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.go
+++ b/lib/model_get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription struct {
// UTC date-time of the event
diff --git a/lib/model_get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.go b/lib/model_get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.go
index 002d910..8df417d 100644
--- a/lib/model_get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.go
+++ b/lib/model_get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription struct {
// ID of the campaign which generated the event
diff --git a/lib/model_get_extended_list.go b/lib/model_get_extended_list.go
index 93096b6..e2a402c 100644
--- a/lib/model_get_extended_list.go
+++ b/lib/model_get_extended_list.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetExtendedList struct {
// ID of the list
@@ -24,7 +24,7 @@ type GetExtendedList struct {
// ID of the folder
FolderId int64 `json:"folderId"`
// Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ)
- CreatedAt string `json:"createdAt"`
+ CreatedAt string `json:"createdAt"`
CampaignStats []GetExtendedListCampaignStats `json:"campaignStats,omitempty"`
// Status telling if the list is dynamic or not (true=dynamic, false=not dynamic)
DynamicList bool `json:"dynamicList,omitempty"`
diff --git a/lib/model_get_extended_list_campaign_stats.go b/lib/model_get_extended_list_campaign_stats.go
index 1f11612..64dd8de 100644
--- a/lib/model_get_extended_list_campaign_stats.go
+++ b/lib/model_get_extended_list_campaign_stats.go
@@ -1,17 +1,17 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetExtendedListCampaignStats struct {
// ID of the campaign
- CampaignId int64 `json:"campaignId"`
- Stats *GetCampaignStats `json:"stats"`
+ CampaignId int64 `json:"campaignId"`
+ Stats *GetCampaignStats `json:"stats"`
}
diff --git a/lib/model_get_external_feed_by_uuid.go b/lib/model_get_external_feed_by_uuid.go
index a1e75b8..d6a6a1c 100644
--- a/lib/model_get_external_feed_by_uuid.go
+++ b/lib/model_get_external_feed_by_uuid.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"time"
@@ -21,7 +21,7 @@ type GetExternalFeedByUuid struct {
Name string `json:"name"`
// URL of the feed
Url string `json:"url"`
- // Auth type of the feed: * `basic` * `token` * `noAuth`
+ // Auth type of the feed: * `basic` * `token` * `noAuth`
AuthType string `json:"authType"`
// Username for authType `basic`
Username string `json:"username,omitempty"`
diff --git a/lib/model_get_external_feed_by_uuid_headers.go b/lib/model_get_external_feed_by_uuid_headers.go
index 2b51a49..95377ba 100644
--- a/lib/model_get_external_feed_by_uuid_headers.go
+++ b/lib/model_get_external_feed_by_uuid_headers.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetExternalFeedByUuidHeaders struct {
// Name of the header
diff --git a/lib/model_get_folder.go b/lib/model_get_folder.go
index f5e9fc5..59366fa 100644
--- a/lib/model_get_folder.go
+++ b/lib/model_get_folder.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetFolder struct {
// ID of the folder
diff --git a/lib/model_get_folder_lists.go b/lib/model_get_folder_lists.go
index c3e55bf..2aec4d1 100644
--- a/lib/model_get_folder_lists.go
+++ b/lib/model_get_folder_lists.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetFolderLists struct {
Lists []interface{} `json:"lists,omitempty"`
diff --git a/lib/model_get_folders.go b/lib/model_get_folders.go
index 79320f7..7f452f9 100644
--- a/lib/model_get_folders.go
+++ b/lib/model_get_folders.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetFolders struct {
Folders []interface{} `json:"folders,omitempty"`
diff --git a/lib/model_get_inbound_email_events.go b/lib/model_get_inbound_email_events.go
index b001115..ce0acfb 100644
--- a/lib/model_get_inbound_email_events.go
+++ b/lib/model_get_inbound_email_events.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetInboundEmailEvents struct {
Events []GetInboundEmailEventsEvents `json:"events,omitempty"`
diff --git a/lib/model_get_inbound_email_events_by_uuid.go b/lib/model_get_inbound_email_events_by_uuid.go
index c0f2f2a..cbb57b1 100644
--- a/lib/model_get_inbound_email_events_by_uuid.go
+++ b/lib/model_get_inbound_email_events_by_uuid.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"time"
@@ -25,7 +25,7 @@ type GetInboundEmailEventsByUuid struct {
Sender string `json:"sender,omitempty"`
// Value of the Message-ID header. This will be present only after the processing is done.
MessageId string `json:"messageId,omitempty"`
- // Value of the Subject header. This will be present only after the processing is done.
+ // Value of the Subject header. This will be present only after the processing is done.
Subject string `json:"subject,omitempty"`
// List of attachments of the email. This will be present only after the processing is done.
Attachments []GetInboundEmailEventsByUuidAttachments `json:"attachments,omitempty"`
diff --git a/lib/model_get_inbound_email_events_by_uuid_attachments.go b/lib/model_get_inbound_email_events_by_uuid_attachments.go
index a0ad759..51c7197 100644
--- a/lib/model_get_inbound_email_events_by_uuid_attachments.go
+++ b/lib/model_get_inbound_email_events_by_uuid_attachments.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetInboundEmailEventsByUuidAttachments struct {
// filename specified in the Content-Disposition header of the attachment
diff --git a/lib/model_get_inbound_email_events_by_uuid_logs.go b/lib/model_get_inbound_email_events_by_uuid_logs.go
index 0ae0469..50536ae 100644
--- a/lib/model_get_inbound_email_events_by_uuid_logs.go
+++ b/lib/model_get_inbound_email_events_by_uuid_logs.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"time"
diff --git a/lib/model_get_inbound_email_events_events.go b/lib/model_get_inbound_email_events_events.go
index eecfc5a..a86c0e1 100644
--- a/lib/model_get_inbound_email_events_events.go
+++ b/lib/model_get_inbound_email_events_events.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"time"
diff --git a/lib/model_get_invited_users_list.go b/lib/model_get_invited_users_list.go
index eb9367f..df88e18 100644
--- a/lib/model_get_invited_users_list.go
+++ b/lib/model_get_invited_users_list.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetInvitedUsersList struct {
// Get invited users list
diff --git a/lib/model_get_invited_users_list_feature_access.go b/lib/model_get_invited_users_list_feature_access.go
index a3ce540..0ddead0 100644
--- a/lib/model_get_invited_users_list_feature_access.go
+++ b/lib/model_get_invited_users_list_feature_access.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Feature accessiblity given to the user.
type GetInvitedUsersListFeatureAccess struct {
diff --git a/lib/model_get_invited_users_list_users.go b/lib/model_get_invited_users_list_users.go
index 95f40d3..d94ffcf 100644
--- a/lib/model_get_invited_users_list_users.go
+++ b/lib/model_get_invited_users_list_users.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetInvitedUsersListUsers struct {
// Email address of the user.
@@ -16,6 +16,6 @@ type GetInvitedUsersListUsers struct {
// Flag for indicating is user owner of the organization.
IsOwner string `json:"is_owner"`
// Status of the invited user.
- Status string `json:"status"`
+ Status string `json:"status"`
FeatureAccess *GetInvitedUsersListFeatureAccess `json:"feature_access"`
}
diff --git a/lib/model_get_ip.go b/lib/model_get_ip.go
index b74311f..5dd1a97 100644
--- a/lib/model_get_ip.go
+++ b/lib/model_get_ip.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetIp struct {
// ID of the dedicated IP
diff --git a/lib/model_get_ip_from_sender.go b/lib/model_get_ip_from_sender.go
index 4be45a0..4924628 100644
--- a/lib/model_get_ip_from_sender.go
+++ b/lib/model_get_ip_from_sender.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetIpFromSender struct {
// ID of the dedicated IP
diff --git a/lib/model_get_ips.go b/lib/model_get_ips.go
index 29a9175..fe4f77b 100644
--- a/lib/model_get_ips.go
+++ b/lib/model_get_ips.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetIps struct {
// Dedicated IP(s) available on your account
diff --git a/lib/model_get_ips_from_sender.go b/lib/model_get_ips_from_sender.go
index fc8a518..764031f 100644
--- a/lib/model_get_ips_from_sender.go
+++ b/lib/model_get_ips_from_sender.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetIpsFromSender struct {
// Dedicated IP(s) linked to a sender
diff --git a/lib/model_get_list.go b/lib/model_get_list.go
index 7e0249c..c53aa8f 100644
--- a/lib/model_get_list.go
+++ b/lib/model_get_list.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetList struct {
// ID of the list
diff --git a/lib/model_get_lists.go b/lib/model_get_lists.go
index c40a61a..667ccae 100644
--- a/lib/model_get_lists.go
+++ b/lib/model_get_lists.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetLists struct {
// Listing of all the lists available in your account
diff --git a/lib/model_get_orders.go b/lib/model_get_orders.go
index ce778fa..2d02e6d 100644
--- a/lib/model_get_orders.go
+++ b/lib/model_get_orders.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetOrders struct {
Orders []interface{} `json:"orders,omitempty"`
diff --git a/lib/model_get_payment_request.go b/lib/model_get_payment_request.go
index 32ce7b5..89aa681 100644
--- a/lib/model_get_payment_request.go
+++ b/lib/model_get_payment_request.go
@@ -1,25 +1,25 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetPaymentRequest struct {
- // Reference of the payment request, it will appear on the payment page.
+ // Reference of the payment request, it will appear on the payment page.
Reference string `json:"reference"`
// Status of the payment request.
- Status string `json:"status"`
+ Status string `json:"status"`
Configuration *Configuration `json:"configuration,omitempty"`
- // Brevo ID of the contact requested to pay.
+ // Brevo ID of the contact requested to pay.
ContactId int64 `json:"contactId,omitempty"`
- // number of reminders sent.
- NumberOfRemindersSent int64 `json:"numberOfRemindersSent,omitempty"`
- Cart *Cart `json:"cart"`
- Notification *Notification `json:"notification"`
+ // number of reminders sent.
+ NumberOfRemindersSent int64 `json:"numberOfRemindersSent,omitempty"`
+ Cart *Cart `json:"cart"`
+ Notification *Notification `json:"notification"`
}
diff --git a/lib/model_get_process.go b/lib/model_get_process.go
index b101c78..4945f40 100644
--- a/lib/model_get_process.go
+++ b/lib/model_get_process.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetProcess struct {
// Id of the process
diff --git a/lib/model_get_processes.go b/lib/model_get_processes.go
index 82cca3e..59bb4e8 100644
--- a/lib/model_get_processes.go
+++ b/lib/model_get_processes.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetProcesses struct {
// List of processes available on your account
diff --git a/lib/model_get_product_details.go b/lib/model_get_product_details.go
index 0b51ebe..7a60a82 100644
--- a/lib/model_get_product_details.go
+++ b/lib/model_get_product_details.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetProductDetails struct {
// Product ID for which you requested the details
diff --git a/lib/model_get_products.go b/lib/model_get_products.go
index 5a6f206..1e4ed09 100644
--- a/lib/model_get_products.go
+++ b/lib/model_get_products.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetProducts struct {
Products []interface{} `json:"products"`
diff --git a/lib/model_get_reports.go b/lib/model_get_reports.go
index 0949d14..2fb8ff4 100644
--- a/lib/model_get_reports.go
+++ b/lib/model_get_reports.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetReports struct {
Reports []GetReportsReports `json:"reports,omitempty"`
diff --git a/lib/model_get_reports_reports.go b/lib/model_get_reports_reports.go
index 5d690b9..8ee084a 100644
--- a/lib/model_get_reports_reports.go
+++ b/lib/model_get_reports_reports.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetReportsReports struct {
// Date of the statistics
diff --git a/lib/model_get_scheduled_email_by_batch_id.go b/lib/model_get_scheduled_email_by_batch_id.go
index 4482949..da30e91 100644
--- a/lib/model_get_scheduled_email_by_batch_id.go
+++ b/lib/model_get_scheduled_email_by_batch_id.go
@@ -1,17 +1,17 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetScheduledEmailByBatchId struct {
// Total number of batches
- Count int32 `json:"count,omitempty"`
+ Count int32 `json:"count,omitempty"`
Batches []GetScheduledEmailByBatchIdBatches `json:"batches,omitempty"`
}
diff --git a/lib/model_get_scheduled_email_by_batch_id_batches.go b/lib/model_get_scheduled_email_by_batch_id_batches.go
index 321231f..6aab8ee 100644
--- a/lib/model_get_scheduled_email_by_batch_id_batches.go
+++ b/lib/model_get_scheduled_email_by_batch_id_batches.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"time"
diff --git a/lib/model_get_scheduled_email_by_message_id.go b/lib/model_get_scheduled_email_by_message_id.go
index 96ce619..076f09d 100644
--- a/lib/model_get_scheduled_email_by_message_id.go
+++ b/lib/model_get_scheduled_email_by_message_id.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"time"
diff --git a/lib/model_get_segments.go b/lib/model_get_segments.go
index ca2c1e3..2d41b7e 100644
--- a/lib/model_get_segments.go
+++ b/lib/model_get_segments.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetSegments struct {
Segments *GetSegmentsSegments `json:"segments,omitempty"`
diff --git a/lib/model_get_segments_segments.go b/lib/model_get_segments_segments.go
index 1505410..a6e27a3 100644
--- a/lib/model_get_segments_segments.go
+++ b/lib/model_get_segments_segments.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetSegmentsSegments struct {
// ID of the list
diff --git a/lib/model_get_senders_list.go b/lib/model_get_senders_list.go
index 803e50a..63601e7 100644
--- a/lib/model_get_senders_list.go
+++ b/lib/model_get_senders_list.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetSendersList struct {
// List of the senders available in your account
diff --git a/lib/model_get_senders_list_ips.go b/lib/model_get_senders_list_ips.go
index 927b31d..01feb32 100644
--- a/lib/model_get_senders_list_ips.go
+++ b/lib/model_get_senders_list_ips.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetSendersListIps struct {
// Dedicated IP available in your account
diff --git a/lib/model_get_senders_list_senders.go b/lib/model_get_senders_list_senders.go
index 0728a54..27b5808 100644
--- a/lib/model_get_senders_list_senders.go
+++ b/lib/model_get_senders_list_senders.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetSendersListSenders struct {
// Id of the sender
diff --git a/lib/model_get_shared_template_url.go b/lib/model_get_shared_template_url.go
index f039899..b75ebaa 100644
--- a/lib/model_get_shared_template_url.go
+++ b/lib/model_get_shared_template_url.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetSharedTemplateUrl struct {
// A unique URL for the email campaign or transactional template. This URL can be shared with other Brevo users.
diff --git a/lib/model_get_sms_campaign.go b/lib/model_get_sms_campaign.go
index 7b691bf..135681f 100644
--- a/lib/model_get_sms_campaign.go
+++ b/lib/model_get_sms_campaign.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetSmsCampaign struct {
// ID of the SMS Campaign
diff --git a/lib/model_get_sms_campaign_overview.go b/lib/model_get_sms_campaign_overview.go
index 30ae7ee..dd415cc 100644
--- a/lib/model_get_sms_campaign_overview.go
+++ b/lib/model_get_sms_campaign_overview.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetSmsCampaignOverview struct {
// ID of the SMS Campaign
diff --git a/lib/model_get_sms_campaign_stats.go b/lib/model_get_sms_campaign_stats.go
index 63369ca..d315d6a 100644
--- a/lib/model_get_sms_campaign_stats.go
+++ b/lib/model_get_sms_campaign_stats.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetSmsCampaignStats struct {
// Number of delivered SMS
diff --git a/lib/model_get_sms_campaigns.go b/lib/model_get_sms_campaigns.go
index 85bf3f3..443d404 100644
--- a/lib/model_get_sms_campaigns.go
+++ b/lib/model_get_sms_campaigns.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetSmsCampaigns struct {
Campaigns []interface{} `json:"campaigns,omitempty"`
diff --git a/lib/model_get_sms_event_report.go b/lib/model_get_sms_event_report.go
index 825b4df..baa4b22 100644
--- a/lib/model_get_sms_event_report.go
+++ b/lib/model_get_sms_event_report.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetSmsEventReport struct {
Events []GetSmsEventReportEvents `json:"events,omitempty"`
diff --git a/lib/model_get_sms_event_report_events.go b/lib/model_get_sms_event_report_events.go
index d31404b..c442e21 100644
--- a/lib/model_get_sms_event_report_events.go
+++ b/lib/model_get_sms_event_report_events.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetSmsEventReportEvents struct {
// Phone number which has generated the event
@@ -21,7 +21,7 @@ type GetSmsEventReportEvents struct {
Event string `json:"event,omitempty"`
// Reason of bounce (only available if the event is hardbounce or softbounce)
Reason string `json:"reason,omitempty"`
- Reply string `json:"reply,omitempty"`
+ Reply string `json:"reply,omitempty"`
// Tag of the SMS which generated the event
Tag string `json:"tag,omitempty"`
}
diff --git a/lib/model_get_smtp_template_overview.go b/lib/model_get_smtp_template_overview.go
index a6f548a..8c718e6 100644
--- a/lib/model_get_smtp_template_overview.go
+++ b/lib/model_get_smtp_template_overview.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetSmtpTemplateOverview struct {
// ID of the template
@@ -20,8 +20,8 @@ type GetSmtpTemplateOverview struct {
// Status of template (true=active, false=inactive)
IsActive bool `json:"isActive"`
// Status of test sending for the template (true=test email has been sent, false=test email has not been sent)
- TestSent bool `json:"testSent"`
- Sender *GetSmtpTemplateOverviewSender `json:"sender"`
+ TestSent bool `json:"testSent"`
+ Sender *GetSmtpTemplateOverviewSender `json:"sender"`
// Email defined as the \"Reply to\" for the template
ReplyTo string `json:"replyTo"`
// Customisation of the \"to\" field for the template
diff --git a/lib/model_get_smtp_template_overview_sender.go b/lib/model_get_smtp_template_overview_sender.go
index b6e2049..592a27e 100644
--- a/lib/model_get_smtp_template_overview_sender.go
+++ b/lib/model_get_smtp_template_overview_sender.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetSmtpTemplateOverviewSender struct {
// From email for the template
diff --git a/lib/model_get_smtp_templates.go b/lib/model_get_smtp_templates.go
index 718c846..3346598 100644
--- a/lib/model_get_smtp_templates.go
+++ b/lib/model_get_smtp_templates.go
@@ -1,17 +1,17 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetSmtpTemplates struct {
// Count of transactional email templates
- Count int64 `json:"count,omitempty"`
+ Count int64 `json:"count,omitempty"`
Templates []GetSmtpTemplateOverview `json:"templates,omitempty"`
}
diff --git a/lib/model_get_sso_token.go b/lib/model_get_sso_token.go
index b91f6ff..7993e8b 100644
--- a/lib/model_get_sso_token.go
+++ b/lib/model_get_sso_token.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetSsoToken struct {
// Session token, it will remain valid for 15 days.
diff --git a/lib/model_get_stats_by_browser.go b/lib/model_get_stats_by_browser.go
index 81882b1..00d9c1d 100644
--- a/lib/model_get_stats_by_browser.go
+++ b/lib/model_get_stats_by_browser.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetStatsByBrowser struct {
}
diff --git a/lib/model_get_stats_by_device.go b/lib/model_get_stats_by_device.go
index a9f07bd..9d05f7e 100644
--- a/lib/model_get_stats_by_device.go
+++ b/lib/model_get_stats_by_device.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetStatsByDevice struct {
// Statistics of the campaign on the basis of desktop devices
diff --git a/lib/model_get_stats_by_domain.go b/lib/model_get_stats_by_domain.go
index 029e8e5..639c290 100644
--- a/lib/model_get_stats_by_domain.go
+++ b/lib/model_get_stats_by_domain.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetStatsByDomain struct {
}
diff --git a/lib/model_get_transac_aggregated_sms_report.go b/lib/model_get_transac_aggregated_sms_report.go
index ab40dba..2dae503 100644
--- a/lib/model_get_transac_aggregated_sms_report.go
+++ b/lib/model_get_transac_aggregated_sms_report.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetTransacAggregatedSmsReport struct {
// Time frame of the report
diff --git a/lib/model_get_transac_blocked_contacts.go b/lib/model_get_transac_blocked_contacts.go
index aa3d250..7ee0a9e 100644
--- a/lib/model_get_transac_blocked_contacts.go
+++ b/lib/model_get_transac_blocked_contacts.go
@@ -1,17 +1,17 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetTransacBlockedContacts struct {
// Count of blocked or unsubscribed contact
- Count int64 `json:"count,omitempty"`
+ Count int64 `json:"count,omitempty"`
Contacts []GetTransacBlockedContactsContacts `json:"contacts,omitempty"`
}
diff --git a/lib/model_get_transac_blocked_contacts_contacts.go b/lib/model_get_transac_blocked_contacts_contacts.go
index 29aacc1..843975f 100644
--- a/lib/model_get_transac_blocked_contacts_contacts.go
+++ b/lib/model_get_transac_blocked_contacts_contacts.go
@@ -1,21 +1,21 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetTransacBlockedContactsContacts struct {
// Email address of the blocked or unsubscribed contact
Email string `json:"email"`
// Sender email address of the blocked or unsubscribed contact
- SenderEmail string `json:"senderEmail"`
- Reason *GetTransacBlockedContactsReason `json:"reason"`
+ SenderEmail string `json:"senderEmail"`
+ Reason *GetTransacBlockedContactsReason `json:"reason"`
// Date when the contact was blocked or unsubscribed on
BlockedAt string `json:"blockedAt"`
}
diff --git a/lib/model_get_transac_blocked_contacts_reason.go b/lib/model_get_transac_blocked_contacts_reason.go
index d054287..5aac5f1 100644
--- a/lib/model_get_transac_blocked_contacts_reason.go
+++ b/lib/model_get_transac_blocked_contacts_reason.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Reason for blocking / unsubscribing
type GetTransacBlockedContactsReason struct {
diff --git a/lib/model_get_transac_email_content.go b/lib/model_get_transac_email_content.go
index 7d1a5bc..99d19f4 100644
--- a/lib/model_get_transac_email_content.go
+++ b/lib/model_get_transac_email_content.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetTransacEmailContent struct {
// Email address to which transactional email has been sent
diff --git a/lib/model_get_transac_email_content_events.go b/lib/model_get_transac_email_content_events.go
index 273b493..98f8f00 100644
--- a/lib/model_get_transac_email_content_events.go
+++ b/lib/model_get_transac_email_content_events.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetTransacEmailContentEvents struct {
// Name of the event that occurred on the sent email
diff --git a/lib/model_get_transac_emails_list.go b/lib/model_get_transac_emails_list.go
index b69ff28..3ecddb7 100644
--- a/lib/model_get_transac_emails_list.go
+++ b/lib/model_get_transac_emails_list.go
@@ -1,17 +1,17 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetTransacEmailsList struct {
// Total number of transactional emails available on your account according to the passed filter
- Count int64 `json:"count,omitempty"`
+ Count int64 `json:"count,omitempty"`
TransactionalEmails []GetTransacEmailsListTransactionalEmails `json:"transactionalEmails,omitempty"`
}
diff --git a/lib/model_get_transac_emails_list_transactional_emails.go b/lib/model_get_transac_emails_list_transactional_emails.go
index 46b08b6..a83d19c 100644
--- a/lib/model_get_transac_emails_list_transactional_emails.go
+++ b/lib/model_get_transac_emails_list_transactional_emails.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetTransacEmailsListTransactionalEmails struct {
// Email address to which transactional email has been sent
diff --git a/lib/model_get_transac_sms_report.go b/lib/model_get_transac_sms_report.go
index 6159a19..7570348 100644
--- a/lib/model_get_transac_sms_report.go
+++ b/lib/model_get_transac_sms_report.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetTransacSmsReport struct {
Reports []GetTransacSmsReportReports `json:"reports,omitempty"`
diff --git a/lib/model_get_transac_sms_report_reports.go b/lib/model_get_transac_sms_report_reports.go
index 3debb83..2c04dda 100644
--- a/lib/model_get_transac_sms_report_reports.go
+++ b/lib/model_get_transac_sms_report_reports.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetTransacSmsReportReports struct {
// Date for which statistics are retrieved
diff --git a/lib/model_get_user_permission.go b/lib/model_get_user_permission.go
index 5eb9082..411850d 100644
--- a/lib/model_get_user_permission.go
+++ b/lib/model_get_user_permission.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Check user permission
type GetUserPermission struct {
diff --git a/lib/model_get_user_permission_privileges.go b/lib/model_get_user_permission_privileges.go
index c69a200..6395752 100644
--- a/lib/model_get_user_permission_privileges.go
+++ b/lib/model_get_user_permission_privileges.go
@@ -1,16 +1,16 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetUserPermissionPrivileges struct {
- Feature string `json:"feature"`
+ Feature string `json:"feature"`
Permissions []string `json:"permissions"`
}
diff --git a/lib/model_get_wa_templates.go b/lib/model_get_wa_templates.go
index 7c70bf1..e83e5c6 100644
--- a/lib/model_get_wa_templates.go
+++ b/lib/model_get_wa_templates.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetWaTemplates struct {
Templates []GetWaTemplatesTemplates `json:"templates"`
diff --git a/lib/model_get_wa_templates_templates.go b/lib/model_get_wa_templates_templates.go
index c075be9..075e428 100644
--- a/lib/model_get_wa_templates_templates.go
+++ b/lib/model_get_wa_templates_templates.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetWaTemplatesTemplates struct {
// id of the template
diff --git a/lib/model_get_webhook.go b/lib/model_get_webhook.go
index 836f469..93061d3 100644
--- a/lib/model_get_webhook.go
+++ b/lib/model_get_webhook.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetWebhook struct {
// URL of the webhook
@@ -16,8 +16,8 @@ type GetWebhook struct {
// ID of the webhook
Id int64 `json:"id"`
// Description of the webhook
- Description string `json:"description"`
- Events []string `json:"events"`
+ Description string `json:"description"`
+ Events []string `json:"events"`
// Type of webhook (marketing or transactional)
Type_ string `json:"type"`
// Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ)
@@ -25,8 +25,8 @@ type GetWebhook struct {
// Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ)
ModifiedAt string `json:"modifiedAt"`
// To send batched webhooks
- Batched bool `json:"batched,omitempty"`
- Auth *GetWebhookAuth `json:"auth,omitempty"`
+ Batched bool `json:"batched,omitempty"`
+ Auth *GetWebhookAuth `json:"auth,omitempty"`
// Custom headers to be send with webhooks
Headers []GetWebhookHeaders `json:"headers,omitempty"`
}
diff --git a/lib/model_get_webhook_auth.go b/lib/model_get_webhook_auth.go
index 9f5b717..f6abb62 100644
--- a/lib/model_get_webhook_auth.go
+++ b/lib/model_get_webhook_auth.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Add authentication on webhook url
type GetWebhookAuth struct {
diff --git a/lib/model_get_webhook_headers.go b/lib/model_get_webhook_headers.go
index d99d56d..82a4928 100644
--- a/lib/model_get_webhook_headers.go
+++ b/lib/model_get_webhook_headers.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetWebhookHeaders struct {
// Header key name
diff --git a/lib/model_get_webhooks.go b/lib/model_get_webhooks.go
index 4e92d54..65fcf33 100644
--- a/lib/model_get_webhooks.go
+++ b/lib/model_get_webhooks.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetWebhooks struct {
Webhooks []interface{} `json:"webhooks"`
diff --git a/lib/model_get_whats_app_config.go b/lib/model_get_whats_app_config.go
index 989faab..9b15f4f 100644
--- a/lib/model_get_whats_app_config.go
+++ b/lib/model_get_whats_app_config.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetWhatsAppConfig struct {
// Id of the WhatsApp business account
diff --git a/lib/model_get_whatsapp_campaign_overview.go b/lib/model_get_whatsapp_campaign_overview.go
index 4f6d8ba..e5ae210 100644
--- a/lib/model_get_whatsapp_campaign_overview.go
+++ b/lib/model_get_whatsapp_campaign_overview.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetWhatsappCampaignOverview struct {
// ID of the WhatsApp Campaign
@@ -20,9 +20,9 @@ type GetWhatsappCampaignOverview struct {
// UTC date-time on which WhatsApp campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format
ScheduledAt string `json:"scheduledAt,omitempty"`
// Sender of the WhatsApp Campaign
- SenderNumber string `json:"senderNumber"`
- Stats *WhatsappCampStats `json:"stats,omitempty"`
- Template *WhatsappCampTemplate `json:"template"`
+ SenderNumber string `json:"senderNumber"`
+ Stats *WhatsappCampStats `json:"stats,omitempty"`
+ Template *WhatsappCampTemplate `json:"template"`
// Creation UTC date-time of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)
CreatedAt string `json:"createdAt"`
// UTC date-time of last modification of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)
diff --git a/lib/model_get_whatsapp_campaigns.go b/lib/model_get_whatsapp_campaigns.go
index 900eb0f..9b4e5d1 100644
--- a/lib/model_get_whatsapp_campaigns.go
+++ b/lib/model_get_whatsapp_campaigns.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetWhatsappCampaigns struct {
Campaigns []GetWhatsappCampaignsCampaigns `json:"campaigns,omitempty"`
diff --git a/lib/model_get_whatsapp_campaigns_campaigns.go b/lib/model_get_whatsapp_campaigns_campaigns.go
index bf10f3c..c1ae843 100644
--- a/lib/model_get_whatsapp_campaigns_campaigns.go
+++ b/lib/model_get_whatsapp_campaigns_campaigns.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetWhatsappCampaignsCampaigns struct {
// ID of the WhatsApp Campaign
@@ -26,8 +26,8 @@ type GetWhatsappCampaignsCampaigns struct {
// Count of invalidated contacts
InvalidatedContacts int64 `json:"invalidatedContacts,omitempty"`
// Read percentage of the the WhatsApp campaign created
- ReadPercentage float32 `json:"readPercentage,omitempty"`
- Stats *WhatsappCampStats `json:"stats,omitempty"`
+ ReadPercentage float32 `json:"readPercentage,omitempty"`
+ Stats *WhatsappCampStats `json:"stats,omitempty"`
// Creation UTC date-time of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)
CreatedAt string `json:"createdAt"`
// UTC date-time of last modification of the whatsapp template (YYYY-MM-DDTHH:mm:ss.SSSZ)
diff --git a/lib/model_get_whatsapp_event_report.go b/lib/model_get_whatsapp_event_report.go
index 1fd4e24..5276072 100644
--- a/lib/model_get_whatsapp_event_report.go
+++ b/lib/model_get_whatsapp_event_report.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetWhatsappEventReport struct {
Events []GetWhatsappEventReportEvents `json:"events,omitempty"`
diff --git a/lib/model_get_whatsapp_event_report_events.go b/lib/model_get_whatsapp_event_report_events.go
index e226927..5d1c0bd 100644
--- a/lib/model_get_whatsapp_event_report_events.go
+++ b/lib/model_get_whatsapp_event_report_events.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type GetWhatsappEventReportEvents struct {
// WhatsApp Number with country code. Example, 85264318721
diff --git a/lib/model_inline_response_200.go b/lib/model_inline_response_200.go
index c0c7d9a..4294c5f 100644
--- a/lib/model_inline_response_200.go
+++ b/lib/model_inline_response_200.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type InlineResponse200 struct {
Message string `json:"message,omitempty"`
diff --git a/lib/model_inline_response_200_1.go b/lib/model_inline_response_200_1.go
index 002c099..2d16707 100644
--- a/lib/model_inline_response_200_1.go
+++ b/lib/model_inline_response_200_1.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type InlineResponse2001 struct {
// Unique id of the group
diff --git a/lib/model_inline_response_200_2.go b/lib/model_inline_response_200_2.go
index b0ea723..3a87853 100644
--- a/lib/model_inline_response_200_2.go
+++ b/lib/model_inline_response_200_2.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Created company id
type InlineResponse2002 struct {
diff --git a/lib/model_inline_response_200_3.go b/lib/model_inline_response_200_3.go
index 940939a..aff3b6d 100644
--- a/lib/model_inline_response_200_3.go
+++ b/lib/model_inline_response_200_3.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type InlineResponse2003 struct {
// The ID of the import process
diff --git a/lib/model_inline_response_200_4.go b/lib/model_inline_response_200_4.go
index f8519cc..40824eb 100644
--- a/lib/model_inline_response_200_4.go
+++ b/lib/model_inline_response_200_4.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type InlineResponse2004 struct {
// ISO 4217 compliant display currency code
diff --git a/lib/model_inline_response_200_5.go b/lib/model_inline_response_200_5.go
index d386e43..807dced 100644
--- a/lib/model_inline_response_200_5.go
+++ b/lib/model_inline_response_200_5.go
@@ -1,17 +1,17 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type InlineResponse2005 struct {
// List of conversion attribution metrics
Results []ConversionSourceMetrics `json:"results"`
- Totals *InlineResponse2005Totals `json:"totals"`
+ Totals *InlineResponse2005Totals `json:"totals"`
}
diff --git a/lib/model_inline_response_200_5_totals.go b/lib/model_inline_response_200_5_totals.go
index c80987d..92b19f1 100644
--- a/lib/model_inline_response_200_5_totals.go
+++ b/lib/model_inline_response_200_5_totals.go
@@ -1,18 +1,18 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Attribution list aggregated totals
type InlineResponse2005Totals struct {
- OrdersCount float32 `json:"ordersCount"`
- Revenue float32 `json:"revenue"`
+ OrdersCount float32 `json:"ordersCount"`
+ Revenue float32 `json:"revenue"`
AverageBasket float32 `json:"averageBasket"`
}
diff --git a/lib/model_inline_response_200_6.go b/lib/model_inline_response_200_6.go
index bc81359..2facec6 100644
--- a/lib/model_inline_response_200_6.go
+++ b/lib/model_inline_response_200_6.go
@@ -1,16 +1,16 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type InlineResponse2006 struct {
ConversionSourceMetrics *ConversionSourceMetrics `json:"ConversionSourceMetrics,omitempty"`
- NewCustomersCount float32 `json:"newCustomersCount"`
+ NewCustomersCount float32 `json:"newCustomersCount"`
}
diff --git a/lib/model_inline_response_200_7.go b/lib/model_inline_response_200_7.go
index aa21df5..b674576 100644
--- a/lib/model_inline_response_200_7.go
+++ b/lib/model_inline_response_200_7.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type InlineResponse2007 struct {
// List of attributed products
diff --git a/lib/model_inline_response_200_8.go b/lib/model_inline_response_200_8.go
index eb0ca7f..08c7628 100644
--- a/lib/model_inline_response_200_8.go
+++ b/lib/model_inline_response_200_8.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type InlineResponse2008 struct {
// The id of the collection
diff --git a/lib/model_inline_response_201.go b/lib/model_inline_response_201.go
index fd228ea..aa82c8b 100644
--- a/lib/model_inline_response_201.go
+++ b/lib/model_inline_response_201.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type InlineResponse201 struct {
Id string `json:"id,omitempty"`
diff --git a/lib/model_inline_response_201_1.go b/lib/model_inline_response_201_1.go
index d4ea1de..a276a9a 100644
--- a/lib/model_inline_response_201_1.go
+++ b/lib/model_inline_response_201_1.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Created deal id
type InlineResponse2011 struct {
diff --git a/lib/model_inline_response_201_2.go b/lib/model_inline_response_201_2.go
index 0716696..b33a0a0 100644
--- a/lib/model_inline_response_201_2.go
+++ b/lib/model_inline_response_201_2.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Task Details
type InlineResponse2012 struct {
diff --git a/lib/model_inline_response_201_3.go b/lib/model_inline_response_201_3.go
index 8b1ad48..7d556f6 100644
--- a/lib/model_inline_response_201_3.go
+++ b/lib/model_inline_response_201_3.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type InlineResponse2013 struct {
// The id of the created collection
diff --git a/lib/model_inline_response_201_4.go b/lib/model_inline_response_201_4.go
index 99b1a08..8a90a33 100644
--- a/lib/model_inline_response_201_4.go
+++ b/lib/model_inline_response_201_4.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type InlineResponse2014 struct {
// messageId of sent message
diff --git a/lib/model_inline_response_201_5.go b/lib/model_inline_response_201_5.go
index 51aa964..58d2282 100644
--- a/lib/model_inline_response_201_5.go
+++ b/lib/model_inline_response_201_5.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type InlineResponse2015 struct {
// ID of the object created
diff --git a/lib/model_inline_response_400.go b/lib/model_inline_response_400.go
index 3332ad8..8f27c33 100644
--- a/lib/model_inline_response_400.go
+++ b/lib/model_inline_response_400.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type InlineResponse400 struct {
Message string `json:"message,omitempty"`
diff --git a/lib/model_invite_admin_user.go b/lib/model_invite_admin_user.go
index c1b88c8..bfacd4a 100644
--- a/lib/model_invite_admin_user.go
+++ b/lib/model_invite_admin_user.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type InviteAdminUser struct {
// Email address for the organization
@@ -16,6 +16,6 @@ type InviteAdminUser struct {
// All access to the features
AllFeaturesAccess bool `json:"all_features_access"`
// Ids of Group
- GroupIds []string `json:"groupIds,omitempty"`
+ GroupIds []string `json:"groupIds,omitempty"`
Privileges []InviteAdminUserPrivileges `json:"privileges"`
}
diff --git a/lib/model_invite_admin_user_privileges.go b/lib/model_invite_admin_user_privileges.go
index 49b592b..6263cfb 100644
--- a/lib/model_invite_admin_user_privileges.go
+++ b/lib/model_invite_admin_user_privileges.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Privileges given to the user
type InviteAdminUserPrivileges struct {
diff --git a/lib/model_inviteuser.go b/lib/model_inviteuser.go
index 011b405..8910c59 100644
--- a/lib/model_inviteuser.go
+++ b/lib/model_inviteuser.go
@@ -1,19 +1,19 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type Inviteuser struct {
// Email address for the organization
Email string `json:"email"`
// All access to the features
- AllFeaturesAccess bool `json:"all_features_access"`
- Privileges []InviteuserPrivileges `json:"privileges"`
+ AllFeaturesAccess bool `json:"all_features_access"`
+ Privileges []InviteuserPrivileges `json:"privileges"`
}
diff --git a/lib/model_inviteuser_privileges.go b/lib/model_inviteuser_privileges.go
index e3748d8..e0701b8 100644
--- a/lib/model_inviteuser_privileges.go
+++ b/lib/model_inviteuser_privileges.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Privileges given to the user
type InviteuserPrivileges struct {
diff --git a/lib/model_manage_ip.go b/lib/model_manage_ip.go
index 67e3b29..b85369e 100644
--- a/lib/model_manage_ip.go
+++ b/lib/model_manage_ip.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type ManageIp struct {
// Dedicated ID
diff --git a/lib/model_master_details_response.go b/lib/model_master_details_response.go
index 6576675..2564247 100644
--- a/lib/model_master_details_response.go
+++ b/lib/model_master_details_response.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type MasterDetailsResponse struct {
// Email id of master account
@@ -20,7 +20,7 @@ type MasterDetailsResponse struct {
// Currency code of the master account organization
CurrencyCode string `json:"currencyCode,omitempty"`
// Timezone of the master account organization
- Timezone string `json:"timezone,omitempty"`
+ Timezone string `json:"timezone,omitempty"`
BillingInfo *MasterDetailsResponseBillingInfo `json:"billingInfo,omitempty"`
- PlanInfo *MasterDetailsResponsePlanInfo `json:"planInfo,omitempty"`
+ PlanInfo *MasterDetailsResponsePlanInfo `json:"planInfo,omitempty"`
}
diff --git a/lib/model_master_details_response_billing_info.go b/lib/model_master_details_response_billing_info.go
index 246039b..a1a4323 100644
--- a/lib/model_master_details_response_billing_info.go
+++ b/lib/model_master_details_response_billing_info.go
@@ -1,21 +1,21 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Billing details of the master account organization
type MasterDetailsResponseBillingInfo struct {
// Billing email id of master account
Email string `json:"email,omitempty"`
// Company name of master account
- CompanyName string `json:"companyName,omitempty"`
- Name *MasterDetailsResponseBillingInfoName `json:"name,omitempty"`
- Address *MasterDetailsResponseBillingInfoAddress `json:"address,omitempty"`
+ CompanyName string `json:"companyName,omitempty"`
+ Name *MasterDetailsResponseBillingInfoName `json:"name,omitempty"`
+ Address *MasterDetailsResponseBillingInfoAddress `json:"address,omitempty"`
}
diff --git a/lib/model_master_details_response_billing_info_address.go b/lib/model_master_details_response_billing_info_address.go
index 1568c09..4909e43 100644
--- a/lib/model_master_details_response_billing_info_address.go
+++ b/lib/model_master_details_response_billing_info_address.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Billing address of master account
type MasterDetailsResponseBillingInfoAddress struct {
diff --git a/lib/model_master_details_response_billing_info_name.go b/lib/model_master_details_response_billing_info_name.go
index 1bc9228..d919574 100644
--- a/lib/model_master_details_response_billing_info_name.go
+++ b/lib/model_master_details_response_billing_info_name.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Billing name of master account holder
type MasterDetailsResponseBillingInfoName struct {
diff --git a/lib/model_master_details_response_plan_info.go b/lib/model_master_details_response_plan_info.go
index a12f4b2..2124c0e 100644
--- a/lib/model_master_details_response_plan_info.go
+++ b/lib/model_master_details_response_plan_info.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Plan details
type MasterDetailsResponsePlanInfo struct {
diff --git a/lib/model_master_details_response_plan_info_features.go b/lib/model_master_details_response_plan_info_features.go
index 58e495a..ed71a4c 100644
--- a/lib/model_master_details_response_plan_info_features.go
+++ b/lib/model_master_details_response_plan_info_features.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type MasterDetailsResponsePlanInfoFeatures struct {
// Name of the feature
diff --git a/lib/model_note.go b/lib/model_note.go
index 9c449b8..2f1d533 100644
--- a/lib/model_note.go
+++ b/lib/model_note.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"time"
diff --git a/lib/model_note_data.go b/lib/model_note_data.go
index 34a28b4..c496185 100644
--- a/lib/model_note_data.go
+++ b/lib/model_note_data.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Note data to be saved
type NoteData struct {
diff --git a/lib/model_note_id.go b/lib/model_note_id.go
index 97708cb..2d3a67f 100644
--- a/lib/model_note_id.go
+++ b/lib/model_note_id.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Updated Note ID
type NoteId struct {
diff --git a/lib/model_note_list.go b/lib/model_note_list.go
index f377e37..ca4c23c 100644
--- a/lib/model_note_list.go
+++ b/lib/model_note_list.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// List of notes
type NoteList struct {
diff --git a/lib/model_notification.go b/lib/model_notification.go
index 3f77b10..346f4cf 100644
--- a/lib/model_notification.go
+++ b/lib/model_notification.go
@@ -1,19 +1,19 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
-// Optional. Use this object if you want to let Brevo send an email to the contact, with the payment request URL. If empty, no notifications (message and reminders) will be sent.
+// Optional. Use this object if you want to let Brevo send an email to the contact, with the payment request URL. If empty, no notifications (message and reminders) will be sent.
type Notification struct {
- // Channel used to send the notifications.
+ // Channel used to send the notifications.
Channel string `json:"channel"`
- // Use this field if you want to give more context to your contact about the payment request.
+ // Use this field if you want to give more context to your contact about the payment request.
Text string `json:"text"`
}
diff --git a/lib/model_order.go b/lib/model_order.go
index d4083e1..725930a 100644
--- a/lib/model_order.go
+++ b/lib/model_order.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type Order struct {
// Unique ID of the order.
@@ -22,10 +22,10 @@ type Order struct {
// Total amount of the order, including all shipping expenses, tax and the price of items.
Amount float32 `json:"amount"`
// ID of store where the order is placed
- StoreId string `json:"storeId,omitempty"`
+ StoreId string `json:"storeId,omitempty"`
Products []OrderProducts `json:"products"`
// Email of the contact, Mandatory if \"phone\" field is not passed in \"billing\" parameter.
- Email string `json:"email,omitempty"`
+ Email string `json:"email,omitempty"`
Billing *OrderBilling `json:"billing,omitempty"`
// Coupons applied to the order. Stored case insensitive.
Coupons []string `json:"coupons,omitempty"`
diff --git a/lib/model_order_batch.go b/lib/model_order_batch.go
index ac5dd95..1c7b72d 100644
--- a/lib/model_order_batch.go
+++ b/lib/model_order_batch.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type OrderBatch struct {
// array of order objects
diff --git a/lib/model_order_billing.go b/lib/model_order_billing.go
index 3a8dd9b..04a5bf3 100644
--- a/lib/model_order_billing.go
+++ b/lib/model_order_billing.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Billing details of an order.
type OrderBilling struct {
diff --git a/lib/model_order_products.go b/lib/model_order_products.go
index e42049c..6a51421 100644
--- a/lib/model_order_products.go
+++ b/lib/model_order_products.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Details for the Products in an order.
type OrderProducts struct {
diff --git a/lib/model_otp.go b/lib/model_otp.go
index 10208f7..bde9561 100644
--- a/lib/model_otp.go
+++ b/lib/model_otp.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type Otp struct {
// 6 digit OTP received on email
diff --git a/lib/model_pipeline.go b/lib/model_pipeline.go
index e970895..dce08f4 100644
--- a/lib/model_pipeline.go
+++ b/lib/model_pipeline.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// List of stages
type Pipeline struct {
diff --git a/lib/model_pipeline_stage.go b/lib/model_pipeline_stage.go
index b9c62c5..39aaa38 100644
--- a/lib/model_pipeline_stage.go
+++ b/lib/model_pipeline_stage.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// List of stages
type PipelineStage struct {
diff --git a/lib/model_pipelines.go b/lib/model_pipelines.go
index b607a08..6f81262 100644
--- a/lib/model_pipelines.go
+++ b/lib/model_pipelines.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// List of pipeline
type Pipelines struct {
diff --git a/lib/model_post_contact_info.go b/lib/model_post_contact_info.go
index 532bc8e..9cecc8d 100644
--- a/lib/model_post_contact_info.go
+++ b/lib/model_post_contact_info.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type PostContactInfo struct {
Contacts *PostContactInfoContacts `json:"contacts"`
diff --git a/lib/model_post_contact_info_contacts.go b/lib/model_post_contact_info_contacts.go
index 823c9a6..84ef6fc 100644
--- a/lib/model_post_contact_info_contacts.go
+++ b/lib/model_post_contact_info_contacts.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type PostContactInfoContacts struct {
Success []string `json:"success,omitempty"`
diff --git a/lib/model_post_send_failed.go b/lib/model_post_send_failed.go
index b398814..dee6736 100644
--- a/lib/model_post_send_failed.go
+++ b/lib/model_post_send_failed.go
@@ -1,21 +1,21 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type PostSendFailed struct {
// Response code
Code int64 `json:"code"`
// Response message
- Message string `json:"message"`
- UnexistingEmails []string `json:"unexistingEmails,omitempty"`
+ Message string `json:"message"`
+ UnexistingEmails []string `json:"unexistingEmails,omitempty"`
WithoutListEmails []string `json:"withoutListEmails,omitempty"`
BlackListedEmails []string `json:"blackListedEmails,omitempty"`
}
diff --git a/lib/model_post_send_sms_test_failed.go b/lib/model_post_send_sms_test_failed.go
index 53a0031..49a5f11 100644
--- a/lib/model_post_send_sms_test_failed.go
+++ b/lib/model_post_send_sms_test_failed.go
@@ -1,20 +1,20 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type PostSendSmsTestFailed struct {
// Response code
Code int64 `json:"code"`
// Response message
- Message string `json:"message"`
- UnexistingSms []string `json:"unexistingSms,omitempty"`
+ Message string `json:"message"`
+ UnexistingSms []string `json:"unexistingSms,omitempty"`
WithoutListSms []string `json:"withoutListSms,omitempty"`
}
diff --git a/lib/model_put_revoke_user_permission.go b/lib/model_put_revoke_user_permission.go
index d067755..9e7eb1a 100644
--- a/lib/model_put_revoke_user_permission.go
+++ b/lib/model_put_revoke_user_permission.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Revoke user permission
type PutRevokeUserPermission struct {
diff --git a/lib/model_putresendcancelinvitation.go b/lib/model_putresendcancelinvitation.go
index 996acd4..9570a95 100644
--- a/lib/model_putresendcancelinvitation.go
+++ b/lib/model_putresendcancelinvitation.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Revoke user permission
type Putresendcancelinvitation struct {
diff --git a/lib/model_remaining_credit_model.go b/lib/model_remaining_credit_model.go
index c1cfa37..83c6fc2 100644
--- a/lib/model_remaining_credit_model.go
+++ b/lib/model_remaining_credit_model.go
@@ -1,16 +1,16 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type RemainingCreditModel struct {
- Child *RemainingCreditModelChild `json:"child"`
+ Child *RemainingCreditModelChild `json:"child"`
Reseller *RemainingCreditModelReseller `json:"reseller"`
}
diff --git a/lib/model_remaining_credit_model_child.go b/lib/model_remaining_credit_model_child.go
index cdba385..9307e14 100644
--- a/lib/model_remaining_credit_model_child.go
+++ b/lib/model_remaining_credit_model_child.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Credits remaining for child account
type RemainingCreditModelChild struct {
diff --git a/lib/model_remaining_credit_model_reseller.go b/lib/model_remaining_credit_model_reseller.go
index 7104545..57612ae 100644
--- a/lib/model_remaining_credit_model_reseller.go
+++ b/lib/model_remaining_credit_model_reseller.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type RemainingCreditModelReseller struct {
// SMS Credits remaining for reseller account
diff --git a/lib/model_remove_contact_from_list.go b/lib/model_remove_contact_from_list.go
index 0800bb2..79ee8ed 100644
--- a/lib/model_remove_contact_from_list.go
+++ b/lib/model_remove_contact_from_list.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type RemoveContactFromList struct {
// Required if 'all' is false. Emails to remove from a list. You can pass a maximum of 150 emails for removal in one request.
diff --git a/lib/model_remove_credits.go b/lib/model_remove_credits.go
index ce5f14e..9c29a34 100644
--- a/lib/model_remove_credits.go
+++ b/lib/model_remove_credits.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type RemoveCredits struct {
// Required if email credits are empty. SMS credits to be removed from the child account
diff --git a/lib/model_request_contact_export.go b/lib/model_request_contact_export.go
index 0d99042..6a5752e 100644
--- a/lib/model_request_contact_export.go
+++ b/lib/model_request_contact_export.go
@@ -1,18 +1,18 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type RequestContactExport struct {
// List of all the attributes that you want to export. These attributes must be present in your contact database. For example, ['fname', 'lname', 'email'].
- ExportAttributes []string `json:"exportAttributes,omitempty"`
+ ExportAttributes []string `json:"exportAttributes,omitempty"`
CustomContactFilter *RequestContactExportCustomContactFilter `json:"customContactFilter"`
// Webhook that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479
NotifyUrl string `json:"notifyUrl,omitempty"`
diff --git a/lib/model_request_contact_export_custom_contact_filter.go b/lib/model_request_contact_export_custom_contact_filter.go
index 0d83c2d..9c242dc 100644
--- a/lib/model_request_contact_export_custom_contact_filter.go
+++ b/lib/model_request_contact_export_custom_contact_filter.go
@@ -1,22 +1,22 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Set the filter for the contacts to be exported.
type RequestContactExportCustomContactFilter struct {
- // Mandatory if neither actionForEmailCampaigns nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on contacts as per the list id. * allContacts - Fetch the list of all contacts for a particular list. * subscribed & unsubscribed - Fetch the list of subscribed / unsubscribed (blacklisted via any means) contacts for a particular list. * unsubscribedPerList - Fetch the list of contacts that are unsubscribed from a particular list only.
+ // Mandatory if neither actionForEmailCampaigns nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on contacts as per the list id. * allContacts - Fetch the list of all contacts for a particular list. * subscribed & unsubscribed - Fetch the list of subscribed / unsubscribed (blacklisted via any means) contacts for a particular list. * unsubscribedPerList - Fetch the list of contacts that are unsubscribed from a particular list only.
ActionForContacts string `json:"actionForContacts,omitempty"`
- // Mandatory if neither actionForContacts nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on email campaigns. * openers & nonOpeners - emailCampaignId is mandatory. Fetch the list of readers / non-readers for a particular email campaign. * clickers & nonClickers - emailCampaignId is mandatory. Fetch the list of clickers / non-clickers for a particular email campaign. * unsubscribed - emailCampaignId is mandatory. Fetch the list of all unsubscribed (blacklisted via any means) contacts for a particular email campaign. * hardBounces & softBounces - emailCampaignId is optional. Fetch the list of hard bounces / soft bounces for a particular / all email campaign(s).
+ // Mandatory if neither actionForContacts nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on email campaigns. * openers & nonOpeners - emailCampaignId is mandatory. Fetch the list of readers / non-readers for a particular email campaign. * clickers & nonClickers - emailCampaignId is mandatory. Fetch the list of clickers / non-clickers for a particular email campaign. * unsubscribed - emailCampaignId is mandatory. Fetch the list of all unsubscribed (blacklisted via any means) contacts for a particular email campaign. * hardBounces & softBounces - emailCampaignId is optional. Fetch the list of hard bounces / soft bounces for a particular / all email campaign(s).
ActionForEmailCampaigns string `json:"actionForEmailCampaigns,omitempty"`
- // Mandatory if neither actionForContacts nor actionForEmailCampaigns is passed. This will export the contacts on the basis of provided action applied on sms campaigns. * unsubscribed - Fetch the list of all unsubscribed (blacklisted via any means) contacts for all / particular sms campaigns. * hardBounces & softBounces - Fetch the list of hard bounces / soft bounces for all / particular sms campaigns.
+ // Mandatory if neither actionForContacts nor actionForEmailCampaigns is passed. This will export the contacts on the basis of provided action applied on sms campaigns. * unsubscribed - Fetch the list of all unsubscribed (blacklisted via any means) contacts for all / particular sms campaigns. * hardBounces & softBounces - Fetch the list of hard bounces / soft bounces for all / particular sms campaigns.
ActionForSmsCampaigns string `json:"actionForSmsCampaigns,omitempty"`
// Mandatory if actionForContacts is passed, ignored otherwise. Id of the list for which the corresponding action shall be applied in the filter.
ListId int64 `json:"listId,omitempty"`
diff --git a/lib/model_request_contact_import.go b/lib/model_request_contact_import.go
index 0ac0c9c..a621161 100644
--- a/lib/model_request_contact_import.go
+++ b/lib/model_request_contact_import.go
@@ -1,27 +1,27 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type RequestContactImport struct {
// Mandatory if fileBody or jsonBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv, .json
FileUrl string `json:"fileUrl,omitempty"`
// Mandatory if fileUrl and jsonBody is not defined. CSV content to be imported. Use semicolon to separate multiple attributes. Maximum allowed file body size is 10MB . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files.
FileBody string `json:"fileBody,omitempty"`
- // **Mandatory if fileUrl and fileBody is not defined.** JSON content to be imported. **Maximum allowed json body size is 10MB** . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of json body size while parsing. Please use fileUrl instead to import bigger files.
+ // **Mandatory if fileUrl and fileBody is not defined.** JSON content to be imported. **Maximum allowed json body size is 10MB** . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of json body size while parsing. Please use fileUrl instead to import bigger files.
JsonBody []RequestContactImportJsonBody `json:"jsonBody,omitempty"`
// Mandatory if newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7].
ListIds []int64 `json:"listIds,omitempty"`
// URL that will be called once the import process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479
- NotifyUrl string `json:"notifyUrl,omitempty"`
- NewList *RequestContactImportNewList `json:"newList,omitempty"`
+ NotifyUrl string `json:"notifyUrl,omitempty"`
+ NewList *RequestContactImportNewList `json:"newList,omitempty"`
// To blacklist all the contacts for email
EmailBlacklist bool `json:"emailBlacklist,omitempty"`
// To disable email notification
diff --git a/lib/model_request_contact_import_json_body.go b/lib/model_request_contact_import_json_body.go
index e617c3a..f8c99b5 100644
--- a/lib/model_request_contact_import_json_body.go
+++ b/lib/model_request_contact_import_json_body.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type RequestContactImportJsonBody struct {
Email string `json:"email,omitempty"`
diff --git a/lib/model_request_contact_import_new_list.go b/lib/model_request_contact_import_new_list.go
index 148756f..dc6db89 100644
--- a/lib/model_request_contact_import_new_list.go
+++ b/lib/model_request_contact_import_new_list.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// To create a new list and import the contacts into it, pass the listName and an optional folderId.
type RequestContactImportNewList struct {
diff --git a/lib/model_request_sms_recipient_export.go b/lib/model_request_sms_recipient_export.go
index 3c69b50..79c1bce 100644
--- a/lib/model_request_sms_recipient_export.go
+++ b/lib/model_request_sms_recipient_export.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type RequestSmsRecipientExport struct {
// URL that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479
diff --git a/lib/model_schedule_smtp_email.go b/lib/model_schedule_smtp_email.go
index d0f5e7c..35e323d 100644
--- a/lib/model_schedule_smtp_email.go
+++ b/lib/model_schedule_smtp_email.go
@@ -1,18 +1,18 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type ScheduleSmtpEmail struct {
// Message ID of the transactional email scheduled
- MessageId string `json:"messageId,omitempty"`
+ MessageId string `json:"messageId,omitempty"`
MessageIds []string `json:"messageIds,omitempty"`
// Batch ID of the batch transactional email scheduled
BatchId string `json:"batchId,omitempty"`
diff --git a/lib/model_send_report.go b/lib/model_send_report.go
index f7e0a3f..a99da9f 100644
--- a/lib/model_send_report.go
+++ b/lib/model_send_report.go
@@ -1,17 +1,17 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type SendReport struct {
// Language of email content for campaign report sending.
- Language string `json:"language,omitempty"`
- Email *SendReportEmail `json:"email"`
+ Language string `json:"language,omitempty"`
+ Email *SendReportEmail `json:"email"`
}
diff --git a/lib/model_send_report_email.go b/lib/model_send_report_email.go
index af5e286..314787d 100644
--- a/lib/model_send_report_email.go
+++ b/lib/model_send_report_email.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Custom attributes for the report email.
type SendReportEmail struct {
diff --git a/lib/model_send_sms.go b/lib/model_send_sms.go
index 3622762..f48f01d 100644
--- a/lib/model_send_sms.go
+++ b/lib/model_send_sms.go
@@ -1,18 +1,18 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type SendSms struct {
Reference string `json:"reference"`
- MessageId int64 `json:"messageId"`
+ MessageId int64 `json:"messageId"`
// Count of SMS's to send multiple text messages
SmsCount int64 `json:"smsCount,omitempty"`
// SMS credits used per text message
diff --git a/lib/model_send_smtp_email.go b/lib/model_send_smtp_email.go
index 7d0578f..3d7f5ba 100644
--- a/lib/model_send_smtp_email.go
+++ b/lib/model_send_smtp_email.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"time"
diff --git a/lib/model_send_smtp_email_attachment.go b/lib/model_send_smtp_email_attachment.go
index 74dd39c..05b09de 100644
--- a/lib/model_send_smtp_email_attachment.go
+++ b/lib/model_send_smtp_email_attachment.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type SendSmtpEmailAttachment struct {
// Absolute url of the attachment (no local file).
diff --git a/lib/model_send_smtp_email_bcc.go b/lib/model_send_smtp_email_bcc.go
index 2403769..2de9369 100644
--- a/lib/model_send_smtp_email_bcc.go
+++ b/lib/model_send_smtp_email_bcc.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type SendSmtpEmailBcc struct {
// Email address of the recipient in bcc
diff --git a/lib/model_send_smtp_email_cc.go b/lib/model_send_smtp_email_cc.go
index da957e7..dc8bf99 100644
--- a/lib/model_send_smtp_email_cc.go
+++ b/lib/model_send_smtp_email_cc.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type SendSmtpEmailCc struct {
// Email address of the recipient in cc
diff --git a/lib/model_send_smtp_email_message_versions.go b/lib/model_send_smtp_email_message_versions.go
index d35aa17..77361e1 100644
--- a/lib/model_send_smtp_email_message_versions.go
+++ b/lib/model_send_smtp_email_message_versions.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type SendSmtpEmailMessageVersions struct {
// List of email addresses and names (_optional_) of the recipients. For example, [{\"name\":\"Jimmy\", \"email\":\"jimmy98@example.com\"}, {\"name\":\"Joe\", \"email\":\"joe@example.com\"}]
@@ -18,12 +18,12 @@ type SendSmtpEmailMessageVersions struct {
// List of email addresses and names (optional) of the recipients in bcc
Bcc []SendSmtpEmailBcc `json:"bcc,omitempty"`
// List of email addresses and names (optional) of the recipients in cc
- Cc []SendSmtpEmailCc `json:"cc,omitempty"`
+ Cc []SendSmtpEmailCc `json:"cc,omitempty"`
ReplyTo *SendSmtpEmailReplyTo1 `json:"replyTo,omitempty"`
- // Custom subject specific to message version
+ // Custom subject specific to message version
Subject string `json:"subject,omitempty"`
- // HTML body of the message. **Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed**
+ // HTML body of the message. **Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed**
HtmlContent string `json:"htmlContent,omitempty"`
- // Plain Text body of the message. **Ignored if 'templateId' is passed**
+ // Plain Text body of the message. **Ignored if 'templateId' is passed**
TextContent string `json:"textContent,omitempty"`
}
diff --git a/lib/model_send_smtp_email_reply_to.go b/lib/model_send_smtp_email_reply_to.go
index 5cf211e..03a09df 100644
--- a/lib/model_send_smtp_email_reply_to.go
+++ b/lib/model_send_smtp_email_reply_to.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Email (required), along with name (optional), on which transactional mail recipients will be able to reply back. For example, {\"email\":\"ann6533@example.com\", \"name\":\"Ann\"}.
type SendSmtpEmailReplyTo struct {
diff --git a/lib/model_send_smtp_email_reply_to_1.go b/lib/model_send_smtp_email_reply_to_1.go
index 59da7c9..e0ac92c 100644
--- a/lib/model_send_smtp_email_reply_to_1.go
+++ b/lib/model_send_smtp_email_reply_to_1.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Email (required), along with name (optional), on which transactional mail recipients will be able to reply back. For example, {\"email\":\"ann6533@example.com\", \"name\":\"Ann\"}
type SendSmtpEmailReplyTo1 struct {
diff --git a/lib/model_send_smtp_email_sender.go b/lib/model_send_smtp_email_sender.go
index 86ff659..bd9a8bf 100644
--- a/lib/model_send_smtp_email_sender.go
+++ b/lib/model_send_smtp_email_sender.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Mandatory if `templateId` is not passed. Pass `name` (optional) and `email` OR `id` of sender from which emails will be sent. `name` will be ignored if passed along with sender `id`. For example, {\"name\":\"Mary from MyShop\", \"email\":\"no-reply@myshop.com\"} or {\"id\":2}
type SendSmtpEmailSender struct {
diff --git a/lib/model_send_smtp_email_to.go b/lib/model_send_smtp_email_to.go
index 68b1b29..265cd30 100644
--- a/lib/model_send_smtp_email_to.go
+++ b/lib/model_send_smtp_email_to.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type SendSmtpEmailTo struct {
// Email address of the recipient
diff --git a/lib/model_send_smtp_email_to_1.go b/lib/model_send_smtp_email_to_1.go
index 02d9761..c8bb6a1 100644
--- a/lib/model_send_smtp_email_to_1.go
+++ b/lib/model_send_smtp_email_to_1.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type SendSmtpEmailTo1 struct {
// Email address of the recipient
diff --git a/lib/model_send_test_email.go b/lib/model_send_test_email.go
index 447d967..e757755 100644
--- a/lib/model_send_test_email.go
+++ b/lib/model_send_test_email.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type SendTestEmail struct {
// List of the email addresses of the recipients whom you wish to send the test mail. If left empty, the test mail will be sent to your entire test list. You can not send more than 50 test emails per day.
diff --git a/lib/model_send_test_sms.go b/lib/model_send_test_sms.go
index 5a68431..0635ea0 100644
--- a/lib/model_send_test_sms.go
+++ b/lib/model_send_test_sms.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type SendTestSms struct {
// Mobile number of the recipient with the country code. This number must belong to one of your contacts in Brevo account and must not be blacklisted
diff --git a/lib/model_send_transac_sms.go b/lib/model_send_transac_sms.go
index 86186cc..c2367f3 100644
--- a/lib/model_send_transac_sms.go
+++ b/lib/model_send_transac_sms.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type SendTransacSms struct {
// Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters**
diff --git a/lib/model_send_whatsapp_message.go b/lib/model_send_whatsapp_message.go
index 96d98e9..07329f0 100644
--- a/lib/model_send_whatsapp_message.go
+++ b/lib/model_send_whatsapp_message.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type SendWhatsappMessage struct {
// ID of the template to send
diff --git a/lib/model_set_config_display_currency.go b/lib/model_set_config_display_currency.go
index bb1924b..6436c1c 100644
--- a/lib/model_set_config_display_currency.go
+++ b/lib/model_set_config_display_currency.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type SetConfigDisplayCurrency struct {
// ISO 4217 compliant display currency code
diff --git a/lib/model_sso_token_request.go b/lib/model_sso_token_request.go
index d1fa0ac..15cf076 100644
--- a/lib/model_sso_token_request.go
+++ b/lib/model_sso_token_request.go
@@ -1,21 +1,21 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type SsoTokenRequest struct {
// Id of the sub-account organization
Id int64 `json:"id"`
// User email of sub-account organization
Email string `json:"email,omitempty"`
- // Set target after login success * automation - Redirect to Automation after login * email_campaign - Redirect to Email Campaign after login * contacts - Redirect to Contacts after login * landing_pages - Redirect to Landing Pages after login * email_transactional - Redirect to Email Transactional after login * senders - Redirect to Contacts after login * sms_campaign - Redirect to Sms Campaign after login * sms_transactional - Redirect to Sms Transactional after login
+ // Set target after login success * automation - Redirect to Automation after login * email_campaign - Redirect to Email Campaign after login * contacts - Redirect to Contacts after login * landing_pages - Redirect to Landing Pages after login * email_transactional - Redirect to Email Transactional after login * senders - Redirect to Contacts after login * sms_campaign - Redirect to Sms Campaign after login * sms_transactional - Redirect to Sms Transactional after login
Target string `json:"target,omitempty"`
// Set the full target URL after login success. The user will land directly on this target URL after login
Url string `json:"url,omitempty"`
diff --git a/lib/model_sso_token_request_corporate.go b/lib/model_sso_token_request_corporate.go
index 3fae21b..23e05e3 100644
--- a/lib/model_sso_token_request_corporate.go
+++ b/lib/model_sso_token_request_corporate.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type SsoTokenRequestCorporate struct {
// User email of sub-account organization
diff --git a/lib/model_sub_account_apps_toggle_request.go b/lib/model_sub_account_apps_toggle_request.go
index 383ffd9..3932d33 100644
--- a/lib/model_sub_account_apps_toggle_request.go
+++ b/lib/model_sub_account_apps_toggle_request.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// List of enable/disable applications on the sub-account
type SubAccountAppsToggleRequest struct {
diff --git a/lib/model_sub_account_details_response.go b/lib/model_sub_account_details_response.go
index e0bc355..6787d31 100644
--- a/lib/model_sub_account_details_response.go
+++ b/lib/model_sub_account_details_response.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type SubAccountDetailsResponse struct {
// Name of the sub-account user
@@ -18,6 +18,6 @@ type SubAccountDetailsResponse struct {
// Sub-account company name
CompanyName string `json:"companyName,omitempty"`
// List of group(s) associated with the sub-account
- Groups []SubAccountDetailsResponseGroups `json:"groups,omitempty"`
+ Groups []SubAccountDetailsResponseGroups `json:"groups,omitempty"`
PlanInfo *SubAccountDetailsResponsePlanInfo `json:"planInfo,omitempty"`
}
diff --git a/lib/model_sub_account_details_response_groups.go b/lib/model_sub_account_details_response_groups.go
index fc57349..c4d09da 100644
--- a/lib/model_sub_account_details_response_groups.go
+++ b/lib/model_sub_account_details_response_groups.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type SubAccountDetailsResponseGroups struct {
// Group id
diff --git a/lib/model_sub_account_details_response_plan_info.go b/lib/model_sub_account_details_response_plan_info.go
index ca86578..4fe21e3 100644
--- a/lib/model_sub_account_details_response_plan_info.go
+++ b/lib/model_sub_account_details_response_plan_info.go
@@ -1,18 +1,18 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Sub-account plan details
type SubAccountDetailsResponsePlanInfo struct {
- Credits *SubAccountDetailsResponsePlanInfoCredits `json:"credits,omitempty"`
+ Credits *SubAccountDetailsResponsePlanInfoCredits `json:"credits,omitempty"`
Features *SubAccountDetailsResponsePlanInfoFeatures `json:"features,omitempty"`
// type of the plan
PlanType string `json:"planType,omitempty"`
diff --git a/lib/model_sub_account_details_response_plan_info_credits.go b/lib/model_sub_account_details_response_plan_info_credits.go
index 3524d88..9eeccd6 100644
--- a/lib/model_sub_account_details_response_plan_info_credits.go
+++ b/lib/model_sub_account_details_response_plan_info_credits.go
@@ -1,18 +1,18 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Credits quota and remaining credits on the sub-account
type SubAccountDetailsResponsePlanInfoCredits struct {
- Emails *SubAccountDetailsResponsePlanInfoCreditsEmails `json:"emails,omitempty"`
- Sms *SubAccountDetailsResponsePlanInfoCreditsSms `json:"sms,omitempty"`
+ Emails *SubAccountDetailsResponsePlanInfoCreditsEmails `json:"emails,omitempty"`
+ Sms *SubAccountDetailsResponsePlanInfoCreditsSms `json:"sms,omitempty"`
WpSubscribers *SubAccountDetailsResponsePlanInfoCreditsWpSubscribers `json:"wpSubscribers,omitempty"`
}
diff --git a/lib/model_sub_account_details_response_plan_info_credits_emails.go b/lib/model_sub_account_details_response_plan_info_credits_emails.go
index 30a61cd..836ff97 100644
--- a/lib/model_sub_account_details_response_plan_info_credits_emails.go
+++ b/lib/model_sub_account_details_response_plan_info_credits_emails.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Email credits remaining on the sub-account
type SubAccountDetailsResponsePlanInfoCreditsEmails struct {
diff --git a/lib/model_sub_account_details_response_plan_info_credits_sms.go b/lib/model_sub_account_details_response_plan_info_credits_sms.go
index 04f9ba1..c2991d3 100644
--- a/lib/model_sub_account_details_response_plan_info_credits_sms.go
+++ b/lib/model_sub_account_details_response_plan_info_credits_sms.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// SMS credits remaining on the sub-account
type SubAccountDetailsResponsePlanInfoCreditsSms struct {
diff --git a/lib/model_sub_account_details_response_plan_info_credits_wp_subscribers.go b/lib/model_sub_account_details_response_plan_info_credits_wp_subscribers.go
index 8c604da..38ede07 100644
--- a/lib/model_sub_account_details_response_plan_info_credits_wp_subscribers.go
+++ b/lib/model_sub_account_details_response_plan_info_credits_wp_subscribers.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Push credits remaining on the sub-account
type SubAccountDetailsResponsePlanInfoCreditsWpSubscribers struct {
diff --git a/lib/model_sub_account_details_response_plan_info_features.go b/lib/model_sub_account_details_response_plan_info_features.go
index 07982b9..62cebe2 100644
--- a/lib/model_sub_account_details_response_plan_info_features.go
+++ b/lib/model_sub_account_details_response_plan_info_features.go
@@ -1,18 +1,18 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Features available on the sub-account
type SubAccountDetailsResponsePlanInfoFeatures struct {
- Inbox *SubAccountDetailsResponsePlanInfoFeaturesInbox `json:"inbox,omitempty"`
+ Inbox *SubAccountDetailsResponsePlanInfoFeaturesInbox `json:"inbox,omitempty"`
LandingPage *SubAccountDetailsResponsePlanInfoFeaturesLandingPage `json:"landingPage,omitempty"`
- Users *SubAccountDetailsResponsePlanInfoFeaturesUsers `json:"users,omitempty"`
+ Users *SubAccountDetailsResponsePlanInfoFeaturesUsers `json:"users,omitempty"`
}
diff --git a/lib/model_sub_account_details_response_plan_info_features_inbox.go b/lib/model_sub_account_details_response_plan_info_features_inbox.go
index 2df6257..d0a82dd 100644
--- a/lib/model_sub_account_details_response_plan_info_features_inbox.go
+++ b/lib/model_sub_account_details_response_plan_info_features_inbox.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Inbox details / Not available on ENTv2
type SubAccountDetailsResponsePlanInfoFeaturesInbox struct {
diff --git a/lib/model_sub_account_details_response_plan_info_features_landing_page.go b/lib/model_sub_account_details_response_plan_info_features_landing_page.go
index 598a249..77d4ed7 100644
--- a/lib/model_sub_account_details_response_plan_info_features_landing_page.go
+++ b/lib/model_sub_account_details_response_plan_info_features_landing_page.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Landing page details / Not available on ENTv2
type SubAccountDetailsResponsePlanInfoFeaturesLandingPage struct {
diff --git a/lib/model_sub_account_details_response_plan_info_features_users.go b/lib/model_sub_account_details_response_plan_info_features_users.go
index fd1924a..03e55cd 100644
--- a/lib/model_sub_account_details_response_plan_info_features_users.go
+++ b/lib/model_sub_account_details_response_plan_info_features_users.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Multi-account details
type SubAccountDetailsResponsePlanInfoFeaturesUsers struct {
diff --git a/lib/model_sub_account_update_plan_request.go b/lib/model_sub_account_update_plan_request.go
index fb4668b..31f0cef 100644
--- a/lib/model_sub_account_update_plan_request.go
+++ b/lib/model_sub_account_update_plan_request.go
@@ -1,17 +1,17 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Details of the plan to be changed
type SubAccountUpdatePlanRequest struct {
- Credits *SubAccountUpdatePlanRequestCredits `json:"credits,omitempty"`
+ Credits *SubAccountUpdatePlanRequestCredits `json:"credits,omitempty"`
Features *SubAccountUpdatePlanRequestFeatures `json:"features,omitempty"`
}
diff --git a/lib/model_sub_account_update_plan_request_credits.go b/lib/model_sub_account_update_plan_request_credits.go
index 982e352..7557ff7 100644
--- a/lib/model_sub_account_update_plan_request_credits.go
+++ b/lib/model_sub_account_update_plan_request_credits.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Credit details to update
type SubAccountUpdatePlanRequestCredits struct {
diff --git a/lib/model_sub_account_update_plan_request_features.go b/lib/model_sub_account_update_plan_request_features.go
index 361a28e..ef109ee 100644
--- a/lib/model_sub_account_update_plan_request_features.go
+++ b/lib/model_sub_account_update_plan_request_features.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Features details to update
type SubAccountUpdatePlanRequestFeatures struct {
diff --git a/lib/model_sub_accounts_response.go b/lib/model_sub_accounts_response.go
index 1491c90..302d82c 100644
--- a/lib/model_sub_accounts_response.go
+++ b/lib/model_sub_accounts_response.go
@@ -1,17 +1,17 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type SubAccountsResponse struct {
// Total number of subaccounts
- Count int32 `json:"count,omitempty"`
+ Count int32 `json:"count,omitempty"`
SubAccounts []SubAccountsResponseSubAccounts `json:"subAccounts,omitempty"`
}
diff --git a/lib/model_sub_accounts_response_groups.go b/lib/model_sub_accounts_response_groups.go
index 636519f..35bc6bb 100644
--- a/lib/model_sub_accounts_response_groups.go
+++ b/lib/model_sub_accounts_response_groups.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type SubAccountsResponseGroups struct {
// Group identifier
diff --git a/lib/model_sub_accounts_response_sub_accounts.go b/lib/model_sub_accounts_response_sub_accounts.go
index 9468b7e..4caf405 100644
--- a/lib/model_sub_accounts_response_sub_accounts.go
+++ b/lib/model_sub_accounts_response_sub_accounts.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type SubAccountsResponseSubAccounts struct {
// id of the sub-account
diff --git a/lib/model_task.go b/lib/model_task.go
index f751885..3f4e971 100644
--- a/lib/model_task.go
+++ b/lib/model_task.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Task Details
type Task struct {
diff --git a/lib/model_task_list.go b/lib/model_task_list.go
index 5a71b86..8009681 100644
--- a/lib/model_task_list.go
+++ b/lib/model_task_list.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// List of tasks
type TaskList struct {
diff --git a/lib/model_task_reminder.go b/lib/model_task_reminder.go
index 5cb28fb..51442a2 100644
--- a/lib/model_task_reminder.go
+++ b/lib/model_task_reminder.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Task reminder date/time for a task
type TaskReminder struct {
diff --git a/lib/model_task_types.go b/lib/model_task_types.go
index ecfe48c..18fb9ed 100644
--- a/lib/model_task_types.go
+++ b/lib/model_task_types.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Task types details
type TaskTypes struct {
diff --git a/lib/model_update_attribute.go b/lib/model_update_attribute.go
index 34e7cba..bfb75a2 100644
--- a/lib/model_update_attribute.go
+++ b/lib/model_update_attribute.go
@@ -1,20 +1,20 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type UpdateAttribute struct {
// Value of the attribute to update. Use only if the attribute's category is 'calculated' or 'global'
Value string `json:"value,omitempty"`
// List of the values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}]
Enumeration []UpdateAttributeEnumeration `json:"enumeration,omitempty"`
- // Use this option to add multiple-choice attributes options only if the attribute's category is \"normal\". **This option is specifically designed for updating multiple-choice attributes**. For example: **[\"USA\",\"INDIA\"]**
+ // Use this option to add multiple-choice attributes options only if the attribute's category is \"normal\". **This option is specifically designed for updating multiple-choice attributes**. For example: **[\"USA\",\"INDIA\"]**
MultiCategoryOptions []string `json:"multiCategoryOptions,omitempty"`
}
diff --git a/lib/model_update_attribute_enumeration.go b/lib/model_update_attribute_enumeration.go
index dffd1d1..b4bf604 100644
--- a/lib/model_update_attribute_enumeration.go
+++ b/lib/model_update_attribute_enumeration.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type UpdateAttributeEnumeration struct {
// Id of the value
diff --git a/lib/model_update_batch_contacts.go b/lib/model_update_batch_contacts.go
index 39299f1..9a4a152 100644
--- a/lib/model_update_batch_contacts.go
+++ b/lib/model_update_batch_contacts.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type UpdateBatchContacts struct {
// List of contacts to be updated
diff --git a/lib/model_update_batch_contacts_contacts.go b/lib/model_update_batch_contacts_contacts.go
index 4105c2d..592fcb7 100644
--- a/lib/model_update_batch_contacts_contacts.go
+++ b/lib/model_update_batch_contacts_contacts.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type UpdateBatchContactsContacts struct {
// Email address of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms)
diff --git a/lib/model_update_batch_contacts_model.go b/lib/model_update_batch_contacts_model.go
index dc6aea0..2e71d2e 100644
--- a/lib/model_update_batch_contacts_model.go
+++ b/lib/model_update_batch_contacts_model.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type UpdateBatchContactsModel struct {
SuccessIds []int64 `json:"successIds,omitempty"`
diff --git a/lib/model_update_campaign_status.go b/lib/model_update_campaign_status.go
index c58f6e6..7b527d6 100644
--- a/lib/model_update_campaign_status.go
+++ b/lib/model_update_campaign_status.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Status of the campaign
type UpdateCampaignStatus struct {
diff --git a/lib/model_update_child.go b/lib/model_update_child.go
index cb37e29..487e957 100644
--- a/lib/model_update_child.go
+++ b/lib/model_update_child.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type UpdateChild struct {
// New Email address to update the child account
diff --git a/lib/model_update_child_account_status.go b/lib/model_update_child_account_status.go
index b7337f0..1400d0b 100644
--- a/lib/model_update_child_account_status.go
+++ b/lib/model_update_child_account_status.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type UpdateChildAccountStatus struct {
// Status of Transactional Email Platform activation for your account (true=enabled, false=disabled)
diff --git a/lib/model_update_child_domain.go b/lib/model_update_child_domain.go
index 06d48e5..71d9be0 100644
--- a/lib/model_update_child_domain.go
+++ b/lib/model_update_child_domain.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type UpdateChildDomain struct {
// Value for the sender domain that will replace the existing domain
diff --git a/lib/model_update_contact.go b/lib/model_update_contact.go
index c02781b..bddfb84 100644
--- a/lib/model_update_contact.go
+++ b/lib/model_update_contact.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type UpdateContact struct {
// Pass the set of attributes to be updated. These attributes must be present in your account. Values that don't match the attribute type (e.g. text or string in a date attribute) will be ignored.To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. The attribute's parameter should be passed in capital letter while updating a contact. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"}
diff --git a/lib/model_update_coupon_collection.go b/lib/model_update_coupon_collection.go
index 9c727dd..b675ab7 100644
--- a/lib/model_update_coupon_collection.go
+++ b/lib/model_update_coupon_collection.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"time"
diff --git a/lib/model_update_email_campaign.go b/lib/model_update_email_campaign.go
index b6b2228..07869ea 100644
--- a/lib/model_update_email_campaign.go
+++ b/lib/model_update_email_campaign.go
@@ -8,7 +8,7 @@
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type UpdateEmailCampaign struct {
// Tag of the campaign
diff --git a/lib/model_update_email_campaign_recipients.go b/lib/model_update_email_campaign_recipients.go
index e7a075f..8fc5bd7 100644
--- a/lib/model_update_email_campaign_recipients.go
+++ b/lib/model_update_email_campaign_recipients.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Segment ids and List ids to include/exclude from campaign
type UpdateEmailCampaignRecipients struct {
diff --git a/lib/model_update_email_campaign_sender.go b/lib/model_update_email_campaign_sender.go
index 89ed165..ce78bfa 100644
--- a/lib/model_update_email_campaign_sender.go
+++ b/lib/model_update_email_campaign_sender.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}`
type UpdateEmailCampaignSender struct {
diff --git a/lib/model_update_external_feed.go b/lib/model_update_external_feed.go
index 67f8680..5984c21 100644
--- a/lib/model_update_external_feed.go
+++ b/lib/model_update_external_feed.go
@@ -1,21 +1,21 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type UpdateExternalFeed struct {
// Name of the feed
Name string `json:"name,omitempty"`
// URL of the feed
Url string `json:"url,omitempty"`
- // Auth type of the feed: * `basic` * `token` * `noAuth`
+ // Auth type of the feed: * `basic` * `token` * `noAuth`
AuthType string `json:"authType,omitempty"`
// Username for authType `basic`
Username string `json:"username,omitempty"`
diff --git a/lib/model_update_list.go b/lib/model_update_list.go
index db2899a..dcff918 100644
--- a/lib/model_update_list.go
+++ b/lib/model_update_list.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type UpdateList struct {
// Name of the list. Either of the two parameters (name, folderId) can be updated at a time.
diff --git a/lib/model_update_sender.go b/lib/model_update_sender.go
index 212f06e..c3dd89a 100644
--- a/lib/model_update_sender.go
+++ b/lib/model_update_sender.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type UpdateSender struct {
// From Name to update the sender
diff --git a/lib/model_update_sms_campaign.go b/lib/model_update_sms_campaign.go
index aa8315a..0f2d0bd 100644
--- a/lib/model_update_sms_campaign.go
+++ b/lib/model_update_sms_campaign.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type UpdateSmsCampaign struct {
// Name of the campaign
@@ -16,7 +16,7 @@ type UpdateSmsCampaign struct {
// Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters**
Sender string `json:"sender,omitempty"`
// Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS
- Content string `json:"content,omitempty"`
+ Content string `json:"content,omitempty"`
Recipients *CreateSmsCampaignRecipients `json:"recipients,omitempty"`
// UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
ScheduledAt string `json:"scheduledAt,omitempty"`
diff --git a/lib/model_update_smtp_template.go b/lib/model_update_smtp_template.go
index 70b7b19..1171027 100644
--- a/lib/model_update_smtp_template.go
+++ b/lib/model_update_smtp_template.go
@@ -1,18 +1,18 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type UpdateSmtpTemplate struct {
// Tag of the template
- Tag string `json:"tag,omitempty"`
+ Tag string `json:"tag,omitempty"`
Sender *UpdateSmtpTemplateSender `json:"sender,omitempty"`
// Name of the template
TemplateName string `json:"templateName,omitempty"`
diff --git a/lib/model_update_smtp_template_sender.go b/lib/model_update_smtp_template_sender.go
index 23c406e..d15a96f 100644
--- a/lib/model_update_smtp_template_sender.go
+++ b/lib/model_update_smtp_template_sender.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
// Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}`
type UpdateSmtpTemplateSender struct {
diff --git a/lib/model_update_webhook.go b/lib/model_update_webhook.go
index edf8f15..b1b441c 100644
--- a/lib/model_update_webhook.go
+++ b/lib/model_update_webhook.go
@@ -1,27 +1,27 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type UpdateWebhook struct {
// URL of the webhook
Url string `json:"url,omitempty"`
// Description of the webhook
Description string `json:"description,omitempty"`
- // - Events triggering the webhook. Possible values for **Transactional** type webhook: #### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` - Possible values for **Marketing** type webhook: #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` - Possible values for **Inbound** type webhook: #### `inboundEmailProcessed`
+ // - Events triggering the webhook. Possible values for **Transactional** type webhook: #### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` - Possible values for **Marketing** type webhook: #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` - Possible values for **Inbound** type webhook: #### `inboundEmailProcessed`
Events []string `json:"events,omitempty"`
// Inbound domain of webhook, used in case of event type `inbound`
Domain string `json:"domain,omitempty"`
// To send batched webhooks
- Batched bool `json:"batched,omitempty"`
- Auth *GetWebhookAuth `json:"auth,omitempty"`
+ Batched bool `json:"batched,omitempty"`
+ Auth *GetWebhookAuth `json:"auth,omitempty"`
// Custom headers to be send with webhooks
Headers []GetWebhookHeaders `json:"headers,omitempty"`
}
diff --git a/lib/model_update_whats_app_campaign.go b/lib/model_update_whats_app_campaign.go
index 140581f..29963ae 100644
--- a/lib/model_update_whats_app_campaign.go
+++ b/lib/model_update_whats_app_campaign.go
@@ -1,21 +1,21 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type UpdateWhatsAppCampaign struct {
// Name of the campaign
CampaignName string `json:"campaignName,omitempty"`
// Status of the campaign
CampaignStatus string `json:"campaignStatus,omitempty"`
- // Reschedule the sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of campaign. **Prefer to pass your timezone in date-time format for accurate result.For example: **2017-06-01T12:30:00+02:00** Use this field to update the scheduledAt of any existing draft or scheduled WhatsApp campaign.
- RescheduleFor string `json:"rescheduleFor,omitempty"`
- Recipients *CreateWhatsAppCampaignRecipients `json:"recipients,omitempty"`
+ // Reschedule the sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of campaign. **Prefer to pass your timezone in date-time format for accurate result.For example: **2017-06-01T12:30:00+02:00** Use this field to update the scheduledAt of any existing draft or scheduled WhatsApp campaign.
+ RescheduleFor string `json:"rescheduleFor,omitempty"`
+ Recipients *CreateWhatsAppCampaignRecipients `json:"recipients,omitempty"`
}
diff --git a/lib/model_upload_image_model.go b/lib/model_upload_image_model.go
index adaf280..564c436 100644
--- a/lib/model_upload_image_model.go
+++ b/lib/model_upload_image_model.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type UploadImageModel struct {
// URL of the image uploaded
diff --git a/lib/model_upload_image_to_gallery.go b/lib/model_upload_image_to_gallery.go
index d6e2ac1..e36fb6d 100644
--- a/lib/model_upload_image_to_gallery.go
+++ b/lib/model_upload_image_to_gallery.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type UploadImageToGallery struct {
// The absolute url of the image (no local file). Maximum allowed size for image is 2MB. Allowed extensions for images are - jpeg, jpg, png, bmp, gif.
diff --git a/lib/model_variables_items.go b/lib/model_variables_items.go
index 02d8229..2852f96 100644
--- a/lib/model_variables_items.go
+++ b/lib/model_variables_items.go
@@ -1,17 +1,17 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type VariablesItems struct {
- Name string `json:"name,omitempty"`
+ Name string `json:"name,omitempty"`
Default_ string `json:"default,omitempty"`
Datatype string `json:"datatype,omitempty"`
}
diff --git a/lib/model_whatsapp_camp_stats.go b/lib/model_whatsapp_camp_stats.go
index 46c7517..5878763 100644
--- a/lib/model_whatsapp_camp_stats.go
+++ b/lib/model_whatsapp_camp_stats.go
@@ -1,19 +1,19 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type WhatsappCampStats struct {
- Sent int32 `json:"sent"`
- Delivered int32 `json:"delivered"`
- Read int32 `json:"read"`
+ Sent int32 `json:"sent"`
+ Delivered int32 `json:"delivered"`
+ Read int32 `json:"read"`
Unsubscribe int32 `json:"unsubscribe"`
- NotSent int32 `json:"not_sent"`
+ NotSent int32 `json:"not_sent"`
}
diff --git a/lib/model_whatsapp_camp_template.go b/lib/model_whatsapp_camp_template.go
index 39b7834..cc0a10c 100644
--- a/lib/model_whatsapp_camp_template.go
+++ b/lib/model_whatsapp_camp_template.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
type WhatsappCampTemplate struct {
// name of the template
@@ -16,9 +16,9 @@ type WhatsappCampTemplate struct {
// description of the template
Category string `json:"category,omitempty"`
// language of the template
- Language string `json:"language,omitempty"`
- ContainsButton bool `json:"contains_button,omitempty"`
- DisplayHeader bool `json:"display_header,omitempty"`
+ Language string `json:"language,omitempty"`
+ ContainsButton bool `json:"contains_button,omitempty"`
+ DisplayHeader bool `json:"display_header,omitempty"`
// type of header
HeaderType string `json:"header_type,omitempty"`
// array of component item objects
@@ -27,6 +27,6 @@ type WhatsappCampTemplate struct {
HeaderVariables []VariablesItems `json:"header_variables,omitempty"`
// array of variables item variables
BodyVariables []VariablesItems `json:"body_variables,omitempty"`
- ButtonType string `json:"button_type,omitempty"`
- HideFooter bool `json:"hide_footer,omitempty"`
+ ButtonType string `json:"button_type,omitempty"`
+ HideFooter bool `json:"hide_footer,omitempty"`
}
diff --git a/lib/response.go b/lib/response.go
index 3d2adb2..49238cc 100644
--- a/lib/response.go
+++ b/lib/response.go
@@ -1,14 +1,14 @@
/*
* 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
-package swagger
+package lib
import (
"net/http"