Class: Knockapi::Resources::Schedules::Bulk
- Inherits:
-
Object
- Object
- Knockapi::Resources::Schedules::Bulk
- Defined in:
- lib/knockapi/resources/schedules/bulk.rb
Instance Method Summary collapse
-
#create(schedules:, request_options: {}) ⇒ Knockapi::Models::BulkOperation
Bulk creates up to 1,000 schedules at a time.
-
#initialize(client:) ⇒ Bulk
constructor
private
A new instance of Bulk.
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.
34 35 36 |
# File 'lib/knockapi/resources/schedules/bulk.rb', line 34 def initialize(client:) @client = client end |
Instance Method Details
#create(schedules:, request_options: {}) ⇒ Knockapi::Models::BulkOperation
Bulk creates up to 1,000 schedules at a time. This endpoint also handles [inline identifications](/managing-recipients/identifying-recipients#inline-identifying-recipients) for the ‘actor`, `recipient`, and `tenant` fields.
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/knockapi/resources/schedules/bulk.rb', line 20 def create(params) parsed, = Knockapi::Schedules::BulkCreateParams.dump_request(params) @client.request( method: :post, path: "v1/schedules/bulk/create", body: parsed, model: Knockapi::BulkOperation, options: ) end |