braze_ruby 0.2.2 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +14 -3
- data/.gitignore +1 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +39 -39
- data/README.md +64 -0
- data/Rakefile +2 -0
- data/braze_ruby.gemspec +7 -7
- data/lib/braze_ruby.rb +2 -0
- data/lib/braze_ruby/api.rb +11 -4
- data/lib/braze_ruby/deprecated.rb +2 -0
- data/lib/braze_ruby/endpoints.rb +4 -0
- data/lib/braze_ruby/endpoints/campaigns.rb +3 -1
- data/lib/braze_ruby/endpoints/canvas.rb +7 -1
- data/lib/braze_ruby/endpoints/create_user_aliases.rb +19 -0
- data/lib/braze_ruby/endpoints/delete_users.rb +4 -2
- data/lib/braze_ruby/endpoints/email_status.rb +3 -1
- data/lib/braze_ruby/endpoints/email_sync.rb +4 -2
- data/lib/braze_ruby/endpoints/identify_users.rb +19 -0
- data/lib/braze_ruby/endpoints/schedule_messages.rb +3 -1
- data/lib/braze_ruby/endpoints/send_messages.rb +3 -1
- data/lib/braze_ruby/endpoints/subscription.rb +20 -0
- data/lib/braze_ruby/endpoints/track_users.rb +7 -5
- data/lib/braze_ruby/http.rb +20 -5
- data/lib/braze_ruby/rest.rb +8 -0
- data/lib/braze_ruby/rest/base.rb +6 -2
- data/lib/braze_ruby/rest/canvas_details.rb +20 -0
- data/lib/braze_ruby/rest/create_user_aliases.rb +13 -0
- data/lib/braze_ruby/rest/delete_users.rb +3 -2
- data/lib/braze_ruby/rest/email_hard_bounces.rb +5 -5
- data/lib/braze_ruby/rest/email_status.rb +5 -5
- data/lib/braze_ruby/rest/email_unsubscribes.rb +5 -5
- data/lib/braze_ruby/rest/export_users.rb +7 -7
- data/lib/braze_ruby/rest/identify_users.rb +13 -0
- data/lib/braze_ruby/rest/list_segments.rb +4 -4
- data/lib/braze_ruby/rest/schedule_messages.rb +5 -5
- data/lib/braze_ruby/rest/send_messages.rb +5 -5
- data/lib/braze_ruby/rest/subscription_status_get.rb +20 -0
- data/lib/braze_ruby/rest/subscription_status_set.rb +20 -0
- data/lib/braze_ruby/rest/subscription_user_status.rb +20 -0
- data/lib/braze_ruby/rest/track_users.rb +3 -2
- data/lib/braze_ruby/rest/trigger_campaign_send.rb +6 -8
- data/lib/braze_ruby/rest/trigger_canvas_send.rb +5 -5
- data/lib/braze_ruby/version.rb +3 -1
- data/spec/braze_ruby/api_spec.rb +2 -0
- data/spec/braze_ruby/endpoints/delete_users_spec.rb +3 -1
- data/spec/braze_ruby/endpoints/track_users_spec.rb +10 -8
- data/spec/braze_ruby/http_spec.rb +48 -0
- data/spec/braze_ruby/rest/create_user_aliases_spec.rb +23 -0
- data/spec/braze_ruby/rest/delete_users_spec.rb +5 -3
- data/spec/braze_ruby/rest/email_status_spec.rb +3 -2
- data/spec/braze_ruby/rest/export_users_spec.rb +5 -3
- data/spec/braze_ruby/rest/identify_users_spec.rb +23 -0
- data/spec/braze_ruby/rest/schedule_messages_spec.rb +3 -2
- data/spec/braze_ruby/rest/send_messages_spec.rb +10 -13
- data/spec/braze_ruby/rest/track_users_spec.rb +12 -9
- data/spec/factories.rb +2 -0
- data/spec/fixtures/responses/campaigns/trigger_send/sends_an_email.yml +17 -15
- data/spec/fixtures/responses/canvas/details/returns_error_when_no_canvas.yml +69 -0
- data/spec/fixtures/responses/canvas/trigger_send/sends_a_canvas.yml +18 -16
- data/spec/fixtures/responses/create_user_aliases/unauthorized/responds_with_unauthorized.yml +67 -0
- data/spec/fixtures/responses/create_user_aliases/with_success/responds_with_created.yml +71 -0
- data/spec/fixtures/responses/create_user_aliases/with_success/responds_with_success_message.yml +71 -0
- data/spec/fixtures/responses/delete_users/unauthorized/responds_with_unauthorized.yml +20 -18
- data/spec/fixtures/responses/delete_users/with_success/responds_with_created.yml +25 -23
- data/spec/fixtures/responses/delete_users/with_success/responds_with_success_message.yml +25 -23
- data/spec/fixtures/responses/email_status/existing_email/responds_with_created.yml +22 -20
- data/spec/fixtures/responses/email_status/existing_email/responds_with_success_message.yml +22 -20
- data/spec/fixtures/responses/email_status/unknown_email/responds_with_bad_request.yml +22 -20
- data/spec/fixtures/responses/email_status/unknown_email/responds_with_success_message.yml +22 -20
- data/spec/fixtures/responses/email_sync/hard_bounces/responds_with_empty_array_when_no_hard_bounces.yml +18 -16
- data/spec/fixtures/responses/email_sync/unsubscribes/responds_with_empty_array_when_no_unsubscribes.yml +18 -16
- data/spec/fixtures/responses/email_sync/unsubscribes/responds_with_unsubscribed_emails.yml +21 -20
- data/spec/fixtures/responses/export_users/by_ids/with_success/responds_with_created.yml +25 -22
- data/spec/fixtures/responses/export_users/by_segment/with_success/responds_with_created.yml +24 -22
- data/spec/fixtures/responses/identify_users/unauthorized/responds_with_unauthorized.yml +68 -0
- data/spec/fixtures/responses/identify_users/with_success/responds_with_created.yml +71 -0
- data/spec/fixtures/responses/identify_users/with_success/responds_with_success_message.yml +71 -0
- data/spec/fixtures/responses/list_segments/with_success/responds_with_a_list_of_segments.yml +35 -35
- data/spec/fixtures/responses/list_segments/with_success/responds_with_success.yml +35 -35
- data/spec/fixtures/responses/schedule_messages/unauthorized/responds_with_unauthorize.yml +20 -19
- data/spec/fixtures/responses/schedule_messages/with_success/responds_with_created.yml +24 -23
- data/spec/fixtures/responses/schedule_messages/with_success/responds_with_success_message.yml +24 -23
- data/spec/fixtures/responses/send_messages/unauthorized/responds_with_unauthorized.yml +20 -18
- data/spec/fixtures/responses/send_messages/with_success/responds_with_created.yml +24 -22
- data/spec/fixtures/responses/send_messages/with_success/responds_with_success_message.yml +24 -22
- data/spec/fixtures/responses/subscription/subscription_status_set/when_subscribing/subscribes_the_user.yml +71 -0
- data/spec/fixtures/responses/subscription/subscription_status_set/when_subscription_group_does_not_exist/returns_an_error_status.yml +68 -0
- data/spec/fixtures/responses/subscription/subscription_status_set/when_unsubscribing/unsubscribes_the_user.yml +139 -0
- data/spec/fixtures/responses/subscription/when_getting_subscription_group_statuses/subscription_status_get/when_checking_subscribed_and_unsubscribed_user_status/returns_only_users_that_were_once_subscribed.yml +211 -0
- data/spec/fixtures/responses/subscription/when_getting_subscription_group_statuses/subscription_status_get/when_group_does_not_exist/returns_an_error.yml +199 -0
- data/spec/fixtures/responses/subscription/when_getting_subscription_group_statuses/subscription_user_status/returns_subscription_groups_and_status_for_every_group.yml +211 -0
- data/spec/fixtures/responses/track_users/unauthorized/responds_with_unauthorized.yml +23 -21
- data/spec/fixtures/responses/track_users/with_success/responds_with_created.yml +22 -20
- data/spec/fixtures/responses/track_users/with_success/responds_with_success_message.yml +22 -20
- data/spec/integrations/campaigns_spec.rb +6 -2
- data/spec/integrations/canvas_spec.rb +15 -2
- data/spec/integrations/create_user_aliases_spec.rb +32 -0
- data/spec/integrations/delete_users_spec.rb +3 -0
- data/spec/integrations/email_status_spec.rb +2 -0
- data/spec/integrations/email_sync_spec.rb +4 -2
- data/spec/integrations/export_users_spec.rb +4 -2
- data/spec/integrations/identify_users_spec.rb +32 -0
- data/spec/integrations/list_segments_spec.rb +3 -1
- data/spec/integrations/schedule_messages_spec.rb +4 -1
- data/spec/integrations/send_messages_spec.rb +4 -1
- data/spec/integrations/subscription_spec.rb +149 -0
- data/spec/integrations/track_users_spec.rb +3 -0
- data/spec/spec_helper.rb +2 -8
- data/spec/support/factory_bot.rb +2 -0
- data/spec/support/integrations.rb +7 -1
- data/spec/support/vcr.rb +5 -1
- metadata +68 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ef227d9be43770703ff994bcda610a34666b8057c5846f270391ee2a0dfd957
|
4
|
+
data.tar.gz: 866befd357481f0cef4a18b761bb69ce66bfa098af871ee768ef4a8b575c944d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5bd262c112d84b59dcefe528def47fd7a299715500e032ce0bbb8d3e6cb45fb226aad2c4f2a2f94c202b18efeae0f608c9984e999bb06549b720fedddba0d533
|
7
|
+
data.tar.gz: 050c09bd0ea3d5b3d5bb7b34f869f9053e628e28e6f192e4b072eb7f3242ed1980f8484dce32708ab1b7cf21fc045318c962b75bc5ac5ae9a75b136b1e3a2b78
|
data/.github/workflows/ci.yml
CHANGED
@@ -7,13 +7,24 @@ jobs:
|
|
7
7
|
runs-on: ubuntu-latest
|
8
8
|
|
9
9
|
steps:
|
10
|
-
- uses: actions/checkout@
|
10
|
+
- uses: actions/checkout@v2
|
11
|
+
|
11
12
|
- name: Set up Ruby
|
12
|
-
uses:
|
13
|
+
uses: ruby/setup-ruby@v1
|
14
|
+
with:
|
15
|
+
ruby-version: 2.6
|
16
|
+
|
17
|
+
- name: Cache gems
|
18
|
+
uses: actions/cache@v1
|
13
19
|
with:
|
14
|
-
|
20
|
+
path: vendor/bundle
|
21
|
+
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
22
|
+
restore-keys: |
|
23
|
+
${{ runner.os }}-gems-
|
24
|
+
|
15
25
|
- name: Build and test
|
16
26
|
run: |
|
17
27
|
gem install bundler
|
28
|
+
bundle config path vendor/bundle
|
18
29
|
bundle install --jobs 4 --retry 3
|
19
30
|
bundle exec rake spec
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,64 +1,64 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
braze_ruby (0.
|
4
|
+
braze_ruby (0.4.0)
|
5
5
|
faraday
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activesupport (6.0.
|
10
|
+
activesupport (6.0.3.2)
|
11
11
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
12
12
|
i18n (>= 0.7, < 2)
|
13
13
|
minitest (~> 5.1)
|
14
14
|
tzinfo (~> 1.1)
|
15
|
-
zeitwerk (~> 2.
|
15
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
16
16
|
addressable (2.7.0)
|
17
17
|
public_suffix (>= 2.0.2, < 5.0)
|
18
|
-
coderay (1.1.
|
19
|
-
concurrent-ruby (1.1.
|
18
|
+
coderay (1.1.3)
|
19
|
+
concurrent-ruby (1.1.6)
|
20
20
|
crack (0.4.3)
|
21
21
|
safe_yaml (~> 1.0.0)
|
22
22
|
diff-lcs (1.3)
|
23
23
|
dotenv (2.7.5)
|
24
|
-
factory_bot (5.
|
24
|
+
factory_bot (5.2.0)
|
25
25
|
activesupport (>= 4.2.0)
|
26
|
-
faraday (0.
|
26
|
+
faraday (1.0.1)
|
27
27
|
multipart-post (>= 1.2, < 3)
|
28
|
-
hashdiff (1.0.
|
29
|
-
i18n (1.
|
28
|
+
hashdiff (1.0.1)
|
29
|
+
i18n (1.8.3)
|
30
30
|
concurrent-ruby (~> 1.0)
|
31
|
-
method_source (0.
|
32
|
-
minitest (5.
|
31
|
+
method_source (1.0.0)
|
32
|
+
minitest (5.14.1)
|
33
33
|
multipart-post (2.1.1)
|
34
|
-
pry (0.
|
35
|
-
coderay (~> 1.1
|
36
|
-
method_source (~>
|
37
|
-
public_suffix (4.0.
|
38
|
-
rake (
|
39
|
-
rspec (3.
|
40
|
-
rspec-core (~> 3.
|
41
|
-
rspec-expectations (~> 3.
|
42
|
-
rspec-mocks (~> 3.
|
43
|
-
rspec-core (3.
|
44
|
-
rspec-support (~> 3.
|
45
|
-
rspec-expectations (3.
|
34
|
+
pry (0.13.1)
|
35
|
+
coderay (~> 1.1)
|
36
|
+
method_source (~> 1.0)
|
37
|
+
public_suffix (4.0.5)
|
38
|
+
rake (13.0.1)
|
39
|
+
rspec (3.9.0)
|
40
|
+
rspec-core (~> 3.9.0)
|
41
|
+
rspec-expectations (~> 3.9.0)
|
42
|
+
rspec-mocks (~> 3.9.0)
|
43
|
+
rspec-core (3.9.2)
|
44
|
+
rspec-support (~> 3.9.3)
|
45
|
+
rspec-expectations (3.9.2)
|
46
46
|
diff-lcs (>= 1.2.0, < 2.0)
|
47
|
-
rspec-support (~> 3.
|
48
|
-
rspec-mocks (3.
|
47
|
+
rspec-support (~> 3.9.0)
|
48
|
+
rspec-mocks (3.9.1)
|
49
49
|
diff-lcs (>= 1.2.0, < 2.0)
|
50
|
-
rspec-support (~> 3.
|
51
|
-
rspec-support (3.
|
50
|
+
rspec-support (~> 3.9.0)
|
51
|
+
rspec-support (3.9.3)
|
52
52
|
safe_yaml (1.0.5)
|
53
53
|
thread_safe (0.3.6)
|
54
|
-
tzinfo (1.2.
|
54
|
+
tzinfo (1.2.7)
|
55
55
|
thread_safe (~> 0.1)
|
56
|
-
vcr (
|
57
|
-
webmock (3.
|
56
|
+
vcr (6.0.0)
|
57
|
+
webmock (3.8.3)
|
58
58
|
addressable (>= 2.3.6)
|
59
59
|
crack (>= 0.3.2)
|
60
60
|
hashdiff (>= 0.4.0, < 2.0.0)
|
61
|
-
zeitwerk (2.
|
61
|
+
zeitwerk (2.3.0)
|
62
62
|
|
63
63
|
PLATFORMS
|
64
64
|
ruby
|
@@ -66,13 +66,13 @@ PLATFORMS
|
|
66
66
|
DEPENDENCIES
|
67
67
|
braze_ruby!
|
68
68
|
bundler (>= 1.3)
|
69
|
-
dotenv
|
70
|
-
factory_bot
|
71
|
-
pry
|
72
|
-
rake
|
73
|
-
rspec
|
74
|
-
vcr
|
75
|
-
webmock
|
69
|
+
dotenv (~> 2.7.5)
|
70
|
+
factory_bot (>= 5.1.0)
|
71
|
+
pry (>= 0.12.2)
|
72
|
+
rake (>= 12.3.3)
|
73
|
+
rspec (~> 3.8)
|
74
|
+
vcr (>= 5.0.0)
|
75
|
+
webmock (>= 3.7.5)
|
76
76
|
|
77
77
|
BUNDLED WITH
|
78
|
-
2.
|
78
|
+
2.1.4
|
data/README.md
CHANGED
@@ -163,6 +163,70 @@ Delete Braze Users with an array of external_ids
|
|
163
163
|
api.delete_users([1, 2, 3])
|
164
164
|
```
|
165
165
|
|
166
|
+
### Subscription groups
|
167
|
+
|
168
|
+
#### Get subscription group status for users by id
|
169
|
+
```ruby
|
170
|
+
api.subscription_user_status(external_id: [1])
|
171
|
+
```
|
172
|
+
|
173
|
+
#### Get users status for a specific subscription group
|
174
|
+
```ruby
|
175
|
+
api.subscription_status_get(
|
176
|
+
external_id: [1],
|
177
|
+
subscription_group_id: 'some-uuid'
|
178
|
+
)
|
179
|
+
```
|
180
|
+
|
181
|
+
#### Set user status for a specific subscription group
|
182
|
+
```ruby
|
183
|
+
api.subscription_status_set(
|
184
|
+
external_id: [1],
|
185
|
+
subscription_group_id: 'some-uuid',
|
186
|
+
subscription_state: 'subscribed|unsubscribed'
|
187
|
+
)
|
188
|
+
```
|
189
|
+
|
190
|
+
### User Alias
|
191
|
+
|
192
|
+
#### Create an alias-only user
|
193
|
+
|
194
|
+
```ruby
|
195
|
+
api.create_user_aliases(
|
196
|
+
user_aliases: [{
|
197
|
+
user_alias: {
|
198
|
+
alias_name: "device123",
|
199
|
+
alias_label: "my_device_identifier",
|
200
|
+
}
|
201
|
+
}]
|
202
|
+
)
|
203
|
+
```
|
204
|
+
|
205
|
+
#### Identify an alias-only user
|
206
|
+
```ruby
|
207
|
+
api.identify_users(
|
208
|
+
aliases_to_identify: [{
|
209
|
+
external_id: 1234,
|
210
|
+
user_alias: {
|
211
|
+
alias_name: "device123",
|
212
|
+
alias_label: "my_device_identifier",
|
213
|
+
}
|
214
|
+
}]
|
215
|
+
)
|
216
|
+
```
|
217
|
+
|
218
|
+
### Email Sync
|
219
|
+
|
220
|
+
#### Get List of or Query Email Unsubscribes
|
221
|
+
```ruby
|
222
|
+
api.email_unsubscribes(email: ['jdoe@example.com'])
|
223
|
+
```
|
224
|
+
|
225
|
+
#### Get List of or Query Hard Bounced Emails
|
226
|
+
```ruby
|
227
|
+
api.email_hard_bounces(email: ['jdoe@example.com'])
|
228
|
+
```
|
229
|
+
|
166
230
|
## Debugging
|
167
231
|
|
168
232
|
The BRAZE_RUBY_DEBUG environment variable will trigger full printouts of the Faraday gem's HTTP requests and responses.
|
data/Rakefile
CHANGED
data/braze_ruby.gemspec
CHANGED
@@ -28,11 +28,11 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.add_dependency 'faraday'
|
29
29
|
|
30
30
|
spec.add_development_dependency 'bundler', '>= 1.3'
|
31
|
-
spec.add_development_dependency 'rake'
|
32
|
-
spec.add_development_dependency 'rspec'
|
33
|
-
spec.add_development_dependency 'dotenv'
|
34
|
-
spec.add_development_dependency 'vcr'
|
35
|
-
spec.add_development_dependency 'webmock'
|
36
|
-
spec.add_development_dependency 'pry'
|
37
|
-
spec.add_development_dependency 'factory_bot'
|
31
|
+
spec.add_development_dependency 'rake', '>= 12.3.3'
|
32
|
+
spec.add_development_dependency 'rspec', '~> 3.8'
|
33
|
+
spec.add_development_dependency 'dotenv', '~> 2.7.5'
|
34
|
+
spec.add_development_dependency 'vcr', '>= 5.0.0'
|
35
|
+
spec.add_development_dependency 'webmock', '>= 3.7.5'
|
36
|
+
spec.add_development_dependency 'pry', '>= 0.12.2'
|
37
|
+
spec.add_development_dependency 'factory_bot', '>= 5.1.0'
|
38
38
|
end
|
data/lib/braze_ruby.rb
CHANGED
data/lib/braze_ruby/api.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'braze_ruby/deprecated'
|
2
4
|
require 'braze_ruby/endpoints/track_users'
|
3
5
|
require 'braze_ruby/endpoints/send_messages'
|
@@ -7,6 +9,7 @@ require 'braze_ruby/endpoints/email_sync'
|
|
7
9
|
require 'braze_ruby/endpoints/delete_users'
|
8
10
|
require 'braze_ruby/endpoints/campaigns'
|
9
11
|
require 'braze_ruby/endpoints/canvas'
|
12
|
+
require 'braze_ruby/endpoints/subscription'
|
10
13
|
|
11
14
|
module BrazeRuby
|
12
15
|
class API
|
@@ -20,20 +23,24 @@ module BrazeRuby
|
|
20
23
|
include BrazeRuby::Endpoints::DeleteUsers
|
21
24
|
include BrazeRuby::Endpoints::Campaigns
|
22
25
|
include BrazeRuby::Endpoints::Canvas
|
26
|
+
include BrazeRuby::Endpoints::Subscription
|
27
|
+
include BrazeRuby::Endpoints::IdentifyUsers
|
28
|
+
include BrazeRuby::Endpoints::CreateUserAliases
|
23
29
|
|
24
30
|
def export_users(**payload)
|
25
|
-
BrazeRuby::REST::ExportUsers.new(braze_url).perform(
|
31
|
+
BrazeRuby::REST::ExportUsers.new(api_key, braze_url, options).perform(**payload)
|
26
32
|
end
|
27
33
|
|
28
34
|
def list_segments
|
29
|
-
BrazeRuby::REST::ListSegments.new(braze_url).perform
|
35
|
+
BrazeRuby::REST::ListSegments.new(api_key, braze_url, options).perform
|
30
36
|
end
|
31
37
|
|
32
|
-
attr_reader :api_key, :braze_url
|
38
|
+
attr_reader :api_key, :braze_url, :options
|
33
39
|
|
34
|
-
def initialize(api_key, braze_url)
|
40
|
+
def initialize(api_key, braze_url, options = {})
|
35
41
|
@api_key = api_key
|
36
42
|
@braze_url = braze_url
|
43
|
+
@options = options
|
37
44
|
end
|
38
45
|
end
|
39
46
|
end
|
data/lib/braze_ruby/endpoints.rb
CHANGED
@@ -1,6 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'braze_ruby/endpoints/email_status'
|
2
4
|
require 'braze_ruby/endpoints/email_sync'
|
3
5
|
require 'braze_ruby/endpoints/schedule_messages'
|
4
6
|
require 'braze_ruby/endpoints/send_messages'
|
5
7
|
require 'braze_ruby/endpoints/track_users'
|
6
8
|
require 'braze_ruby/endpoints/delete_users'
|
9
|
+
require 'braze_ruby/endpoints/identify_users'
|
10
|
+
require 'braze_ruby/endpoints/create_user_aliases'
|
@@ -1,8 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module BrazeRuby
|
2
4
|
module Endpoints
|
3
5
|
module Campaigns
|
4
6
|
def trigger_campaign_send(**payload)
|
5
|
-
BrazeRuby::REST::TriggerCampaignSend.new(api_key, braze_url, payload).perform
|
7
|
+
BrazeRuby::REST::TriggerCampaignSend.new(api_key, braze_url, options, **payload).perform
|
6
8
|
end
|
7
9
|
end
|
8
10
|
end
|
@@ -1,8 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module BrazeRuby
|
2
4
|
module Endpoints
|
3
5
|
module Canvas
|
4
6
|
def trigger_canvas_send(**payload)
|
5
|
-
BrazeRuby::REST::TriggerCanvasSend.new(api_key, braze_url, payload).perform
|
7
|
+
BrazeRuby::REST::TriggerCanvasSend.new(api_key, braze_url, options, **payload).perform
|
8
|
+
end
|
9
|
+
|
10
|
+
def canvas_details(**payload)
|
11
|
+
BrazeRuby::REST::CanvasDetails.new(api_key, braze_url, options, **payload).perform
|
6
12
|
end
|
7
13
|
end
|
8
14
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BrazeRuby
|
4
|
+
module Endpoints
|
5
|
+
module CreateUserAliases
|
6
|
+
attr_writer :create_user_aliases_service
|
7
|
+
|
8
|
+
def create_user_aliases(**payload)
|
9
|
+
create_user_aliases_service.perform(**payload)
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def create_user_aliases_service
|
15
|
+
@create_user_aliases_service ||= BrazeRuby::REST::CreateUserAliases.new(api_key, braze_url, options)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -1,10 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module BrazeRuby
|
2
4
|
module Endpoints
|
3
5
|
module DeleteUsers
|
4
6
|
attr_writer :delete_users_service
|
5
7
|
|
6
8
|
def delete_users_action(**payload)
|
7
|
-
delete_users_service.perform(
|
9
|
+
delete_users_service.perform(**payload)
|
8
10
|
end
|
9
11
|
|
10
12
|
def delete_users(payload)
|
@@ -14,7 +16,7 @@ module BrazeRuby
|
|
14
16
|
private
|
15
17
|
|
16
18
|
def delete_users_service
|
17
|
-
@delete_users_service ||= BrazeRuby::REST::DeleteUsers.new(braze_url)
|
19
|
+
@delete_users_service ||= BrazeRuby::REST::DeleteUsers.new(api_key, braze_url, options)
|
18
20
|
end
|
19
21
|
end
|
20
22
|
end
|
@@ -1,8 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module BrazeRuby
|
2
4
|
module Endpoints
|
3
5
|
module EmailStatus
|
4
6
|
def email_status(**payload)
|
5
|
-
email_status_service.new(api_key, braze_url, payload).perform
|
7
|
+
email_status_service.new(api_key, braze_url, options, **payload).perform
|
6
8
|
end
|
7
9
|
|
8
10
|
def email_status_service
|
@@ -1,12 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module BrazeRuby
|
2
4
|
module Endpoints
|
3
5
|
module EmailSync
|
4
6
|
def email_unsubscribes(**payload)
|
5
|
-
BrazeRuby::REST::EmailUnsubscribes.new(api_key, braze_url, payload).perform
|
7
|
+
BrazeRuby::REST::EmailUnsubscribes.new(api_key, braze_url, options, **payload).perform
|
6
8
|
end
|
7
9
|
|
8
10
|
def email_hard_bounces(**payload)
|
9
|
-
BrazeRuby::REST::EmailHardBounces.new(api_key, braze_url, payload).perform
|
11
|
+
BrazeRuby::REST::EmailHardBounces.new(api_key, braze_url, options, **payload).perform
|
10
12
|
end
|
11
13
|
end
|
12
14
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BrazeRuby
|
4
|
+
module Endpoints
|
5
|
+
module IdentifyUsers
|
6
|
+
attr_writer :identify_users_service
|
7
|
+
|
8
|
+
def identify_users(**payload)
|
9
|
+
identify_users_service.perform(**payload)
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def identify_users_service
|
15
|
+
@identify_users_service ||= BrazeRuby::REST::IdentifyUsers.new(api_key, braze_url, options)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|