Class: Knockapi::Resources::Tenants::Bulk
- Inherits:
-
Object
- Object
- Knockapi::Resources::Tenants::Bulk
- Defined in:
- lib/knockapi/resources/tenants/bulk.rb
Instance Method Summary collapse
-
#delete(tenant_ids:, request_options: {}) ⇒ Knockapi::Models::BulkOperation
Delete up to 1,000 tenants at a time in a single operation.
-
#initialize(client:) ⇒ Bulk
constructor
private
A new instance of Bulk.
-
#set(tenants:, request_options: {}) ⇒ Knockapi::Models::BulkOperation
Set or update up to 1,000 tenants in a single operation.
Constructor Details
#initialize(client:) ⇒ Bulk
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 Bulk.
55 56 57 |
# File 'lib/knockapi/resources/tenants/bulk.rb', line 55 def initialize(client:) @client = client end |
Instance Method Details
#delete(tenant_ids:, request_options: {}) ⇒ Knockapi::Models::BulkOperation
Delete up to 1,000 tenants at a time in a single operation. This operation cannot be undone.
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/knockapi/resources/tenants/bulk.rb', line 19 def delete(params) parsed, = Knockapi::Tenants::BulkDeleteParams.dump_request(params) @client.request( method: :post, path: "v1/tenants/bulk/delete", query: parsed, model: Knockapi::BulkOperation, options: ) end |
#set(tenants:, request_options: {}) ⇒ Knockapi::Models::BulkOperation
Set or update up to 1,000 tenants in a single operation.
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/knockapi/resources/tenants/bulk.rb', line 41 def set(params) parsed, = Knockapi::Tenants::BulkSetParams.dump_request(params) @client.request( method: :post, path: "v1/tenants/bulk/set", body: parsed, model: Knockapi::BulkOperation, options: ) end |