braze_ruby 0.3.1 → 0.4.2
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/Gemfile.lock +43 -39
- data/README.md +59 -0
- data/braze_ruby.gemspec +7 -7
- data/lib/braze_ruby/api.rb +11 -4
- data/lib/braze_ruby/endpoints.rb +4 -0
- data/lib/braze_ruby/endpoints/campaigns.rb +1 -1
- data/lib/braze_ruby/endpoints/canvas.rb +2 -2
- data/lib/braze_ruby/endpoints/create_user_aliases.rb +19 -0
- data/lib/braze_ruby/endpoints/delete_users.rb +2 -2
- data/lib/braze_ruby/endpoints/email_status.rb +1 -1
- data/lib/braze_ruby/endpoints/email_sync.rb +2 -2
- data/lib/braze_ruby/endpoints/identify_users.rb +19 -0
- data/lib/braze_ruby/endpoints/remove_external_ids.rb +19 -0
- data/lib/braze_ruby/endpoints/rename_external_ids.rb +19 -0
- data/lib/braze_ruby/endpoints/schedule_messages.rb +1 -1
- data/lib/braze_ruby/endpoints/send_messages.rb +1 -1
- data/lib/braze_ruby/endpoints/subscription.rb +3 -3
- data/lib/braze_ruby/endpoints/track_users.rb +5 -5
- data/lib/braze_ruby/http.rb +18 -5
- data/lib/braze_ruby/rest.rb +4 -0
- data/lib/braze_ruby/rest/base.rb +4 -2
- data/lib/braze_ruby/rest/canvas_details.rb +3 -5
- data/lib/braze_ruby/rest/create_user_aliases.rb +13 -0
- data/lib/braze_ruby/rest/delete_users.rb +1 -2
- data/lib/braze_ruby/rest/email_hard_bounces.rb +3 -5
- data/lib/braze_ruby/rest/email_status.rb +3 -5
- data/lib/braze_ruby/rest/email_unsubscribes.rb +3 -5
- data/lib/braze_ruby/rest/export_users.rb +5 -7
- data/lib/braze_ruby/rest/identify_users.rb +13 -0
- data/lib/braze_ruby/rest/list_segments.rb +2 -4
- data/lib/braze_ruby/rest/remove_external_ids.rb +13 -0
- data/lib/braze_ruby/rest/rename_external_ids.rb +13 -0
- data/lib/braze_ruby/rest/schedule_messages.rb +3 -5
- data/lib/braze_ruby/rest/send_messages.rb +3 -5
- data/lib/braze_ruby/rest/subscription_status_get.rb +3 -5
- data/lib/braze_ruby/rest/subscription_status_set.rb +3 -5
- data/lib/braze_ruby/rest/subscription_user_status.rb +3 -5
- data/lib/braze_ruby/rest/track_users.rb +1 -2
- data/lib/braze_ruby/rest/trigger_campaign_send.rb +4 -8
- data/lib/braze_ruby/rest/trigger_canvas_send.rb +3 -5
- data/lib/braze_ruby/version.rb +1 -1
- data/spec/braze_ruby/endpoints/delete_users_spec.rb +1 -1
- data/spec/braze_ruby/endpoints/track_users_spec.rb +8 -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 +3 -3
- data/spec/braze_ruby/rest/email_status_spec.rb +1 -2
- data/spec/braze_ruby/rest/export_users_spec.rb +3 -3
- data/spec/braze_ruby/rest/identify_users_spec.rb +23 -0
- data/spec/braze_ruby/rest/remove_external_ids_spec.rb +22 -0
- data/spec/braze_ruby/rest/rename_external_ids_spec.rb +22 -0
- data/spec/braze_ruby/rest/schedule_messages_spec.rb +1 -2
- data/spec/braze_ruby/rest/send_messages_spec.rb +8 -13
- data/spec/braze_ruby/rest/track_users_spec.rb +10 -9
- 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 +16 -14
- 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/remove_external_ids/unauthorized/responds_with_unauthorized.yml +67 -0
- data/spec/fixtures/responses/remove_external_ids/with_success/responds_with_created.yml +69 -0
- data/spec/fixtures/responses/remove_external_ids/with_success/responds_with_success_message.yml +69 -0
- data/spec/fixtures/responses/rename_external_ids/unauthorized/responds_with_unauthorized.yml +67 -0
- data/spec/fixtures/responses/rename_external_ids/with_success/responds_with_created.yml +69 -0
- data/spec/fixtures/responses/rename_external_ids/with_success/responds_with_success_message.yml +69 -0
- 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 +16 -14
- data/spec/fixtures/responses/subscription/subscription_status_set/when_subscription_group_does_not_exist/returns_an_error_status.yml +16 -14
- data/spec/fixtures/responses/subscription/subscription_status_set/when_unsubscribing/unsubscribes_the_user.yml +32 -28
- 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 +50 -44
- data/spec/fixtures/responses/subscription/when_getting_subscription_group_statuses/subscription_status_get/when_group_does_not_exist/returns_an_error.yml +48 -42
- data/spec/fixtures/responses/subscription/when_getting_subscription_group_statuses/subscription_user_status/returns_subscription_groups_and_status_for_every_group.yml +50 -46
- 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 +4 -2
- data/spec/integrations/canvas_spec.rb +4 -2
- data/spec/integrations/create_user_aliases_spec.rb +32 -0
- data/spec/integrations/delete_users_spec.rb +1 -0
- data/spec/integrations/email_sync_spec.rb +2 -2
- data/spec/integrations/export_users_spec.rb +2 -2
- data/spec/integrations/identify_users_spec.rb +32 -0
- data/spec/integrations/list_segments_spec.rb +1 -1
- data/spec/integrations/remove_external_ids_spec.rb +33 -0
- data/spec/integrations/rename_external_ids_spec.rb +37 -0
- data/spec/integrations/schedule_messages_spec.rb +2 -1
- data/spec/integrations/send_messages_spec.rb +2 -1
- data/spec/integrations/subscription_spec.rb +7 -7
- data/spec/integrations/track_users_spec.rb +1 -0
- data/spec/spec_helper.rb +0 -8
- data/spec/support/integrations.rb +5 -1
- data/spec/support/vcr.rb +3 -1
- metadata +69 -19
@@ -6,12 +6,14 @@ RSpec.describe 'campaigns' do
|
|
6
6
|
describe 'trigger_send' do
|
7
7
|
it 'sends an email', vcr: true do
|
8
8
|
response = api.trigger_campaign_send(
|
9
|
-
campaign_id: '
|
9
|
+
campaign_id: 'd8b73da7-0b7c-fc72-1d80-e59c7f20f0d3',
|
10
10
|
recipients: [
|
11
|
-
external_user_id:
|
11
|
+
external_user_id: 12345,
|
12
12
|
trigger_properties: {first_name: 'John'}
|
13
13
|
]
|
14
14
|
)
|
15
|
+
|
16
|
+
expect(response.success?).to eq(true)
|
15
17
|
end
|
16
18
|
end
|
17
19
|
end
|
@@ -6,12 +6,14 @@ RSpec.describe 'canvas' do
|
|
6
6
|
describe 'trigger_send' do
|
7
7
|
it 'sends a canvas', vcr: true do
|
8
8
|
response = api.trigger_canvas_send(
|
9
|
-
canvas_id: '
|
9
|
+
canvas_id: '70a7fb99-cbcb-451a-8224-5f8b8c63e03f',
|
10
10
|
recipients: [
|
11
|
-
external_user_id:
|
11
|
+
external_user_id: 12345,
|
12
12
|
canvas_entry_properties: {first_name: 'John'}
|
13
13
|
]
|
14
14
|
)
|
15
|
+
|
16
|
+
expect(response.success?).to eq(true)
|
15
17
|
end
|
16
18
|
end
|
17
19
|
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe 'create user aliases' do
|
6
|
+
let(:user) { { user_alias: { alias_name: 'abc', alias_label: 'foo' } } }
|
7
|
+
|
8
|
+
subject(:create_user_aliases) do
|
9
|
+
api.create_user_aliases(user_aliases: [user])
|
10
|
+
end
|
11
|
+
|
12
|
+
context 'with success', vcr: true do
|
13
|
+
it 'responds with created' do
|
14
|
+
expect(create_user_aliases.status).to be 201
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'responds with success message' do
|
18
|
+
expect(JSON.parse(create_user_aliases.body)).to eq(
|
19
|
+
'aliases_processed' => 1,
|
20
|
+
'message' => 'success'
|
21
|
+
)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
context 'unauthorized', vcr: true do
|
26
|
+
let(:api_key) { 'non-existent' }
|
27
|
+
|
28
|
+
it 'responds with unauthorized' do
|
29
|
+
expect(create_user_aliases.status).to be 401
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -5,11 +5,11 @@ require 'spec_helper'
|
|
5
5
|
RSpec.describe 'email sync' do
|
6
6
|
describe 'unsubscribes' do
|
7
7
|
it 'responds with unsubscribed emails', vcr: true do
|
8
|
-
response = api.email_unsubscribes(start_date: '
|
8
|
+
response = api.email_unsubscribes(start_date: '2020-06-17', end_date: '2020-06-18')
|
9
9
|
emails = JSON.parse(response.body)['emails']
|
10
10
|
|
11
11
|
expect(emails.size).to eq(1)
|
12
|
-
expect(emails.first['email']).to eq('
|
12
|
+
expect(emails.first['email']).to eq('example@123.com')
|
13
13
|
end
|
14
14
|
|
15
15
|
it 'responds with empty array when no unsubscribes', vcr: true do
|
@@ -4,7 +4,7 @@ require 'spec_helper'
|
|
4
4
|
|
5
5
|
describe 'export users' do
|
6
6
|
context 'by ids' do
|
7
|
-
subject(:export_users) { api.export_users(external_ids: [
|
7
|
+
subject(:export_users) { api.export_users(external_ids: [12345]) }
|
8
8
|
|
9
9
|
context 'with success', :vcr do
|
10
10
|
it 'responds with created' do
|
@@ -15,7 +15,7 @@ describe 'export users' do
|
|
15
15
|
|
16
16
|
context 'by segment' do
|
17
17
|
context 'with success', :vcr do
|
18
|
-
let(:segment_id) {
|
18
|
+
let(:segment_id) { "3aca937b-9bbc-4e42-9370-05e411967b2b" }
|
19
19
|
|
20
20
|
subject(:export_users) do
|
21
21
|
api.export_users(segment_id: segment_id, callback_endpoint: 'https://example.com')
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe 'identify users' do
|
6
|
+
let(:user) { { external_id: 12345, user_alias: { alias_name: 'abc', alias_label: 'foo' } } }
|
7
|
+
|
8
|
+
subject(:identify_users) do
|
9
|
+
api.identify_users(aliases_to_identify: [user])
|
10
|
+
end
|
11
|
+
|
12
|
+
context 'with success', vcr: true do
|
13
|
+
it 'responds with created' do
|
14
|
+
expect(identify_users.status).to be 201
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'responds with success message' do
|
18
|
+
expect(JSON.parse(identify_users.body)).to eq(
|
19
|
+
'aliases_processed' => 1,
|
20
|
+
'message' => 'success'
|
21
|
+
)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
context 'unauthorized', vcr: true do
|
26
|
+
let(:api_key) { 'non-existent' }
|
27
|
+
|
28
|
+
it 'responds with unauthorized' do
|
29
|
+
expect(identify_users.status).to be 401
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe 'remove external ids' do
|
6
|
+
let(:external_ids) { { external_ids: ['abc'] } }
|
7
|
+
|
8
|
+
subject(:remove_external_ids) do
|
9
|
+
api.remove_external_ids(external_ids)
|
10
|
+
end
|
11
|
+
|
12
|
+
context 'with success', vcr: true do
|
13
|
+
it 'responds with created' do
|
14
|
+
expect(remove_external_ids.status).to be 201
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'responds with success message' do
|
18
|
+
expect(JSON.parse(remove_external_ids.body)).to include(
|
19
|
+
'removed_ids' => ['abc'],
|
20
|
+
'removal_errors' => [],
|
21
|
+
'message' => 'success'
|
22
|
+
)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
context 'unauthorized', vcr: true do
|
27
|
+
let(:api_key) { 'non-existent' }
|
28
|
+
|
29
|
+
it 'responds with unauthorized' do
|
30
|
+
expect(remove_external_ids.status).to be 401
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe 'rename external ids' do
|
6
|
+
let(:external_id_renames) { { external_id_renames: [{ current_external_id: 'abc', new_external_id: 'foo' }] } }
|
7
|
+
|
8
|
+
subject(:rename_external_ids) do
|
9
|
+
api.rename_external_ids(external_id_renames)
|
10
|
+
end
|
11
|
+
|
12
|
+
context 'with success', vcr: true do
|
13
|
+
it 'responds with created' do
|
14
|
+
expect(rename_external_ids.status).to be 201
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'responds with success message' do
|
18
|
+
expect(JSON.parse(rename_external_ids.body)).to include(
|
19
|
+
'external_ids' => [
|
20
|
+
hash_including(
|
21
|
+
'current_external_id' => 'abc',
|
22
|
+
'new_external_id' => 'foo'
|
23
|
+
),],
|
24
|
+
'rename_errors' => [],
|
25
|
+
'message' => 'success'
|
26
|
+
)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context 'unauthorized', vcr: true do
|
31
|
+
let(:api_key) { 'non-existent' }
|
32
|
+
|
33
|
+
it 'responds with unauthorized' do
|
34
|
+
expect(rename_external_ids.status).to be 401
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
5
|
describe 'send messages' do
|
6
|
-
let(:user_ids) { [
|
6
|
+
let(:user_ids) { [12345] }
|
7
7
|
let(:messages) { build(:messages) }
|
8
8
|
|
9
9
|
subject(:send_messages) do
|
@@ -17,6 +17,7 @@ describe 'send messages' do
|
|
17
17
|
|
18
18
|
it 'responds with success message' do
|
19
19
|
expect(JSON.parse(send_messages.body)).to eq(
|
20
|
+
'dispatch_id' => "ea0532cddfc97cd4e5767b351d6af0eb",
|
20
21
|
'message' => 'success'
|
21
22
|
)
|
22
23
|
end
|
@@ -3,10 +3,10 @@
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
5
|
RSpec.describe 'subscription', vcr: true do
|
6
|
-
let(:subscription_group_id) { '
|
7
|
-
let(:subscribed_user) { 'test-
|
8
|
-
let(:unsubscribed_user) { 'test-
|
9
|
-
let(:never_subscribed_user) { 'test-
|
6
|
+
let(:subscription_group_id) { 'ed06e19a-69b1-4f9b-a452-2db2c4e303a8' }
|
7
|
+
let(:subscribed_user) { 'test-user-1' }
|
8
|
+
let(:unsubscribed_user) { 'test-user-2' }
|
9
|
+
let(:never_subscribed_user) { 'test-user-3' }
|
10
10
|
|
11
11
|
context 'when getting subscription group statuses' do
|
12
12
|
let(:json_response) { JSON.parse(response.body) }
|
@@ -83,9 +83,9 @@ RSpec.describe 'subscription', vcr: true do
|
|
83
83
|
expect(json_response).to eq(
|
84
84
|
'message' => 'success',
|
85
85
|
'status' => {
|
86
|
-
'test-
|
87
|
-
'test-
|
88
|
-
'test-
|
86
|
+
'test-user-1' => 'Subscribed',
|
87
|
+
'test-user-2' => 'Unsubscribed',
|
88
|
+
'test-user-3' => 'unknown'
|
89
89
|
}
|
90
90
|
)
|
91
91
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -15,10 +15,6 @@ BRAZE_REST_API_KEY = ENV.fetch('BRAZE_REST_API_KEY', 'test')
|
|
15
15
|
BRAZE_REST_URL = ENV.fetch('BRAZE_REST_URL', 'https://rest.iad-03.braze.com')
|
16
16
|
|
17
17
|
RSpec.configure do |config|
|
18
|
-
def test_time
|
19
|
-
Time.parse('2019-02-15 00:00:00 -0500')
|
20
|
-
end
|
21
|
-
|
22
18
|
def braze_rest_api_key
|
23
19
|
BRAZE_REST_API_KEY
|
24
20
|
end
|
@@ -26,8 +22,4 @@ RSpec.configure do |config|
|
|
26
22
|
def braze_rest_url
|
27
23
|
BRAZE_REST_URL
|
28
24
|
end
|
29
|
-
|
30
|
-
def braze_test_segment
|
31
|
-
'a8fde797-4c44-4406-8e6c-5850d323f169'
|
32
|
-
end
|
33
25
|
end
|
data/spec/support/vcr.rb
CHANGED
@@ -9,7 +9,9 @@ VCR.configure do |config|
|
|
9
9
|
config.cassette_library_dir = 'spec/fixtures/responses'
|
10
10
|
|
11
11
|
config.default_cassette_options = {
|
12
|
-
match_requests_on: [:method, :uri, :body]
|
12
|
+
match_requests_on: [:method, :uri, :body],
|
13
|
+
record: :once,
|
14
|
+
allow_unused_http_interactions: false
|
13
15
|
}
|
14
16
|
|
15
17
|
config.configure_rspec_metadata!
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: braze_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Nussbaum
|
@@ -10,22 +10,22 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2021-02-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: faraday
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- - "
|
19
|
+
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0
|
21
|
+
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
|
-
- - "
|
26
|
+
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0
|
28
|
+
version: '0'
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: bundler
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
name: rake
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- - "
|
47
|
+
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: 12.3.3
|
50
50
|
type: :development
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
|
-
- - "
|
54
|
+
- - ">="
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
version: 12.3.3
|
57
57
|
- !ruby/object:Gem::Dependency
|
@@ -60,14 +60,14 @@ dependencies:
|
|
60
60
|
requirements:
|
61
61
|
- - "~>"
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 3.8
|
63
|
+
version: '3.8'
|
64
64
|
type: :development
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - "~>"
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 3.8
|
70
|
+
version: '3.8'
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: dotenv
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,56 +86,56 @@ dependencies:
|
|
86
86
|
name: vcr
|
87
87
|
requirement: !ruby/object:Gem::Requirement
|
88
88
|
requirements:
|
89
|
-
- - "
|
89
|
+
- - ">="
|
90
90
|
- !ruby/object:Gem::Version
|
91
91
|
version: 5.0.0
|
92
92
|
type: :development
|
93
93
|
prerelease: false
|
94
94
|
version_requirements: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
|
-
- - "
|
96
|
+
- - ">="
|
97
97
|
- !ruby/object:Gem::Version
|
98
98
|
version: 5.0.0
|
99
99
|
- !ruby/object:Gem::Dependency
|
100
100
|
name: webmock
|
101
101
|
requirement: !ruby/object:Gem::Requirement
|
102
102
|
requirements:
|
103
|
-
- - "
|
103
|
+
- - ">="
|
104
104
|
- !ruby/object:Gem::Version
|
105
105
|
version: 3.7.5
|
106
106
|
type: :development
|
107
107
|
prerelease: false
|
108
108
|
version_requirements: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
|
-
- - "
|
110
|
+
- - ">="
|
111
111
|
- !ruby/object:Gem::Version
|
112
112
|
version: 3.7.5
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: pry
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
|
-
- - "
|
117
|
+
- - ">="
|
118
118
|
- !ruby/object:Gem::Version
|
119
119
|
version: 0.12.2
|
120
120
|
type: :development
|
121
121
|
prerelease: false
|
122
122
|
version_requirements: !ruby/object:Gem::Requirement
|
123
123
|
requirements:
|
124
|
-
- - "
|
124
|
+
- - ">="
|
125
125
|
- !ruby/object:Gem::Version
|
126
126
|
version: 0.12.2
|
127
127
|
- !ruby/object:Gem::Dependency
|
128
128
|
name: factory_bot
|
129
129
|
requirement: !ruby/object:Gem::Requirement
|
130
130
|
requirements:
|
131
|
-
- - "
|
131
|
+
- - ">="
|
132
132
|
- !ruby/object:Gem::Version
|
133
133
|
version: 5.1.0
|
134
134
|
type: :development
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
137
|
requirements:
|
138
|
-
- - "
|
138
|
+
- - ">="
|
139
139
|
- !ruby/object:Gem::Version
|
140
140
|
version: 5.1.0
|
141
141
|
description: Braze wrapper
|
@@ -162,9 +162,13 @@ files:
|
|
162
162
|
- lib/braze_ruby/endpoints.rb
|
163
163
|
- lib/braze_ruby/endpoints/campaigns.rb
|
164
164
|
- lib/braze_ruby/endpoints/canvas.rb
|
165
|
+
- lib/braze_ruby/endpoints/create_user_aliases.rb
|
165
166
|
- lib/braze_ruby/endpoints/delete_users.rb
|
166
167
|
- lib/braze_ruby/endpoints/email_status.rb
|
167
168
|
- lib/braze_ruby/endpoints/email_sync.rb
|
169
|
+
- lib/braze_ruby/endpoints/identify_users.rb
|
170
|
+
- lib/braze_ruby/endpoints/remove_external_ids.rb
|
171
|
+
- lib/braze_ruby/endpoints/rename_external_ids.rb
|
168
172
|
- lib/braze_ruby/endpoints/schedule_messages.rb
|
169
173
|
- lib/braze_ruby/endpoints/send_messages.rb
|
170
174
|
- lib/braze_ruby/endpoints/subscription.rb
|
@@ -173,12 +177,16 @@ files:
|
|
173
177
|
- lib/braze_ruby/rest.rb
|
174
178
|
- lib/braze_ruby/rest/base.rb
|
175
179
|
- lib/braze_ruby/rest/canvas_details.rb
|
180
|
+
- lib/braze_ruby/rest/create_user_aliases.rb
|
176
181
|
- lib/braze_ruby/rest/delete_users.rb
|
177
182
|
- lib/braze_ruby/rest/email_hard_bounces.rb
|
178
183
|
- lib/braze_ruby/rest/email_status.rb
|
179
184
|
- lib/braze_ruby/rest/email_unsubscribes.rb
|
180
185
|
- lib/braze_ruby/rest/export_users.rb
|
186
|
+
- lib/braze_ruby/rest/identify_users.rb
|
181
187
|
- lib/braze_ruby/rest/list_segments.rb
|
188
|
+
- lib/braze_ruby/rest/remove_external_ids.rb
|
189
|
+
- lib/braze_ruby/rest/rename_external_ids.rb
|
182
190
|
- lib/braze_ruby/rest/schedule_messages.rb
|
183
191
|
- lib/braze_ruby/rest/send_messages.rb
|
184
192
|
- lib/braze_ruby/rest/subscription_status_get.rb
|
@@ -191,9 +199,14 @@ files:
|
|
191
199
|
- spec/braze_ruby/api_spec.rb
|
192
200
|
- spec/braze_ruby/endpoints/delete_users_spec.rb
|
193
201
|
- spec/braze_ruby/endpoints/track_users_spec.rb
|
202
|
+
- spec/braze_ruby/http_spec.rb
|
203
|
+
- spec/braze_ruby/rest/create_user_aliases_spec.rb
|
194
204
|
- spec/braze_ruby/rest/delete_users_spec.rb
|
195
205
|
- spec/braze_ruby/rest/email_status_spec.rb
|
196
206
|
- spec/braze_ruby/rest/export_users_spec.rb
|
207
|
+
- spec/braze_ruby/rest/identify_users_spec.rb
|
208
|
+
- spec/braze_ruby/rest/remove_external_ids_spec.rb
|
209
|
+
- spec/braze_ruby/rest/rename_external_ids_spec.rb
|
197
210
|
- spec/braze_ruby/rest/schedule_messages_spec.rb
|
198
211
|
- spec/braze_ruby/rest/send_messages_spec.rb
|
199
212
|
- spec/braze_ruby/rest/track_users_spec.rb
|
@@ -201,6 +214,9 @@ files:
|
|
201
214
|
- spec/fixtures/responses/campaigns/trigger_send/sends_an_email.yml
|
202
215
|
- spec/fixtures/responses/canvas/details/returns_error_when_no_canvas.yml
|
203
216
|
- spec/fixtures/responses/canvas/trigger_send/sends_a_canvas.yml
|
217
|
+
- spec/fixtures/responses/create_user_aliases/unauthorized/responds_with_unauthorized.yml
|
218
|
+
- spec/fixtures/responses/create_user_aliases/with_success/responds_with_created.yml
|
219
|
+
- spec/fixtures/responses/create_user_aliases/with_success/responds_with_success_message.yml
|
204
220
|
- spec/fixtures/responses/delete_users/unauthorized/responds_with_unauthorized.yml
|
205
221
|
- spec/fixtures/responses/delete_users/with_success/responds_with_created.yml
|
206
222
|
- spec/fixtures/responses/delete_users/with_success/responds_with_success_message.yml
|
@@ -213,8 +229,17 @@ files:
|
|
213
229
|
- spec/fixtures/responses/email_sync/unsubscribes/responds_with_unsubscribed_emails.yml
|
214
230
|
- spec/fixtures/responses/export_users/by_ids/with_success/responds_with_created.yml
|
215
231
|
- spec/fixtures/responses/export_users/by_segment/with_success/responds_with_created.yml
|
232
|
+
- spec/fixtures/responses/identify_users/unauthorized/responds_with_unauthorized.yml
|
233
|
+
- spec/fixtures/responses/identify_users/with_success/responds_with_created.yml
|
234
|
+
- spec/fixtures/responses/identify_users/with_success/responds_with_success_message.yml
|
216
235
|
- spec/fixtures/responses/list_segments/with_success/responds_with_a_list_of_segments.yml
|
217
236
|
- spec/fixtures/responses/list_segments/with_success/responds_with_success.yml
|
237
|
+
- spec/fixtures/responses/remove_external_ids/unauthorized/responds_with_unauthorized.yml
|
238
|
+
- spec/fixtures/responses/remove_external_ids/with_success/responds_with_created.yml
|
239
|
+
- spec/fixtures/responses/remove_external_ids/with_success/responds_with_success_message.yml
|
240
|
+
- spec/fixtures/responses/rename_external_ids/unauthorized/responds_with_unauthorized.yml
|
241
|
+
- spec/fixtures/responses/rename_external_ids/with_success/responds_with_created.yml
|
242
|
+
- spec/fixtures/responses/rename_external_ids/with_success/responds_with_success_message.yml
|
218
243
|
- spec/fixtures/responses/schedule_messages/unauthorized/responds_with_unauthorize.yml
|
219
244
|
- spec/fixtures/responses/schedule_messages/with_success/responds_with_created.yml
|
220
245
|
- spec/fixtures/responses/schedule_messages/with_success/responds_with_success_message.yml
|
@@ -232,11 +257,15 @@ files:
|
|
232
257
|
- spec/fixtures/responses/track_users/with_success/responds_with_success_message.yml
|
233
258
|
- spec/integrations/campaigns_spec.rb
|
234
259
|
- spec/integrations/canvas_spec.rb
|
260
|
+
- spec/integrations/create_user_aliases_spec.rb
|
235
261
|
- spec/integrations/delete_users_spec.rb
|
236
262
|
- spec/integrations/email_status_spec.rb
|
237
263
|
- spec/integrations/email_sync_spec.rb
|
238
264
|
- spec/integrations/export_users_spec.rb
|
265
|
+
- spec/integrations/identify_users_spec.rb
|
239
266
|
- spec/integrations/list_segments_spec.rb
|
267
|
+
- spec/integrations/remove_external_ids_spec.rb
|
268
|
+
- spec/integrations/rename_external_ids_spec.rb
|
240
269
|
- spec/integrations/schedule_messages_spec.rb
|
241
270
|
- spec/integrations/send_messages_spec.rb
|
242
271
|
- spec/integrations/subscription_spec.rb
|
@@ -266,7 +295,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
266
295
|
- !ruby/object:Gem::Version
|
267
296
|
version: '0'
|
268
297
|
requirements: []
|
269
|
-
rubygems_version: 3.
|
298
|
+
rubygems_version: 3.1.4
|
270
299
|
signing_key:
|
271
300
|
specification_version: 4
|
272
301
|
summary: A wrapper for the Braze REST API forked from the appboy gem, track users/events/purchases,
|
@@ -275,9 +304,14 @@ test_files:
|
|
275
304
|
- spec/braze_ruby/api_spec.rb
|
276
305
|
- spec/braze_ruby/endpoints/delete_users_spec.rb
|
277
306
|
- spec/braze_ruby/endpoints/track_users_spec.rb
|
307
|
+
- spec/braze_ruby/http_spec.rb
|
308
|
+
- spec/braze_ruby/rest/create_user_aliases_spec.rb
|
278
309
|
- spec/braze_ruby/rest/delete_users_spec.rb
|
279
310
|
- spec/braze_ruby/rest/email_status_spec.rb
|
280
311
|
- spec/braze_ruby/rest/export_users_spec.rb
|
312
|
+
- spec/braze_ruby/rest/identify_users_spec.rb
|
313
|
+
- spec/braze_ruby/rest/remove_external_ids_spec.rb
|
314
|
+
- spec/braze_ruby/rest/rename_external_ids_spec.rb
|
281
315
|
- spec/braze_ruby/rest/schedule_messages_spec.rb
|
282
316
|
- spec/braze_ruby/rest/send_messages_spec.rb
|
283
317
|
- spec/braze_ruby/rest/track_users_spec.rb
|
@@ -285,6 +319,9 @@ test_files:
|
|
285
319
|
- spec/fixtures/responses/campaigns/trigger_send/sends_an_email.yml
|
286
320
|
- spec/fixtures/responses/canvas/details/returns_error_when_no_canvas.yml
|
287
321
|
- spec/fixtures/responses/canvas/trigger_send/sends_a_canvas.yml
|
322
|
+
- spec/fixtures/responses/create_user_aliases/unauthorized/responds_with_unauthorized.yml
|
323
|
+
- spec/fixtures/responses/create_user_aliases/with_success/responds_with_created.yml
|
324
|
+
- spec/fixtures/responses/create_user_aliases/with_success/responds_with_success_message.yml
|
288
325
|
- spec/fixtures/responses/delete_users/unauthorized/responds_with_unauthorized.yml
|
289
326
|
- spec/fixtures/responses/delete_users/with_success/responds_with_created.yml
|
290
327
|
- spec/fixtures/responses/delete_users/with_success/responds_with_success_message.yml
|
@@ -297,8 +334,17 @@ test_files:
|
|
297
334
|
- spec/fixtures/responses/email_sync/unsubscribes/responds_with_unsubscribed_emails.yml
|
298
335
|
- spec/fixtures/responses/export_users/by_ids/with_success/responds_with_created.yml
|
299
336
|
- spec/fixtures/responses/export_users/by_segment/with_success/responds_with_created.yml
|
337
|
+
- spec/fixtures/responses/identify_users/unauthorized/responds_with_unauthorized.yml
|
338
|
+
- spec/fixtures/responses/identify_users/with_success/responds_with_created.yml
|
339
|
+
- spec/fixtures/responses/identify_users/with_success/responds_with_success_message.yml
|
300
340
|
- spec/fixtures/responses/list_segments/with_success/responds_with_a_list_of_segments.yml
|
301
341
|
- spec/fixtures/responses/list_segments/with_success/responds_with_success.yml
|
342
|
+
- spec/fixtures/responses/remove_external_ids/unauthorized/responds_with_unauthorized.yml
|
343
|
+
- spec/fixtures/responses/remove_external_ids/with_success/responds_with_created.yml
|
344
|
+
- spec/fixtures/responses/remove_external_ids/with_success/responds_with_success_message.yml
|
345
|
+
- spec/fixtures/responses/rename_external_ids/unauthorized/responds_with_unauthorized.yml
|
346
|
+
- spec/fixtures/responses/rename_external_ids/with_success/responds_with_created.yml
|
347
|
+
- spec/fixtures/responses/rename_external_ids/with_success/responds_with_success_message.yml
|
302
348
|
- spec/fixtures/responses/schedule_messages/unauthorized/responds_with_unauthorize.yml
|
303
349
|
- spec/fixtures/responses/schedule_messages/with_success/responds_with_created.yml
|
304
350
|
- spec/fixtures/responses/schedule_messages/with_success/responds_with_success_message.yml
|
@@ -316,11 +362,15 @@ test_files:
|
|
316
362
|
- spec/fixtures/responses/track_users/with_success/responds_with_success_message.yml
|
317
363
|
- spec/integrations/campaigns_spec.rb
|
318
364
|
- spec/integrations/canvas_spec.rb
|
365
|
+
- spec/integrations/create_user_aliases_spec.rb
|
319
366
|
- spec/integrations/delete_users_spec.rb
|
320
367
|
- spec/integrations/email_status_spec.rb
|
321
368
|
- spec/integrations/email_sync_spec.rb
|
322
369
|
- spec/integrations/export_users_spec.rb
|
370
|
+
- spec/integrations/identify_users_spec.rb
|
323
371
|
- spec/integrations/list_segments_spec.rb
|
372
|
+
- spec/integrations/remove_external_ids_spec.rb
|
373
|
+
- spec/integrations/rename_external_ids_spec.rb
|
324
374
|
- spec/integrations/schedule_messages_spec.rb
|
325
375
|
- spec/integrations/send_messages_spec.rb
|
326
376
|
- spec/integrations/subscription_spec.rb
|