sendpost_ruby_sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +79 -0
- data/Rakefile +10 -0
- data/config-ruby.json +11 -0
- data/docs/Attachment.md +20 -0
- data/docs/City.md +26 -0
- data/docs/CopyTo.md +22 -0
- data/docs/Device.md +18 -0
- data/docs/EmailApi.md +145 -0
- data/docs/EmailMessage.md +46 -0
- data/docs/EmailResponse.md +26 -0
- data/docs/EventMetadata.md +30 -0
- data/docs/From.md +20 -0
- data/docs/Os.md +26 -0
- data/docs/QEmailMessage.md +70 -0
- data/docs/QEvent.md +42 -0
- data/docs/ReplyTo.md +20 -0
- data/docs/To.md +26 -0
- data/docs/UserAgent.md +24 -0
- data/docs/WebhookEvent.md +20 -0
- data/generate-libs.bash +1 -0
- data/git_push.sh +57 -0
- data/lib/sendpost_ruby_sdk/api/email_api.rb +160 -0
- data/lib/sendpost_ruby_sdk/api_client.rb +391 -0
- data/lib/sendpost_ruby_sdk/api_error.rb +58 -0
- data/lib/sendpost_ruby_sdk/configuration.rb +288 -0
- data/lib/sendpost_ruby_sdk/models/attachment.rb +228 -0
- data/lib/sendpost_ruby_sdk/models/city.rb +255 -0
- data/lib/sendpost_ruby_sdk/models/copy_to.rb +237 -0
- data/lib/sendpost_ruby_sdk/models/device.rb +219 -0
- data/lib/sendpost_ruby_sdk/models/email_message.rb +351 -0
- data/lib/sendpost_ruby_sdk/models/email_response.rb +255 -0
- data/lib/sendpost_ruby_sdk/models/event_metadata.rb +273 -0
- data/lib/sendpost_ruby_sdk/models/from.rb +228 -0
- data/lib/sendpost_ruby_sdk/models/os.rb +255 -0
- data/lib/sendpost_ruby_sdk/models/q_email_message.rb +461 -0
- data/lib/sendpost_ruby_sdk/models/q_event.rb +329 -0
- data/lib/sendpost_ruby_sdk/models/reply_to.rb +228 -0
- data/lib/sendpost_ruby_sdk/models/to.rb +259 -0
- data/lib/sendpost_ruby_sdk/models/user_agent.rb +246 -0
- data/lib/sendpost_ruby_sdk/models/webhook_event.rb +228 -0
- data/lib/sendpost_ruby_sdk/version.rb +15 -0
- data/lib/sendpost_ruby_sdk.rb +55 -0
- data/sendpost.yaml +438 -0
- data/sendpost_ruby_sdk.gemspec +38 -0
- data/spec/api/email_api_spec.rb +59 -0
- data/spec/api_client_spec.rb +228 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/attachment_spec.rb +40 -0
- data/spec/models/city_spec.rb +58 -0
- data/spec/models/copy_to_spec.rb +46 -0
- data/spec/models/device_spec.rb +34 -0
- data/spec/models/email_message_spec.rb +118 -0
- data/spec/models/email_response_spec.rb +58 -0
- data/spec/models/event_metadata_spec.rb +70 -0
- data/spec/models/from_spec.rb +40 -0
- data/spec/models/os_spec.rb +58 -0
- data/spec/models/q_email_message_spec.rb +190 -0
- data/spec/models/q_event_spec.rb +106 -0
- data/spec/models/reply_to_spec.rb +40 -0
- data/spec/models/to_spec.rb +58 -0
- data/spec/models/user_agent_spec.rb +52 -0
- data/spec/models/webhook_event_spec.rb +40 -0
- data/spec/spec_helper.rb +111 -0
- metadata +168 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9eb2149c22351f9d17d9847b0033f1bcc4e92af1425143e350f9de9ed0cd2c03
|
4
|
+
data.tar.gz: 359e1e022b62989d09c73ac780da73aec846ace95cc8029d0b24836d0783053a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e1e71a7501180a3796d5ad29a933adfb0d8278b896e92ce65688022f6ecc1eb1636767af0475833d3b9dfad0ddc2e39b253d40f1e9edde32cc6b58ddc03e3f40
|
7
|
+
data.tar.gz: 3f1481486c0ecff2636699e4f2c02f2e90f0a2776a110fdf4a3ac32275246a72f0c0f23b3cde6a7cbea1bf28b0c851c167b0b1800685e05f3eadff84ae997cb2
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
# sendpost_ruby_sdk
|
2
|
+
|
3
|
+
Sendpost - the Ruby gem for the SendPost API
|
4
|
+
|
5
|
+
Email API and SMTP relay to not just send and measure email sending, but also alert and optimise. We provide you with tools, expertise and support needed to reliably deliver emails to your customers inboxes on time, every time.
|
6
|
+
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
```shell
|
11
|
+
gem install sendpost_ruby_sdk-1.0.0.gem
|
12
|
+
```
|
13
|
+
|
14
|
+
## Getting Started
|
15
|
+
|
16
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'sendpost_ruby_sdk'
|
20
|
+
|
21
|
+
api_instance = Sendpost::EmailApi.new
|
22
|
+
x_sub_account_api_key = 'your_api_key' # String | Sub-Account API Key
|
23
|
+
email_message = Sendpost::EmailMessage.new
|
24
|
+
email_message.from = {
|
25
|
+
email: 'richard@piedpiper.com'
|
26
|
+
}
|
27
|
+
email_message.to = [{
|
28
|
+
email: 'gavin@hooli.com'
|
29
|
+
}]
|
30
|
+
email_message.subject = 'Hello World'
|
31
|
+
email_message.html_body = '<strong>it works!</strong>'
|
32
|
+
email_message.ippool = 'PiedPiper'
|
33
|
+
|
34
|
+
opts = {
|
35
|
+
email_message: email_message # EmailMessage | Email message
|
36
|
+
}
|
37
|
+
|
38
|
+
begin
|
39
|
+
result = api_instance.send_email(x_sub_account_api_key, opts)
|
40
|
+
p result
|
41
|
+
rescue Sendpost::ApiError => e
|
42
|
+
puts "Exception when calling EmailApi->send_email: #{e}"
|
43
|
+
end
|
44
|
+
|
45
|
+
```
|
46
|
+
|
47
|
+
## Documentation for API Endpoints
|
48
|
+
|
49
|
+
All URIs are relative to *https://api.sendpost.io/api/v1*
|
50
|
+
|
51
|
+
Class | Method | HTTP request | Description
|
52
|
+
------------ | ------------- | ------------- | -------------
|
53
|
+
*Sendpost::EmailApi* | [**send_email**](docs/EmailApi.md#send_email) | **POST** /subaccount/email/ |
|
54
|
+
*Sendpost::EmailApi* | [**send_email_with_template**](docs/EmailApi.md#send_email_with_template) | **POST** /subaccount/email/template |
|
55
|
+
|
56
|
+
|
57
|
+
## Documentation for Models
|
58
|
+
|
59
|
+
- [Sendpost::Attachment](docs/Attachment.md)
|
60
|
+
- [Sendpost::City](docs/City.md)
|
61
|
+
- [Sendpost::CopyTo](docs/CopyTo.md)
|
62
|
+
- [Sendpost::Device](docs/Device.md)
|
63
|
+
- [Sendpost::EmailMessage](docs/EmailMessage.md)
|
64
|
+
- [Sendpost::EmailResponse](docs/EmailResponse.md)
|
65
|
+
- [Sendpost::EventMetadata](docs/EventMetadata.md)
|
66
|
+
- [Sendpost::From](docs/From.md)
|
67
|
+
- [Sendpost::Os](docs/Os.md)
|
68
|
+
- [Sendpost::QEmailMessage](docs/QEmailMessage.md)
|
69
|
+
- [Sendpost::QEvent](docs/QEvent.md)
|
70
|
+
- [Sendpost::ReplyTo](docs/ReplyTo.md)
|
71
|
+
- [Sendpost::To](docs/To.md)
|
72
|
+
- [Sendpost::UserAgent](docs/UserAgent.md)
|
73
|
+
- [Sendpost::WebhookEvent](docs/WebhookEvent.md)
|
74
|
+
|
75
|
+
|
76
|
+
## Documentation for Authorization
|
77
|
+
|
78
|
+
Endpoints do not require authorization.
|
79
|
+
|
data/Rakefile
ADDED
data/config-ruby.json
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
{
|
2
|
+
"moduleName": "Sendpost",
|
3
|
+
"prependFormOrBodyParameters": true,
|
4
|
+
"gemAuthor": "Sendpost",
|
5
|
+
"gemAuthorEmail": "dev@sendpost.io",
|
6
|
+
"gemDescription": "Email API and SMTP relay to not just send and measure email sending, but also alert and optimise. We provide you with tools, expertise and support needed to reliably deliver emails to your customers inboxes on time, every time.",
|
7
|
+
"gemHomepage": "https://sendpost.io/",
|
8
|
+
"gemSummary": "SendPost Ruby API",
|
9
|
+
"gemName": "sendpost_ruby_sdk",
|
10
|
+
"gemVersion": "1.0.0"
|
11
|
+
}
|
data/docs/Attachment.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# Sendpost::Attachment
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **content** | **String** | | [optional] |
|
8
|
+
| **filename** | **String** | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'sendpost_ruby_sdk'
|
14
|
+
|
15
|
+
instance = Sendpost::Attachment.new(
|
16
|
+
content: V2VsY29tZSB0byBTZW5kUG9zdCEgOikK,
|
17
|
+
filename: file0.txt
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
data/docs/City.md
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# Sendpost::City
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **city_id** | **Integer** | | [optional] |
|
8
|
+
| **continent_code** | **String** | | [optional] |
|
9
|
+
| **country_code** | **String** | | [optional] |
|
10
|
+
| **postal_code** | **String** | | [optional] |
|
11
|
+
| **time_zone** | **String** | | [optional] |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'sendpost_ruby_sdk'
|
17
|
+
|
18
|
+
instance = Sendpost::City.new(
|
19
|
+
city_id: null,
|
20
|
+
continent_code: null,
|
21
|
+
country_code: null,
|
22
|
+
postal_code: null,
|
23
|
+
time_zone: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
data/docs/CopyTo.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# Sendpost::CopyTo
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | | [optional] |
|
8
|
+
| **email** | **String** | | [optional] |
|
9
|
+
| **custom_fields** | **Object** | | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'sendpost_ruby_sdk'
|
15
|
+
|
16
|
+
instance = Sendpost::CopyTo.new(
|
17
|
+
name: Nelson Bighetti,
|
18
|
+
email: bighead@bachmanity.com,
|
19
|
+
custom_fields: {"Company":"Bachmanity"}
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
data/docs/Device.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# Sendpost::Device
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **family** | **String** | | [optional] |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'sendpost_ruby_sdk'
|
13
|
+
|
14
|
+
instance = Sendpost::Device.new(
|
15
|
+
family: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
data/docs/EmailApi.md
ADDED
@@ -0,0 +1,145 @@
|
|
1
|
+
# Sendpost::EmailApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.sendpost.io/api/v1*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**send_email**](EmailApi.md#send_email) | **POST** /subaccount/email/ | |
|
8
|
+
| [**send_email_with_template**](EmailApi.md#send_email_with_template) | **POST** /subaccount/email/template | |
|
9
|
+
|
10
|
+
|
11
|
+
## send_email
|
12
|
+
|
13
|
+
> <Array<EmailResponse>> send_email(x_sub_account_api_key, opts)
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
Send Email To Contacts
|
18
|
+
|
19
|
+
### Examples
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
require 'time'
|
23
|
+
require 'sendpost_ruby_sdk'
|
24
|
+
|
25
|
+
api_instance = Sendpost::EmailApi.new
|
26
|
+
x_sub_account_api_key = 'x_sub_account_api_key_example' # String | Sub-Account API Key
|
27
|
+
opts = {
|
28
|
+
email_message: Sendpost::EmailMessage.new # EmailMessage | Email message
|
29
|
+
}
|
30
|
+
|
31
|
+
begin
|
32
|
+
|
33
|
+
result = api_instance.send_email(x_sub_account_api_key, opts)
|
34
|
+
p result
|
35
|
+
rescue Sendpost::ApiError => e
|
36
|
+
puts "Error when calling EmailApi->send_email: #{e}"
|
37
|
+
end
|
38
|
+
```
|
39
|
+
|
40
|
+
#### Using the send_email_with_http_info variant
|
41
|
+
|
42
|
+
This returns an Array which contains the response data, status code and headers.
|
43
|
+
|
44
|
+
> <Array(<Array<EmailResponse>>, Integer, Hash)> send_email_with_http_info(x_sub_account_api_key, opts)
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
begin
|
48
|
+
|
49
|
+
data, status_code, headers = api_instance.send_email_with_http_info(x_sub_account_api_key, opts)
|
50
|
+
p status_code # => 2xx
|
51
|
+
p headers # => { ... }
|
52
|
+
p data # => <Array<EmailResponse>>
|
53
|
+
rescue Sendpost::ApiError => e
|
54
|
+
puts "Error when calling EmailApi->send_email_with_http_info: #{e}"
|
55
|
+
end
|
56
|
+
```
|
57
|
+
|
58
|
+
### Parameters
|
59
|
+
|
60
|
+
| Name | Type | Description | Notes |
|
61
|
+
| ---- | ---- | ----------- | ----- |
|
62
|
+
| **x_sub_account_api_key** | **String** | Sub-Account API Key | |
|
63
|
+
| **email_message** | [**EmailMessage**](EmailMessage.md) | Email message | [optional] |
|
64
|
+
|
65
|
+
### Return type
|
66
|
+
|
67
|
+
[**Array<EmailResponse>**](EmailResponse.md)
|
68
|
+
|
69
|
+
### Authorization
|
70
|
+
|
71
|
+
No authorization required
|
72
|
+
|
73
|
+
### HTTP request headers
|
74
|
+
|
75
|
+
- **Content-Type**: application/json
|
76
|
+
- **Accept**: application/json
|
77
|
+
|
78
|
+
|
79
|
+
## send_email_with_template
|
80
|
+
|
81
|
+
> <Array<EmailResponse>> send_email_with_template(x_sub_account_api_key, opts)
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
Send Email To Contacts With Template
|
86
|
+
|
87
|
+
### Examples
|
88
|
+
|
89
|
+
```ruby
|
90
|
+
require 'time'
|
91
|
+
require 'sendpost_ruby_sdk'
|
92
|
+
|
93
|
+
api_instance = Sendpost::EmailApi.new
|
94
|
+
x_sub_account_api_key = 'x_sub_account_api_key_example' # String | Sub-Account API Key
|
95
|
+
opts = {
|
96
|
+
email_message: Sendpost::EmailMessage.new # EmailMessage | Email message
|
97
|
+
}
|
98
|
+
|
99
|
+
begin
|
100
|
+
|
101
|
+
result = api_instance.send_email_with_template(x_sub_account_api_key, opts)
|
102
|
+
p result
|
103
|
+
rescue Sendpost::ApiError => e
|
104
|
+
puts "Error when calling EmailApi->send_email_with_template: #{e}"
|
105
|
+
end
|
106
|
+
```
|
107
|
+
|
108
|
+
#### Using the send_email_with_template_with_http_info variant
|
109
|
+
|
110
|
+
This returns an Array which contains the response data, status code and headers.
|
111
|
+
|
112
|
+
> <Array(<Array<EmailResponse>>, Integer, Hash)> send_email_with_template_with_http_info(x_sub_account_api_key, opts)
|
113
|
+
|
114
|
+
```ruby
|
115
|
+
begin
|
116
|
+
|
117
|
+
data, status_code, headers = api_instance.send_email_with_template_with_http_info(x_sub_account_api_key, opts)
|
118
|
+
p status_code # => 2xx
|
119
|
+
p headers # => { ... }
|
120
|
+
p data # => <Array<EmailResponse>>
|
121
|
+
rescue Sendpost::ApiError => e
|
122
|
+
puts "Error when calling EmailApi->send_email_with_template_with_http_info: #{e}"
|
123
|
+
end
|
124
|
+
```
|
125
|
+
|
126
|
+
### Parameters
|
127
|
+
|
128
|
+
| Name | Type | Description | Notes |
|
129
|
+
| ---- | ---- | ----------- | ----- |
|
130
|
+
| **x_sub_account_api_key** | **String** | Sub-Account API Key | |
|
131
|
+
| **email_message** | [**EmailMessage**](EmailMessage.md) | Email message | [optional] |
|
132
|
+
|
133
|
+
### Return type
|
134
|
+
|
135
|
+
[**Array<EmailResponse>**](EmailResponse.md)
|
136
|
+
|
137
|
+
### Authorization
|
138
|
+
|
139
|
+
No authorization required
|
140
|
+
|
141
|
+
### HTTP request headers
|
142
|
+
|
143
|
+
- **Content-Type**: application/json
|
144
|
+
- **Accept**: application/json
|
145
|
+
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# Sendpost::EmailMessage
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **attachments** | [**Array<Attachment>**](Attachment.md) | | [optional] |
|
8
|
+
| **from** | [**From**](From.md) | | [optional] |
|
9
|
+
| **groups** | **Array<String>** | | [optional] |
|
10
|
+
| **html_body** | **String** | | [optional] |
|
11
|
+
| **ippool** | **String** | | [optional] |
|
12
|
+
| **pre_text** | **String** | | [optional] |
|
13
|
+
| **reply_to** | [**ReplyTo**](ReplyTo.md) | | [optional] |
|
14
|
+
| **subject** | **String** | | [optional] |
|
15
|
+
| **template** | **String** | | [optional] |
|
16
|
+
| **text_body** | **String** | | [optional] |
|
17
|
+
| **to** | [**Array<To>**](To.md) | | [optional] |
|
18
|
+
| **track_clicks** | **Boolean** | | [optional] |
|
19
|
+
| **track_opens** | **Boolean** | | [optional] |
|
20
|
+
| **headers** | **Object** | | [optional] |
|
21
|
+
| **amp_body** | **String** | | [optional] |
|
22
|
+
|
23
|
+
## Example
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
require 'sendpost_ruby_sdk'
|
27
|
+
|
28
|
+
instance = Sendpost::EmailMessage.new(
|
29
|
+
attachments: null,
|
30
|
+
from: null,
|
31
|
+
groups: ["promotion","techcrunch-launch"],
|
32
|
+
html_body: <html><body>Thanks for your trust in Hooli {{.Name}}. We are trying launching Nucleus at TechCrunch Disrupt - our cloud based compression platform. That you could easily integrate it into {{.Company}}.</html></body>,
|
33
|
+
ippool: promotional-hooli,
|
34
|
+
pre_text: Follow the steps to integrate our video compression API,
|
35
|
+
reply_to: null,
|
36
|
+
subject: Welcome to Nucles {{.Name}}:) Let's get started,
|
37
|
+
template: welcome-onboarding,
|
38
|
+
text_body: Thanks for your trust in Hooli {{.Name}}. We are trying launching Nucleus at TechCrunch Disrupt - our cloud based compression platform. That you could easily integrate it into {{.Company}},
|
39
|
+
to: null,
|
40
|
+
track_clicks: true,
|
41
|
+
track_opens: true,
|
42
|
+
headers: {"X-Campaign-Id":"techcrunch-launch"},
|
43
|
+
amp_body: null
|
44
|
+
)
|
45
|
+
```
|
46
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# Sendpost::EmailResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **error_code** | **Integer** | | [optional] |
|
8
|
+
| **message** | **String** | | [optional] |
|
9
|
+
| **message_id** | **String** | | [optional] |
|
10
|
+
| **submitted_at** | **Integer** | | [optional] |
|
11
|
+
| **to** | **String** | | [optional] |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'sendpost_ruby_sdk'
|
17
|
+
|
18
|
+
instance = Sendpost::EmailResponse.new(
|
19
|
+
error_code: 500,
|
20
|
+
message: ok,
|
21
|
+
message_id: 0e139af1-f1xe-480d-b08d-eg28m48kf48d,
|
22
|
+
submitted_at: 1567512491587205124,
|
23
|
+
to: bighead@bachmanity.com
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Sendpost::EventMetadata
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **clicked_url** | **String** | | [optional] |
|
8
|
+
| **device** | [**Device**](Device.md) | | [optional] |
|
9
|
+
| **geo** | [**City**](City.md) | | [optional] |
|
10
|
+
| **os** | [**Os**](Os.md) | | [optional] |
|
11
|
+
| **smtp_code** | **Integer** | | [optional] |
|
12
|
+
| **smtp_description** | **String** | | [optional] |
|
13
|
+
| **user_agent** | [**UserAgent**](UserAgent.md) | | [optional] |
|
14
|
+
|
15
|
+
## Example
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'sendpost_ruby_sdk'
|
19
|
+
|
20
|
+
instance = Sendpost::EventMetadata.new(
|
21
|
+
clicked_url: null,
|
22
|
+
device: null,
|
23
|
+
geo: null,
|
24
|
+
os: null,
|
25
|
+
smtp_code: 200,
|
26
|
+
smtp_description: email delivered successfully,
|
27
|
+
user_agent: null
|
28
|
+
)
|
29
|
+
```
|
30
|
+
|
data/docs/From.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# Sendpost::From
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **email** | **String** | | [optional] |
|
8
|
+
| **name** | **String** | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'sendpost_ruby_sdk'
|
14
|
+
|
15
|
+
instance = Sendpost::From.new(
|
16
|
+
email: gavin@hooli.com,
|
17
|
+
name: Gavin Belson
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
data/docs/Os.md
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# Sendpost::Os
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **family** | **String** | | [optional] |
|
8
|
+
| **major** | **String** | | [optional] |
|
9
|
+
| **minor** | **String** | | [optional] |
|
10
|
+
| **patch** | **String** | | [optional] |
|
11
|
+
| **patch_minor** | **String** | | [optional] |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'sendpost_ruby_sdk'
|
17
|
+
|
18
|
+
instance = Sendpost::Os.new(
|
19
|
+
family: null,
|
20
|
+
major: null,
|
21
|
+
minor: null,
|
22
|
+
patch: null,
|
23
|
+
patch_minor: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# Sendpost::QEmailMessage
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **account_id** | **Integer** | | [optional] |
|
8
|
+
| **amp_body** | **String** | | [optional] |
|
9
|
+
| **attachments** | [**Array<Attachment>**](Attachment.md) | | [optional] |
|
10
|
+
| **attempt** | **Integer** | | [optional] |
|
11
|
+
| **custom_fields** | **Object** | | [optional] |
|
12
|
+
| **email_type** | **String** | | [optional] |
|
13
|
+
| **from** | [**From**](From.md) | | [optional] |
|
14
|
+
| **groups** | **Array<String>** | | [optional] |
|
15
|
+
| **header_bcc** | [**Array<CopyTo>**](CopyTo.md) | | [optional] |
|
16
|
+
| **header_cc** | [**Array<CopyTo>**](CopyTo.md) | | [optional] |
|
17
|
+
| **header_to** | [**To**](To.md) | | [optional] |
|
18
|
+
| **headers** | **Object** | | [optional] |
|
19
|
+
| **html_body** | **String** | | [optional] |
|
20
|
+
| **ip_id** | **Integer** | | [optional] |
|
21
|
+
| **ip_pool** | **String** | | [optional] |
|
22
|
+
| **local_ip** | **String** | | [optional] |
|
23
|
+
| **message_id** | **String** | | [optional] |
|
24
|
+
| **pre_text** | **String** | | [optional] |
|
25
|
+
| **public_ip** | **String** | | [optional] |
|
26
|
+
| **reply_to** | [**ReplyTo**](ReplyTo.md) | | [optional] |
|
27
|
+
| **sub_account_id** | **Integer** | | [optional] |
|
28
|
+
| **subject** | **String** | | [optional] |
|
29
|
+
| **submitted_at** | **Integer** | | [optional] |
|
30
|
+
| **text_body** | **String** | | [optional] |
|
31
|
+
| **to** | [**To**](To.md) | | [optional] |
|
32
|
+
| **track_clicks** | **Boolean** | | [optional] |
|
33
|
+
| **track_opens** | **Boolean** | | [optional] |
|
34
|
+
|
35
|
+
## Example
|
36
|
+
|
37
|
+
```ruby
|
38
|
+
require 'sendpost_ruby_sdk'
|
39
|
+
|
40
|
+
instance = Sendpost::QEmailMessage.new(
|
41
|
+
account_id: 117,
|
42
|
+
amp_body: null,
|
43
|
+
attachments: null,
|
44
|
+
attempt: 1,
|
45
|
+
custom_fields: {"Company":"Bachmanity"},
|
46
|
+
email_type: gmail,
|
47
|
+
from: null,
|
48
|
+
groups: ["promotion","techcrunch-launch"],
|
49
|
+
header_bcc: null,
|
50
|
+
header_cc: null,
|
51
|
+
header_to: null,
|
52
|
+
headers: {"X-Campaign-Id":"techcrunch-launch"},
|
53
|
+
html_body: <html><body>{{.FirstName}}, I have been following your journey since {{.Company}} days. Just wanted to thank you for inspiring us.</body></html>,
|
54
|
+
ip_id: 18,
|
55
|
+
ip_pool: transactional-piedpiper,
|
56
|
+
local_ip: 172.30.2.45,
|
57
|
+
message_id: 0c6c7600-e68d-498e-b924-d8105130cc1d,
|
58
|
+
pre_text: thanks for the inspiration ...,
|
59
|
+
public_ip: 52.13.11.9,
|
60
|
+
reply_to: null,
|
61
|
+
sub_account_id: 234,
|
62
|
+
subject: Building great products?,
|
63
|
+
submitted_at: 1567512491587205024,
|
64
|
+
text_body: {{.FirstName}}, I have been following your journey since {{.Company}} days. Just wanted to thank you for inspiring us.,
|
65
|
+
to: null,
|
66
|
+
track_clicks: true,
|
67
|
+
track_opens: true
|
68
|
+
)
|
69
|
+
```
|
70
|
+
|
data/docs/QEvent.md
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# Sendpost::QEvent
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **account_id** | **Integer** | | [optional] |
|
8
|
+
| **event_id** | **String** | | [optional] |
|
9
|
+
| **event_metadata** | [**EventMetadata**](EventMetadata.md) | | [optional] |
|
10
|
+
| **from** | **String** | | [optional] |
|
11
|
+
| **groups** | **Array<String>** | | [optional] |
|
12
|
+
| **ip_id** | **Integer** | | [optional] |
|
13
|
+
| **message_id** | **String** | | [optional] |
|
14
|
+
| **message_type** | **String** | | [optional] |
|
15
|
+
| **sub_account_id** | **Integer** | | [optional] |
|
16
|
+
| **submitted_at** | **Integer** | | [optional] |
|
17
|
+
| **to** | **String** | | [optional] |
|
18
|
+
| **tpsp_id** | **Integer** | | [optional] |
|
19
|
+
| **type** | **Integer** | | [optional] |
|
20
|
+
|
21
|
+
## Example
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
require 'sendpost_ruby_sdk'
|
25
|
+
|
26
|
+
instance = Sendpost::QEvent.new(
|
27
|
+
account_id: 8,
|
28
|
+
event_id: 8690608c-2538-4173-a463-f0de475633da,
|
29
|
+
event_metadata: null,
|
30
|
+
from: gavin@hooli.com,
|
31
|
+
groups: ["promotion","techcrunch-launch"],
|
32
|
+
ip_id: 7,
|
33
|
+
message_id: edcb833d-5ef6-48c3-936f-1de0b74843d4,
|
34
|
+
message_type: default,
|
35
|
+
sub_account_id: 28,
|
36
|
+
submitted_at: 1689245147247766056,
|
37
|
+
to: richard@piedpiper.com,
|
38
|
+
tpsp_id: 0,
|
39
|
+
type: 2
|
40
|
+
)
|
41
|
+
```
|
42
|
+
|
data/docs/ReplyTo.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# Sendpost::ReplyTo
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **email** | **String** | | [optional] |
|
8
|
+
| **name** | **String** | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'sendpost_ruby_sdk'
|
14
|
+
|
15
|
+
instance = Sendpost::ReplyTo.new(
|
16
|
+
email: welcome@hooli.vom,
|
17
|
+
name: Team @ Hooli
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
data/docs/To.md
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# Sendpost::To
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | | [optional] |
|
8
|
+
| **email** | **String** | | [optional] |
|
9
|
+
| **cc** | [**Array<CopyTo>**](CopyTo.md) | | [optional] |
|
10
|
+
| **bcc** | [**Array<CopyTo>**](CopyTo.md) | | [optional] |
|
11
|
+
| **custom_fields** | **Object** | | [optional] |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'sendpost_ruby_sdk'
|
17
|
+
|
18
|
+
instance = Sendpost::To.new(
|
19
|
+
name: Elrich Bachman,
|
20
|
+
email: elrich@bachmanity.com,
|
21
|
+
cc: null,
|
22
|
+
bcc: null,
|
23
|
+
custom_fields: {"Company":"Bachmanity"}
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|