vivialconnect 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/vivialconnect.rb +0 -1
- data/lib/vivialconnect/message.rb +9 -9
- data/lib/vivialconnect/number.rb +20 -20
- data/lib/vivialconnect/version.rb +1 -1
- metadata +2 -3
- data/lib/vivialconnect/configuration.rb +0 -172
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2884c51b84da198e79e8b06a18c278330c04d42
|
4
|
+
data.tar.gz: 3b0cbd5713317739c3f7f5974b5f17170f473350
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eafa0c296a726e5f5d6ff0d17b0c35395679ee4ee4f497b235a54bb115a0e39841526bf757d60fc605bac2a582cd52dd2d8d18b6d9db7dbcd44e41aedd74c872
|
7
|
+
data.tar.gz: 7b6ea421bd801e8a58ee3b0033c49c28a2627401c656f1aa3da1db305f590c4a98d41be1aaba88b97db394d1d1e82eb9676febe5f15508798bc8320d2f3aeb39
|
data/lib/vivialconnect.rb
CHANGED
@@ -6,7 +6,6 @@ require 'vivialconnect/message'
|
|
6
6
|
require 'vivialconnect/account'
|
7
7
|
require 'vivialconnect/user'
|
8
8
|
require 'vivialconnect/attachment'
|
9
|
-
require 'vivialconnect/configuration'
|
10
9
|
require 'vivialconnect/number'
|
11
10
|
require 'vivialconnect/log'
|
12
11
|
require 'vivialconnect/contact'
|
@@ -9,7 +9,7 @@ module VivialConnect
|
|
9
9
|
#
|
10
10
|
#
|
11
11
|
# VivialConnect::Message.all
|
12
|
-
# => [#<VivialConnect::Message to_number="#", from_number="#", body="example message", account_id=1XXXX, date_created="2017-04-19T15:18:12-04:00", date_modified="2017-04-19T15:18:12-04:00", direction="outbound-api", error_code=nil, error_message=nil, id=17219, master_account_id=1XXXX,
|
12
|
+
# => [#<VivialConnect::Message to_number="#", from_number="#", body="example message", account_id=1XXXX, date_created="2017-04-19T15:18:12-04:00", date_modified="2017-04-19T15:18:12-04:00", direction="outbound-api", error_code=nil, error_message=nil, id=17219, master_account_id=1XXXX, message_type="local_sms", num_media=0, num_segments=1, price=75, price_currency="USD", sent=nil, sms_configuration_id=nil, status="accepted">]
|
13
13
|
#
|
14
14
|
#
|
15
15
|
#=== .count
|
@@ -49,14 +49,14 @@ module VivialConnect
|
|
49
49
|
#
|
50
50
|
# VivialConnect::Message.send(to_number: "+1##########", from_number: "+1##########", body: "example message")
|
51
51
|
# VivialConnect::Message.create(to_number: "+1##########", from_number: "+1##########", body: "example message")
|
52
|
-
# => #<VivialConnect::Message to_number="+1##########", from_number="+1##########", body="example message", account_id=1XXXX, date_created="2017-04-19T15:18:12-04:00", date_modified="2017-04-19T15:18:12-04:00", direction="outbound-api", error_code=nil, error_message=nil, id=17219, master_account_id=1XXXX,
|
52
|
+
# => #<VivialConnect::Message to_number="+1##########", from_number="+1##########", body="example message", account_id=1XXXX, date_created="2017-04-19T15:18:12-04:00", date_modified="2017-04-19T15:18:12-04:00", direction="outbound-api", error_code=nil, error_message=nil, id=17219, master_account_id=1XXXX, message_type="local_sms", num_media=0, num_segments=1, price=75, price_currency="USD", sent=nil, sms_configuration_id=nil, status="accepted">
|
53
53
|
#
|
54
54
|
#
|
55
55
|
# MMS
|
56
56
|
#
|
57
57
|
# VivialConnect::Message.send(to_number: "+1##########", from_number: "+1##########", body: "example mms", content_urls: ['www.yourhost/path/to/media'])
|
58
58
|
# VivialConnect::Message.create(to_number: "+1##########", from_number: "+1##########", body: "example mms", content_urls: ['www.yourhost/path/to/media'])
|
59
|
-
# => #<VivialConnect::Message account_id=1XXXXX, body="example mms", date_created="2017-04-19T11:18:11-04:00", date_modified="2017-04-19T11:18:34-04:00", direction="outbound-api", error_code=nil, error_message=nil, from_number="+1##########", id=6399, master_account_id=1XXXX
|
59
|
+
# => #<VivialConnect::Message account_id=1XXXXX, body="example mms", date_created="2017-04-19T11:18:11-04:00", date_modified="2017-04-19T11:18:34-04:00", direction="outbound-api", error_code=nil, error_message=nil, from_number="+1##########", id=6399, master_account_id=1XXXX, message_type="local_mms", num_media=1, num_segments=1, price=100, price_currency="USD", sent="2017-04-19T11:18:16-04:00", sms_configuration_id=nil, status="delivered", to_number="+1##########">
|
60
60
|
#
|
61
61
|
#
|
62
62
|
#
|
@@ -76,7 +76,7 @@ module VivialConnect
|
|
76
76
|
#
|
77
77
|
#
|
78
78
|
# VivialConnect::Message.find(17219)
|
79
|
-
# => #<VivialConnect::Message to_number="+1##########", from_number="+1##########", body="example message", account_id=1XXXX, date_created="2017-04-19T15:18:12-04:00", date_modified="2017-04-19T15:18:12-04:00", direction="outbound-api", error_code=nil, error_message=nil, id=17219, master_account_id=1XXXX,
|
79
|
+
# => #<VivialConnect::Message to_number="+1##########", from_number="+1##########", body="example message", account_id=1XXXX, date_created="2017-04-19T15:18:12-04:00", date_modified="2017-04-19T15:18:12-04:00", direction="outbound-api", error_code=nil, error_message=nil, id=17219, master_account_id=1XXXX, message_type="local_sms", num_media=0, num_segments=1, price=75, price_currency="USD", sent=nil, sms_configuration_id=nil, status="accepted">
|
80
80
|
#
|
81
81
|
#
|
82
82
|
##
|
@@ -110,7 +110,7 @@ module VivialConnect
|
|
110
110
|
#
|
111
111
|
# VivialConnect::Message.find_each {|message| puts message.body}
|
112
112
|
# example message
|
113
|
-
# => [#<VivialConnect::Message to_number="#", from_number="#", body="example message", account_id=1XXXX, date_created="2017-04-19T15:18:12-04:00", date_modified="2017-04-19T15:18:12-04:00", direction="outbound-api", error_code=nil, error_message=nil, id=17219, master_account_id=1XXXX,
|
113
|
+
# => [#<VivialConnect::Message to_number="#", from_number="#", body="example message", account_id=1XXXX, date_created="2017-04-19T15:18:12-04:00", date_modified="2017-04-19T15:18:12-04:00", direction="outbound-api", error_code=nil, error_message=nil, id=17219, master_account_id=1XXXX, message_type="local_sms", num_media=0, num_segments=1, price=75, price_currency="USD", sent=nil, sms_configuration_id=nil, status="accepted">, ...]
|
114
114
|
#
|
115
115
|
#
|
116
116
|
#
|
@@ -145,7 +145,7 @@ module VivialConnect
|
|
145
145
|
#
|
146
146
|
#
|
147
147
|
# VivialConnect::Message.find_in_batches {|batch| do_something_with_an_array(batch)}
|
148
|
-
# => [#<VivialConnect::Message to_number="#", from_number="#", body="example message", account_id=1XXXX, date_created="2017-04-19T15:18:12-04:00", date_modified="2017-04-19T15:18:12-04:00", direction="outbound-api", error_code=nil, error_message=nil, id=17219, master_account_id=1XXXX,
|
148
|
+
# => [#<VivialConnect::Message to_number="#", from_number="#", body="example message", account_id=1XXXX, date_created="2017-04-19T15:18:12-04:00", date_modified="2017-04-19T15:18:12-04:00", direction="outbound-api", error_code=nil, error_message=nil, id=17219, master_account_id=1XXXX, message_type="local_sms", num_media=0, num_segments=1, price=75, price_currency="USD", sent=nil, sms_configuration_id=nil, status="accepted">, ...]
|
149
149
|
#
|
150
150
|
#
|
151
151
|
#
|
@@ -159,7 +159,7 @@ module VivialConnect
|
|
159
159
|
#
|
160
160
|
#
|
161
161
|
# VivialConnect::Message.redact(1)
|
162
|
-
# => #<VivialConnect::Message to_number="+1##########", from_number="+1##########", body="", account_id=1XXXX, date_created="2017-04-19T15:18:12-04:00", date_modified="2017-04-19T15:18:12-04:00", direction="outbound-api", error_code=nil, error_message=nil, id=17219, master_account_id=1XXXX,
|
162
|
+
# => #<VivialConnect::Message to_number="+1##########", from_number="+1##########", body="", account_id=1XXXX, date_created="2017-04-19T15:18:12-04:00", date_modified="2017-04-19T15:18:12-04:00", direction="outbound-api", error_code=nil, error_message=nil, id=17219, master_account_id=1XXXX, message_type="local_sms", num_media=0, num_segments=1, price=75, price_currency="USD", sent=nil, sms_configuration_id=nil, status="accepted">
|
163
163
|
#
|
164
164
|
#
|
165
165
|
##
|
@@ -175,7 +175,7 @@ module VivialConnect
|
|
175
175
|
# message.from_number = "+1##########"
|
176
176
|
# message.body = "Example message"
|
177
177
|
# message.save
|
178
|
-
# => #<VivialConnect::Message to_number="+1##########", from_number="+1##########", body="Example message", account_id=1XXXX, date_created="2017-04-19T16:18:12-04:00", date_modified="2017-04-19T16:18:12-04:00", direction="outbound-api", error_code=nil, error_message=nil, id=17220, master_account_id=1XXXX,
|
178
|
+
# => #<VivialConnect::Message to_number="+1##########", from_number="+1##########", body="Example message", account_id=1XXXX, date_created="2017-04-19T16:18:12-04:00", date_modified="2017-04-19T16:18:12-04:00", direction="outbound-api", error_code=nil, error_message=nil, id=17220, master_account_id=1XXXX, message_type="local_sms", num_media=0, num_segments=1, price=75, price_currency="USD", sent=nil, sms_configuration_id=nil, status="accepted">
|
179
179
|
#
|
180
180
|
#
|
181
181
|
##
|
@@ -188,7 +188,7 @@ module VivialConnect
|
|
188
188
|
#
|
189
189
|
#
|
190
190
|
# message.redact
|
191
|
-
# => #<VivialConnect::Message to_number="+1##########", from_number="+1##########", body="", account_id=1XXXX, date_created="2017-04-19T15:18:12-04:00", date_modified="2017-04-19T15:18:12-04:00", direction="outbound-api", error_code=nil, error_message=nil, id=17219, master_account_id=1XXXX,
|
191
|
+
# => #<VivialConnect::Message to_number="+1##########", from_number="+1##########", body="", account_id=1XXXX, date_created="2017-04-19T15:18:12-04:00", date_modified="2017-04-19T15:18:12-04:00", direction="outbound-api", error_code=nil, error_message=nil, id=17219, master_account_id=1XXXX, message_type="local_sms", num_media=0, num_segments=1, price=75, price_currency="USD", sent=nil, sms_configuration_id=nil, status="accepted">
|
192
192
|
#
|
193
193
|
#
|
194
194
|
|
data/lib/vivialconnect/number.rb
CHANGED
@@ -8,7 +8,7 @@ module VivialConnect
|
|
8
8
|
# Example usage:
|
9
9
|
#
|
10
10
|
# VivialConnect::Number.all
|
11
|
-
# => [#<VivialConnect::Number account_id=1XXXX, active=true, address_requirements="none", capabilities={"mms"=>true, "sms"=>true, "voice"=>true}, city="ALMELUND", date_created="2017-04-25T09:53:11-04:00", date_modified="2017-04-25T09:53:11-04:00", id=65, lata=nil, master_account_id=1XXXX,
|
11
|
+
# => [#<VivialConnect::Number account_id=1XXXX, active=true, address_requirements="none", capabilities={"mms"=>true, "sms"=>true, "voice"=>true}, city="ALMELUND", date_created="2017-04-25T09:53:11-04:00", date_modified="2017-04-25T09:53:11-04:00", id=65, lata=nil, master_account_id=1XXXX, status_text_url=nil, name="(612) 299-1726", phone_number="+16122991726", phone_number_type="local", rate_center="TWINCITIES", region="MN", sms_configuration_id=nil, incoming_text_fallback_method=nil, incoming_text_fallback_url=nil, incoming_text_method=nil, incoming_text_url=nil, voice_forwarding_number=nil>]
|
12
12
|
#
|
13
13
|
#
|
14
14
|
#
|
@@ -66,19 +66,19 @@ module VivialConnect
|
|
66
66
|
#
|
67
67
|
# Optional parameters:
|
68
68
|
#
|
69
|
-
# name
|
70
|
-
#
|
71
|
-
# sms_configuration_id
|
72
|
-
#
|
73
|
-
#
|
74
|
-
#
|
75
|
-
#
|
69
|
+
# name | String | New phone number as it is displayed to users. Default format: Friendly national format: (xxx) yyy-zzzz.
|
70
|
+
# status_text_url | String | URL to receive status requests for messages sent via the API using this associated phone number. Max. length: 256 characters.
|
71
|
+
# sms_configuration_id | String | Unique identifier of the status configuration to be used to handle SMS messages sent to the associated number.
|
72
|
+
# incoming_text_url | String | URL for receiving SMS messages to the associated phone number. Max. length: 256 characters.
|
73
|
+
# incoming_text_method | String | HTTP method used for the incoming_text_url requests. Max. length: 8 characters. Possible values: GET or POST. Default value: POST.
|
74
|
+
# incoming_text_fallback_url | String | URL for receiving SMS messages if incoming_text_url fails. Only valid if you provide a value for the incoming_text_url parameter. Max. length: 256 characters.
|
75
|
+
# incoming_text_fallback_method | String | HTTP method used for sms_url_fallback requests. Max. length: 8 characters. Possible values: GET or POST. Default value: POST.
|
76
76
|
#
|
77
77
|
# Example usage:
|
78
78
|
#
|
79
79
|
# VivialConnect::Number.create(phone_number: "+14124330365")
|
80
80
|
# VivialConnect::Number.buy(phone_number: "+14124330365")
|
81
|
-
# => #<VivialConnect::Number account_id=1XXXX, active=true, address_requirements="none", capabilities={"mms"=>true, "sms"=>true, "voice"=>true}, city="PITTSBURGH ", date_created="2017-04-25T09:56:04-04:00", date_modified="2017-04-25T09:56:04-04:00", id=66, lata=nil, master_account_id=10096,
|
81
|
+
# => #<VivialConnect::Number account_id=1XXXX, active=true, address_requirements="none", capabilities={"mms"=>true, "sms"=>true, "voice"=>true}, city="PITTSBURGH ", date_created="2017-04-25T09:56:04-04:00", date_modified="2017-04-25T09:56:04-04:00", id=66, lata=nil, master_account_id=10096, status_text_url=nil, name="(412) 433-0365", phone_number="+14124330365", phone_number_type="local", rate_center="PTTSBGZON1", region="PA", sms_configuration_id=nil, incoming_text_fallback_method=nil, incoming_text_fallback_url=nil, incoming_text_method=nil, incoming_text_url=nil, voice_forwarding_number=nil>
|
82
82
|
#
|
83
83
|
##
|
84
84
|
#=== .delete(id)
|
@@ -130,7 +130,7 @@ module VivialConnect
|
|
130
130
|
# Example usage:
|
131
131
|
#
|
132
132
|
# VivialConnect::Number.find(726)
|
133
|
-
# => #<VivialConnect::Number account_id=1XXXX, active=true, address_requirements="none", capabilities={"mms"=>true, "sms"=>true, "voice"=>true}, city="ALMELUND", date_created="2017-04-25T10:22:07-04:00", date_modified="2017-04-25T10:41:16-04:00", id=726, lata=nil, master_account_id=1XXXX,
|
133
|
+
# => #<VivialConnect::Number account_id=1XXXX, active=true, address_requirements="none", capabilities={"mms"=>true, "sms"=>true, "voice"=>true}, city="ALMELUND", date_created="2017-04-25T10:22:07-04:00", date_modified="2017-04-25T10:41:16-04:00", id=726, lata=nil, master_account_id=1XXXX, status_text_url=nil, name="Dr. Jones", phone_number="+16123151041", phone_number_type="local", rate_center="TWINCITIES", region="MN", sms_configuration_id=nil, incoming_text_fallback_method=nil, incoming_text_fallback_url=nil, incoming_text_method=nil, incoming_text_url=nil, voice_forwarding_number=nil>
|
134
134
|
#
|
135
135
|
#
|
136
136
|
##
|
@@ -210,7 +210,7 @@ module VivialConnect
|
|
210
210
|
#
|
211
211
|
#
|
212
212
|
# VivialConnect::Number.local
|
213
|
-
# => [#<VivialConnect::Number account_id=1XXXX, active=true, address_requirements="none", capabilities={"mms"=>true, "sms"=>true, "voice"=>true}, city="BELCHERTOWN", date_created="2017-02-06T15:51:27-05:00", date_modified="2017-04-10T17:43:17-04:00", id=27, lata=nil, master_account_id=1XXXX,
|
213
|
+
# => [#<VivialConnect::Number account_id=1XXXX, active=true, address_requirements="none", capabilities={"mms"=>true, "sms"=>true, "voice"=>true}, city="BELCHERTOWN", date_created="2017-02-06T15:51:27-05:00", date_modified="2017-04-10T17:43:17-04:00", id=27, lata=nil, master_account_id=1XXXX, status_text_url=nil, name="App Number 1", phone_number="+1XXXXXXXXXX", phone_number_type="local", rate_center="BELCHERTN", region="MA", sms_configuration_id=nil, incoming_text_fallback_method=nil, incoming_text_fallback_url=nil, incoming_text_method=nil, incoming_text_url="http://requestb.in/174w8nz1", voice_forwarding_number="+1XXXXXXXXXX">]
|
214
214
|
#
|
215
215
|
#
|
216
216
|
##
|
@@ -240,19 +240,19 @@ module VivialConnect
|
|
240
240
|
#
|
241
241
|
# Optional parameters:
|
242
242
|
#
|
243
|
-
# name
|
244
|
-
#
|
245
|
-
# sms_configuration_id
|
246
|
-
#
|
247
|
-
#
|
248
|
-
#
|
249
|
-
#
|
243
|
+
# name | String | New phone number as it is displayed to users. Default format: Friendly national format: (xxx) yyy-zzzz.
|
244
|
+
# status_text_url | String | URL to receive status requests for messages sent via the API using this associated phone number. Max. length: 256 characters.
|
245
|
+
# sms_configuration_id | String | Unique identifier of the status configuration to be used to handle SMS messages sent to the associated number.
|
246
|
+
# incoming_text_url | String | incoming_text_url URL for receiving SMS messages to the associated phone number. Max. length: 256 characters.
|
247
|
+
# incoming_text_method | String | HTTP method used for the incoming_text_url requests. Max. length: 8 characters. Possible values: GET or POST. Default value: POST.
|
248
|
+
# incoming_text_fallback_url | String | URL for receiving SMS messages if incoming_text_url fails. Only valid if you provide a value for the incoming_text_url parameter. Max. length: 256 characters.
|
249
|
+
# incoming_text_fallback_method | String | HTTP method used for sms_url_fallback requests. Max. length: 8 characters. Possible values: GET or POST. Default value: POST.
|
250
250
|
#
|
251
251
|
# Example usage:
|
252
252
|
#
|
253
253
|
#
|
254
254
|
# VivialConnect::Number.update(875, name: "Dr. Jones")
|
255
|
-
# => #<VivialConnect::Number account_id=10096, active=true, address_requirements="none", capabilities={"mms"=>true, "sms"=>true, "voice"=>true}, city="ALMELUND", date_created="2017-04-25T10:22:07-04:00", date_modified="2017-04-25T10:41:16-04:00", id=69, lata=nil, master_account_id=1XXXX,
|
255
|
+
# => #<VivialConnect::Number account_id=10096, active=true, address_requirements="none", capabilities={"mms"=>true, "sms"=>true, "voice"=>true}, city="ALMELUND", date_created="2017-04-25T10:22:07-04:00", date_modified="2017-04-25T10:41:16-04:00", id=69, lata=nil, master_account_id=1XXXX, status_text_url=nil, name="Dr. Jones", phone_number="+16123151041", phone_number_type="local", rate_center="TWINCITIES", region="MN", sms_configuration_id=nil, incoming_text_fallback_method=nil, incoming_text_fallback_url=nil, incoming_text_method=nil, incoming_text_url=nil, voice_forwarding_number=nil> #<VivialConnect::Number account_id=1XXXX, active=true, address_requirements="none", capabilities={"mms"=>true, "sms"=>true, "voice"=>true}, city="PITTSBURGH ", date_created="2017-04-25T09:56:04-04:00", date_modified="2017-04-25T09:56:04-04:00", id=66, lata=nil, master_account_id=10096, status_text_url=nil, name="(412) 433-0365", phone_number="+14124330365", phone_number_type="local", rate_center="PTTSBGZON1", region="PA", sms_configuration_id=nil, incoming_text_fallback_method=nil, incoming_text_fallback_url=nil, incoming_text_method=nil, incoming_text_url=nil, voice_forwarding_number=nil>
|
256
256
|
#
|
257
257
|
#
|
258
258
|
#=== \#delete
|
@@ -278,7 +278,7 @@ module VivialConnect
|
|
278
278
|
# number = VivialConnect::Number.find(2)
|
279
279
|
# number.name = "new name for this number"
|
280
280
|
# number.save
|
281
|
-
# => #<VivialConnect::Number account_id=1XXXX, active=true, address_requirements="none", capabilities={"mms"=>true, "sms"=>true, "voice"=>true}, city="PITTSBURGH ", date_created="2017-04-25T09:56:04-04:00", date_modified="2017-04-25T09:56:04-04:00", id=66, lata=nil, master_account_id=10096,
|
281
|
+
# => #<VivialConnect::Number account_id=1XXXX, active=true, address_requirements="none", capabilities={"mms"=>true, "sms"=>true, "voice"=>true}, city="PITTSBURGH ", date_created="2017-04-25T09:56:04-04:00", date_modified="2017-04-25T09:56:04-04:00", id=66, lata=nil, master_account_id=10096, status_text_url=nil, name="new name for this number", phone_number="+14124330365", phone_number_type="local", rate_center="PTTSBGZON1", region="PA", sms_configuration_id=nil, incoming_text_fallback_method=nil, incoming_text_fallback_url=nil, incoming_text_method=nil, incoming_text_url=nil, voice_forwarding_number=nil>
|
282
282
|
#
|
283
283
|
#
|
284
284
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vivialconnect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin LeFurjah
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05
|
11
|
+
date: 2017-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -133,7 +133,6 @@ files:
|
|
133
133
|
- lib/vivialconnect/account.rb
|
134
134
|
- lib/vivialconnect/attachment.rb
|
135
135
|
- lib/vivialconnect/client.rb
|
136
|
-
- lib/vivialconnect/configuration.rb
|
137
136
|
- lib/vivialconnect/contact.rb
|
138
137
|
- lib/vivialconnect/log.rb
|
139
138
|
- lib/vivialconnect/message.rb
|
@@ -1,172 +0,0 @@
|
|
1
|
-
module VivialConnect
|
2
|
-
##
|
3
|
-
#=== .all
|
4
|
-
#
|
5
|
-
#Returns an array containing ruby objects corresponding to all Configuration resources on your account
|
6
|
-
#
|
7
|
-
#
|
8
|
-
# Example usage:
|
9
|
-
#
|
10
|
-
#
|
11
|
-
# VivialConnect::Configuration.all
|
12
|
-
# => [#<VivialConnect::Configuration account_id=1XXXX, active=true, date_created="2017-02-06T16:00:52-05:00", date_modified="2017-04-10T11:15:33-04:00", id=12, message_status_callback=nil, name="Message App Config", sms_fallback_method=nil, sms_fallback_url=nil, sms_method="POST", sms_url="http://requestb.in/174w8nz1">]
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#=== .count
|
17
|
-
#
|
18
|
-
#Returns the amount of Configurations set up on your account
|
19
|
-
#
|
20
|
-
# Example usage:
|
21
|
-
#
|
22
|
-
#
|
23
|
-
# VivialConnect::Configuration.count
|
24
|
-
# => 1
|
25
|
-
#
|
26
|
-
#
|
27
|
-
##
|
28
|
-
#=== .create(options={})
|
29
|
-
#
|
30
|
-
#Creates and returns a new Configuration
|
31
|
-
#
|
32
|
-
#
|
33
|
-
# Required parameter:
|
34
|
-
#
|
35
|
-
# name | String | "Taxi App Config"
|
36
|
-
#
|
37
|
-
#
|
38
|
-
# Optional parameters: for MMS
|
39
|
-
#
|
40
|
-
# phone_number | String | "+1XXXXXXXXXX"
|
41
|
-
# message_status_callback | String | "https://myserver.example.com/status"
|
42
|
-
# sms_url | String | "https://myserver.example.com/url-for-fielding-incoming-message"
|
43
|
-
# sms_method | String | "POST" or "GET" (default is POST)
|
44
|
-
# sms_fallback_url | String | "https://myserver.example.com/url-if-sms_url-fails"
|
45
|
-
# sms_fallback_method | String | "POST" or "GET" (default is POST)
|
46
|
-
#
|
47
|
-
# Example Usage
|
48
|
-
#
|
49
|
-
#
|
50
|
-
# VivialConnect::Configuration.create(name: "Taxi Messaging", message_status_callback: "https://myserver.example.com/status")
|
51
|
-
# => #<VivialConnect::Configuration account_id=1XXXXX, active=true, date_created="2017-04-21T15:44:28-04:00", date_modified="2017-04-21T15:44:28-04:00", id=55, message_status_callback="https://myserver.example.com/status", name="Taxi Messaging", sms_fallback_method=nil, sms_fallback_url=nil, sms_method=nil, sms_url=nil>
|
52
|
-
#
|
53
|
-
#
|
54
|
-
##
|
55
|
-
#=== .find(id)
|
56
|
-
#
|
57
|
-
#Returns the a Configuration object referenced by the `id` value.
|
58
|
-
#
|
59
|
-
# Required parameter:
|
60
|
-
#
|
61
|
-
# id | Fixnum | the id of the configuration you would like to retrieve
|
62
|
-
#
|
63
|
-
#
|
64
|
-
# Example usage:
|
65
|
-
#
|
66
|
-
#
|
67
|
-
# VivialConnect::Configuration.find(55)
|
68
|
-
# => #<VivialConnect::Configuration account_id=1XXXX, active=true, date_created="2017-04-21T15:44:28-04:00", date_modified="2017-04-21T15:44:28-04:00", id=55, message_status_callback="https://myserver.example.com/status", name="Taxi Messaging", sms_fallback_method=nil, sms_fallback_url=nil, sms_method=nil, sms_url=nil>
|
69
|
-
#
|
70
|
-
#
|
71
|
-
##
|
72
|
-
#=== .find_each(start: 1, finish: nil, batch_size: 150)
|
73
|
-
#
|
74
|
-
#Iterates through all of the configurations on your account in N sized batches beginning at the `start: value` and ending at the `finish: value`.
|
75
|
-
#
|
76
|
-
#
|
77
|
-
# When a block is given this method yields an individual Configuration object.
|
78
|
-
# Without a block, this method returns an Enumerator.
|
79
|
-
#
|
80
|
-
#
|
81
|
-
# By default, it will begin at the first configuration and end at the last configuration
|
82
|
-
#
|
83
|
-
#
|
84
|
-
# With default batch_size: 150, if you wanted to get your records from
|
85
|
-
# 150 to 300 you would start at 2 and finish at 2.
|
86
|
-
#
|
87
|
-
#
|
88
|
-
#Returns an Array of objects corresponding to the `start` and `finish` values. Default is all objects.
|
89
|
-
#
|
90
|
-
# Optional parameters:
|
91
|
-
#
|
92
|
-
# start | Fixnum | batch to start with
|
93
|
-
# finish | Fixnum | batch to end with
|
94
|
-
# batch_size | Fixnum | between 1..150
|
95
|
-
#
|
96
|
-
#
|
97
|
-
#
|
98
|
-
# Example usage:
|
99
|
-
#
|
100
|
-
#
|
101
|
-
# VivialConnect::Configuration.find_each {|configuration| puts configuration.name}
|
102
|
-
# Taxi Messaging
|
103
|
-
# => [#<VivialConnect::Configuration account_id=1XXXX, active=true, date_created="2017-04-21T15:44:28-04:00", date_modified="2017-04-21T15:44:28-04:00", id=55, message_status_callback="https://myserver.example.com/status", name="Taxi Messaging", sms_fallback_method=nil, sms_fallback_url=nil, sms_method=nil, sms_url=nil>, ...]
|
104
|
-
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
##
|
109
|
-
#=== .find_in_batches(start: 1, finish: nil, batch_size: 150)
|
110
|
-
#
|
111
|
-
#Iterates through all of the configurations on your account in N sized batches beginning at the `start: value` and ending at the `finish: value`.
|
112
|
-
#
|
113
|
-
#
|
114
|
-
# When a block is given this method yields an array of batch_size resource objects.
|
115
|
-
# Without a block, it returns an Enumerator.
|
116
|
-
#
|
117
|
-
#
|
118
|
-
# By default, it will begin at the first configuration and end at the last configuration
|
119
|
-
#
|
120
|
-
#
|
121
|
-
# With default batch_size: 150, if you wanted to get your records from
|
122
|
-
# 150 to 300 you would start at 2 and finish at 2.
|
123
|
-
#
|
124
|
-
#
|
125
|
-
# Returns an Array of objects corresponding to the `start` and `finish` values. Default is all objects.
|
126
|
-
#
|
127
|
-
# Optional parameters:
|
128
|
-
#
|
129
|
-
# start | Fixnum | batch to start with
|
130
|
-
# finish | Fixnum | batch to end with
|
131
|
-
# batch_size | Fixnum | between 1..150
|
132
|
-
#
|
133
|
-
#
|
134
|
-
# Example usage:
|
135
|
-
#
|
136
|
-
#
|
137
|
-
# VivialConnect::Configuration.find_in_batches {|batch| do_something_with_an_array(batch)}
|
138
|
-
# => [#<VivialConnect::Configuration account_id=1XXXX, active=true, date_created="2017-04-21T15:44:28-04:00", date_modified="2017-04-21T15:44:28-04:00", id=55, message_status_callback="https://myserver.example.com/status", name="Taxi Messaging", sms_fallback_method=nil, sms_fallback_url=nil, sms_method=nil, sms_url=nil>, ...]
|
139
|
-
#
|
140
|
-
#
|
141
|
-
#=== \#delete
|
142
|
-
#
|
143
|
-
# Deletes a Configuration object
|
144
|
-
#
|
145
|
-
#
|
146
|
-
# Example usage:
|
147
|
-
#
|
148
|
-
#
|
149
|
-
# configuration = VivialConnect::Configuration.find(55)
|
150
|
-
# configuration.delete
|
151
|
-
# => true
|
152
|
-
#
|
153
|
-
#
|
154
|
-
#=== \#save
|
155
|
-
#
|
156
|
-
# Creates a Configuration or updates an existing one
|
157
|
-
#
|
158
|
-
#
|
159
|
-
# Example usage:
|
160
|
-
#
|
161
|
-
#
|
162
|
-
# configuration = VivialConnect::Configuration.new
|
163
|
-
# configuration.name = "Taxi Messaging"
|
164
|
-
# configuration.message_status_callback = "https://myserver.example.com/status"
|
165
|
-
# configuration.save
|
166
|
-
# => #<VivialConnect::Configuration account_id=1XXXX, active=true, date_created="2017-04-21T15:44:28-04:00", date_modified="2017-04-21T15:44:28-04:00", id=55, message_status_callback="https://myserver.example.com/status", name="Taxi Messaging", sms_fallback_method=nil, sms_fallback_url=nil, sms_method=nil, sms_url=nil>
|
167
|
-
#
|
168
|
-
#
|
169
|
-
|
170
|
-
class Configuration < Resource
|
171
|
-
end
|
172
|
-
end
|