upland_mobile_commons_rest 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f34644e11282b6cd0234d4b376ad6b0bec67abb4a0385bef99b56fa1233eea92
|
4
|
+
data.tar.gz: 47b415580a1fac3855a3b670f10ae3f1651af10908b9c60a0e7bc72a8f8910b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cfbdef2b235b17763688476472694b1e558ea4b900699960c96b1c602ded91b76007ff8370d4ae03ce94e272a6afa1e74b4df65f329b084700a97001f198ae3
|
7
|
+
data.tar.gz: 0ce777ff7b280913f9ab2100f06c2048136ef47aa920d967cef76013f16b700b81a930487cae603c5379f280965a32bd8427ee7941f1ee22dcd4e25a2b7dfdbc
|
@@ -85,6 +85,12 @@ module UplandMobileCommonsRest
|
|
85
85
|
}
|
86
86
|
|
87
87
|
def on_complete(response)
|
88
|
+
# First ensure responses without the expected format are correctly handled
|
89
|
+
if response.body.nil? || response.body['response'].nil?
|
90
|
+
raise UnknownError.new(response.inspect)
|
91
|
+
end
|
92
|
+
|
93
|
+
# Now verify that response was successful or raise a corresponding exception otherwise
|
88
94
|
if response.body['response']['success'] == 'false'
|
89
95
|
raise POSSIBLE_ERRORS[response.body['response']['error']['id']].new(response.body['response']['error']['message'])
|
90
96
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "upland_mobile_commons_rest".freeze
|
9
|
-
s.version = "0.1.
|
9
|
+
s.version = "0.1.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: upland_mobile_commons_rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Woodhull
|
@@ -194,10 +194,8 @@ files:
|
|
194
194
|
- spec/client_spec.rb
|
195
195
|
- spec/fixtures/campaigns/list.xml
|
196
196
|
- spec/fixtures/error.xml
|
197
|
-
- spec/fixtures/error_profile_not_found.xml
|
198
197
|
- spec/fixtures/groups/create.xml
|
199
198
|
- spec/fixtures/groups/list.xml
|
200
|
-
- spec/fixtures/profiles/get.xml
|
201
199
|
- spec/fixtures/profiles/update.xml
|
202
200
|
- spec/group_spec.rb
|
203
201
|
- spec/profiles_spec.rb
|
@@ -1,42 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<response success="true">
|
3
|
-
<profile id="34xxxxxxx">
|
4
|
-
<first_name>John</first_name>
|
5
|
-
<last_name>Doe</last_name>
|
6
|
-
<phone_number>12025551234</phone_number>
|
7
|
-
<email />
|
8
|
-
<status>Active subscriber</status>
|
9
|
-
<created_at>2019-06-21 14:49:40 UTC</created_at>
|
10
|
-
<updated_at>2019-06-21 14:49:40 UTC</updated_at>
|
11
|
-
<opted_out_at />
|
12
|
-
<opted_out_source />
|
13
|
-
<source type="API" name="User1" email="user1@domain.com" />
|
14
|
-
<address>
|
15
|
-
<street1 />
|
16
|
-
<street2 />
|
17
|
-
<city />
|
18
|
-
<state />
|
19
|
-
<postal_code />
|
20
|
-
<country>US</country>
|
21
|
-
</address>
|
22
|
-
<last_saved_location>
|
23
|
-
<latitude>38.906639</latitude>
|
24
|
-
<longitude>-77.016577</longitude>
|
25
|
-
<precision>state</precision>
|
26
|
-
<city />
|
27
|
-
<state>DC</state>
|
28
|
-
<postal_code />
|
29
|
-
<country>US</country>
|
30
|
-
</last_saved_location>
|
31
|
-
<custom_columns>
|
32
|
-
<custom_column name="Age" />
|
33
|
-
<custom_column name="Favorite animal" />
|
34
|
-
<custom_column name="Yes/NO" />
|
35
|
-
</custom_columns>
|
36
|
-
<subscriptions>
|
37
|
-
<subscription campaign_id="162xxx" campaign_name="MC_test2" campaign_description="" opt_in_path_id="" status="Active" opt_in_source="User1" created_at="2019-06-21T14:49:40Z" activated_at="2019-06-22T20:24:36Z" opted_out_at="" opt_out_source="" />
|
38
|
-
</subscriptions>
|
39
|
-
<integrations></integrations>
|
40
|
-
<clicks></clicks>
|
41
|
-
</profile>
|
42
|
-
</response>
|