Skip to content

Add attachment url in transactional template send #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ Class | Method | HTTP request | Description
- [SmsCampaignsRecipients](docs/Model/SmsCampaignsRecipients.md)
- [SmtpTemplate](docs/Model/SmtpTemplate.md)
- [SmtpTemplate1](docs/Model/SmtpTemplate1.md)
- [SmtpemailAttachment](docs/Model/SmtpemailAttachment.md)
- [SmtpemailBcc](docs/Model/SmtpemailBcc.md)
- [SmtpemailCc](docs/Model/SmtpemailCc.md)
- [SmtpemailReplyTo](docs/Model/SmtpemailReplyTo.md)
Expand Down Expand Up @@ -438,4 +439,4 @@ Be sure to visit the SendinBlue official [documentation website](https://sendinb

If you find a bug, please post the issue on [Github](https://github.com/sendinblue/APIv3-php-library/issues).

As always, if you need additional assistance, drop us a note [here](https://account.sendinblue.com/support).
As always, if you need additional assistance, drop us a note [here](https://account.sendinblue.com/support).
3 changes: 2 additions & 1 deletion docs/Model/SendEmail.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Name | Type | Description | Notes
**email_bcc** | **string[]** | Email addresses of the recipients in bcc | [optional]
**email_cc** | **string[]** | Email addresses of the recipients in cc | [optional]
**reply_to** | **string** | Email on which campaign recipients will be able to reply to | [optional]
**attachment** | [**\Swagger\Client\Model\SmtptemplatestemplateIdsendAttachment[]**](SmtptemplatestemplateIdsendAttachment.md) | Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez | [optional]
**attachment_url** | **string** | Absolute url of the attachment (no local file). Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez | [optional]
**attachment** | [**\Swagger\Client\Model\SmtptemplatestemplateIdsendAttachment[]**](SmtptemplatestemplateIdsendAttachment.md) | Pass the base64 content of the attachment. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez | [optional]
**headers** | **map[string,string]** | | [optional]
**attributes** | **map[string,string]** | | [optional]

Expand Down
3 changes: 2 additions & 1 deletion docs/Model/SendEmail1.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Name | Type | Description | Notes
**email_bcc** | **string[]** | Email addresses of the recipients in bcc | [optional]
**email_cc** | **string[]** | Email addresses of the recipients in cc | [optional]
**reply_to** | **string** | Email on which campaign recipients will be able to reply to | [optional]
**attachment** | [**\Swagger\Client\Model\SmtptemplatestemplateIdsendAttachment[]**](SmtptemplatestemplateIdsendAttachment.md) | Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez | [optional]
**attachment_url** | **string** | Absolute url of the attachment (no local file). Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez | [optional]
**attachment** | [**\Swagger\Client\Model\SmtptemplatestemplateIdsendAttachment[]**](SmtptemplatestemplateIdsendAttachment.md) | Pass the base64 content of the attachment. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez | [optional]
**headers** | **map[string,string]** | | [optional]
**attributes** | **map[string,string]** | | [optional]

Expand Down
2 changes: 1 addition & 1 deletion docs/Model/SendSmtpEmail.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Name | Type | Description | Notes
**text_content** | **string** | Plain Text body of the message | [optional]
**subject** | **string** | Subject of the message |
**reply_to** | [**\Swagger\Client\Model\SmtpemailReplyTo**](SmtpemailReplyTo.md) | | [optional]
**attachment** | [**\Swagger\Client\Model\SmtptemplatestemplateIdsendAttachment[]**](SmtptemplatestemplateIdsendAttachment.md) | Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez | [optional]
**attachment** | [**\Swagger\Client\Model\SmtpemailAttachment[]**](SmtpemailAttachment.md) | Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez | [optional]
**headers** | **map[string,string]** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/Model/SendSmtpEmail1.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Name | Type | Description | Notes
**text_content** | **string** | Plain Text body of the message | [optional]
**subject** | **string** | Subject of the message |
**reply_to** | [**\Swagger\Client\Model\SmtpemailReplyTo**](SmtpemailReplyTo.md) | | [optional]
**attachment** | [**\Swagger\Client\Model\SmtptemplatestemplateIdsendAttachment[]**](SmtptemplatestemplateIdsendAttachment.md) | Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez | [optional]
**attachment** | [**\Swagger\Client\Model\SmtpemailAttachment[]**](SmtpemailAttachment.md) | Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez | [optional]
**headers** | **map[string,string]** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
12 changes: 12 additions & 0 deletions docs/Model/SmtpemailAttachment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SmtpemailAttachment

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**url** | **string** | Absolute url of the attachment (no local file). | [optional]
**content** | **string** | Base64 encoded chunk data of the attachment generated on the fly | [optional]
**name** | **string** | Required for content. Name of the attachment | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


1 change: 0 additions & 1 deletion docs/Model/SmtptemplatestemplateIdsendAttachment.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**url** | **string** | Absolute url of the attachment (no local file). | [optional]
**content** | **string** | Base64 encoded chunk data of the attachment generated on the fly | [optional]
**name** | **string** | Required for content. Name of the attachment | [optional]

Expand Down
3 changes: 2 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ Class | Method | HTTP request | Description
- [SmsCampaignsRecipients](docs/Model/SmsCampaignsRecipients.md)
- [SmtpTemplate](docs/Model/SmtpTemplate.md)
- [SmtpTemplate1](docs/Model/SmtpTemplate1.md)
- [SmtpemailAttachment](docs/Model/SmtpemailAttachment.md)
- [SmtpemailBcc](docs/Model/SmtpemailBcc.md)
- [SmtpemailCc](docs/Model/SmtpemailCc.md)
- [SmtpemailReplyTo](docs/Model/SmtpemailReplyTo.md)
Expand Down Expand Up @@ -373,4 +374,4 @@ Class | Method | HTTP request | Description

- **Type**: API key
- **API key parameter name**: api-key
- **Location**: HTTP header
- **Location**: HTTP header
29 changes: 28 additions & 1 deletion lib/Model/SendEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class SendEmail implements ArrayAccess
'email_bcc' => 'string[]',
'email_cc' => 'string[]',
'reply_to' => 'string',
'attachment_url' => 'string',
'attachment' => '\Swagger\Client\Model\SmtptemplatestemplateIdsendAttachment[]',
'headers' => 'map[string,string]',
'attributes' => 'map[string,string]'
Expand All @@ -72,6 +73,7 @@ class SendEmail implements ArrayAccess
'email_bcc' => 'email',
'email_cc' => 'email',
'reply_to' => 'email',
'attachment_url' => 'url',
'attachment' => null,
'headers' => null,
'attributes' => null
Expand All @@ -96,6 +98,7 @@ public static function swaggerFormats()
'email_bcc' => 'emailBcc',
'email_cc' => 'emailCc',
'reply_to' => 'replyTo',
'attachment_url' => 'attachmentUrl',
'attachment' => 'attachment',
'headers' => 'headers',
'attributes' => 'attributes'
Expand All @@ -111,6 +114,7 @@ public static function swaggerFormats()
'email_bcc' => 'setEmailBcc',
'email_cc' => 'setEmailCc',
'reply_to' => 'setReplyTo',
'attachment_url' => 'setAttachmentUrl',
'attachment' => 'setAttachment',
'headers' => 'setHeaders',
'attributes' => 'setAttributes'
Expand All @@ -126,6 +130,7 @@ public static function swaggerFormats()
'email_bcc' => 'getEmailBcc',
'email_cc' => 'getEmailCc',
'reply_to' => 'getReplyTo',
'attachment_url' => 'getAttachmentUrl',
'attachment' => 'getAttachment',
'headers' => 'getHeaders',
'attributes' => 'getAttributes'
Expand Down Expand Up @@ -166,6 +171,7 @@ public function __construct(array $data = null)
$this->container['email_bcc'] = isset($data['email_bcc']) ? $data['email_bcc'] : null;
$this->container['email_cc'] = isset($data['email_cc']) ? $data['email_cc'] : null;
$this->container['reply_to'] = isset($data['reply_to']) ? $data['reply_to'] : null;
$this->container['attachment_url'] = isset($data['attachment_url']) ? $data['attachment_url'] : null;
$this->container['attachment'] = isset($data['attachment']) ? $data['attachment'] : null;
$this->container['headers'] = isset($data['headers']) ? $data['headers'] : null;
$this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null;
Expand Down Expand Up @@ -286,6 +292,27 @@ public function setReplyTo($reply_to)
return $this;
}

/**
* Gets attachment_url
* @return string
*/
public function getAttachmentUrl()
{
return $this->container['attachment_url'];
}

/**
* Sets attachment_url
* @param string $attachment_url Absolute url of the attachment (no local file). Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez
* @return $this
*/
public function setAttachmentUrl($attachment_url)
{
$this->container['attachment_url'] = $attachment_url;

return $this;
}

/**
* Gets attachment
* @return \Swagger\Client\Model\SmtptemplatestemplateIdsendAttachment[]
Expand All @@ -297,7 +324,7 @@ public function getAttachment()

/**
* Sets attachment
* @param \Swagger\Client\Model\SmtptemplatestemplateIdsendAttachment[] $attachment Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez
* @param \Swagger\Client\Model\SmtptemplatestemplateIdsendAttachment[] $attachment Pass the base64 content of the attachment. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez
* @return $this
*/
public function setAttachment($attachment)
Expand Down
29 changes: 28 additions & 1 deletion lib/Model/SendEmail1.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class SendEmail1 implements ArrayAccess
'email_bcc' => 'string[]',
'email_cc' => 'string[]',
'reply_to' => 'string',
'attachment_url' => 'string',
'attachment' => '\Swagger\Client\Model\SmtptemplatestemplateIdsendAttachment[]',
'headers' => 'map[string,string]',
'attributes' => 'map[string,string]'
Expand All @@ -72,6 +73,7 @@ class SendEmail1 implements ArrayAccess
'email_bcc' => 'email',
'email_cc' => 'email',
'reply_to' => 'email',
'attachment_url' => 'url',
'attachment' => null,
'headers' => null,
'attributes' => null
Expand All @@ -96,6 +98,7 @@ public static function swaggerFormats()
'email_bcc' => 'emailBcc',
'email_cc' => 'emailCc',
'reply_to' => 'replyTo',
'attachment_url' => 'attachmentUrl',
'attachment' => 'attachment',
'headers' => 'headers',
'attributes' => 'attributes'
Expand All @@ -111,6 +114,7 @@ public static function swaggerFormats()
'email_bcc' => 'setEmailBcc',
'email_cc' => 'setEmailCc',
'reply_to' => 'setReplyTo',
'attachment_url' => 'setAttachmentUrl',
'attachment' => 'setAttachment',
'headers' => 'setHeaders',
'attributes' => 'setAttributes'
Expand All @@ -126,6 +130,7 @@ public static function swaggerFormats()
'email_bcc' => 'getEmailBcc',
'email_cc' => 'getEmailCc',
'reply_to' => 'getReplyTo',
'attachment_url' => 'getAttachmentUrl',
'attachment' => 'getAttachment',
'headers' => 'getHeaders',
'attributes' => 'getAttributes'
Expand Down Expand Up @@ -166,6 +171,7 @@ public function __construct(array $data = null)
$this->container['email_bcc'] = isset($data['email_bcc']) ? $data['email_bcc'] : null;
$this->container['email_cc'] = isset($data['email_cc']) ? $data['email_cc'] : null;
$this->container['reply_to'] = isset($data['reply_to']) ? $data['reply_to'] : null;
$this->container['attachment_url'] = isset($data['attachment_url']) ? $data['attachment_url'] : null;
$this->container['attachment'] = isset($data['attachment']) ? $data['attachment'] : null;
$this->container['headers'] = isset($data['headers']) ? $data['headers'] : null;
$this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null;
Expand Down Expand Up @@ -286,6 +292,27 @@ public function setReplyTo($reply_to)
return $this;
}

/**
* Gets attachment_url
* @return string
*/
public function getAttachmentUrl()
{
return $this->container['attachment_url'];
}

/**
* Sets attachment_url
* @param string $attachment_url Absolute url of the attachment (no local file). Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez
* @return $this
*/
public function setAttachmentUrl($attachment_url)
{
$this->container['attachment_url'] = $attachment_url;

return $this;
}

/**
* Gets attachment
* @return \Swagger\Client\Model\SmtptemplatestemplateIdsendAttachment[]
Expand All @@ -297,7 +324,7 @@ public function getAttachment()

/**
* Sets attachment
* @param \Swagger\Client\Model\SmtptemplatestemplateIdsendAttachment[] $attachment Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez
* @param \Swagger\Client\Model\SmtptemplatestemplateIdsendAttachment[] $attachment Pass the base64 content of the attachment. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez
* @return $this
*/
public function setAttachment($attachment)
Expand Down
6 changes: 3 additions & 3 deletions lib/Model/SendSmtpEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class SendSmtpEmail implements ArrayAccess
'text_content' => 'string',
'subject' => 'string',
'reply_to' => '\Swagger\Client\Model\SmtpemailReplyTo',
'attachment' => '\Swagger\Client\Model\SmtptemplatestemplateIdsendAttachment[]',
'attachment' => '\Swagger\Client\Model\SmtpemailAttachment[]',
'headers' => 'map[string,string]'
];

Expand Down Expand Up @@ -402,7 +402,7 @@ public function setReplyTo($reply_to)

/**
* Gets attachment
* @return \Swagger\Client\Model\SmtptemplatestemplateIdsendAttachment[]
* @return \Swagger\Client\Model\SmtpemailAttachment[]
*/
public function getAttachment()
{
Expand All @@ -411,7 +411,7 @@ public function getAttachment()

/**
* Sets attachment
* @param \Swagger\Client\Model\SmtptemplatestemplateIdsendAttachment[] $attachment Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez
* @param \Swagger\Client\Model\SmtpemailAttachment[] $attachment Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez
* @return $this
*/
public function setAttachment($attachment)
Expand Down
6 changes: 3 additions & 3 deletions lib/Model/SendSmtpEmail1.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class SendSmtpEmail1 implements ArrayAccess
'text_content' => 'string',
'subject' => 'string',
'reply_to' => '\Swagger\Client\Model\SmtpemailReplyTo',
'attachment' => '\Swagger\Client\Model\SmtptemplatestemplateIdsendAttachment[]',
'attachment' => '\Swagger\Client\Model\SmtpemailAttachment[]',
'headers' => 'map[string,string]'
];

Expand Down Expand Up @@ -402,7 +402,7 @@ public function setReplyTo($reply_to)

/**
* Gets attachment
* @return \Swagger\Client\Model\SmtptemplatestemplateIdsendAttachment[]
* @return \Swagger\Client\Model\SmtpemailAttachment[]
*/
public function getAttachment()
{
Expand All @@ -411,7 +411,7 @@ public function getAttachment()

/**
* Sets attachment
* @param \Swagger\Client\Model\SmtptemplatestemplateIdsendAttachment[] $attachment Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez
* @param \Swagger\Client\Model\SmtpemailAttachment[] $attachment Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez
* @return $this
*/
public function setAttachment($attachment)
Expand Down
Loading