enveloop 0.1.3 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -1
- data/Gemfile.lock +1 -1
- data/lib/enveloop/client.rb +6 -4
- data/lib/enveloop/message_response.rb +1 -1
- data/lib/enveloop/template_response.rb +1 -1
- data/lib/enveloop/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4de448ebf9699afceacb4f9bbe512de8743f4b65793850e991967b1724b52109
|
4
|
+
data.tar.gz: f4b7c8e5418f394bf34ab7952c71dc48530ac9bd274de2b4e91c62af08c1f850
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd504a7f37f14c2a728d854c336ecd8b6ec7a8fca4190c259bbd67bb09de1ca57636b9c8c8a4913aa5a50871185110808c30de9216c99b4685b6821afd7a7e66
|
7
|
+
data.tar.gz: 65a021f76297552af4e7edbb41f57b3334290c77812254a3fc7e0eeeaff53543f8ba55baa86161e8e1817cdfec43b18b707732ea42327791ff6bd051e6754113
|
data/CHANGELOG.md
CHANGED
@@ -15,4 +15,14 @@
|
|
15
15
|
|
16
16
|
> ## Version 0.1.3
|
17
17
|
|
18
|
-
* change `user_variables` to `template_variables` in API call
|
18
|
+
* change `user_variables` to `template_variables` in API call
|
19
|
+
|
20
|
+
> ## Version 0.1.4
|
21
|
+
|
22
|
+
* Do not require `from` in api call to allow for default from in template
|
23
|
+
* Do not require `subject` in api call to allow for default subject in template
|
24
|
+
* send `Sdk-Version` header for tracking of SDK usage and future deprection warnings
|
25
|
+
|
26
|
+
> ## Version 0.1.5
|
27
|
+
|
28
|
+
* Use new `/messages` endpoint
|
data/Gemfile.lock
CHANGED
data/lib/enveloop/client.rb
CHANGED
@@ -5,11 +5,12 @@ module Enveloop
|
|
5
5
|
@api_key = api_key
|
6
6
|
end
|
7
7
|
|
8
|
-
def send_message(template:, to:, from
|
8
|
+
def send_message(template:, to:, from: nil, subject: nil, template_variables: {})
|
9
9
|
data = {
|
10
10
|
to: to,
|
11
11
|
from: from,
|
12
12
|
subject: subject,
|
13
|
+
template: template,
|
13
14
|
templateVariables: template_variables
|
14
15
|
}
|
15
16
|
|
@@ -17,11 +18,12 @@ module Enveloop
|
|
17
18
|
url: @endpoint,
|
18
19
|
headers: {
|
19
20
|
"Content-Type" => "application/json",
|
20
|
-
"Authorization" => "token #{@api_key}"
|
21
|
+
"Authorization" => "token #{@api_key}",
|
22
|
+
"Sdk-Version" => "ruby-#{Enveloop::VERSION}"
|
21
23
|
}
|
22
24
|
)
|
23
25
|
|
24
|
-
response = conn.post(
|
26
|
+
response = conn.post('/messages') do |req|
|
25
27
|
req.body = data.to_json
|
26
28
|
end
|
27
29
|
|
@@ -42,4 +44,4 @@ module Enveloop
|
|
42
44
|
return TemplateResponse.new(status: response.status, body: response.body)
|
43
45
|
end
|
44
46
|
end
|
45
|
-
end
|
47
|
+
end
|
data/lib/enveloop/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enveloop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Wyrosdick
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10
|
11
|
+
date: 2022-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: '0'
|
72
72
|
requirements: []
|
73
|
-
rubygems_version: 3.1.
|
73
|
+
rubygems_version: 3.1.2
|
74
74
|
signing_key:
|
75
75
|
specification_version: 4
|
76
76
|
summary: Envelope API wrapper
|