Class: Telnyx::Resources::Storage::Buckets::SslCertificate
- Inherits:
-
Object
- Object
- Telnyx::Resources::Storage::Buckets::SslCertificate
- Defined in:
- lib/telnyx/resources/storage/buckets/ssl_certificate.rb
Overview
SSL certificate operations
Instance Method Summary collapse
-
#create(bucket_name, certificate: nil, private_key: nil, request_options: {}) ⇒ Telnyx::Models::Storage::Buckets::SslCertificateCreateResponse
Uploads an SSL certificate and its matching secret so that you can use Telnyx’s storage as your CDN.
-
#delete(bucket_name, request_options: {}) ⇒ Telnyx::Models::Storage::Buckets::SslCertificateDeleteResponse
Deletes an SSL certificate and its matching secret.
-
#initialize(client:) ⇒ SslCertificate
constructor
private
A new instance of SslCertificate.
-
#retrieve(bucket_name, request_options: {}) ⇒ Telnyx::Models::Storage::Buckets::SslCertificateRetrieveResponse
Returns the stored certificate detail of a bucket, if applicable.
Constructor Details
#initialize(client:) ⇒ SslCertificate
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of SslCertificate.
80 81 82 |
# File 'lib/telnyx/resources/storage/buckets/ssl_certificate.rb', line 80 def initialize(client:) @client = client end |
Instance Method Details
#create(bucket_name, certificate: nil, private_key: nil, request_options: {}) ⇒ Telnyx::Models::Storage::Buckets::SslCertificateCreateResponse
Uploads an SSL certificate and its matching secret so that you can use Telnyx’s storage as your CDN.
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/telnyx/resources/storage/buckets/ssl_certificate.rb', line 25 def create(bucket_name, params = {}) parsed, = Telnyx::Storage::Buckets::SslCertificateCreateParams.dump_request(params) @client.request( method: :put, path: ["storage/buckets/%1$s/ssl_certificate", bucket_name], headers: {"content-type" => "multipart/form-data"}, body: parsed, model: Telnyx::Models::Storage::Buckets::SslCertificateCreateResponse, options: ) end |
#delete(bucket_name, request_options: {}) ⇒ Telnyx::Models::Storage::Buckets::SslCertificateDeleteResponse
Deletes an SSL certificate and its matching secret.
68 69 70 71 72 73 74 75 |
# File 'lib/telnyx/resources/storage/buckets/ssl_certificate.rb', line 68 def delete(bucket_name, params = {}) @client.request( method: :delete, path: ["storage/buckets/%1$s/ssl_certificate", bucket_name], model: Telnyx::Models::Storage::Buckets::SslCertificateDeleteResponse, options: params[:request_options] ) end |
#retrieve(bucket_name, request_options: {}) ⇒ Telnyx::Models::Storage::Buckets::SslCertificateRetrieveResponse
Returns the stored certificate detail of a bucket, if applicable.
48 49 50 51 52 53 54 55 |
# File 'lib/telnyx/resources/storage/buckets/ssl_certificate.rb', line 48 def retrieve(bucket_name, params = {}) @client.request( method: :get, path: ["storage/buckets/%1$s/ssl_certificate", bucket_name], model: Telnyx::Models::Storage::Buckets::SslCertificateRetrieveResponse, options: params[:request_options] ) end |