lib/twilio-ruby/rest/ip_messaging/v2/credential.rb in twilio-ruby-5.9.0 vs lib/twilio-ruby/rest/ip_messaging/v2/credential.rb in twilio-ruby-5.10.0

- old
+ new

@@ -106,17 +106,29 @@ end ## # Retrieve a single page of CredentialInstance records from the API. # Request is executed immediately. - # @param [credential.PushService] type The type - # @param [String] friendly_name The friendly_name - # @param [String] certificate The certificate - # @param [String] private_key The private_key - # @param [Boolean] sandbox The sandbox - # @param [String] api_key The api_key - # @param [String] secret The secret + # @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. + # `-----BEGIN CERTIFICATE----- + # MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A== + # -----END CERTIFICATE-----` + # @param [String] private_key [APN only] URL encoded representation of the private + # key, e.g. + # `-----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. # @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, @@ -201,16 +213,27 @@ CredentialInstance.new(@version, payload, sid: @solution[:sid], ) end ## # Update the CredentialInstance - # @param [String] friendly_name The friendly_name - # @param [String] certificate The certificate - # @param [String] private_key The private_key - # @param [Boolean] sandbox The sandbox - # @param [String] api_key The api_key - # @param [String] secret The secret + # @param [String] friendly_name Friendly name for stored credential + # @param [String] certificate [APN only] URL encoded representation of the + # certificate, e.g. + # `-----BEGIN CERTIFICATE----- + # MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A== + # -----END CERTIFICATE-----` + # @param [String] private_key [APN only] URL encoded representation of the private + # key, e.g. + # `-----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. # @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, @@ -281,53 +304,53 @@ end @instance_context end ## - # @return [String] The sid + # @return [String] A 34 character string that uniquely identifies this resource. def sid @properties['sid'] end ## - # @return [String] The account_sid + # @return [String] The unique id of the Account responsible for this resource. def account_sid @properties['account_sid'] end ## - # @return [String] The friendly_name + # @return [String] The human-readable name of this resource. def friendly_name @properties['friendly_name'] end ## - # @return [credential.PushService] The type + # @return [credential.PushService] Indicates which push notifications service this credential is for - either gcm, fcm, or apn def type @properties['type'] end ## - # @return [String] The sandbox + # @return [String] [APN only] true when this resource should use the sandbox APN service. def sandbox @properties['sandbox'] end ## - # @return [Time] The date_created + # @return [Time] The date that this resource was created. def date_created @properties['date_created'] end ## - # @return [Time] The date_updated + # @return [Time] The date that this resource was last updated. def date_updated @properties['date_updated'] end ## - # @return [String] The url + # @return [String] An absolute URL for this credential resource. def url @properties['url'] end ## @@ -337,15 +360,26 @@ context.fetch end ## # Update the CredentialInstance - # @param [String] friendly_name The friendly_name - # @param [String] certificate The certificate - # @param [String] private_key The private_key - # @param [Boolean] sandbox The sandbox - # @param [String] api_key The api_key - # @param [String] secret The secret + # @param [String] friendly_name Friendly name for stored credential + # @param [String] certificate [APN only] URL encoded representation of the + # certificate, e.g. + # `-----BEGIN CERTIFICATE----- + # MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A== + # -----END CERTIFICATE-----` + # @param [String] private_key [APN only] URL encoded representation of the private + # key, e.g. + # `-----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. # @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