Class: Telnyx::Resources::IntegrationSecrets
- Inherits:
-
Object
- Object
- Telnyx::Resources::IntegrationSecrets
- Defined in:
- lib/telnyx/resources/integration_secrets.rb
Overview
Store and retrieve integration secrets
Instance Method Summary collapse
-
#create(identifier:, type:, token: nil, password: nil, username: nil, request_options: {}) ⇒ Telnyx::Models::IntegrationSecretCreateResponse
Some parameter documentations has been truncated, see Models::IntegrationSecretCreateParams for more details.
-
#delete(id, request_options: {}) ⇒ nil
Delete an integration secret given its ID.
-
#initialize(client:) ⇒ IntegrationSecrets
constructor
private
A new instance of IntegrationSecrets.
-
#list(filter: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::IntegrationSecret>
Retrieve a list of all integration secrets configured by the user.
Constructor Details
#initialize(client:) ⇒ IntegrationSecrets
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 IntegrationSecrets.
91 92 93 |
# File 'lib/telnyx/resources/integration_secrets.rb', line 91 def initialize(client:) @client = client end |
Instance Method Details
#create(identifier:, type:, token: nil, password: nil, username: nil, request_options: {}) ⇒ Telnyx::Models::IntegrationSecretCreateResponse
Some parameter documentations has been truncated, see Models::IntegrationSecretCreateParams for more details.
Create a new secret with an associated identifier that can be used to securely integrate with other services.
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/telnyx/resources/integration_secrets.rb', line 30 def create(params) parsed, = Telnyx::IntegrationSecretCreateParams.dump_request(params) @client.request( method: :post, path: "integration_secrets", body: parsed, model: Telnyx::Models::IntegrationSecretCreateResponse, options: ) end |
#delete(id, request_options: {}) ⇒ nil
Delete an integration secret given its ID.
79 80 81 82 83 84 85 86 |
# File 'lib/telnyx/resources/integration_secrets.rb', line 79 def delete(id, params = {}) @client.request( method: :delete, path: ["integration_secrets/%1$s", id], model: NilClass, options: params[:request_options] ) end |
#list(filter: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::IntegrationSecret>
Retrieve a list of all integration secrets configured by the user.
56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/telnyx/resources/integration_secrets.rb', line 56 def list(params = {}) parsed, = Telnyx::IntegrationSecretListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "integration_secrets", query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::IntegrationSecret, options: ) end |