braze_ruby 0.3.2 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +57 -0
- data/.circleci/gem_credentials +2 -0
- data/.circleci/setup-rubygems +6 -0
- data/.gitignore +12 -19
- data/.standard.yml +1 -0
- data/Gemfile +1 -2
- data/LICENSE.txt +17 -18
- data/README.md +49 -2
- data/Rakefile +2 -1
- data/bin/release +16 -0
- data/braze_ruby.gemspec +28 -31
- data/lib/braze_ruby.rb +4 -4
- data/lib/braze_ruby/api.rb +20 -14
- data/lib/braze_ruby/deprecated.rb +4 -4
- data/lib/braze_ruby/endpoints.rb +10 -7
- 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 +2 -2
- 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 -4
- data/lib/braze_ruby/endpoints/track_users.rb +5 -5
- data/lib/braze_ruby/http.rb +21 -8
- data/lib/braze_ruby/rest.rb +20 -17
- data/lib/braze_ruby/rest/base.rb +5 -3
- data/lib/braze_ruby/rest/canvas_details.rb +4 -6
- data/lib/braze_ruby/rest/create_user_aliases.rb +13 -0
- data/lib/braze_ruby/rest/delete_users.rb +3 -4
- data/lib/braze_ruby/rest/email_hard_bounces.rb +4 -6
- data/lib/braze_ruby/rest/email_status.rb +6 -8
- data/lib/braze_ruby/rest/email_unsubscribes.rb +4 -6
- data/lib/braze_ruby/rest/export_users.rb +9 -11
- data/lib/braze_ruby/rest/identify_users.rb +3 -4
- 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 +9 -11
- data/lib/braze_ruby/rest/send_messages.rb +6 -8
- data/lib/braze_ruby/rest/subscription_status_get.rb +4 -6
- data/lib/braze_ruby/rest/subscription_status_set.rb +4 -6
- data/lib/braze_ruby/rest/subscription_user_status.rb +4 -6
- data/lib/braze_ruby/rest/track_users.rb +5 -6
- data/lib/braze_ruby/rest/trigger_campaign_send.rb +4 -8
- data/lib/braze_ruby/rest/trigger_canvas_send.rb +4 -6
- data/lib/braze_ruby/version.rb +1 -1
- metadata +61 -175
- data/.github/workflows/ci.yml +0 -19
- data/Gemfile.lock +0 -78
- data/spec/braze_ruby/api_spec.rb +0 -6
- data/spec/braze_ruby/endpoints/delete_users_spec.rb +0 -31
- data/spec/braze_ruby/endpoints/track_users_spec.rb +0 -74
- data/spec/braze_ruby/rest/delete_users_spec.rb +0 -22
- data/spec/braze_ruby/rest/email_status_spec.rb +0 -21
- data/spec/braze_ruby/rest/export_users_spec.rb +0 -21
- data/spec/braze_ruby/rest/identify_users_spec.rb +0 -23
- data/spec/braze_ruby/rest/schedule_messages_spec.rb +0 -38
- data/spec/braze_ruby/rest/send_messages_spec.rb +0 -35
- data/spec/braze_ruby/rest/track_users_spec.rb +0 -26
- data/spec/factories.rb +0 -38
- data/spec/fixtures/responses/campaigns/trigger_send/sends_an_email.yml +0 -69
- data/spec/fixtures/responses/canvas/details/returns_error_when_no_canvas.yml +0 -67
- data/spec/fixtures/responses/canvas/trigger_send/sends_a_canvas.yml +0 -69
- data/spec/fixtures/responses/delete_users/unauthorized/responds_with_unauthorized.yml +0 -66
- data/spec/fixtures/responses/delete_users/with_success/responds_with_created.yml +0 -69
- data/spec/fixtures/responses/delete_users/with_success/responds_with_success_message.yml +0 -69
- data/spec/fixtures/responses/email_status/existing_email/responds_with_created.yml +0 -69
- data/spec/fixtures/responses/email_status/existing_email/responds_with_success_message.yml +0 -69
- data/spec/fixtures/responses/email_status/unknown_email/responds_with_bad_request.yml +0 -69
- data/spec/fixtures/responses/email_status/unknown_email/responds_with_success_message.yml +0 -69
- data/spec/fixtures/responses/email_sync/hard_bounces/responds_with_empty_array_when_no_hard_bounces.yml +0 -73
- data/spec/fixtures/responses/email_sync/unsubscribes/responds_with_empty_array_when_no_unsubscribes.yml +0 -73
- data/spec/fixtures/responses/email_sync/unsubscribes/responds_with_unsubscribed_emails.yml +0 -74
- data/spec/fixtures/responses/export_users/by_ids/with_success/responds_with_created.yml +0 -69
- data/spec/fixtures/responses/export_users/by_segment/with_success/responds_with_created.yml +0 -69
- data/spec/fixtures/responses/identify_users/unauthorized/responds_with_unauthorized.yml +0 -66
- data/spec/fixtures/responses/identify_users/with_success/responds_with_created.yml +0 -69
- data/spec/fixtures/responses/identify_users/with_success/responds_with_success_message.yml +0 -69
- data/spec/fixtures/responses/list_segments/with_success/responds_with_a_list_of_segments.yml +0 -81
- data/spec/fixtures/responses/list_segments/with_success/responds_with_success.yml +0 -81
- data/spec/fixtures/responses/schedule_messages/unauthorized/responds_with_unauthorize.yml +0 -67
- data/spec/fixtures/responses/schedule_messages/with_success/responds_with_created.yml +0 -70
- data/spec/fixtures/responses/schedule_messages/with_success/responds_with_success_message.yml +0 -70
- data/spec/fixtures/responses/send_messages/unauthorized/responds_with_unauthorized.yml +0 -66
- data/spec/fixtures/responses/send_messages/with_success/responds_with_created.yml +0 -69
- data/spec/fixtures/responses/send_messages/with_success/responds_with_success_message.yml +0 -69
- data/spec/fixtures/responses/subscription/subscription_status_set/when_subscribing/subscribes_the_user.yml +0 -69
- data/spec/fixtures/responses/subscription/subscription_status_set/when_subscription_group_does_not_exist/returns_an_error_status.yml +0 -66
- data/spec/fixtures/responses/subscription/subscription_status_set/when_unsubscribing/unsubscribes_the_user.yml +0 -135
- 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 +0 -205
- data/spec/fixtures/responses/subscription/when_getting_subscription_group_statuses/subscription_status_get/when_group_does_not_exist/returns_an_error.yml +0 -193
- data/spec/fixtures/responses/subscription/when_getting_subscription_group_statuses/subscription_user_status/returns_subscription_groups_and_status_for_every_group.yml +0 -207
- data/spec/fixtures/responses/track_users/unauthorized/responds_with_unauthorized.yml +0 -68
- data/spec/fixtures/responses/track_users/with_success/responds_with_created.yml +0 -71
- data/spec/fixtures/responses/track_users/with_success/responds_with_success_message.yml +0 -71
- data/spec/integrations/campaigns_spec.rb +0 -17
- data/spec/integrations/canvas_spec.rb +0 -26
- data/spec/integrations/delete_users_spec.rb +0 -31
- data/spec/integrations/email_status_spec.rb +0 -38
- data/spec/integrations/email_sync_spec.rb +0 -31
- data/spec/integrations/export_users_spec.rb +0 -29
- data/spec/integrations/identify_users_spec.rb +0 -32
- data/spec/integrations/list_segments_spec.rb +0 -21
- data/spec/integrations/schedule_messages_spec.rb +0 -33
- data/spec/integrations/send_messages_spec.rb +0 -32
- data/spec/integrations/subscription_spec.rb +0 -149
- data/spec/integrations/track_users_spec.rb +0 -37
- data/spec/spec_helper.rb +0 -33
- data/spec/support/factory_bot.rb +0 -12
- data/spec/support/integrations.rb +0 -23
- data/spec/support/vcr.rb +0 -18
@@ -1,135 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: "<BRAZE_REST_URL>/subscription/status/set"
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '{"api_key":"<BRAZE_REST_API_KEY>","external_id":"test-gem-002","subscription_group_id":"0201b87a-ef6e-4410-9412-a298c4c1206d","subscription_state":"subscribed"}'
|
9
|
-
headers:
|
10
|
-
Content-Type:
|
11
|
-
- application/json
|
12
|
-
Accept:
|
13
|
-
- application/json
|
14
|
-
User-Agent:
|
15
|
-
- Braze Ruby gem v0.2.2
|
16
|
-
Accept-Encoding:
|
17
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
-
response:
|
19
|
-
status:
|
20
|
-
code: 201
|
21
|
-
message: Created
|
22
|
-
headers:
|
23
|
-
Cache-Control:
|
24
|
-
- max-age=0, private, must-revalidate
|
25
|
-
Content-Type:
|
26
|
-
- application/json
|
27
|
-
Etag:
|
28
|
-
- W/"838a7c62adda8d131d694ae13ba2c5b7"
|
29
|
-
Server:
|
30
|
-
- nginx
|
31
|
-
Strict-Transport-Security:
|
32
|
-
- max-age=0; includeSubDomains
|
33
|
-
- max-age=31536000; includeSubDomains
|
34
|
-
X-Ratelimit-Limit:
|
35
|
-
- '250000'
|
36
|
-
X-Ratelimit-Remaining:
|
37
|
-
- '249976'
|
38
|
-
X-Ratelimit-Reset:
|
39
|
-
- '1574409600'
|
40
|
-
X-Request-Id:
|
41
|
-
- c59a4c1a-8e48-487a-ba11-5bac411e109b
|
42
|
-
X-Runtime:
|
43
|
-
- '0.005244'
|
44
|
-
Content-Length:
|
45
|
-
- '46'
|
46
|
-
Accept-Ranges:
|
47
|
-
- bytes
|
48
|
-
Date:
|
49
|
-
- Fri, 22 Nov 2019 07:59:46 GMT
|
50
|
-
Via:
|
51
|
-
- 1.1 varnish
|
52
|
-
Connection:
|
53
|
-
- keep-alive
|
54
|
-
X-Served-By:
|
55
|
-
- cache-hhn4022-HHN
|
56
|
-
X-Cache:
|
57
|
-
- MISS
|
58
|
-
X-Cache-Hits:
|
59
|
-
- '0'
|
60
|
-
X-Timer:
|
61
|
-
- S1574409586.449783,VS0,VE13
|
62
|
-
Vary:
|
63
|
-
- Origin,Accept-Encoding
|
64
|
-
body:
|
65
|
-
encoding: ASCII-8BIT
|
66
|
-
string: '{"message":"success"}'
|
67
|
-
http_version:
|
68
|
-
recorded_at: Fri, 22 Nov 2019 07:59:46 GMT
|
69
|
-
- request:
|
70
|
-
method: post
|
71
|
-
uri: "<BRAZE_REST_URL>/subscription/status/set"
|
72
|
-
body:
|
73
|
-
encoding: UTF-8
|
74
|
-
string: '{"api_key":"<BRAZE_REST_API_KEY>","external_id":"test-gem-002","subscription_group_id":"0201b87a-ef6e-4410-9412-a298c4c1206d","subscription_state":"unsubscribed"}'
|
75
|
-
headers:
|
76
|
-
Content-Type:
|
77
|
-
- application/json
|
78
|
-
Accept:
|
79
|
-
- application/json
|
80
|
-
User-Agent:
|
81
|
-
- Braze Ruby gem v0.2.2
|
82
|
-
Accept-Encoding:
|
83
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
84
|
-
response:
|
85
|
-
status:
|
86
|
-
code: 201
|
87
|
-
message: Created
|
88
|
-
headers:
|
89
|
-
Cache-Control:
|
90
|
-
- max-age=0, private, must-revalidate
|
91
|
-
Content-Type:
|
92
|
-
- application/json
|
93
|
-
Etag:
|
94
|
-
- W/"838a7c62adda8d131d694ae13ba2c5b7"
|
95
|
-
Server:
|
96
|
-
- nginx
|
97
|
-
Strict-Transport-Security:
|
98
|
-
- max-age=0; includeSubDomains
|
99
|
-
- max-age=31536000; includeSubDomains
|
100
|
-
X-Ratelimit-Limit:
|
101
|
-
- '250000'
|
102
|
-
X-Ratelimit-Remaining:
|
103
|
-
- '249975'
|
104
|
-
X-Ratelimit-Reset:
|
105
|
-
- '1574409600'
|
106
|
-
X-Request-Id:
|
107
|
-
- 596f4df6-b90e-4de8-94cb-43e62b03ee7d
|
108
|
-
X-Runtime:
|
109
|
-
- '0.006277'
|
110
|
-
Content-Length:
|
111
|
-
- '46'
|
112
|
-
Accept-Ranges:
|
113
|
-
- bytes
|
114
|
-
Date:
|
115
|
-
- Fri, 22 Nov 2019 07:59:46 GMT
|
116
|
-
Via:
|
117
|
-
- 1.1 varnish
|
118
|
-
Connection:
|
119
|
-
- keep-alive
|
120
|
-
X-Served-By:
|
121
|
-
- cache-hhn4023-HHN
|
122
|
-
X-Cache:
|
123
|
-
- MISS
|
124
|
-
X-Cache-Hits:
|
125
|
-
- '0'
|
126
|
-
X-Timer:
|
127
|
-
- S1574409587.663692,VS0,VE14
|
128
|
-
Vary:
|
129
|
-
- Origin,Accept-Encoding
|
130
|
-
body:
|
131
|
-
encoding: ASCII-8BIT
|
132
|
-
string: '{"message":"success"}'
|
133
|
-
http_version:
|
134
|
-
recorded_at: Fri, 22 Nov 2019 07:59:46 GMT
|
135
|
-
recorded_with: VCR 5.0.0
|
@@ -1,205 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: "<BRAZE_REST_URL>/subscription/status/set"
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '{"api_key":"<BRAZE_REST_API_KEY>","external_id":"test-gem-001","subscription_group_id":"0201b87a-ef6e-4410-9412-a298c4c1206d","subscription_state":"subscribed"}'
|
9
|
-
headers:
|
10
|
-
Content-Type:
|
11
|
-
- application/json
|
12
|
-
Accept:
|
13
|
-
- application/json
|
14
|
-
User-Agent:
|
15
|
-
- Braze Ruby gem v0.2.2
|
16
|
-
Accept-Encoding:
|
17
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
-
response:
|
19
|
-
status:
|
20
|
-
code: 201
|
21
|
-
message: Created
|
22
|
-
headers:
|
23
|
-
Cache-Control:
|
24
|
-
- max-age=0, private, must-revalidate
|
25
|
-
Content-Type:
|
26
|
-
- application/json
|
27
|
-
Etag:
|
28
|
-
- W/"838a7c62adda8d131d694ae13ba2c5b7"
|
29
|
-
Server:
|
30
|
-
- nginx
|
31
|
-
Strict-Transport-Security:
|
32
|
-
- max-age=0; includeSubDomains
|
33
|
-
- max-age=31536000; includeSubDomains
|
34
|
-
X-Ratelimit-Limit:
|
35
|
-
- '250000'
|
36
|
-
X-Ratelimit-Remaining:
|
37
|
-
- '249983'
|
38
|
-
X-Ratelimit-Reset:
|
39
|
-
- '1574409600'
|
40
|
-
X-Request-Id:
|
41
|
-
- 870fe392-6e88-4d29-bb09-44abb692feee
|
42
|
-
X-Runtime:
|
43
|
-
- '0.004454'
|
44
|
-
Content-Length:
|
45
|
-
- '46'
|
46
|
-
Accept-Ranges:
|
47
|
-
- bytes
|
48
|
-
Date:
|
49
|
-
- Fri, 22 Nov 2019 07:59:44 GMT
|
50
|
-
Via:
|
51
|
-
- 1.1 varnish
|
52
|
-
Connection:
|
53
|
-
- keep-alive
|
54
|
-
X-Served-By:
|
55
|
-
- cache-hhn4067-HHN
|
56
|
-
X-Cache:
|
57
|
-
- MISS
|
58
|
-
X-Cache-Hits:
|
59
|
-
- '0'
|
60
|
-
X-Timer:
|
61
|
-
- S1574409585.950445,VS0,VE12
|
62
|
-
Vary:
|
63
|
-
- Origin,Accept-Encoding
|
64
|
-
body:
|
65
|
-
encoding: ASCII-8BIT
|
66
|
-
string: '{"message":"success"}'
|
67
|
-
http_version:
|
68
|
-
recorded_at: Fri, 22 Nov 2019 07:59:44 GMT
|
69
|
-
- request:
|
70
|
-
method: post
|
71
|
-
uri: "<BRAZE_REST_URL>/subscription/status/set"
|
72
|
-
body:
|
73
|
-
encoding: UTF-8
|
74
|
-
string: '{"api_key":"<BRAZE_REST_API_KEY>","external_id":"test-gem-002","subscription_group_id":"0201b87a-ef6e-4410-9412-a298c4c1206d","subscription_state":"unsubscribed"}'
|
75
|
-
headers:
|
76
|
-
Content-Type:
|
77
|
-
- application/json
|
78
|
-
Accept:
|
79
|
-
- application/json
|
80
|
-
User-Agent:
|
81
|
-
- Braze Ruby gem v0.2.2
|
82
|
-
Accept-Encoding:
|
83
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
84
|
-
response:
|
85
|
-
status:
|
86
|
-
code: 201
|
87
|
-
message: Created
|
88
|
-
headers:
|
89
|
-
Cache-Control:
|
90
|
-
- max-age=0, private, must-revalidate
|
91
|
-
Content-Type:
|
92
|
-
- application/json
|
93
|
-
Etag:
|
94
|
-
- W/"838a7c62adda8d131d694ae13ba2c5b7"
|
95
|
-
Server:
|
96
|
-
- nginx
|
97
|
-
Strict-Transport-Security:
|
98
|
-
- max-age=0; includeSubDomains
|
99
|
-
- max-age=31536000; includeSubDomains
|
100
|
-
X-Ratelimit-Limit:
|
101
|
-
- '250000'
|
102
|
-
X-Ratelimit-Remaining:
|
103
|
-
- '249982'
|
104
|
-
X-Ratelimit-Reset:
|
105
|
-
- '1574409600'
|
106
|
-
X-Request-Id:
|
107
|
-
- 653dcaaa-5c38-4e71-b65c-f0b0149638d4
|
108
|
-
X-Runtime:
|
109
|
-
- '0.006976'
|
110
|
-
Content-Length:
|
111
|
-
- '46'
|
112
|
-
Accept-Ranges:
|
113
|
-
- bytes
|
114
|
-
Date:
|
115
|
-
- Fri, 22 Nov 2019 07:59:45 GMT
|
116
|
-
Via:
|
117
|
-
- 1.1 varnish
|
118
|
-
Connection:
|
119
|
-
- keep-alive
|
120
|
-
X-Served-By:
|
121
|
-
- cache-hhn4027-HHN
|
122
|
-
X-Cache:
|
123
|
-
- MISS
|
124
|
-
X-Cache-Hits:
|
125
|
-
- '0'
|
126
|
-
X-Timer:
|
127
|
-
- S1574409585.148598,VS0,VE54
|
128
|
-
Vary:
|
129
|
-
- Origin,Accept-Encoding
|
130
|
-
body:
|
131
|
-
encoding: ASCII-8BIT
|
132
|
-
string: '{"message":"success"}'
|
133
|
-
http_version:
|
134
|
-
recorded_at: Fri, 22 Nov 2019 07:59:45 GMT
|
135
|
-
- request:
|
136
|
-
method: get
|
137
|
-
uri: "<BRAZE_REST_URL>/subscription/status/get?api_key=<BRAZE_REST_API_KEY>&external_id%5B%5D=test-gem-001&external_id%5B%5D=test-gem-002&external_id%5B%5D=test-gem-003&subscription_group_id=0201b87a-ef6e-4410-9412-a298c4c1206d"
|
138
|
-
body:
|
139
|
-
encoding: US-ASCII
|
140
|
-
string: ''
|
141
|
-
headers:
|
142
|
-
Content-Type:
|
143
|
-
- application/json
|
144
|
-
Accept:
|
145
|
-
- application/json
|
146
|
-
User-Agent:
|
147
|
-
- Braze Ruby gem v0.2.2
|
148
|
-
Accept-Encoding:
|
149
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
150
|
-
response:
|
151
|
-
status:
|
152
|
-
code: 200
|
153
|
-
message: OK
|
154
|
-
headers:
|
155
|
-
Cache-Control:
|
156
|
-
- max-age=0, private, must-revalidate
|
157
|
-
Content-Type:
|
158
|
-
- application/json
|
159
|
-
Etag:
|
160
|
-
- W/"693ac9a1fc6752c76edadb586c391f44"
|
161
|
-
Server:
|
162
|
-
- nginx
|
163
|
-
Strict-Transport-Security:
|
164
|
-
- max-age=0; includeSubDomains
|
165
|
-
- max-age=31536000; includeSubDomains
|
166
|
-
X-Ratelimit-Limit:
|
167
|
-
- '250000'
|
168
|
-
X-Ratelimit-Remaining:
|
169
|
-
- '249981'
|
170
|
-
X-Ratelimit-Reset:
|
171
|
-
- '1574409600'
|
172
|
-
X-Request-Id:
|
173
|
-
- c7e25224-b577-4528-8990-43af1de7e6d9
|
174
|
-
X-Runtime:
|
175
|
-
- '0.031761'
|
176
|
-
Accept-Ranges:
|
177
|
-
- bytes
|
178
|
-
- bytes
|
179
|
-
Age:
|
180
|
-
- '0'
|
181
|
-
- '0'
|
182
|
-
Content-Length:
|
183
|
-
- '106'
|
184
|
-
Date:
|
185
|
-
- Fri, 22 Nov 2019 07:59:45 GMT
|
186
|
-
Via:
|
187
|
-
- 1.1 varnish
|
188
|
-
Connection:
|
189
|
-
- keep-alive
|
190
|
-
X-Served-By:
|
191
|
-
- cache-hhn4053-HHN
|
192
|
-
X-Cache:
|
193
|
-
- MISS
|
194
|
-
X-Cache-Hits:
|
195
|
-
- '0'
|
196
|
-
X-Timer:
|
197
|
-
- S1574409585.392003,VS0,VE34
|
198
|
-
Vary:
|
199
|
-
- Origin,Accept-Encoding
|
200
|
-
body:
|
201
|
-
encoding: ASCII-8BIT
|
202
|
-
string: '{"status":{"test-gem-001":"Subscribed","test-gem-002":"Unsubscribed","test-gem-003":"unknown"},"message":"success"}'
|
203
|
-
http_version:
|
204
|
-
recorded_at: Fri, 22 Nov 2019 07:59:45 GMT
|
205
|
-
recorded_with: VCR 5.0.0
|
@@ -1,193 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: "<BRAZE_REST_URL>/subscription/status/set"
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '{"api_key":"<BRAZE_REST_API_KEY>","external_id":"test-gem-001","subscription_group_id":"non-existing-subscription-group","subscription_state":"subscribed"}'
|
9
|
-
headers:
|
10
|
-
Content-Type:
|
11
|
-
- application/json
|
12
|
-
Accept:
|
13
|
-
- application/json
|
14
|
-
User-Agent:
|
15
|
-
- Braze Ruby gem v0.2.2
|
16
|
-
Accept-Encoding:
|
17
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
-
response:
|
19
|
-
status:
|
20
|
-
code: 400
|
21
|
-
message: Bad Request
|
22
|
-
headers:
|
23
|
-
Cache-Control:
|
24
|
-
- no-cache
|
25
|
-
Content-Type:
|
26
|
-
- application/json
|
27
|
-
Server:
|
28
|
-
- nginx
|
29
|
-
Strict-Transport-Security:
|
30
|
-
- max-age=0; includeSubDomains
|
31
|
-
X-Ratelimit-Limit:
|
32
|
-
- '250000'
|
33
|
-
X-Ratelimit-Remaining:
|
34
|
-
- '249980'
|
35
|
-
X-Ratelimit-Reset:
|
36
|
-
- '1574409600'
|
37
|
-
X-Request-Id:
|
38
|
-
- 620af52d-d528-46bd-bc42-8e658850ff56
|
39
|
-
X-Runtime:
|
40
|
-
- '0.011493'
|
41
|
-
Content-Length:
|
42
|
-
- '69'
|
43
|
-
Accept-Ranges:
|
44
|
-
- bytes
|
45
|
-
Date:
|
46
|
-
- Fri, 22 Nov 2019 07:59:45 GMT
|
47
|
-
Via:
|
48
|
-
- 1.1 varnish
|
49
|
-
Connection:
|
50
|
-
- keep-alive
|
51
|
-
X-Served-By:
|
52
|
-
- cache-hhn4035-HHN
|
53
|
-
X-Cache:
|
54
|
-
- MISS
|
55
|
-
X-Cache-Hits:
|
56
|
-
- '0'
|
57
|
-
X-Timer:
|
58
|
-
- S1574409586.594248,VS0,VE57
|
59
|
-
Vary:
|
60
|
-
- Origin,Accept-Encoding
|
61
|
-
body:
|
62
|
-
encoding: ASCII-8BIT
|
63
|
-
string: '{"message":"Invalid subscription group ID"}'
|
64
|
-
http_version:
|
65
|
-
recorded_at: Fri, 22 Nov 2019 07:59:45 GMT
|
66
|
-
- request:
|
67
|
-
method: post
|
68
|
-
uri: "<BRAZE_REST_URL>/subscription/status/set"
|
69
|
-
body:
|
70
|
-
encoding: UTF-8
|
71
|
-
string: '{"api_key":"<BRAZE_REST_API_KEY>","external_id":"test-gem-002","subscription_group_id":"non-existing-subscription-group","subscription_state":"unsubscribed"}'
|
72
|
-
headers:
|
73
|
-
Content-Type:
|
74
|
-
- application/json
|
75
|
-
Accept:
|
76
|
-
- application/json
|
77
|
-
User-Agent:
|
78
|
-
- Braze Ruby gem v0.2.2
|
79
|
-
Accept-Encoding:
|
80
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
81
|
-
response:
|
82
|
-
status:
|
83
|
-
code: 400
|
84
|
-
message: Bad Request
|
85
|
-
headers:
|
86
|
-
Cache-Control:
|
87
|
-
- no-cache
|
88
|
-
Content-Type:
|
89
|
-
- application/json
|
90
|
-
Server:
|
91
|
-
- nginx
|
92
|
-
Strict-Transport-Security:
|
93
|
-
- max-age=0; includeSubDomains
|
94
|
-
X-Ratelimit-Limit:
|
95
|
-
- '250000'
|
96
|
-
X-Ratelimit-Remaining:
|
97
|
-
- '249979'
|
98
|
-
X-Ratelimit-Reset:
|
99
|
-
- '1574409600'
|
100
|
-
X-Request-Id:
|
101
|
-
- 1dbbe62d-e251-46ac-b511-9e435f790a96
|
102
|
-
X-Runtime:
|
103
|
-
- '0.009396'
|
104
|
-
Content-Length:
|
105
|
-
- '69'
|
106
|
-
Accept-Ranges:
|
107
|
-
- bytes
|
108
|
-
Date:
|
109
|
-
- Fri, 22 Nov 2019 07:59:45 GMT
|
110
|
-
Via:
|
111
|
-
- 1.1 varnish
|
112
|
-
Connection:
|
113
|
-
- keep-alive
|
114
|
-
X-Served-By:
|
115
|
-
- cache-hhn4061-HHN
|
116
|
-
X-Cache:
|
117
|
-
- MISS
|
118
|
-
X-Cache-Hits:
|
119
|
-
- '0'
|
120
|
-
X-Timer:
|
121
|
-
- S1574409586.826897,VS0,VE15
|
122
|
-
Vary:
|
123
|
-
- Origin,Accept-Encoding
|
124
|
-
body:
|
125
|
-
encoding: ASCII-8BIT
|
126
|
-
string: '{"message":"Invalid subscription group ID"}'
|
127
|
-
http_version:
|
128
|
-
recorded_at: Fri, 22 Nov 2019 07:59:45 GMT
|
129
|
-
- request:
|
130
|
-
method: get
|
131
|
-
uri: "<BRAZE_REST_URL>/subscription/status/get?api_key=<BRAZE_REST_API_KEY>&external_id=test-gem-001&subscription_group_id=non-existing-subscription-group"
|
132
|
-
body:
|
133
|
-
encoding: US-ASCII
|
134
|
-
string: ''
|
135
|
-
headers:
|
136
|
-
Content-Type:
|
137
|
-
- application/json
|
138
|
-
Accept:
|
139
|
-
- application/json
|
140
|
-
User-Agent:
|
141
|
-
- Braze Ruby gem v0.2.2
|
142
|
-
Accept-Encoding:
|
143
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
144
|
-
response:
|
145
|
-
status:
|
146
|
-
code: 400
|
147
|
-
message: Bad Request
|
148
|
-
headers:
|
149
|
-
Cache-Control:
|
150
|
-
- no-cache
|
151
|
-
Content-Type:
|
152
|
-
- application/json
|
153
|
-
Server:
|
154
|
-
- nginx
|
155
|
-
Strict-Transport-Security:
|
156
|
-
- max-age=0; includeSubDomains
|
157
|
-
X-Ratelimit-Limit:
|
158
|
-
- '250000'
|
159
|
-
X-Ratelimit-Remaining:
|
160
|
-
- '249978'
|
161
|
-
X-Ratelimit-Reset:
|
162
|
-
- '1574409600'
|
163
|
-
X-Request-Id:
|
164
|
-
- f79731f9-3440-47dc-871c-6349fbaf28ea
|
165
|
-
X-Runtime:
|
166
|
-
- '0.009930'
|
167
|
-
Accept-Ranges:
|
168
|
-
- bytes
|
169
|
-
- bytes
|
170
|
-
Content-Length:
|
171
|
-
- '69'
|
172
|
-
Date:
|
173
|
-
- Fri, 22 Nov 2019 07:59:46 GMT
|
174
|
-
Via:
|
175
|
-
- 1.1 varnish
|
176
|
-
Connection:
|
177
|
-
- keep-alive
|
178
|
-
X-Served-By:
|
179
|
-
- cache-hhn4051-HHN
|
180
|
-
X-Cache:
|
181
|
-
- MISS
|
182
|
-
X-Cache-Hits:
|
183
|
-
- '0'
|
184
|
-
X-Timer:
|
185
|
-
- S1574409586.039550,VS0,VE13
|
186
|
-
Vary:
|
187
|
-
- Origin,Accept-Encoding
|
188
|
-
body:
|
189
|
-
encoding: ASCII-8BIT
|
190
|
-
string: '{"message":"Invalid subscription group ID"}'
|
191
|
-
http_version:
|
192
|
-
recorded_at: Fri, 22 Nov 2019 07:59:46 GMT
|
193
|
-
recorded_with: VCR 5.0.0
|