braze_ruby 0.2.1 → 0.4.0
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 +30 -0
- data/.gitignore +1 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +39 -39
- data/README.md +48 -0
- data/Rakefile +2 -0
- data/braze_ruby.gemspec +7 -7
- data/lib/braze_ruby.rb +2 -0
- data/lib/braze_ruby/api.rb +12 -4
- data/lib/braze_ruby/deprecated.rb +2 -0
- data/lib/braze_ruby/endpoints.rb +3 -0
- data/lib/braze_ruby/endpoints/campaigns.rb +3 -1
- data/lib/braze_ruby/endpoints/canvas.rb +15 -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/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 +20 -0
- 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/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 +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 +28 -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 +63 -21
@@ -1,8 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module BrazeRuby
|
2
4
|
module Endpoints
|
3
5
|
module SendMessages
|
4
6
|
def send_messages(**payload)
|
5
|
-
send_messages_service.new(api_key, braze_url, payload).perform
|
7
|
+
send_messages_service.new(api_key, braze_url, options, **payload).perform
|
6
8
|
end
|
7
9
|
|
8
10
|
private
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BrazeRuby
|
4
|
+
module Endpoints
|
5
|
+
module Subscription
|
6
|
+
def subscription_status_set(**payload)
|
7
|
+
BrazeRuby::REST::SubscriptionStatusSet.new(api_key, braze_url, options, **payload).perform
|
8
|
+
end
|
9
|
+
|
10
|
+
def subscription_status_get(**payload)
|
11
|
+
BrazeRuby::REST::SubscriptionStatusGet.new(api_key, braze_url, options, **payload).perform
|
12
|
+
end
|
13
|
+
|
14
|
+
|
15
|
+
def subscription_user_status(**payload)
|
16
|
+
BrazeRuby::REST::SubscriptionUserStatus.new(api_key, braze_url, options, **payload).perform
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -1,28 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module BrazeRuby
|
2
4
|
module Endpoints
|
3
5
|
module TrackUsers
|
4
6
|
attr_writer :track_users_service
|
5
7
|
|
6
8
|
def track_users(**payload)
|
7
|
-
track_users_service.perform(
|
9
|
+
track_users_service.perform(**payload)
|
8
10
|
end
|
9
11
|
|
10
|
-
def track_purchase(payload)
|
12
|
+
def track_purchase(**payload)
|
11
13
|
track_users(purchases: [payload])
|
12
14
|
end
|
13
15
|
|
14
|
-
def track_event(payload)
|
16
|
+
def track_event(**payload)
|
15
17
|
track_users(events: [payload])
|
16
18
|
end
|
17
19
|
|
18
|
-
def track_attribute(payload)
|
20
|
+
def track_attribute(**payload)
|
19
21
|
track_users(attributes: [payload])
|
20
22
|
end
|
21
23
|
|
22
24
|
private
|
23
25
|
|
24
26
|
def track_users_service
|
25
|
-
@track_users_service ||= BrazeRuby::REST::TrackUsers.new(braze_url)
|
27
|
+
@track_users_service ||= BrazeRuby::REST::TrackUsers.new(api_key, braze_url, options)
|
26
28
|
end
|
27
29
|
end
|
28
30
|
end
|
data/lib/braze_ruby/http.rb
CHANGED
@@ -1,10 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'json'
|
2
4
|
require 'faraday'
|
3
5
|
|
4
6
|
module BrazeRuby
|
5
7
|
class HTTP
|
6
|
-
|
8
|
+
DEFAULT_TIMEOUT = 30
|
9
|
+
|
10
|
+
def initialize(api_key, braze_url, options = {})
|
11
|
+
@api_key = api_key
|
7
12
|
@braze_url = braze_url
|
13
|
+
@options = default_options.merge(options)
|
8
14
|
end
|
9
15
|
|
10
16
|
def post(path, payload)
|
@@ -13,20 +19,29 @@ module BrazeRuby
|
|
13
19
|
end
|
14
20
|
end
|
15
21
|
|
16
|
-
def get(path, query)
|
22
|
+
def get(path, query = {})
|
17
23
|
connection.get path, query
|
18
24
|
end
|
19
25
|
|
20
26
|
def connection
|
21
27
|
@connection ||= Faraday.new(url: @braze_url) do |connection|
|
22
|
-
connection.headers[
|
23
|
-
connection.headers[
|
24
|
-
connection.headers[
|
28
|
+
connection.headers["Content-Type"] = "application/json"
|
29
|
+
connection.headers["Accept"] = "application/json"
|
30
|
+
connection.headers["User-Agent"] = "Braze Ruby gem v#{BrazeRuby::VERSION}"
|
31
|
+
connection.headers["Authorization"] = "Bearer #{@api_key}"
|
25
32
|
|
26
33
|
connection.response :logger if ENV['BRAZE_RUBY_DEBUG']
|
27
34
|
|
28
35
|
connection.adapter Faraday.default_adapter
|
36
|
+
|
37
|
+
connection.options[:timeout] = @options[:timeout]
|
29
38
|
end
|
30
39
|
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def default_options
|
44
|
+
{timeout: DEFAULT_TIMEOUT}
|
45
|
+
end
|
31
46
|
end
|
32
47
|
end
|
data/lib/braze_ruby/rest.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'braze_ruby/rest/base'
|
2
4
|
require 'braze_ruby/rest/track_users'
|
3
5
|
require 'braze_ruby/rest/send_messages'
|
@@ -9,3 +11,9 @@ require 'braze_ruby/rest/export_users'
|
|
9
11
|
require 'braze_ruby/rest/list_segments'
|
10
12
|
require 'braze_ruby/rest/delete_users'
|
11
13
|
require 'braze_ruby/rest/trigger_campaign_send'
|
14
|
+
require 'braze_ruby/rest/trigger_canvas_send'
|
15
|
+
require 'braze_ruby/rest/canvas_details'
|
16
|
+
require 'braze_ruby/rest/subscription_status_set'
|
17
|
+
require 'braze_ruby/rest/subscription_status_get'
|
18
|
+
require 'braze_ruby/rest/subscription_user_status'
|
19
|
+
require 'braze_ruby/rest/identify_users'
|
data/lib/braze_ruby/rest/base.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'braze_ruby/http'
|
2
4
|
|
3
5
|
module BrazeRuby
|
@@ -5,14 +7,16 @@ module BrazeRuby
|
|
5
7
|
class Base
|
6
8
|
attr_writer :http
|
7
9
|
|
8
|
-
def initialize(braze_url)
|
10
|
+
def initialize(api_key, braze_url, options)
|
11
|
+
@api_key = api_key
|
9
12
|
@braze_url = braze_url
|
13
|
+
@options = options
|
10
14
|
end
|
11
15
|
|
12
16
|
private
|
13
17
|
|
14
18
|
def http
|
15
|
-
@http ||= BrazeRuby::HTTP.new(@braze_url)
|
19
|
+
@http ||= BrazeRuby::HTTP.new(@api_key, @braze_url, @options)
|
16
20
|
end
|
17
21
|
end
|
18
22
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BrazeRuby
|
4
|
+
module REST
|
5
|
+
class CanvasDetails < Base
|
6
|
+
attr_reader :params
|
7
|
+
|
8
|
+
def initialize(api_key, braze_url, options, **params)
|
9
|
+
@params = params
|
10
|
+
super api_key, braze_url, options
|
11
|
+
end
|
12
|
+
|
13
|
+
def perform
|
14
|
+
http.get('/canvas/details', {
|
15
|
+
**@params
|
16
|
+
})
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -1,9 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module BrazeRuby
|
2
4
|
module REST
|
3
5
|
class DeleteUsers < Base
|
4
|
-
def perform(
|
6
|
+
def perform(external_ids: [])
|
5
7
|
http.post '/users/delete', {
|
6
|
-
'api_key': api_key,
|
7
8
|
'external_ids': external_ids
|
8
9
|
}
|
9
10
|
end
|
@@ -1,17 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module BrazeRuby
|
2
4
|
module REST
|
3
5
|
class EmailHardBounces < Base
|
4
|
-
attr_reader :
|
6
|
+
attr_reader :params
|
5
7
|
|
6
|
-
def initialize(api_key, braze_url, **params)
|
7
|
-
@api_key = api_key
|
8
|
+
def initialize(api_key, braze_url, options, **params)
|
8
9
|
@params = params
|
9
|
-
super braze_url
|
10
|
+
super api_key, braze_url, options
|
10
11
|
end
|
11
12
|
|
12
13
|
def perform
|
13
14
|
http.get('/email/hard_bounces', {
|
14
|
-
'api_key': api_key,
|
15
15
|
**@params
|
16
16
|
})
|
17
17
|
end
|
@@ -1,18 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module BrazeRuby
|
2
4
|
module REST
|
3
5
|
class EmailStatus < Base
|
4
|
-
attr_reader :
|
6
|
+
attr_reader :email, :status
|
5
7
|
|
6
|
-
def initialize(api_key, braze_url, email: nil, status: nil)
|
7
|
-
@api_key = api_key
|
8
|
+
def initialize(api_key, braze_url, options, email: nil, status: nil)
|
8
9
|
@email = email
|
9
10
|
@status = status
|
10
|
-
super braze_url
|
11
|
+
super api_key, braze_url, options
|
11
12
|
end
|
12
13
|
|
13
14
|
def perform
|
14
15
|
http.post '/email/status', {
|
15
|
-
'api_key': api_key,
|
16
16
|
'email': email,
|
17
17
|
'subscription_state': status
|
18
18
|
}
|
@@ -1,17 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module BrazeRuby
|
2
4
|
module REST
|
3
5
|
class EmailUnsubscribes < Base
|
4
|
-
attr_reader :
|
6
|
+
attr_reader :params
|
5
7
|
|
6
|
-
def initialize(api_key, braze_url, **params)
|
7
|
-
@api_key = api_key
|
8
|
+
def initialize(api_key, braze_url, options, **params)
|
8
9
|
@params = params
|
9
|
-
super braze_url
|
10
|
+
super api_key, braze_url, options
|
10
11
|
end
|
11
12
|
|
12
13
|
def perform
|
13
14
|
http.get('/email/unsubscribes', {
|
14
|
-
'api_key': api_key,
|
15
15
|
**params
|
16
16
|
})
|
17
17
|
end
|
@@ -1,24 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module BrazeRuby
|
2
4
|
module REST
|
3
5
|
class ExportUsers < Base
|
4
|
-
def perform(
|
5
|
-
return export_users_by_ids(
|
6
|
+
def perform(external_ids: nil, segment_id: nil, **options)
|
7
|
+
return export_users_by_ids(external_ids) if external_ids
|
6
8
|
|
7
|
-
export_users_by_segment(
|
9
|
+
export_users_by_segment(segment_id, options) if segment_id
|
8
10
|
end
|
9
11
|
|
10
12
|
private
|
11
13
|
|
12
|
-
def export_users_by_ids(
|
14
|
+
def export_users_by_ids(external_ids)
|
13
15
|
http.post '/users/export/ids', {
|
14
|
-
'api_key': api_key,
|
15
16
|
'external_ids': external_ids
|
16
17
|
}
|
17
18
|
end
|
18
19
|
|
19
|
-
def export_users_by_segment(
|
20
|
+
def export_users_by_segment(segment_id, options)
|
20
21
|
http.post '/users/export/segment', {
|
21
|
-
'api_key': api_key,
|
22
22
|
'segment_id': segment_id
|
23
23
|
}.merge(options)
|
24
24
|
end
|
@@ -1,20 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module BrazeRuby
|
2
4
|
module REST
|
3
5
|
class ScheduleMessages < Base
|
4
|
-
attr_reader :
|
6
|
+
attr_reader :time, :messages, :in_local_time, :external_user_ids
|
5
7
|
|
6
|
-
def initialize(api_key, braze_url, time: nil, messages: [], external_user_ids: [], in_local_time: false)
|
7
|
-
@api_key = api_key
|
8
|
+
def initialize(api_key, braze_url, options, time: nil, messages: [], external_user_ids: [], in_local_time: false)
|
8
9
|
@messages = messages
|
9
10
|
@time = time
|
10
11
|
@external_user_ids = external_user_ids
|
11
12
|
@in_local_time = in_local_time
|
12
|
-
super braze_url
|
13
|
+
super api_key, braze_url, options
|
13
14
|
end
|
14
15
|
|
15
16
|
def perform
|
16
17
|
http.post '/messages/schedule/create', {
|
17
|
-
'api_key': api_key,
|
18
18
|
'external_user_ids': external_user_ids,
|
19
19
|
'schedule': {
|
20
20
|
'time': time,
|
@@ -1,18 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module BrazeRuby
|
2
4
|
module REST
|
3
5
|
class SendMessages < Base
|
4
|
-
attr_reader :
|
6
|
+
attr_reader :messages, :external_user_ids
|
5
7
|
|
6
|
-
def initialize(api_key, braze_url, messages: [], external_user_ids: [])
|
7
|
-
@api_key = api_key
|
8
|
+
def initialize(api_key, braze_url, options, messages: [], external_user_ids: [])
|
8
9
|
@messages = messages
|
9
10
|
@external_user_ids = external_user_ids
|
10
|
-
super braze_url
|
11
|
+
super api_key, braze_url, options
|
11
12
|
end
|
12
13
|
|
13
14
|
def perform
|
14
15
|
http.post '/messages/send', {
|
15
|
-
'api_key': api_key,
|
16
16
|
'messages': messages,
|
17
17
|
'external_user_ids': external_user_ids
|
18
18
|
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BrazeRuby
|
4
|
+
module REST
|
5
|
+
class SubscriptionStatusGet < Base
|
6
|
+
attr_reader :params
|
7
|
+
|
8
|
+
def initialize(api_key, braze_url, options, **params)
|
9
|
+
@params = params
|
10
|
+
super api_key, braze_url, options
|
11
|
+
end
|
12
|
+
|
13
|
+
def perform
|
14
|
+
http.get('/subscription/status/get', {
|
15
|
+
**params
|
16
|
+
})
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BrazeRuby
|
4
|
+
module REST
|
5
|
+
class SubscriptionStatusSet < Base
|
6
|
+
attr_reader :params
|
7
|
+
|
8
|
+
def initialize(api_key, braze_url, options, **params)
|
9
|
+
@params = params
|
10
|
+
super api_key, braze_url, options
|
11
|
+
end
|
12
|
+
|
13
|
+
def perform
|
14
|
+
http.post('/subscription/status/set', {
|
15
|
+
**params
|
16
|
+
})
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BrazeRuby
|
4
|
+
module REST
|
5
|
+
class SubscriptionUserStatus < Base
|
6
|
+
attr_reader :params
|
7
|
+
|
8
|
+
def initialize(api_key, braze_url, options, **params)
|
9
|
+
@params = params
|
10
|
+
super api_key, braze_url, options
|
11
|
+
end
|
12
|
+
|
13
|
+
def perform
|
14
|
+
http.get('/subscription/user/status', {
|
15
|
+
**params
|
16
|
+
})
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|