Class: Exa::Services::Websets::UpdateImport
- Inherits:
-
Object
- Object
- Exa::Services::Websets::UpdateImport
- Defined in:
- lib/exa/services/websets/import_update.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(connection, id:, **params) ⇒ UpdateImport
constructor
A new instance of UpdateImport.
Constructor Details
#initialize(connection, id:, **params) ⇒ UpdateImport
Returns a new instance of UpdateImport.
7 8 9 10 11 |
# File 'lib/exa/services/websets/import_update.rb', line 7 def initialize(connection, id:, **params) @connection = connection @id = id @params = params end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/exa/services/websets/import_update.rb', line 13 def call response = @connection.patch("/websets/v0/imports/#{@id}", @params) body = response.body Resources::Import.new( id: body["id"], object: body["object"], status: body["status"], format: body["format"], entity: body["entity"], title: body["title"], count: body["count"], metadata: body["metadata"], failed_reason: body["failedReason"], failed_at: body["failedAt"], failed_message: body["failedMessage"], created_at: body["createdAt"], updated_at: body["updatedAt"], upload_url: body["uploadUrl"], upload_valid_until: body["uploadValidUntil"] ) end |