Skip to content

Commit

Permalink
l3 correction
Browse files Browse the repository at this point in the history
  • Loading branch information
jain-raunak committed Mar 13, 2024
1 parent b85d58d commit 427f37e
Show file tree
Hide file tree
Showing 18 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion lib/model_body.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
2 changes: 1 addition & 1 deletion lib/model_body_1.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
2 changes: 1 addition & 1 deletion lib/model_body_3.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
2 changes: 1 addition & 1 deletion lib/model_body_4.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
2 changes: 1 addition & 1 deletion lib/model_company.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/model_create_doi_contact.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/model_create_email_campaign.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/model_deal.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/model_get_contact_details.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
6 changes: 3 additions & 3 deletions lib/model_get_email_campaign.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
6 changes: 3 additions & 3 deletions lib/model_get_extended_campaign_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ 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
MirrorClick int64 `json:"mirrorClick"`
// 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
Expand Down
2 changes: 1 addition & 1 deletion lib/model_get_extended_contact_details.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
2 changes: 1 addition & 1 deletion lib/model_get_product_details.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions lib/model_get_sms_campaign.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
2 changes: 1 addition & 1 deletion lib/model_note.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/model_send_smtp_email.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/model_update_contact.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/model_update_email_campaign.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 427f37e

Please sign in to comment.