Class: Exa::Resources::Import
- Inherits:
-
Struct
- Object
- Struct
- Exa::Resources::Import
- Defined in:
- lib/exa/resources/import.rb
Overview
Represents an import operation for bringing external data into Exa
An import allows uploading CSV data containing entities (e.g., companies) to be processed and enriched within the Exa system.
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#entity ⇒ Object
Returns the value of attribute entity.
-
#failed_at ⇒ Object
Returns the value of attribute failed_at.
-
#failed_message ⇒ Object
Returns the value of attribute failed_message.
-
#failed_reason ⇒ Object
Returns the value of attribute failed_reason.
-
#format ⇒ Object
Returns the value of attribute format.
-
#id ⇒ Object
Returns the value of attribute id.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#object ⇒ Object
Returns the value of attribute object.
-
#status ⇒ Object
Returns the value of attribute status.
-
#title ⇒ Object
Returns the value of attribute title.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#upload_url ⇒ Object
Returns the value of attribute upload_url.
-
#upload_valid_until ⇒ Object
Returns the value of attribute upload_valid_until.
Instance Method Summary collapse
- #completed? ⇒ Boolean
- #failed? ⇒ Boolean
-
#initialize(id:, object:, status:, format: nil, entity: nil, title: nil, count: nil, metadata: nil, failed_reason: nil, failed_at: nil, failed_message: nil, created_at: nil, updated_at: nil, upload_url: nil, upload_valid_until: nil) ⇒ Import
constructor
A new instance of Import.
-
#pending? ⇒ Boolean
Status helper methods.
- #processing? ⇒ Boolean
- #to_h ⇒ Object
Constructor Details
#initialize(id:, object:, status:, format: nil, entity: nil, title: nil, count: nil, metadata: nil, failed_reason: nil, failed_at: nil, failed_message: nil, created_at: nil, updated_at: nil, upload_url: nil, upload_valid_until: nil) ⇒ Import
Returns a new instance of Import.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/exa/resources/import.rb', line 27 def initialize( id:, object:, status:, format: nil, entity: nil, title: nil, count: nil, metadata: nil, failed_reason: nil, failed_at: nil, failed_message: nil, created_at: nil, updated_at: nil, upload_url: nil, upload_valid_until: nil ) super freeze end |
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count
9 10 11 |
# File 'lib/exa/resources/import.rb', line 9 def count @count end |
#created_at ⇒ Object
Returns the value of attribute created_at
9 10 11 |
# File 'lib/exa/resources/import.rb', line 9 def created_at @created_at end |
#entity ⇒ Object
Returns the value of attribute entity
9 10 11 |
# File 'lib/exa/resources/import.rb', line 9 def entity @entity end |
#failed_at ⇒ Object
Returns the value of attribute failed_at
9 10 11 |
# File 'lib/exa/resources/import.rb', line 9 def failed_at @failed_at end |
#failed_message ⇒ Object
Returns the value of attribute failed_message
9 10 11 |
# File 'lib/exa/resources/import.rb', line 9 def end |
#failed_reason ⇒ Object
Returns the value of attribute failed_reason
9 10 11 |
# File 'lib/exa/resources/import.rb', line 9 def failed_reason @failed_reason end |
#format ⇒ Object
Returns the value of attribute format
9 10 11 |
# File 'lib/exa/resources/import.rb', line 9 def format @format end |
#id ⇒ Object
Returns the value of attribute id
9 10 11 |
# File 'lib/exa/resources/import.rb', line 9 def id @id end |
#metadata ⇒ Object
Returns the value of attribute metadata
9 10 11 |
# File 'lib/exa/resources/import.rb', line 9 def end |
#object ⇒ Object
Returns the value of attribute object
9 10 11 |
# File 'lib/exa/resources/import.rb', line 9 def object @object end |
#status ⇒ Object
Returns the value of attribute status
9 10 11 |
# File 'lib/exa/resources/import.rb', line 9 def status @status end |
#title ⇒ Object
Returns the value of attribute title
9 10 11 |
# File 'lib/exa/resources/import.rb', line 9 def title @title end |
#updated_at ⇒ Object
Returns the value of attribute updated_at
9 10 11 |
# File 'lib/exa/resources/import.rb', line 9 def updated_at @updated_at end |
#upload_url ⇒ Object
Returns the value of attribute upload_url
9 10 11 |
# File 'lib/exa/resources/import.rb', line 9 def upload_url @upload_url end |
#upload_valid_until ⇒ Object
Returns the value of attribute upload_valid_until
9 10 11 |
# File 'lib/exa/resources/import.rb', line 9 def upload_valid_until @upload_valid_until end |
Instance Method Details
#completed? ⇒ Boolean
57 58 59 |
# File 'lib/exa/resources/import.rb', line 57 def completed? status == "completed" end |
#failed? ⇒ Boolean
61 62 63 |
# File 'lib/exa/resources/import.rb', line 61 def failed? status == "failed" end |
#pending? ⇒ Boolean
Status helper methods
49 50 51 |
# File 'lib/exa/resources/import.rb', line 49 def pending? status == "pending" end |
#processing? ⇒ Boolean
53 54 55 |
# File 'lib/exa/resources/import.rb', line 53 def processing? status == "processing" end |
#to_h ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/exa/resources/import.rb', line 65 def to_h { id: id, object: object, status: status, format: format, entity: entity, title: title, count: count, metadata: , failed_reason: failed_reason, failed_at: failed_at, failed_message: , created_at: created_at, updated_at: updated_at, upload_url: upload_url, upload_valid_until: upload_valid_until }.compact end |