Class: Stigg::Resources::V1::Events::DataExport::Destinations
- Inherits:
-
Object
- Object
- Stigg::Resources::V1::Events::DataExport::Destinations
- Defined in:
- lib/stigg/resources/v1/events/data_export/destinations.rb
Instance Method Summary collapse
-
#create(destination_id:, destination_type:, request_options: {}) ⇒ Stigg::Models::V1::Events::DataExport::DestinationCreateResponse
Register a destination on the environment’s DATA_EXPORT integration.
-
#delete(destination_id, request_options: {}) ⇒ Stigg::Models::V1::Events::DataExport::DestinationDeleteResponse
Remove a destination from the DATA_EXPORT integration metadata.
-
#initialize(client:) ⇒ Destinations
constructor
private
A new instance of Destinations.
Constructor Details
#initialize(client:) ⇒ Destinations
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 Destinations.
58 59 60 |
# File 'lib/stigg/resources/v1/events/data_export/destinations.rb', line 58 def initialize(client:) @client = client end |
Instance Method Details
#create(destination_id:, destination_type:, request_options: {}) ⇒ Stigg::Models::V1::Events::DataExport::DestinationCreateResponse
Register a destination on the environment’s DATA_EXPORT integration. Lazy-creates the integration row + provider recipient on first call. Idempotent on destinationId.
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/stigg/resources/v1/events/data_export/destinations.rb', line 24 def create(params) parsed, = Stigg::V1::Events::DataExport::DestinationCreateParams.dump_request(params) @client.request( method: :post, path: "api/v1/data-export/destinations", body: parsed, model: Stigg::Models::V1::Events::DataExport::DestinationCreateResponse, options: ) end |
#delete(destination_id, request_options: {}) ⇒ Stigg::Models::V1::Events::DataExport::DestinationDeleteResponse
Remove a destination from the DATA_EXPORT integration metadata. Idempotent.
46 47 48 49 50 51 52 53 |
# File 'lib/stigg/resources/v1/events/data_export/destinations.rb', line 46 def delete(destination_id, params = {}) @client.request( method: :delete, path: ["api/v1/data-export/destinations/%1$s", destination_id], model: Stigg::Models::V1::Events::DataExport::DestinationDeleteResponse, options: params[:request_options] ) end |