@@ -108,19 +108,26 @@ def get_page(target_url)
108
108
##
109
109
# Retrieve a single page of CredentialInstance records from the API.
110
110
# Request is executed immediately.
111
- # @param [credential.PushService] type Credential type, one of "gcm" or "apn"
112
- # @param [String] friendly_name Friendly name for stored credential
113
- # @param [String] certificate [APN only] URL encoded representation of the
114
- # certificate, e.g. `-----BEGIN
115
- # CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END CERTIFICATE-----`
116
- # @param [String] private_key [APN only] URL encoded representation of the private
117
- # key, e.g. `-----BEGIN RSA PRIVATE
118
- # KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\n.-----END RSA PRIVATE KEY-----`
119
- # @param [Boolean] sandbox [APN only] use this credential for sending to
120
- # production or sandbox APNs (string `true` or `false`)
121
- # @param [String] api_key [GCM only] This is the "API key" for project from Google
122
- # Developer console for your GCM Service application credential
123
- # @param [String] secret The secret
111
+ # @param [credential.PushService] type The type of push-notification service the
112
+ # credential is for. Can be: `gcm`, `fcm`, or `apn`.
113
+ # @param [String] friendly_name A descriptive string that you create to describe
114
+ # the new resource. It can be up to 64 characters long.
115
+ # @param [String] certificate [APN only] The URL encoded representation of the
116
+ # certificate. For example,
117
+ # `-----BEGIN CERTIFICATE-----
118
+ # MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==
119
+ # -----END CERTIFICATE-----`
120
+ # @param [String] private_key [APN only] The URL encoded representation of the
121
+ # private key. For example,
122
+ # `-----BEGIN RSA PRIVATE KEY-----
123
+ # MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR.
124
+ # -----END RSA PRIVATE KEY-----`
125
+ # @param [Boolean] sandbox [APN only] Whether to send the credential to sandbox
126
+ # APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
127
+ # @param [String] api_key [GCM only] The API key for the project that was obtained
128
+ # from the Google Developer console for your GCM Service application credential.
129
+ # @param [String] secret [FCM only] The **Server key** of your project from the
130
+ # Firebase console, found under Settings / Cloud messaging.
124
131
# @return [CredentialInstance] Newly created CredentialInstance
125
132
def create ( type : nil , friendly_name : :unset , certificate : :unset , private_key : :unset , sandbox : :unset , api_key : :unset , secret : :unset )
126
133
data = Twilio ::Values . of ( {
@@ -182,7 +189,8 @@ class CredentialContext < InstanceContext
182
189
##
183
190
# Initialize the CredentialContext
184
191
# @param [Version] version Version that contains the resource
185
- # @param [String] sid The sid
192
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
193
+ # Credential resource to fetch.
186
194
# @return [CredentialContext] CredentialContext
187
195
def initialize ( version , sid )
188
196
super ( version )
@@ -209,18 +217,24 @@ def fetch
209
217
210
218
##
211
219
# Update the CredentialInstance
212
- # @param [String] friendly_name Friendly name for stored credential
213
- # @param [String] certificate [APN only] URL encoded representation of the
214
- # certificate, e.g. `-----BEGIN
215
- # CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END CERTIFICATE-----`
216
- # @param [String] private_key [APN only] URL encoded representation of the private
217
- # key, e.g. `-----BEGIN RSA PRIVATE
218
- # KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\n.-----END RSA PRIVATE KEY-----`
219
- # @param [Boolean] sandbox [APN only] use this credential for sending to
220
- # production or sandbox APNs (string `true` or `false`)
221
- # @param [String] api_key [GCM only] This is the "API key" for project from Google
222
- # Developer console for your GCM Service application credential
223
- # @param [String] secret The secret
220
+ # @param [String] friendly_name A descriptive string that you create to describe
221
+ # the resource. It can be up to 64 characters long.
222
+ # @param [String] certificate [APN only] The URL encoded representation of the
223
+ # certificate. For example,
224
+ # `-----BEGIN CERTIFICATE-----
225
+ # MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==
226
+ # -----END CERTIFICATE-----`
227
+ # @param [String] private_key [APN only] The URL encoded representation of the
228
+ # private key. For example,
229
+ # `-----BEGIN RSA PRIVATE KEY-----
230
+ # MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR.
231
+ # -----END RSA PRIVATE KEY-----`
232
+ # @param [Boolean] sandbox [APN only] Whether to send the credential to sandbox
233
+ # APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
234
+ # @param [String] api_key [GCM only] The API key for the project that was obtained
235
+ # from the Google Developer console for your GCM Service application credential.
236
+ # @param [String] secret [FCM only] The **Server key** of your project from the
237
+ # Firebase console, found under Settings / Cloud messaging.
224
238
# @return [CredentialInstance] Updated CredentialInstance
225
239
def update ( friendly_name : :unset , certificate : :unset , private_key : :unset , sandbox : :unset , api_key : :unset , secret : :unset )
226
240
data = Twilio ::Values . of ( {
@@ -268,7 +282,8 @@ class CredentialInstance < InstanceResource
268
282
# Initialize the CredentialInstance
269
283
# @param [Version] version Version that contains the resource
270
284
# @param [Hash] payload payload that contains response from Twilio
271
- # @param [String] sid The sid
285
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
286
+ # Credential resource to fetch.
272
287
# @return [CredentialInstance] CredentialInstance
273
288
def initialize ( version , payload , sid : nil )
274
289
super ( version )
@@ -302,49 +317,49 @@ def context
302
317
end
303
318
304
319
##
305
- # @return [String] A 34 character string that uniquely identifies this resource.
320
+ # @return [String] The unique string that identifies the resource
306
321
def sid
307
322
@properties [ 'sid' ]
308
323
end
309
324
310
325
##
311
- # @return [String] The unique id of the Account[/console] responsible for this resource.
326
+ # @return [String] The SID of the Account that created the resource
312
327
def account_sid
313
328
@properties [ 'account_sid' ]
314
329
end
315
330
316
331
##
317
- # @return [String] The human-readable name of this resource.
332
+ # @return [String] The string that you assigned to describe the resource
318
333
def friendly_name
319
334
@properties [ 'friendly_name' ]
320
335
end
321
336
322
337
##
323
- # @return [credential.PushService] Indicates which push notifications service this credential is for - either gcm or apn
338
+ # @return [credential.PushService] The type of push-notification service the credential is for
324
339
def type
325
340
@properties [ 'type' ]
326
341
end
327
342
328
343
##
329
- # @return [String] [APN only] true when this resource should use the sandbox APN service.
344
+ # @return [String] [APN only] Whether to send the credential to sandbox APNs
330
345
def sandbox
331
346
@properties [ 'sandbox' ]
332
347
end
333
348
334
349
##
335
- # @return [Time] The date that this resource was created.
350
+ # @return [Time] The RFC 2822 date and time in GMT when the resource was created
336
351
def date_created
337
352
@properties [ 'date_created' ]
338
353
end
339
354
340
355
##
341
- # @return [Time] The date that this resource was last updated.
356
+ # @return [Time] The RFC 2822 date and time in GMT when the resource was last updated
342
357
def date_updated
343
358
@properties [ 'date_updated' ]
344
359
end
345
360
346
361
##
347
- # @return [String] An absolute URL for this credential resource.
362
+ # @return [String] The absolute URL of the Credential resource
348
363
def url
349
364
@properties [ 'url' ]
350
365
end
@@ -358,18 +373,24 @@ def fetch
358
373
359
374
##
360
375
# Update the CredentialInstance
361
- # @param [String] friendly_name Friendly name for stored credential
362
- # @param [String] certificate [APN only] URL encoded representation of the
363
- # certificate, e.g. `-----BEGIN
364
- # CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END CERTIFICATE-----`
365
- # @param [String] private_key [APN only] URL encoded representation of the private
366
- # key, e.g. `-----BEGIN RSA PRIVATE
367
- # KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\n.-----END RSA PRIVATE KEY-----`
368
- # @param [Boolean] sandbox [APN only] use this credential for sending to
369
- # production or sandbox APNs (string `true` or `false`)
370
- # @param [String] api_key [GCM only] This is the "API key" for project from Google
371
- # Developer console for your GCM Service application credential
372
- # @param [String] secret The secret
376
+ # @param [String] friendly_name A descriptive string that you create to describe
377
+ # the resource. It can be up to 64 characters long.
378
+ # @param [String] certificate [APN only] The URL encoded representation of the
379
+ # certificate. For example,
380
+ # `-----BEGIN CERTIFICATE-----
381
+ # MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==
382
+ # -----END CERTIFICATE-----`
383
+ # @param [String] private_key [APN only] The URL encoded representation of the
384
+ # private key. For example,
385
+ # `-----BEGIN RSA PRIVATE KEY-----
386
+ # MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR.
387
+ # -----END RSA PRIVATE KEY-----`
388
+ # @param [Boolean] sandbox [APN only] Whether to send the credential to sandbox
389
+ # APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
390
+ # @param [String] api_key [GCM only] The API key for the project that was obtained
391
+ # from the Google Developer console for your GCM Service application credential.
392
+ # @param [String] secret [FCM only] The **Server key** of your project from the
393
+ # Firebase console, found under Settings / Cloud messaging.
373
394
# @return [CredentialInstance] Updated CredentialInstance
374
395
def update ( friendly_name : :unset , certificate : :unset , private_key : :unset , sandbox : :unset , api_key : :unset , secret : :unset )
375
396
context . update (
0 commit comments