diff --git a/lib/model_body.go b/lib/model_body.go index 442f3eb..eb35592 100644 --- a/lib/model_body.go +++ b/lib/model_body.go @@ -14,7 +14,7 @@ type Body struct { // Name of company Name string `json:"name"` // Attributes for company creation - Attributes *interface{} `json:"attributes,omitempty"` + Attributes map[string]interface{} `json:"attributes,omitempty"` // Country code if phone_number is passed in attributes. CountryCode int64 `json:"countryCode,omitempty"` } diff --git a/lib/model_body_1.go b/lib/model_body_1.go index f5dc12f..c9908b3 100644 --- a/lib/model_body_1.go +++ b/lib/model_body_1.go @@ -14,7 +14,7 @@ type Body1 struct { // Name of company Name string `json:"name,omitempty"` // Attributes for company update - Attributes *interface{} `json:"attributes,omitempty"` + Attributes map[string]interface{} `json:"attributes,omitempty"` // Country code if phone_number is passed in attributes. CountryCode int64 `json:"countryCode,omitempty"` } diff --git a/lib/model_body_3.go b/lib/model_body_3.go index aff9dbb..708ba3f 100644 --- a/lib/model_body_3.go +++ b/lib/model_body_3.go @@ -14,5 +14,5 @@ type Body3 struct { // Name of deal Name string `json:"name"` // Attributes fo\\r deal creation - Attributes *interface{} `json:"attributes,omitempty"` + Attributes map[string]interface{} `json:"attributes,omitempty"` } diff --git a/lib/model_body_4.go b/lib/model_body_4.go index 326e169..2aad472 100644 --- a/lib/model_body_4.go +++ b/lib/model_body_4.go @@ -14,5 +14,5 @@ type Body4 struct { // Name of deal Name string `json:"name,omitempty"` // Attributes for deal update - Attributes *interface{} `json:"attributes,omitempty"` + Attributes map[string]interface{} `json:"attributes,omitempty"` } diff --git a/lib/model_company.go b/lib/model_company.go index 55dc253..7ed9f8f 100644 --- a/lib/model_company.go +++ b/lib/model_company.go @@ -15,7 +15,7 @@ type Company struct { // Unique company id Id string `json:"id,omitempty"` // Company attributes with values - Attributes *interface{} `json:"attributes,omitempty"` + Attributes map[string]interface{} `json:"attributes,omitempty"` // Contact ids for contacts linked to this company LinkedContactsIds []int32 `json:"linkedContactsIds,omitempty"` // Deals ids for companies linked to this company diff --git a/lib/model_create_doi_contact.go b/lib/model_create_doi_contact.go index 3b74583..335b6da 100644 --- a/lib/model_create_doi_contact.go +++ b/lib/model_create_doi_contact.go @@ -14,7 +14,7 @@ type CreateDoiContact struct { // Email address where the confirmation email will be sent. This email address will be the identifier for all other contact attributes. Email string `json:"email"` // Pass the set of attributes and their values. These attributes must be present in your Brevo account. For eg. {'FNAME':'Elly', 'LNAME':'Roger'} - Attributes *interface{} `json:"attributes,omitempty"` + Attributes map[string]interface{} `json:"attributes,omitempty"` // Lists under user account where contact should be added IncludeListIds []int64 `json:"includeListIds"` // Lists under user account where contact should not be added diff --git a/lib/model_create_email_campaign.go b/lib/model_create_email_campaign.go index fc2cdf7..5022298 100644 --- a/lib/model_create_email_campaign.go +++ b/lib/model_create_email_campaign.go @@ -44,7 +44,7 @@ type CreateEmailCampaign struct { // Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed UtmCampaign string `json:"utmCampaign,omitempty"` // Pass the set of attributes to customize the type classic campaign. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. Only available if 'type' is 'classic'. It's considered only if campaign is in New Template Language format. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField' - Params *interface{} `json:"params,omitempty"` + Params map[string]interface{} `json:"params,omitempty"` // Set this to true if you want to send your campaign at best time. SendAtBestTime bool `json:"sendAtBestTime,omitempty"` // Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered when abTesting is set to true. 'subjectA' & 'subjectB' are mandatory together & 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B diff --git a/lib/model_deal.go b/lib/model_deal.go index e506346..52e8029 100644 --- a/lib/model_deal.go +++ b/lib/model_deal.go @@ -15,7 +15,7 @@ type Deal struct { // Unique deal id Id string `json:"id,omitempty"` // Deal attributes with values - Attributes *interface{} `json:"attributes,omitempty"` + Attributes map[string]interface{} `json:"attributes,omitempty"` // Contact ids for contacts linked to this deal LinkedContactsIds []int32 `json:"linkedContactsIds,omitempty"` // Companies ids for companies linked to this deal diff --git a/lib/model_get_contact_details.go b/lib/model_get_contact_details.go index 51f78df..87ef6a8 100644 --- a/lib/model_get_contact_details.go +++ b/lib/model_get_contact_details.go @@ -26,5 +26,5 @@ type GetContactDetails struct { ListIds []int64 `json:"listIds"` ListUnsubscribed []int64 `json:"listUnsubscribed,omitempty"` // Set of attributes of the contact - Attributes *interface{} `json:"attributes"` + Attributes map[string]interface{} `json:"attributes"` } diff --git a/lib/model_get_email_campaign.go b/lib/model_get_email_campaign.go index 2480868..2b96a66 100644 --- a/lib/model_get_email_campaign.go +++ b/lib/model_get_email_campaign.go @@ -67,7 +67,7 @@ type GetEmailCampaign struct { // Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' SentDate string `json:"sentDate,omitempty"` // Total number of non-delivered campaigns for a particular campaign id. - ReturnBounce int64 `json:"returnBounce,omitempty"` - Recipients *interface{} `json:"recipients"` - Statistics *interface{} `json:"statistics"` + ReturnBounce int64 `json:"returnBounce,omitempty"` + Recipients map[string]interface{} `json:"recipients"` + Statistics map[string]interface{} `json:"statistics"` } diff --git a/lib/model_get_extended_campaign_stats.go b/lib/model_get_extended_campaign_stats.go index 0f65d66..c04752c 100644 --- a/lib/model_get_extended_campaign_stats.go +++ b/lib/model_get_extended_campaign_stats.go @@ -12,7 +12,7 @@ package lib type GetExtendedCampaignStats struct { // Overall statistics of the campaign - GlobalStats *interface{} `json:"globalStats"` + GlobalStats map[string]interface{} `json:"globalStats"` // List-wise statistics of the campaign. CampaignStats []interface{} `json:"campaignStats"` // Number of clicks on mirror link @@ -20,8 +20,8 @@ type GetExtendedCampaignStats struct { // Number of remaning emails to send Remaining int64 `json:"remaining"` // Statistics about the number of clicks for the links - LinksStats *interface{} `json:"linksStats"` - StatsByDomain *GetStatsByDomain `json:"statsByDomain"` + LinksStats map[string]interface{} `json:"linksStats"` + StatsByDomain *GetStatsByDomain `json:"statsByDomain"` // Statistics about the campaign on the basis of various devices StatsByDevice *GetStatsByDevice `json:"statsByDevice"` // Statistics about the campaign on the basis of various browsers diff --git a/lib/model_get_extended_contact_details.go b/lib/model_get_extended_contact_details.go index 107a8cb..8a56b4b 100644 --- a/lib/model_get_extended_contact_details.go +++ b/lib/model_get_extended_contact_details.go @@ -26,6 +26,6 @@ type GetExtendedContactDetails struct { ListIds []int64 `json:"listIds"` ListUnsubscribed []int64 `json:"listUnsubscribed,omitempty"` // Set of attributes of the contact - Attributes *interface{} `json:"attributes"` + Attributes map[string]interface{} `json:"attributes"` Statistics *GetExtendedContactDetailsStatistics `json:"statistics"` } diff --git a/lib/model_get_product_details.go b/lib/model_get_product_details.go index 3273429..11b1fa2 100644 --- a/lib/model_get_product_details.go +++ b/lib/model_get_product_details.go @@ -36,7 +36,7 @@ type GetProductDetails struct { // S3 thumbnail url of original image in 120x120 dimension for analytics section S3ThumbAnalytics string `json:"s3ThumbAnalytics"` // Meta data of product such as description, vendor, producer, stock level, etc. - MetaInfo *interface{} `json:"metaInfo,omitempty"` + MetaInfo map[string]interface{} `json:"metaInfo,omitempty"` // S3 thumbnail url of original image in 600x400 dimension for editor section S3ThumbEditor string `json:"s3ThumbEditor"` // product deleted from the shop's database diff --git a/lib/model_get_sms_campaign.go b/lib/model_get_sms_campaign.go index 7470c7f..d42101d 100644 --- a/lib/model_get_sms_campaign.go +++ b/lib/model_get_sms_campaign.go @@ -26,7 +26,7 @@ type GetSmsCampaign struct { // Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) CreatedAt string `json:"createdAt"` // UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - ModifiedAt string `json:"modifiedAt"` - Recipients *interface{} `json:"recipients"` - Statistics *interface{} `json:"statistics"` + ModifiedAt string `json:"modifiedAt"` + Recipients map[string]interface{} `json:"recipients"` + Statistics map[string]interface{} `json:"statistics"` } diff --git a/lib/model_note.go b/lib/model_note.go index 073b606..ff61b4b 100644 --- a/lib/model_note.go +++ b/lib/model_note.go @@ -25,7 +25,7 @@ type Note struct { // Deal ids linked to a note DealIds []string `json:"dealIds,omitempty"` // Account details of user which created the note - AuthorId *interface{} `json:"authorId,omitempty"` + AuthorId map[string]interface{} `json:"authorId,omitempty"` // Note created date/time CreatedAt time.Time `json:"createdAt,omitempty"` // Note updated date/time diff --git a/lib/model_send_smtp_email.go b/lib/model_send_smtp_email.go index bae2ec4..fe6177c 100644 --- a/lib/model_send_smtp_email.go +++ b/lib/model_send_smtp_email.go @@ -28,11 +28,11 @@ type SendSmtpEmail struct { // Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, `[{\"url\":\"https://attachment.domain.com/myAttachmentFromUrl.jpg\", \"name\":\"myAttachmentFromUrl.jpg\"}, {\"content\":\"base64 example content\", \"name\":\"myAttachmentFromBase64.jpg\"}]`. Allowed extensions for attachment file: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg, wmv, pkpass and xlsm ( If 'templateId' is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then 'attachment' is ignored ) Attachment []SendSmtpEmailAttachment `json:"attachment,omitempty"` // Pass the set of custom headers (not the standard headers) that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. Headers are allowed in `This-Case-Only` (i.e. words separated by hyphen with first letter of each word in capital letter), they will be converted to such case styling if not in this format in the request payload. For example, `{\"sender.ip\":\"1.2.3.4\", \"X-Mailin-custom\":\"some_custom_header\", \"idempotencyKey\":\"abc-123\"}`. - Headers *interface{} `json:"headers,omitempty"` + Headers map[string]interface{} `json:"headers,omitempty"` // Id of the template. TemplateId int64 `json:"templateId,omitempty"` // Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. It's considered only if template is in New Template Language format. - Params *interface{} `json:"params,omitempty"` + Params map[string]interface{} `json:"params,omitempty"` // You can customize and send out multiple versions of a mail. templateId can be customized only if global parameter contains templateId. htmlContent and textContent can be customized only if any of the two, htmlContent or textContent, is present in global parameters. Some global parameters such as **to(mandatory), bcc, cc, replyTo, subject** can also be customized specific to each version. Total number of recipients in one API request must not exceed 2000. However, you can still pass upto 99 recipients maximum in one message version. The size of individual params in all the messageVersions shall not exceed 100 KB limit and that of cumulative params shall not exceed 1000 KB. You can follow this **step-by-step guide** on how to use **messageVersions** to batch send emails - https://developers.brevo.com/docs/batch-send-transactional-emails MessageVersions []SendSmtpEmailMessageVersions `json:"messageVersions,omitempty"` // Tag your emails to find them more easily diff --git a/lib/model_update_contact.go b/lib/model_update_contact.go index a7b9c2f..c107350 100644 --- a/lib/model_update_contact.go +++ b/lib/model_update_contact.go @@ -12,7 +12,7 @@ package lib type UpdateContact struct { // Pass the set of attributes to be updated. These attributes must be present in your account. 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\"} - Attributes *interface{} `json:"attributes,omitempty"` + Attributes map[string]interface{} `json:"attributes,omitempty"` // Pass your own Id to update ext_id of a contact. ExtId string `json:"ext_id,omitempty"` // Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) diff --git a/lib/model_update_email_campaign.go b/lib/model_update_email_campaign.go index f379234..6eaf0f5 100644 --- a/lib/model_update_email_campaign.go +++ b/lib/model_update_email_campaign.go @@ -44,7 +44,7 @@ type UpdateEmailCampaign struct { // Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed UtmCampaign string `json:"utmCampaign,omitempty"` // Pass the set of attributes to customize the type 'classic' campaign. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. The 'params' field will get updated, only if the campaign is in New Template Language, else ignored. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField' - Params *interface{} `json:"params,omitempty"` + Params map[string]interface{} `json:"params,omitempty"` // Set this to true if you want to send your campaign at best time. Note:- if true, warmup ip will be disabled. SendAtBestTime bool `json:"sendAtBestTime,omitempty"` // Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered if abTesting is set to true. 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B