sendpost_ruby 1.0.1
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 +106 -0
- data/Rakefile +10 -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/git_push.sh +57 -0
- data/lib/sendpost_ruby/api/email_api.rb +160 -0
- data/lib/sendpost_ruby/api_client.rb +391 -0
- data/lib/sendpost_ruby/api_error.rb +58 -0
- data/lib/sendpost_ruby/configuration.rb +288 -0
- data/lib/sendpost_ruby/models/attachment.rb +228 -0
- data/lib/sendpost_ruby/models/city.rb +255 -0
- data/lib/sendpost_ruby/models/copy_to.rb +237 -0
- data/lib/sendpost_ruby/models/device.rb +219 -0
- data/lib/sendpost_ruby/models/email_message.rb +351 -0
- data/lib/sendpost_ruby/models/email_response.rb +255 -0
- data/lib/sendpost_ruby/models/event_metadata.rb +273 -0
- data/lib/sendpost_ruby/models/from.rb +228 -0
- data/lib/sendpost_ruby/models/os.rb +255 -0
- data/lib/sendpost_ruby/models/q_email_message.rb +461 -0
- data/lib/sendpost_ruby/models/q_event.rb +329 -0
- data/lib/sendpost_ruby/models/reply_to.rb +228 -0
- data/lib/sendpost_ruby/models/to.rb +259 -0
- data/lib/sendpost_ruby/models/user_agent.rb +246 -0
- data/lib/sendpost_ruby/models/webhook_event.rb +228 -0
- data/lib/sendpost_ruby/version.rb +15 -0
- data/lib/sendpost_ruby.rb +55 -0
- data/sendpost_ruby.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 +165 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 319fd2ed664334dc2a2e52552610763cfd4846950e080cf96554457894d0f151
|
4
|
+
data.tar.gz: 534e824390e0947dfc89379d990c460f313fc069aa8b0b4b18b56854a2141f9b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 40ba4daa9b7fead7812fa63e182f7a04a057f23561d914fc6f210b53d30bae1ee99d0076adb03aa4467ce9295039f9b1d3b1266a3d650fd478931c9a90702b7d
|
7
|
+
data.tar.gz: a8fea7dbe7105e16a64f769d04e8967541f8790a94ee4f72d0e67ca841f5e5cf3662709e9c65f2f4b2e169d6580a81ef805f1159d28fe8b608375c89502050b3
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,106 @@
|
|
1
|
+
# sendpost_ruby
|
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
|
+
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
|
+
|
9
|
+
- API version: 1.0.0
|
10
|
+
- Package version: 1.0.1
|
11
|
+
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
### Build a gem
|
16
|
+
|
17
|
+
To build the Ruby code into a gem:
|
18
|
+
|
19
|
+
```shell
|
20
|
+
gem build sendpost_ruby.gemspec
|
21
|
+
```
|
22
|
+
|
23
|
+
Then either install the gem locally:
|
24
|
+
|
25
|
+
```shell
|
26
|
+
gem install ./sendpost_ruby-1.0.1.gem
|
27
|
+
```
|
28
|
+
|
29
|
+
(for development, run `gem install --dev ./sendpost_ruby-1.0.1.gem` to install the development dependencies)
|
30
|
+
|
31
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
32
|
+
|
33
|
+
Finally add this to the Gemfile:
|
34
|
+
|
35
|
+
gem 'sendpost_ruby', '~> 1.0.1'
|
36
|
+
|
37
|
+
### Install from Git
|
38
|
+
|
39
|
+
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
|
40
|
+
|
41
|
+
gem 'sendpost_ruby', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
42
|
+
|
43
|
+
### Include the Ruby code directly
|
44
|
+
|
45
|
+
Include the Ruby code directly using `-I` as follows:
|
46
|
+
|
47
|
+
```shell
|
48
|
+
ruby -Ilib script.rb
|
49
|
+
```
|
50
|
+
|
51
|
+
## Getting Started
|
52
|
+
|
53
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
54
|
+
|
55
|
+
```ruby
|
56
|
+
# Load the gem
|
57
|
+
require 'sendpost_ruby'
|
58
|
+
|
59
|
+
api_instance = Sendpost::EmailApi.new
|
60
|
+
x_sub_account_api_key = 'x_sub_account_api_key_example' # String | Sub-Account API Key
|
61
|
+
opts = {
|
62
|
+
email_message: Sendpost::EmailMessage.new # EmailMessage | Email message
|
63
|
+
}
|
64
|
+
|
65
|
+
begin
|
66
|
+
result = api_instance.send_email(x_sub_account_api_key, opts)
|
67
|
+
p result
|
68
|
+
rescue Sendpost::ApiError => e
|
69
|
+
puts "Exception when calling EmailApi->send_email: #{e}"
|
70
|
+
end
|
71
|
+
|
72
|
+
```
|
73
|
+
|
74
|
+
## Documentation for API Endpoints
|
75
|
+
|
76
|
+
All URIs are relative to *https://api.sendpost.io/api/v1*
|
77
|
+
|
78
|
+
Class | Method | HTTP request | Description
|
79
|
+
------------ | ------------- | ------------- | -------------
|
80
|
+
*Sendpost::EmailApi* | [**send_email**](docs/EmailApi.md#send_email) | **POST** /subaccount/email/ |
|
81
|
+
*Sendpost::EmailApi* | [**send_email_with_template**](docs/EmailApi.md#send_email_with_template) | **POST** /subaccount/email/template |
|
82
|
+
|
83
|
+
|
84
|
+
## Documentation for Models
|
85
|
+
|
86
|
+
- [Sendpost::Attachment](docs/Attachment.md)
|
87
|
+
- [Sendpost::City](docs/City.md)
|
88
|
+
- [Sendpost::CopyTo](docs/CopyTo.md)
|
89
|
+
- [Sendpost::Device](docs/Device.md)
|
90
|
+
- [Sendpost::EmailMessage](docs/EmailMessage.md)
|
91
|
+
- [Sendpost::EmailResponse](docs/EmailResponse.md)
|
92
|
+
- [Sendpost::EventMetadata](docs/EventMetadata.md)
|
93
|
+
- [Sendpost::From](docs/From.md)
|
94
|
+
- [Sendpost::Os](docs/Os.md)
|
95
|
+
- [Sendpost::QEmailMessage](docs/QEmailMessage.md)
|
96
|
+
- [Sendpost::QEvent](docs/QEvent.md)
|
97
|
+
- [Sendpost::ReplyTo](docs/ReplyTo.md)
|
98
|
+
- [Sendpost::To](docs/To.md)
|
99
|
+
- [Sendpost::UserAgent](docs/UserAgent.md)
|
100
|
+
- [Sendpost::WebhookEvent](docs/WebhookEvent.md)
|
101
|
+
|
102
|
+
|
103
|
+
## Documentation for Authorization
|
104
|
+
|
105
|
+
Endpoints do not require authorization.
|
106
|
+
|
data/Rakefile
ADDED
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'
|
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'
|
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'
|
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'
|
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'
|
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'
|
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'
|
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** | **Object** | | [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'
|
17
|
+
|
18
|
+
instance = Sendpost::EmailResponse.new(
|
19
|
+
error_code: 0,
|
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'
|
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'
|
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'
|
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'
|
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'
|
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'
|
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'
|
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
|
+
|