Class: Stigg::Resources::V1::Events::Beta::Customers::Entities
- Inherits:
-
Object
- Object
- Stigg::Resources::V1::Events::Beta::Customers::Entities
- Defined in:
- lib/stigg/resources/v1/events/beta/customers/entities.rb
Instance Method Summary collapse
-
#archive(id, ids:, x_account_id: nil, x_environment_id: nil, request_options: {}) ⇒ Stigg::Models::V1::Events::Beta::Customers::EntityArchiveResponse
Some parameter documentations has been truncated, see Models::V1::Events::Beta::Customers::EntityArchiveParams for more details.
-
#initialize(client:) ⇒ Entities
constructor
private
A new instance of Entities.
-
#list(id, after: nil, before: nil, include_archived: nil, limit: nil, type_ref_id: nil, x_account_id: nil, x_environment_id: nil, request_options: {}) ⇒ Stigg::Internal::MyCursorIDPage<Stigg::Models::V1::Events::Beta::Customers::EntityListResponse>
Some parameter documentations has been truncated, see Models::V1::Events::Beta::Customers::EntityListParams for more details.
-
#retrieve(entity_id, id:, x_account_id: nil, x_environment_id: nil, request_options: {}) ⇒ Stigg::Models::V1::Events::Beta::Customers::EntityRetrieveResponse
Some parameter documentations has been truncated, see Models::V1::Events::Beta::Customers::EntityRetrieveParams for more details.
-
#unarchive(id, ids:, x_account_id: nil, x_environment_id: nil, request_options: {}) ⇒ Stigg::Models::V1::Events::Beta::Customers::EntityUnarchiveResponse
Some parameter documentations has been truncated, see Models::V1::Events::Beta::Customers::EntityUnarchiveParams for more details.
-
#upsert(id, entities:, x_account_id: nil, x_environment_id: nil, request_options: {}) ⇒ Stigg::Models::V1::Events::Beta::Customers::EntityUpsertResponse
Some parameter documentations has been truncated, see Models::V1::Events::Beta::Customers::EntityUpsertParams for more details.
Constructor Details
#initialize(client:) ⇒ Entities
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 Entities.
201 202 203 |
# File 'lib/stigg/resources/v1/events/beta/customers/entities.rb', line 201 def initialize(client:) @client = client end |
Instance Method Details
#archive(id, ids:, x_account_id: nil, x_environment_id: nil, request_options: {}) ⇒ Stigg::Models::V1::Events::Beta::Customers::EntityArchiveResponse
Some parameter documentations has been truncated, see Models::V1::Events::Beta::Customers::EntityArchiveParams for more details.
Archives entities in bulk for the given customer by id.
116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/stigg/resources/v1/events/beta/customers/entities.rb', line 116 def archive(id, params) parsed, = Stigg::V1::Events::Beta::Customers::EntityArchiveParams.dump_request(params) header_params = {x_account_id: "x-account-id", x_environment_id: "x-environment-id"} @client.request( method: :post, path: ["api/v1-beta/customers/%1$s/entities/archive", id], headers: parsed.slice(*header_params.keys).transform_keys(header_params), body: parsed.except(*header_params.keys), model: Stigg::Models::V1::Events::Beta::Customers::EntityArchiveResponse, options: ) end |
#list(id, after: nil, before: nil, include_archived: nil, limit: nil, type_ref_id: nil, x_account_id: nil, x_environment_id: nil, request_options: {}) ⇒ Stigg::Internal::MyCursorIDPage<Stigg::Models::V1::Events::Beta::Customers::EntityListResponse>
Some parameter documentations has been truncated, see Models::V1::Events::Beta::Customers::EntityListParams for more details.
Retrieves a paginated list of entities for the given customer.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/stigg/resources/v1/events/beta/customers/entities.rb', line 77 def list(id, params = {}) query_params = [:after, :before, :include_archived, :limit, :type_ref_id] parsed, = Stigg::V1::Events::Beta::Customers::EntityListParams.dump_request(params) query = Stigg::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :get, path: ["api/v1-beta/customers/%1$s/entities", id], query: query.transform_keys(include_archived: "includeArchived", type_ref_id: "typeRefId"), headers: parsed.except(*query_params).transform_keys( x_account_id: "x-account-id", x_environment_id: "x-environment-id" ), page: Stigg::Internal::MyCursorIDPage, model: Stigg::Models::V1::Events::Beta::Customers::EntityListResponse, options: ) end |
#retrieve(entity_id, id:, x_account_id: nil, x_environment_id: nil, request_options: {}) ⇒ Stigg::Models::V1::Events::Beta::Customers::EntityRetrieveResponse
Some parameter documentations has been truncated, see Models::V1::Events::Beta::Customers::EntityRetrieveParams for more details.
Retrieves a single entity for the given customer by its identifier.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/stigg/resources/v1/events/beta/customers/entities.rb', line 31 def retrieve(entity_id, params) parsed, = Stigg::V1::Events::Beta::Customers::EntityRetrieveParams.dump_request(params) id = parsed.delete(:id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["api/v1-beta/customers/%1$s/entities/%2$s", id, entity_id], headers: parsed.transform_keys( x_account_id: "x-account-id", x_environment_id: "x-environment-id" ), model: Stigg::Models::V1::Events::Beta::Customers::EntityRetrieveResponse, options: ) end |
#unarchive(id, ids:, x_account_id: nil, x_environment_id: nil, request_options: {}) ⇒ Stigg::Models::V1::Events::Beta::Customers::EntityUnarchiveResponse
Some parameter documentations has been truncated, see Models::V1::Events::Beta::Customers::EntityUnarchiveParams for more details.
Restores previously archived entities in bulk for the given customer by id.
150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/stigg/resources/v1/events/beta/customers/entities.rb', line 150 def unarchive(id, params) parsed, = Stigg::V1::Events::Beta::Customers::EntityUnarchiveParams.dump_request(params) header_params = {x_account_id: "x-account-id", x_environment_id: "x-environment-id"} @client.request( method: :post, path: ["api/v1-beta/customers/%1$s/entities/unarchive", id], headers: parsed.slice(*header_params.keys).transform_keys(header_params), body: parsed.except(*header_params.keys), model: Stigg::Models::V1::Events::Beta::Customers::EntityUnarchiveResponse, options: ) end |
#upsert(id, entities:, x_account_id: nil, x_environment_id: nil, request_options: {}) ⇒ Stigg::Models::V1::Events::Beta::Customers::EntityUpsertResponse
Some parameter documentations has been truncated, see Models::V1::Events::Beta::Customers::EntityUpsertParams for more details.
Creates or updates entities in bulk for the given customer. Existing entities matched by id are updated; new ids are created.
185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/stigg/resources/v1/events/beta/customers/entities.rb', line 185 def upsert(id, params) parsed, = Stigg::V1::Events::Beta::Customers::EntityUpsertParams.dump_request(params) header_params = {x_account_id: "x-account-id", x_environment_id: "x-environment-id"} @client.request( method: :put, path: ["api/v1-beta/customers/%1$s/entities", id], headers: parsed.slice(*header_params.keys).transform_keys(header_params), body: parsed.except(*header_params.keys), model: Stigg::Models::V1::Events::Beta::Customers::EntityUpsertResponse, options: ) end |