mailjet 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -17
- data/lib/mailjet/message_delivery.rb +2 -1
- data/lib/mailjet/resource.rb +62 -9
- data/lib/mailjet/resources/apikey.rb +2 -2
- data/lib/mailjet/resources/apikeyaccess.rb +2 -2
- data/lib/mailjet/resources/apikeytotals.rb +3 -3
- data/lib/mailjet/resources/apitoken.rb +2 -2
- data/lib/mailjet/resources/axtesting.rb +12 -0
- data/lib/mailjet/resources/batchjob.rb +2 -2
- data/lib/mailjet/resources/bouncestatistics.rb +3 -3
- data/lib/mailjet/resources/campaign.rb +2 -2
- data/lib/mailjet/resources/campaignstatistics.rb +3 -3
- data/lib/mailjet/resources/clickstatistics.rb +3 -3
- data/lib/mailjet/resources/contact.rb +2 -2
- data/lib/mailjet/resources/contactdata.rb +2 -2
- data/lib/mailjet/resources/contactfilter.rb +2 -2
- data/lib/mailjet/resources/contacthistorydata.rb +2 -2
- data/lib/mailjet/resources/contactmetadata.rb +2 -2
- data/lib/mailjet/resources/contactslist.rb +2 -2
- data/lib/mailjet/resources/contactslistsignup.rb +2 -2
- data/lib/mailjet/resources/contactstatistics.rb +3 -3
- data/lib/mailjet/resources/csvimport.rb +2 -2
- data/lib/mailjet/resources/domainstatistics.rb +3 -3
- data/lib/mailjet/resources/eventcallbackurl.rb +2 -2
- data/lib/mailjet/resources/geostatistics.rb +3 -3
- data/lib/mailjet/resources/graphstatistics.rb +3 -3
- data/lib/mailjet/resources/listrecipient.rb +3 -3
- data/lib/mailjet/resources/listrecipientstatistics.rb +3 -3
- data/lib/mailjet/resources/liststatistics.rb +3 -3
- data/lib/mailjet/resources/manycontacts.rb +2 -2
- data/lib/mailjet/resources/message.rb +2 -2
- data/lib/mailjet/resources/messagehistory.rb +3 -3
- data/lib/mailjet/resources/messageinformation.rb +3 -3
- data/lib/mailjet/resources/messagesentstatistics.rb +3 -3
- data/lib/mailjet/resources/messagestate.rb +2 -2
- data/lib/mailjet/resources/messagestatistics.rb +3 -3
- data/lib/mailjet/resources/metadata.rb +3 -3
- data/lib/mailjet/resources/metasender.rb +2 -2
- data/lib/mailjet/resources/myprofile.rb +2 -2
- data/lib/mailjet/resources/newsletter.rb +2 -2
- data/lib/mailjet/resources/newsletterblock.rb +2 -2
- data/lib/mailjet/resources/newsletterproperties.rb +2 -2
- data/lib/mailjet/resources/newslettertemplate.rb +2 -2
- data/lib/mailjet/resources/newslettertemplateblock.rb +2 -2
- data/lib/mailjet/resources/newslettertemplatecategory.rb +2 -2
- data/lib/mailjet/resources/newslettertemplateproperties.rb +2 -2
- data/lib/mailjet/resources/openinformation.rb +3 -3
- data/lib/mailjet/resources/openstatistics.rb +3 -3
- data/lib/mailjet/resources/parseroute.rb +2 -2
- data/lib/mailjet/resources/preferences.rb +2 -2
- data/lib/mailjet/resources/sender.rb +2 -2
- data/lib/mailjet/resources/senderstatistics.rb +3 -3
- data/lib/mailjet/resources/toplinkclicked.rb +3 -3
- data/lib/mailjet/resources/trigger.rb +2 -2
- data/lib/mailjet/resources/user.rb +2 -2
- data/lib/mailjet/resources/useragentstatistics.rb +3 -3
- data/lib/mailjet/resources/widget.rb +2 -2
- data/lib/mailjet/resources/widgetcustomvalue.rb +2 -2
- data/lib/mailjet/version.rb +1 -1
- metadata +46 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2be6a74fb51bd389bb3891306adda8484d6502f8
|
4
|
+
data.tar.gz: fe9905f9978f227106ee168e241be967af1dacb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a0e85431e034bea7ae72d69c88a4f0350b7050f5b43ec27b5e5f0528524e1cd13cbd80f82b9a81aea997dddbdfb0c96963f2eebdd56a9e4c3475bccd3818cb5
|
7
|
+
data.tar.gz: 4ec68185cb8d717dc824da84eb35ba9a3bcf2596f8bdc3df4b68ad6bfc83f286741379691b89ac87da125c2aee3b961a2d8b0742b931aa98392bffba27b5d0d5
|
data/README.md
CHANGED
@@ -96,7 +96,7 @@ As easy as:
|
|
96
96
|
|
97
97
|
```ruby
|
98
98
|
# application.rb
|
99
|
-
config.action_mailer.delivery_method = :
|
99
|
+
config.action_mailer.delivery_method = :mailjet
|
100
100
|
|
101
101
|
```
|
102
102
|
|
@@ -117,6 +117,11 @@ You can find out all the resources you can access to in the [Official API docs][
|
|
117
117
|
|
118
118
|
Let's have a look at the power of this thin wrapper
|
119
119
|
|
120
|
+
### Naming conventions
|
121
|
+
|
122
|
+
* Class names' first letter is capitalized followed by the rest of the resource name in lowercase (e.g. `listrecipient` will be `Listrecipient` in ruby)
|
123
|
+
* Ruby attribute names are the [underscored][underscore-api] versions of API attributes names (e.g. `IsActive` will be `is_active` in ruby)
|
124
|
+
|
120
125
|
### Wrapper REST API
|
121
126
|
|
122
127
|
Let's say we want to manage list recipients.
|
@@ -137,8 +142,6 @@ You can refine queries using [API Filters][apidoc-recipient]`*` as well as the f
|
|
137
142
|
* offset: int (default: 0)
|
138
143
|
* sort: `[[:property, :asc], [:property, :desc]]`
|
139
144
|
|
140
|
-
`*` See below for [naming conventions](#naming-conventions)
|
141
|
-
|
142
145
|
#### GET the resources count
|
143
146
|
|
144
147
|
```ruby
|
@@ -184,20 +187,6 @@ You can refine queries using [API Filters][apidoc-recipient]`*` as well as the f
|
|
184
187
|
=> #<Mailjet::Listrecipient>
|
185
188
|
```
|
186
189
|
|
187
|
-
### Naming conventions
|
188
|
-
|
189
|
-
* Classes names are the [camelcased][camelcase-api] version of resource names (e.g. class name for `listrecipient` resource will be `Listrecipient` - notice the "r" of "recipient" is downcase since the "listrecipient" resource has no dash or underscore between "list" and "recipient")
|
190
|
-
* Ruby attribute names are the [underscored][underscore-api] versions of API attributes names (e.g. `IsActive` will be `is_active` in ruby)
|
191
|
-
* If you do not like the name of the resource, you can easily rename them. For instance, if you want a capital R to ListRecipient, you can define the following class:
|
192
|
-
|
193
|
-
```ruby
|
194
|
-
class ListRecipient
|
195
|
-
include Mailjet::Resource
|
196
|
-
self.resource_path = 'listrecipient'
|
197
|
-
self.public_operations = [:get, :put, :post, :delete] # optional
|
198
|
-
end
|
199
|
-
```
|
200
|
-
|
201
190
|
## Send emails through API
|
202
191
|
|
203
192
|
In order to send emails through the API, you just have to `create` a new `MessageDelivery` resource.
|
@@ -3,7 +3,8 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class MessageDelivery
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = 'v3/send'
|
6
|
+
self.resource_path = 'v3/send/message'
|
7
7
|
self.public_operations = [:post]
|
8
|
+
self.properties = [:from, :sender, :to, :cc, :bcc, :subject, :text, :html, :attachment, :inlineattachment, :header]
|
8
9
|
end
|
9
10
|
end
|
data/lib/mailjet/resource.rb
CHANGED
@@ -7,7 +7,12 @@ require 'active_support/core_ext/module/delegation'
|
|
7
7
|
require 'active_support/concern'
|
8
8
|
require 'active_support/json/decoding'
|
9
9
|
|
10
|
-
|
10
|
+
|
11
|
+
# This option automatically transforms the date output by the API into something a bit more readable.
|
12
|
+
# Setting this option to 'true' -- or having it at all -- may effect a users app by globally implementing this
|
13
|
+
# date transformation feature which may not be desired by the developer for whatever reason.
|
14
|
+
#
|
15
|
+
# ActiveSupport.parse_json_times = false
|
11
16
|
|
12
17
|
module Mailjet
|
13
18
|
module Resource
|
@@ -29,6 +34,10 @@ module Mailjet
|
|
29
34
|
public_operations: public_operations,
|
30
35
|
read_only: read_only)
|
31
36
|
end
|
37
|
+
|
38
|
+
def self.default_headers
|
39
|
+
{ accept: :json, accept_encoding: :deflate }
|
40
|
+
end
|
32
41
|
end
|
33
42
|
|
34
43
|
module ClassMethods
|
@@ -38,21 +47,25 @@ module Mailjet
|
|
38
47
|
|
39
48
|
def all(params = {})
|
40
49
|
params = format_params(params)
|
41
|
-
attribute_array = parse_api_json(connection.get(params: params))
|
50
|
+
attribute_array = parse_api_json(connection.get(default_headers.merge(params: params)))
|
42
51
|
attribute_array.map{ |attributes| instanciate_from_api(attributes) }
|
43
52
|
end
|
44
53
|
|
45
54
|
def count
|
46
|
-
response_json = connection.get(params: {limit: 1, countrecords: 1})
|
55
|
+
response_json = connection.get(default_headers.merge(params: {limit: 1, countrecords: 1}))
|
47
56
|
response_hash = ActiveSupport::JSON.decode(response_json)
|
48
57
|
response_hash['Total']
|
49
58
|
end
|
50
59
|
|
51
60
|
def find(id)
|
52
|
-
attributes = parse_api_json(connection[id].get).first
|
61
|
+
attributes = parse_api_json(connection[id].get(default_headers)).first
|
53
62
|
instanciate_from_api(attributes)
|
54
|
-
rescue
|
55
|
-
|
63
|
+
rescue Mailjet::ApiError => e
|
64
|
+
if e.code == 404
|
65
|
+
nil
|
66
|
+
else
|
67
|
+
raise e
|
68
|
+
end
|
56
69
|
end
|
57
70
|
|
58
71
|
def create(attributes = {})
|
@@ -63,7 +76,7 @@ module Mailjet
|
|
63
76
|
end
|
64
77
|
|
65
78
|
def delete(id)
|
66
|
-
connection[id].delete
|
79
|
+
connection[id].delete(default_headers)
|
67
80
|
end
|
68
81
|
|
69
82
|
def instanciate_from_api(attributes = {})
|
@@ -72,10 +85,40 @@ module Mailjet
|
|
72
85
|
|
73
86
|
def parse_api_json(response_json)
|
74
87
|
response_hash = ActiveSupport::JSON.decode(response_json)
|
88
|
+
#Take the response from the API and put it through a method -- taken from the ActiveSupport library -- which converts
|
89
|
+
#the date-time from "2014-05-19T15:31:09Z" to "Mon, 19 May 2014 15:31:09 +0000" format.
|
90
|
+
response_hash = convert_dates_from(response_hash)
|
91
|
+
#
|
92
|
+
#
|
75
93
|
response_data_array = response_hash['Data']
|
76
94
|
response_data_array.map{ |response_data| underscore_keys(response_data) }
|
77
95
|
end
|
78
96
|
|
97
|
+
# Method -- taken from the ActiveSupport library -- which converts the date-time from
|
98
|
+
#"2014-05-19T15:31:09Z" to "Mon, 19 May 2014 15:31:09 +0000" format.
|
99
|
+
#We may have to change this in the future if ActiveSupport's JSON implementation changes
|
100
|
+
def convert_dates_from(data)
|
101
|
+
case data
|
102
|
+
when nil
|
103
|
+
nil
|
104
|
+
when /^(?:\d{4}-\d{2}-\d{2}|\d{4}-\d{1,2}-\d{1,2}[T \t]+\d{1,2}:\d{2}:\d{2}(\.[0-9]*)?(([ \t]*)Z|[-+]\d{2}?(:\d{2})?))$/
|
105
|
+
begin
|
106
|
+
DateTime.parse(data)
|
107
|
+
rescue ArgumentError
|
108
|
+
data
|
109
|
+
end
|
110
|
+
when Array
|
111
|
+
data.map! { |d| convert_dates_from(d) }
|
112
|
+
when Hash
|
113
|
+
data.each do |key, value|
|
114
|
+
data[key] = convert_dates_from(value)
|
115
|
+
end
|
116
|
+
else
|
117
|
+
data
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
|
79
122
|
def format_params(params)
|
80
123
|
if params[:sort]
|
81
124
|
params[:sort] = params[:sort].map do |attribute, direction|
|
@@ -116,9 +159,9 @@ module Mailjet
|
|
116
159
|
|
117
160
|
def save
|
118
161
|
if persisted?
|
119
|
-
response = connection[id].put(formatted_payload)
|
162
|
+
response = connection[id].put(formatted_payload, default_headers)
|
120
163
|
else
|
121
|
-
response = connection.post(formatted_payload)
|
164
|
+
response = connection.post(formatted_payload, default_headers)
|
122
165
|
end
|
123
166
|
|
124
167
|
self.attributes = parse_api_json(response).first
|
@@ -156,6 +199,10 @@ module Mailjet
|
|
156
199
|
self.class.connection
|
157
200
|
end
|
158
201
|
|
202
|
+
def default_headers
|
203
|
+
self.class.default_headers
|
204
|
+
end
|
205
|
+
|
159
206
|
def formatted_payload
|
160
207
|
payload = attributes.reject { |k,v| v.blank? }
|
161
208
|
payload = payload.slice(*properties)
|
@@ -178,6 +225,12 @@ module Mailjet
|
|
178
225
|
self.class.parse_api_json(response_json)
|
179
226
|
end
|
180
227
|
|
228
|
+
#my code!
|
229
|
+
def convert_dates_from(data)
|
230
|
+
self.class.convert_dates_from(data)
|
231
|
+
end
|
232
|
+
#end my code
|
233
|
+
|
181
234
|
def method_missing(method_symbol, *arguments) #:nodoc:
|
182
235
|
method_name = method_symbol.to_s
|
183
236
|
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Apikey
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/apikey'
|
7
7
|
self.public_operations = [:get, :put, :post, :delete]
|
8
8
|
self.filters = [:api_key, :confirm_key, :custom_status, :is_active, :is_master, :key_type, :name, :user]
|
9
9
|
self.properties = [:api_key, :created_at, :custom_status, :id, :inactive_reason, :is_active, :is_master, :name, :runlevel, :secret_key, :track_host, :user_id]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Apikeyaccess
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/apikeyaccess'
|
7
7
|
self.public_operations = [:get, :put, :post, :delete]
|
8
8
|
self.filters = [:api_key, :is_active, :real_user, :sub_account, :token, :user]
|
9
9
|
self.properties = [:allowed_access, :api_key, :created_at, :custom_name, :id, :is_active, :last_activity_at, :real_user, :subaccount, :user]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,12 +3,12 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Apikeytotals
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/apikeytotals'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = []
|
9
9
|
self.properties = [:blocked_count, :bounced_count, :clicked_count, :delivered_count, :last_activity, :opened_count, :processed_count, :queued_count, :spamcomplaint_count, :unsubscribed_count]
|
10
|
-
|
10
|
+
|
11
11
|
self.read_only = true
|
12
|
-
|
12
|
+
|
13
13
|
end
|
14
14
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Apitoken
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/apitoken'
|
7
7
|
self.public_operations = [:get, :put, :post, :delete]
|
8
8
|
self.filters = [:api_key, :catched_ip, :is_active, :is_api_key_active, :token]
|
9
9
|
self.properties = [:allowed_access, :api_key, :catched_ip, :created_at, :first_used_at, :id, :is_active, :lang, :last_used_at, :sent_data, :timezone, :token, :token_type, :valid_for]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'mailjet/resource'
|
2
|
+
|
3
|
+
module Mailjet
|
4
|
+
class Axtesting
|
5
|
+
include Mailjet::Resource
|
6
|
+
self.resource_path = 'v3/REST/axtesting'
|
7
|
+
self.public_operations = [:get, :put, :post, :delete]
|
8
|
+
self.filters = [:contacts_list, :is_deleted, :segmentation]
|
9
|
+
self.properties = [:contact_list_id, :contact_list_alt, :created_at, :deleted, :id, :mode, :name, :percentage, :remainder_at, :segmentation_id, :segmentation_alt, :starred, :start_at, :status, :status_code, :status_string, :winner_click_rate, :winner_id, :winner_method, :winner_open_rate, :winner_spam_rate, :winner_unsub_rate]
|
10
|
+
|
11
|
+
end
|
12
|
+
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Batchjob
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/batchjob'
|
7
7
|
self.public_operations = [:get, :put, :post]
|
8
8
|
self.filters = [:api_key, :data, :job_type, :max_job_end, :max_job_start, :max_request_at, :method, :min_job_end, :min_job_start, :min_request_at, :ref_id, :status]
|
9
9
|
self.properties = [:alive_at, :api_key, :blocksize, :count, :current, :data, :errcount, :err_treshold, :id, :job_end, :job_start, :job_type, :method, :ref_id, :request_at, :status, :throttle]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,12 +3,12 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Bouncestatistics
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/bouncestatistics'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = [:campaign_id, :campaign_status, :contacts_list, :custom_campaign, :from, :from_domain, :from_id, :from_ts, :from_type, :is_deleted, :is_newsletter_tool, :is_starred, :message_status, :period, :to_ts]
|
9
9
|
self.properties = [:bounced_at, :campaign, :contact, :id, :is_blocked, :is_state_permanent, :state]
|
10
|
-
|
10
|
+
|
11
11
|
self.read_only = true
|
12
|
-
|
12
|
+
|
13
13
|
end
|
14
14
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Campaign
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/campaign'
|
7
7
|
self.public_operations = [:get, :put]
|
8
8
|
self.filters = [:campaign_id, :campaign_status, :contacts_list, :custom_campaign, :from, :from_domain, :from_id, :from_ts, :from_type, :is_deleted, :is_newsletter_tool, :is_starred, :period, :to_ts]
|
9
9
|
self.properties = [:campaign_type, :click_tracked, :created_at, :custom_value, :first_message_id, :from, :from_email, :from_name, :has_html_count, :has_txt_count, :id, :is_deleted, :is_starred, :list, :news_letter_id, :open_tracked, :segmentation, :send_end_at, :send_start_at, :spamass_score, :status, :subject, :unsubscribe_tracked_count]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,12 +3,12 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Campaignstatistics
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/campaignstatistics'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = [:blocked, :bounced, :campaign_status, :click, :contacts_list, :from_type, :is_deleted, :is_starred, :last_activity_at, :max_last_activity_at, :min_last_activity_at, :news_letter, :open, :queued, :sender, :sent, :spam, :subject, :unsubscribed]
|
9
9
|
self.properties = [:blocked_count, :bounced_count, :campaign, :clicked_count, :delivered_count, :last_activity_at, :news_letter, :opened_count, :processed_count, :queued_count, :spam_complaint_count, :unsubscribed_count]
|
10
|
-
|
10
|
+
|
11
11
|
self.read_only = true
|
12
|
-
|
12
|
+
|
13
13
|
end
|
14
14
|
end
|
@@ -3,12 +3,12 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Clickstatistics
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/clickstatistics'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = [:campaign_id, :campaign_status, :contacts_list, :custom_campaign, :from, :from_domain, :from_id, :from_ts, :from_type, :is_deleted, :is_newsletter_tool, :is_starred, :message_id, :message_status, :period, :to_ts]
|
9
9
|
self.properties = [:clicked_at, :clicked_delay, :contact, :id, :message, :url, :user_agent]
|
10
|
-
|
10
|
+
|
11
11
|
self.read_only = true
|
12
|
-
|
12
|
+
|
13
13
|
end
|
14
14
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Contact
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/contact'
|
7
7
|
self.public_operations = [:get, :put, :post]
|
8
8
|
self.filters = [:campaign, :contacts_list, :is_unsubscribed, :last_activity_at, :recipient, :status]
|
9
9
|
self.properties = [:created_at, :delivered_count, :email, :id, :is_opt_in_pending, :is_spam_complaining, :last_activity_at, :last_update_at, :name, :unsubscribed_at, :unsubscribed_by]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Contactdata
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/contactdata'
|
7
7
|
self.public_operations = [:get, :put, :post, :delete]
|
8
8
|
self.filters = [:campaign, :contacts_list, :fields, :is_unsubscribed, :last_activity_at, :recipient, :status]
|
9
9
|
self.properties = [:contact_id, :data, :id]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Contactfilter
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/contactfilter'
|
7
7
|
self.public_operations = [:get, :put, :post, :delete]
|
8
8
|
self.filters = [:show_deleted, :status]
|
9
9
|
self.properties = [:description, :expression, :id, :name, :status]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Contacthistorydata
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/contacthistorydata'
|
7
7
|
self.public_operations = [:get, :post, :delete]
|
8
8
|
self.filters = [:contact, :last, :max_created_at, :min_created_at, :name]
|
9
9
|
self.properties = [:contact, :created_at, :data, :id, :name]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Contactmetadata
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/contactmetadata'
|
7
7
|
self.public_operations = [:get, :put, :post, :delete]
|
8
8
|
self.filters = [:data_type, :namespace]
|
9
9
|
self.properties = [:datatype, :id, :name, :name_space]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Contactslist
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/contactslist'
|
7
7
|
self.public_operations = [:get, :put, :post, :delete]
|
8
8
|
self.filters = [:address, :exclude_id, :is_deleted, :name]
|
9
9
|
self.properties = [:address, :created_at, :id, :is_deleted, :name, :subscriber_count]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Contactslistsignup
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/contactslistsignup'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = [:api_key, :contact, :contacts_list, :domain, :email, :local_part, :max_confirm_at, :max_signup_at, :min_confirm_at, :min_signup_at, :source, :source_id]
|
9
9
|
self.properties = [:confirm_at, :confirm_ip, :contact, :email, :id, :list, :recipient, :signup_at, :signup_ip, :signup_key, :source, :source_id]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,12 +3,12 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Contactstatistics
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/contactstatistics'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = [:blocked, :bounced, :click, :last_activity_at, :max_last_activity_at, :min_last_activity_at, :open, :queued, :sent, :spam, :unsubscribed]
|
9
9
|
self.properties = [:blocked_count, :bounced_count, :clicked_count, :contact, :delivered_count, :last_activity_at, :opened_count, :processed_count, :queued_count, :spam_complaint_count, :unsubscribed_count]
|
10
|
-
|
10
|
+
|
11
11
|
self.read_only = true
|
12
|
-
|
12
|
+
|
13
13
|
end
|
14
14
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Csvimport
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/csvimport'
|
7
7
|
self.public_operations = [:get, :put, :post]
|
8
8
|
self.filters = []
|
9
9
|
self.properties = [:alive_at, :contacts_list, :count, :current, :data_id, :errcount, :err_treshold, :id, :import_options, :job_end, :job_start, :method, :request_at, :status]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,12 +3,12 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Domainstatistics
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/domainstatistics'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = [:campaign_id, :campaign_status, :contacts_list, :custom_campaign, :from, :from_domain, :from_id, :from_ts, :from_type, :is_deleted, :is_newsletter_tool, :is_starred, :message_status, :period, :to_ts]
|
9
9
|
self.properties = [:blocked_count, :bounced_count, :clicked_count, :delivered_count, :domain, :id, :opened_count, :processed_count, :queued_count, :spam_complaint_count, :unsubscribed_count]
|
10
|
-
|
10
|
+
|
11
11
|
self.read_only = true
|
12
|
-
|
12
|
+
|
13
13
|
end
|
14
14
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Eventcallbackurl
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/eventcallbackurl'
|
7
7
|
self.public_operations = [:get, :put, :post, :delete]
|
8
8
|
self.filters = [:api_key, :backup, :event_type, :status, :version]
|
9
9
|
self.properties = [:api_key, :event_type, :id, :is_backup, :status, :url, :version]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,12 +3,12 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Geostatistics
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/geostatistics'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = [:campaign_id, :campaign_status, :contacts_list, :custom_campaign, :from, :from_domain, :from_id, :from_ts, :from_type, :is_deleted, :is_newsletter_tool, :is_starred, :message_status, :period, :to_ts]
|
9
9
|
self.properties = [:clicked_count, :country, :opened_count]
|
10
|
-
|
10
|
+
|
11
11
|
self.read_only = true
|
12
|
-
|
12
|
+
|
13
13
|
end
|
14
14
|
end
|
@@ -3,12 +3,12 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Graphstatistics
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/graphstatistics'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = [:campaign_id, :campaign_status, :contact, :contacts_list, :custom_campaign, :from, :from_domain, :from_id, :from_ts, :from_type, :is_deleted, :is_newsletter_tool, :is_starred, :message_status, :period, :scale, :to_ts]
|
9
9
|
self.properties = [:blocked_count, :bounced_count, :clicked_count, :delivered_count, :opened_count, :processed_count, :queued_count, :ref_timestamp, :sendtime_start, :spamcomplaint_count, :unsubscribed_count]
|
10
|
-
|
10
|
+
|
11
11
|
self.read_only = true
|
12
|
-
|
12
|
+
|
13
13
|
end
|
14
14
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Listrecipient
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/listrecipient'
|
7
7
|
self.public_operations = [:get, :put, :post, :delete]
|
8
8
|
self.filters = [:active, :blocked, :contact, :contact_email, :contacts_list, :last_activity_at, :list_name, :opened, :status, :unsub]
|
9
|
-
self.properties = [:contact, :id, :is_active, :is_unsubscribed, :list, :unsubscribed_at]
|
10
|
-
|
9
|
+
self.properties = [:contact, :id, :is_active, :is_unsubscribed, :list, :unsubscribed_at, :contact_id, :list_id, 'ContactID', 'ListID', 'ContactALT', 'ListALT']
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,12 +3,12 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Listrecipientstatistics
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/listrecipientstatistics'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = [:blocked, :bounced, :click, :contact, :contacts_list, :is_active, :is_unsubscribed, :last_activity_at, :max_last_activity_at, :max_unsubscribed_at, :min_last_activity_at, :min_unsubscribed_at, :open, :queued, :sent, :show_extra_data, :spam, :unsubscribed]
|
9
9
|
self.properties = [:blocked_count, :bounced_count, :clicked_count, :data, :delivered_count, :last_activity_at, :list_recipient, :opened_count, :processed_count, :queued_count, :spam_complaint_count, :unsubscribed_count]
|
10
|
-
|
10
|
+
|
11
11
|
self.read_only = true
|
12
|
-
|
12
|
+
|
13
13
|
end
|
14
14
|
end
|
@@ -3,12 +3,12 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Liststatistics
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/liststatistics'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = [:address, :calc_active_unsub, :exclude_id, :is_deleted, :name]
|
9
9
|
self.properties = [:active_count, :active_unsubscribed_count, :address, :blocked_count, :bounced_count, :clicked_count, :created_at, :delivered_count, :id, :is_deleted, :last_activity_at, :name, :opened_count, :spam_complaint_count, :subscriber_count, :unsubscribed_count]
|
10
|
-
|
10
|
+
|
11
11
|
self.read_only = true
|
12
|
-
|
12
|
+
|
13
13
|
end
|
14
14
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Manycontacts
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/manycontacts'
|
7
7
|
self.public_operations = [:post]
|
8
8
|
self.filters = []
|
9
9
|
self.properties = [:action, :addresses, :errors, :force, :list, :recipients]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Message
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/message'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = [:campaign, :contact, :destination, :message_state, :plan_subscription, :sender]
|
9
9
|
self.properties = [:arrived_at, :attachment_count, :attempt_count, :campaign, :contact, :delay, :destination, :filter_time, :from, :id, :is_click_tracked, :is_html_part_included, :is_open_tracked, :is_text_part_included, :is_unsub_tracked, :message_size, :spamassassin_score, :spamass_rules, :state, :state_permanent, :status]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,12 +3,12 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Messagehistory
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/messagehistory'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = [:message]
|
9
9
|
self.properties = [:event_at, :event_type, :useragent]
|
10
|
-
|
10
|
+
|
11
11
|
self.read_only = true
|
12
|
-
|
12
|
+
|
13
13
|
end
|
14
14
|
end
|
@@ -3,12 +3,12 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Messageinformation
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/messageinformation'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = [:campaign_id, :campaign_status, :contacts_list, :custom_campaign, :from, :from_domain, :from_id, :from_ts, :from_type, :is_deleted, :is_newsletter_tool, :is_starred, :message_status, :period, :to_ts]
|
9
9
|
self.properties = [:campaign, :click_tracked_count, :contact, :created_at, :id, :message_size, :open_tracked_count, :queued_count, :send_end_at, :sent_count, :spam_assassin_rules, :spam_assassin_score]
|
10
|
-
|
10
|
+
|
11
11
|
self.read_only = true
|
12
|
-
|
12
|
+
|
13
13
|
end
|
14
14
|
end
|
@@ -3,12 +3,12 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Messagesentstatistics
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/messagesentstatistics'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = [:all_messages, :campaign_id, :campaign_status, :contact, :contacts_list, :custom_campaign, :from, :from_domain, :from_id, :from_ts, :from_type, :is_deleted, :is_newsletter_tool, :is_starred, :message_status, :period, :to_ts]
|
9
9
|
self.properties = [:arrival_ts, :blocked, :bounce, :campaign, :click, :cnt_recipients, :contact, :message_id, :open, :queued, :sent, :spam, :state, :state_permanent, :status]
|
10
|
-
|
10
|
+
|
11
11
|
self.read_only = true
|
12
|
-
|
12
|
+
|
13
13
|
end
|
14
14
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Messagestate
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/messagestate'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = []
|
9
9
|
self.properties = [:id, :related_to, :state]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,12 +3,12 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Messagestatistics
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/messagestatistics'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = [:campaign_id, :campaign_status, :contact_email, :contact_id, :custom_campaign, :from, :from_domain, :from_id, :from_ts, :from_type, :is_deleted, :is_newsletter_tool, :is_starred, :message_status, :period, :to_ts]
|
9
9
|
self.properties = [:average_click_delay, :average_clicked_count, :average_open_delay, :average_opened_count, :blocked_count, :bounced_count, :campaign_count, :clicked_count, :delivered_count, :opened_count, :processed_count, :queued_count, :spam_complaint_count, :transactional_count, :unsubscribed_count]
|
10
|
-
|
10
|
+
|
11
11
|
self.read_only = true
|
12
|
-
|
12
|
+
|
13
13
|
end
|
14
14
|
end
|
@@ -3,12 +3,12 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Metadata
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/metadata'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = [:public_resources, :read_only_resources, :resource_name]
|
9
9
|
self.properties = [:description, :filters, :is_read_only, :name, :private_operations, :properties, :public_operations, :sort_info, :unique_key]
|
10
|
-
|
10
|
+
|
11
11
|
self.read_only = true
|
12
|
-
|
12
|
+
|
13
13
|
end
|
14
14
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Metasender
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/metasender'
|
7
7
|
self.public_operations = [:get, :put, :post]
|
8
8
|
self.filters = [:dns, :user]
|
9
9
|
self.properties = [:created_at, :description, :email, :filename, :id, :is_enabled]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Myprofile
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/myprofile'
|
7
7
|
self.public_operations = [:get, :put]
|
8
8
|
self.filters = [:user]
|
9
9
|
self.properties = [:address_city, :address_country, :address_postal_code, :address_street, :billing_email, :birthday_at, :company_name, :contact_phone, :estimated_volume, :features, :firstname, :id, :industry, :lastname, :user, :vat, :vat_number, :website]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Newsletter
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/newsletter'
|
7
7
|
self.public_operations = [:get, :put, :post]
|
8
8
|
self.filters = [:campaign, :contacts_list, :delivered_at, :edit_mode, :is_archived, :is_campaign, :is_deleted, :is_handled, :is_starred, :modified, :news_letter_template, :segmentation, :status, :subject]
|
9
9
|
self.properties = [:callback, :campaign, :contacts_list, :created_at, :delivered_at, :edit_mode, :edit_type, :footer, :footer_address, :footer_wysiwyg_type, :header_filename, :header_link, :header_text, :header_url, :id, :ip, :is_handled, :is_starred, :is_text_part_included, :locale, :modified_at, :permalink, :permalink_host, :permalink_wysiwyg_type, :politeness_mode, :reply_email, :segmentation, :sender, :sender_email, :sender_name, :status, :subject, :template, :test_address, :title, :url]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Newsletterblock
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/newsletterblock'
|
7
7
|
self.public_operations = [:get, :put, :post, :delete]
|
8
8
|
self.filters = [:news_letter]
|
9
9
|
self.properties = [:align, :alt, :block_type, :color, :content, :filename, :fontfamily, :fontsize, :id, :line, :link, :news_letter, :pos, :siblings, :src_height, :src_width, :url, :width]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Newsletterproperties
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/newsletterproperties'
|
7
7
|
self.public_operations = [:get, :put, :post, :delete]
|
8
8
|
self.filters = [:news_letter]
|
9
9
|
self.properties = [:id, :name, :news_letter, :property_name, :selector, :value]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Newslettertemplate
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/newslettertemplate'
|
7
7
|
self.public_operations = [:get, :put, :post]
|
8
8
|
self.filters = [:is_public, :news_letter_template_category]
|
9
9
|
self.properties = [:category, :created_at, :footer, :footer_address, :footer_wysiwyg_type, :header_filename, :header_link, :header_text, :header_url, :id, :locale, :name, :permalink, :permalink_wysiwyg_type, :source_news_letter_id, :status]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Newslettertemplateblock
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/newslettertemplateblock'
|
7
7
|
self.public_operations = [:get, :put, :post, :delete]
|
8
8
|
self.filters = [:news_letter_template]
|
9
9
|
self.properties = [:align, :alt, :block_type, :color, :content, :filename, :fontfamily, :fontsize, :id, :line, :link, :pos, :siblings, :src_height, :src_width, :template, :url, :width]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Newslettertemplatecategory
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/newslettertemplatecategory'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = [:locale]
|
9
9
|
self.properties = [:description, :id, :locale, :parent_category, :value]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Newslettertemplateproperties
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/newslettertemplateproperties'
|
7
7
|
self.public_operations = [:get, :put, :post, :delete]
|
8
8
|
self.filters = [:news_letter_template]
|
9
9
|
self.properties = [:id, :name, :property_name, :selector, :template, :value]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,12 +3,12 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Openinformation
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/openinformation'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = [:campaign_id, :campaign_status, :contacts_list, :custom_campaign, :from, :from_domain, :from_id, :from_ts, :from_type, :is_deleted, :is_newsletter_tool, :is_starred, :message_status, :period, :to_ts]
|
9
9
|
self.properties = [:arrived_at, :campaign, :contact, :id, :message_id, :opened_at, :user_agent, :user_agent_full]
|
10
|
-
|
10
|
+
|
11
11
|
self.read_only = true
|
12
|
-
|
12
|
+
|
13
13
|
end
|
14
14
|
end
|
@@ -3,12 +3,12 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Openstatistics
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/openstatistics'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = [:campaign_id, :campaign_status, :contacts_list, :custom_campaign, :from, :from_domain, :from_id, :from_ts, :from_type, :is_deleted, :is_newsletter_tool, :is_starred, :message_status, :period, :to_ts]
|
9
9
|
self.properties = [:opened_count, :opened_delay, :processed_count]
|
10
|
-
|
10
|
+
|
11
11
|
self.read_only = true
|
12
|
-
|
12
|
+
|
13
13
|
end
|
14
14
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Parseroute
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/parseroute'
|
7
7
|
self.public_operations = [:get, :put, :post, :delete]
|
8
8
|
self.filters = [:api_key]
|
9
9
|
self.properties = [:api_key, :email, :id, :url]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Preferences
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/preferences'
|
7
7
|
self.public_operations = [:get, :put, :post, :delete]
|
8
8
|
self.filters = [:user]
|
9
9
|
self.properties = [:id, :key, :user, :value]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Sender
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/sender'
|
7
7
|
self.public_operations = [:get, :put, :post, :delete]
|
8
8
|
self.filters = [:confirm_key, :domain, :email, :local_part, :show_deleted, :status]
|
9
9
|
self.properties = [:confirm_key, :created_at, :dns, :email, :email_type, :filename, :id, :is_default_sender, :name, :status]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,12 +3,12 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Senderstatistics
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/senderstatistics'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = [:domain, :email, :sender]
|
9
9
|
self.properties = [:blocked_count, :bounced_count, :clicked_count, :delivered_count, :last_activity_at, :opened_count, :processed_count, :queued_count, :sender, :spam_complaint_count, :unsubscribed_count]
|
10
|
-
|
10
|
+
|
11
11
|
self.read_only = true
|
12
|
-
|
12
|
+
|
13
13
|
end
|
14
14
|
end
|
@@ -3,12 +3,12 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Toplinkclicked
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/toplinkclicked'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = [:campaign_id, :campaign_status, :contact, :contacts_list, :custom_campaign, :from, :from_domain, :from_id, :from_ts, :from_type, :is_deleted, :is_newsletter_tool, :is_starred, :message, :period, :to_ts]
|
9
9
|
self.properties = [:clicked_count, :id, :link_id, :url]
|
10
|
-
|
10
|
+
|
11
11
|
self.read_only = true
|
12
|
-
|
12
|
+
|
13
13
|
end
|
14
14
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Trigger
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/trigger'
|
7
7
|
self.public_operations = [:get, :put, :post, :delete]
|
8
8
|
self.filters = [:event, :min_added_ts]
|
9
9
|
self.properties = [:added_ts, :api_key, :details, :event, :id, :user]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class User
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/user'
|
7
7
|
self.public_operations = [:get, :put]
|
8
8
|
self.filters = [:is_activated, :new_email, :user_name]
|
9
9
|
self.properties = [:created_at, :email, :id, :is_rules_accepted, :last_ip, :last_login_at, :locale, :max_allowed_api_keys, :timezone, :username, :warned_ratelimit_at]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,12 +3,12 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Useragentstatistics
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/useragentstatistics'
|
7
7
|
self.public_operations = [:get]
|
8
8
|
self.filters = [:campaign_id, :campaign_status, :contacts_list, :custom_campaign, :event, :exclude_platform, :from, :from_domain, :from_id, :from_ts, :from_type, :is_deleted, :is_newsletter_tool, :is_starred, :period, :platform, :to_ts]
|
9
9
|
self.properties = [:count, :distinct_count, :platform, :user_agent]
|
10
|
-
|
10
|
+
|
11
11
|
self.read_only = true
|
12
|
-
|
12
|
+
|
13
13
|
end
|
14
14
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Widget
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/widget'
|
7
7
|
self.public_operations = [:get, :put, :post, :delete]
|
8
8
|
self.filters = [:active, :api_key, :contacts_list, :locale, :message_template, :sender]
|
9
9
|
self.properties = [:created_at, :from, :id, :is_active, :list, :locale, :name, :replyto, :sendername, :subject, :template]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
@@ -3,10 +3,10 @@ require 'mailjet/resource'
|
|
3
3
|
module Mailjet
|
4
4
|
class Widgetcustomvalue
|
5
5
|
include Mailjet::Resource
|
6
|
-
self.resource_path = '
|
6
|
+
self.resource_path = 'v3/REST/widgetcustomvalue'
|
7
7
|
self.public_operations = [:get, :put, :post, :delete]
|
8
8
|
self.filters = [:name, :widget]
|
9
9
|
self.properties = [:api_key, :display, :id, :name, :value, :widget]
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
data/lib/mailjet/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailjet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean-Baptiste Escoyez
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-11-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -236,6 +236,48 @@ dependencies:
|
|
236
236
|
- - '>='
|
237
237
|
- !ruby/object:Gem::Version
|
238
238
|
version: '0'
|
239
|
+
- !ruby/object:Gem::Dependency
|
240
|
+
name: rspec
|
241
|
+
requirement: !ruby/object:Gem::Requirement
|
242
|
+
requirements:
|
243
|
+
- - '>='
|
244
|
+
- !ruby/object:Gem::Version
|
245
|
+
version: '0'
|
246
|
+
type: :development
|
247
|
+
prerelease: false
|
248
|
+
version_requirements: !ruby/object:Gem::Requirement
|
249
|
+
requirements:
|
250
|
+
- - '>='
|
251
|
+
- !ruby/object:Gem::Version
|
252
|
+
version: '0'
|
253
|
+
- !ruby/object:Gem::Dependency
|
254
|
+
name: rspec-expectations
|
255
|
+
requirement: !ruby/object:Gem::Requirement
|
256
|
+
requirements:
|
257
|
+
- - '>='
|
258
|
+
- !ruby/object:Gem::Version
|
259
|
+
version: '0'
|
260
|
+
type: :development
|
261
|
+
prerelease: false
|
262
|
+
version_requirements: !ruby/object:Gem::Requirement
|
263
|
+
requirements:
|
264
|
+
- - '>='
|
265
|
+
- !ruby/object:Gem::Version
|
266
|
+
version: '0'
|
267
|
+
- !ruby/object:Gem::Dependency
|
268
|
+
name: dotenv
|
269
|
+
requirement: !ruby/object:Gem::Requirement
|
270
|
+
requirements:
|
271
|
+
- - '>='
|
272
|
+
- !ruby/object:Gem::Version
|
273
|
+
version: '0'
|
274
|
+
type: :development
|
275
|
+
prerelease: false
|
276
|
+
version_requirements: !ruby/object:Gem::Requirement
|
277
|
+
requirements:
|
278
|
+
- - '>='
|
279
|
+
- !ruby/object:Gem::Version
|
280
|
+
version: '0'
|
239
281
|
description: Cloud Emailing for easy delivery.
|
240
282
|
email:
|
241
283
|
- jbescoyez@gmail.com
|
@@ -262,6 +304,7 @@ files:
|
|
262
304
|
- lib/mailjet/resources/apikeyaccess.rb
|
263
305
|
- lib/mailjet/resources/apikeytotals.rb
|
264
306
|
- lib/mailjet/resources/apitoken.rb
|
307
|
+
- lib/mailjet/resources/axtesting.rb
|
265
308
|
- lib/mailjet/resources/batchjob.rb
|
266
309
|
- lib/mailjet/resources/bouncestatistics.rb
|
267
310
|
- lib/mailjet/resources/campaign.rb
|
@@ -332,7 +375,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
332
375
|
version: '0'
|
333
376
|
requirements: []
|
334
377
|
rubyforge_project:
|
335
|
-
rubygems_version: 2.
|
378
|
+
rubygems_version: 2.4.1
|
336
379
|
signing_key:
|
337
380
|
specification_version: 4
|
338
381
|
summary: Cloud Emailing for easy delivery.
|