lib/twilio-ruby/rest/ip_messaging/v2/credential.rb in twilio-ruby-5.21.1 vs lib/twilio-ruby/rest/ip_messaging/v2/credential.rb in twilio-ruby-5.21.2
- old
+ new
@@ -106,29 +106,30 @@
end
##
# Retrieve a single page of CredentialInstance records from the API.
# Request is executed immediately.
- # @param [credential.PushService] type Credential type, one of "gcm", "fcm", or
- # "apn"
- # @param [String] friendly_name Friendly name for stored credential
- # @param [String] certificate [APN only] URL encoded representation of the
- # certificate, e.g.
+ # @param [credential.PushService] type The type of push-notification service the
+ # credential is for. Can be: `gcm`, `fcm`, or `apn`.
+ # @param [String] friendly_name A descriptive string that you create to describe
+ # the new resource. It can be up to 64 characters long.
+ # @param [String] certificate [APN only] The URL encoded representation of the
+ # certificate. For example,
# `-----BEGIN CERTIFICATE-----
# MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==
# -----END CERTIFICATE-----`
- # @param [String] private_key [APN only] URL encoded representation of the private
- # key, e.g.
+ # @param [String] private_key [APN only] The URL encoded representation of the
+ # private key. For example,
# `-----BEGIN RSA PRIVATE KEY-----
# MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR.
# -----END RSA PRIVATE KEY-----`
- # @param [Boolean] sandbox [APN only] use this credential for sending to
- # production or sandbox APNs (string `true` or `false`)
- # @param [String] api_key [GCM only] This is the "API key" for project from Google
- # Developer console for your GCM Service application credential
- # @param [String] secret [FCM only] This is the "Server key" of your project from
- # Firebase console under Settings / Cloud messaging.
+ # @param [Boolean] sandbox [APN only] Whether to send the credential to sandbox
+ # APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
+ # @param [String] api_key [GCM only] The API key for the project that was obtained
+ # from the Google Developer console for your GCM Service application credential.
+ # @param [String] secret [FCM only] The **Server key** of your project from the
+ # Firebase console, found under Settings / Cloud messaging.
# @return [CredentialInstance] Newly created CredentialInstance
def create(type: nil, friendly_name: :unset, certificate: :unset, private_key: :unset, sandbox: :unset, api_key: :unset, secret: :unset)
data = Twilio::Values.of({
'Type' => type,
'FriendlyName' => friendly_name,
@@ -186,11 +187,12 @@
class CredentialContext < InstanceContext
##
# Initialize the CredentialContext
# @param [Version] version Version that contains the resource
- # @param [String] sid The sid
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
+ # Credential resource to fetch.
# @return [CredentialContext] CredentialContext
def initialize(version, sid)
super(version)
# Path Solution
@@ -213,27 +215,28 @@
CredentialInstance.new(@version, payload, sid: @solution[:sid], )
end
##
# Update the CredentialInstance
- # @param [String] friendly_name Friendly name for stored credential
- # @param [String] certificate [APN only] URL encoded representation of the
- # certificate, e.g.
+ # @param [String] friendly_name A descriptive string that you create to describe
+ # the resource. It can be up to 64 characters long.
+ # @param [String] certificate [APN only] The URL encoded representation of the
+ # certificate. For example,
# `-----BEGIN CERTIFICATE-----
# MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==
# -----END CERTIFICATE-----`
- # @param [String] private_key [APN only] URL encoded representation of the private
- # key, e.g.
+ # @param [String] private_key [APN only] The URL encoded representation of the
+ # private key. For example,
# `-----BEGIN RSA PRIVATE KEY-----
# MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR.
# -----END RSA PRIVATE KEY-----`
- # @param [Boolean] sandbox [APN only] use this credential for sending to
- # production or sandbox APNs (string `true` or `false`)
- # @param [String] api_key [GCM only] This is the "API key" for project from Google
- # Developer console for your GCM Service application credential
- # @param [String] secret [FCM only] This is the "Server key" of your project from
- # Firebase console under Settings / Cloud messaging.
+ # @param [Boolean] sandbox [APN only] Whether to send the credential to sandbox
+ # APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
+ # @param [String] api_key [GCM only] The API key for the project that was obtained
+ # from the Google Developer console for your GCM Service application credential.
+ # @param [String] secret [FCM only] The **Server key** of your project from the
+ # Firebase console, found under Settings / Cloud messaging.
# @return [CredentialInstance] Updated CredentialInstance
def update(friendly_name: :unset, certificate: :unset, private_key: :unset, sandbox: :unset, api_key: :unset, secret: :unset)
data = Twilio::Values.of({
'FriendlyName' => friendly_name,
'Certificate' => certificate,
@@ -277,11 +280,12 @@
class CredentialInstance < InstanceResource
##
# Initialize the CredentialInstance
# @param [Version] version Version that contains the resource
# @param [Hash] payload payload that contains response from Twilio
- # @param [String] sid The sid
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
+ # Credential resource to fetch.
# @return [CredentialInstance] CredentialInstance
def initialize(version, payload, sid: nil)
super(version)
# Marshaled Properties
@@ -311,53 +315,53 @@
end
@instance_context
end
##
- # @return [String] A 34 character string that uniquely identifies this resource.
+ # @return [String] The unique string that identifies the resource
def sid
@properties['sid']
end
##
- # @return [String] The unique id of the Account responsible for this resource.
+ # @return [String] The SID of the Account that created the resource
def account_sid
@properties['account_sid']
end
##
- # @return [String] The human-readable name of this resource.
+ # @return [String] The string that you assigned to describe the resource
def friendly_name
@properties['friendly_name']
end
##
- # @return [credential.PushService] Indicates which push notifications service this credential is for - either gcm, fcm, or apn
+ # @return [credential.PushService] The type of push-notification service the credential is for
def type
@properties['type']
end
##
- # @return [String] [APN only] true when this resource should use the sandbox APN service.
+ # @return [String] [APN only] Whether to send the credential to sandbox APNs
def sandbox
@properties['sandbox']
end
##
- # @return [Time] The date that this resource was created.
+ # @return [Time] The RFC 2822 date and time in GMT when the resource was created
def date_created
@properties['date_created']
end
##
- # @return [Time] The date that this resource was last updated.
+ # @return [Time] The RFC 2822 date and time in GMT when the resource was last updated
def date_updated
@properties['date_updated']
end
##
- # @return [String] An absolute URL for this credential resource.
+ # @return [String] The absolute URL of the Credential resource
def url
@properties['url']
end
##
@@ -367,26 +371,27 @@
context.fetch
end
##
# Update the CredentialInstance
- # @param [String] friendly_name Friendly name for stored credential
- # @param [String] certificate [APN only] URL encoded representation of the
- # certificate, e.g.
+ # @param [String] friendly_name A descriptive string that you create to describe
+ # the resource. It can be up to 64 characters long.
+ # @param [String] certificate [APN only] The URL encoded representation of the
+ # certificate. For example,
# `-----BEGIN CERTIFICATE-----
# MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==
# -----END CERTIFICATE-----`
- # @param [String] private_key [APN only] URL encoded representation of the private
- # key, e.g.
+ # @param [String] private_key [APN only] The URL encoded representation of the
+ # private key. For example,
# `-----BEGIN RSA PRIVATE KEY-----
# MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR.
# -----END RSA PRIVATE KEY-----`
- # @param [Boolean] sandbox [APN only] use this credential for sending to
- # production or sandbox APNs (string `true` or `false`)
- # @param [String] api_key [GCM only] This is the "API key" for project from Google
- # Developer console for your GCM Service application credential
- # @param [String] secret [FCM only] This is the "Server key" of your project from
- # Firebase console under Settings / Cloud messaging.
+ # @param [Boolean] sandbox [APN only] Whether to send the credential to sandbox
+ # APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
+ # @param [String] api_key [GCM only] The API key for the project that was obtained
+ # from the Google Developer console for your GCM Service application credential.
+ # @param [String] secret [FCM only] The **Server key** of your project from the
+ # Firebase console, found under Settings / Cloud messaging.
# @return [CredentialInstance] Updated CredentialInstance
def update(friendly_name: :unset, certificate: :unset, private_key: :unset, sandbox: :unset, api_key: :unset, secret: :unset)
context.update(
friendly_name: friendly_name,
certificate: certificate,
\ No newline at end of file