Class: TheCompaniesAPI::Generated::Models::Action
- Inherits:
-
Object
- Object
- TheCompaniesAPI::Generated::Models::Action
- Defined in:
- lib/thecompaniesapi/generated/models/action.rb
Overview
An action tracks a request made to our job queue and its result.
Instance Attribute Summary collapse
-
#attempts ⇒ Float
Attempts.
-
#cost ⇒ Object
Cost.
-
#created_at ⇒ Object
CreatedAt.
-
#data ⇒ Hash
Data.
-
#id ⇒ Float
Id.
-
#list_id ⇒ Float
ListId.
-
#prompt_id ⇒ Float
PromptId.
-
#result ⇒ Hash
Result.
-
#status ⇒ String
Status.
-
#team_id ⇒ Float
TeamId.
-
#type ⇒ String
Type.
-
#updated_at ⇒ Object
UpdatedAt.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Action
constructor
Initialize a new Action.
-
#to_hash ⇒ Hash
(also: #to_h)
Convert to hash.
Constructor Details
#initialize(data = {}) ⇒ Action
Initialize a new Action
51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/thecompaniesapi/generated/models/action.rb', line 51 def initialize(data = {}) @attempts = data['attempts'] @cost = data['cost'] @created_at = data['createdAt'] @data = data['data'] @id = data['id'] @list_id = data['listId'] @prompt_id = data['promptId'] @result = data['result'] @status = data['status'] @team_id = data['teamId'] @type = data['type'] @updated_at = data['updatedAt'] end |
Instance Attribute Details
#attempts ⇒ Float
Returns attempts.
12 13 14 |
# File 'lib/thecompaniesapi/generated/models/action.rb', line 12 def attempts @attempts end |
#cost ⇒ Object
Returns cost.
15 16 17 |
# File 'lib/thecompaniesapi/generated/models/action.rb', line 15 def cost @cost end |
#created_at ⇒ Object
Returns createdAt.
18 19 20 |
# File 'lib/thecompaniesapi/generated/models/action.rb', line 18 def created_at @created_at end |
#data ⇒ Hash
Returns data.
21 22 23 |
# File 'lib/thecompaniesapi/generated/models/action.rb', line 21 def data @data end |
#id ⇒ Float
Returns id.
24 25 26 |
# File 'lib/thecompaniesapi/generated/models/action.rb', line 24 def id @id end |
#list_id ⇒ Float
Returns listId.
27 28 29 |
# File 'lib/thecompaniesapi/generated/models/action.rb', line 27 def list_id @list_id end |
#prompt_id ⇒ Float
Returns promptId.
30 31 32 |
# File 'lib/thecompaniesapi/generated/models/action.rb', line 30 def prompt_id @prompt_id end |
#result ⇒ Hash
Returns result.
33 34 35 |
# File 'lib/thecompaniesapi/generated/models/action.rb', line 33 def result @result end |
#status ⇒ String
Returns status.
36 37 38 |
# File 'lib/thecompaniesapi/generated/models/action.rb', line 36 def status @status end |
#team_id ⇒ Float
Returns teamId.
39 40 41 |
# File 'lib/thecompaniesapi/generated/models/action.rb', line 39 def team_id @team_id end |
#type ⇒ String
Returns type.
42 43 44 |
# File 'lib/thecompaniesapi/generated/models/action.rb', line 42 def type @type end |
#updated_at ⇒ Object
Returns updatedAt.
45 46 47 |
# File 'lib/thecompaniesapi/generated/models/action.rb', line 45 def updated_at @updated_at end |
Instance Method Details
#to_hash ⇒ Hash Also known as: to_h
Convert to hash
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/thecompaniesapi/generated/models/action.rb', line 70 def to_hash { 'attempts' => @attempts, 'cost' => @cost, 'createdAt' => @created_at, 'data' => @data, 'id' => @id, 'listId' => @list_id, 'promptId' => @prompt_id, 'result' => @result, 'status' => @status, 'teamId' => @team_id, 'type' => @type, 'updatedAt' => @updated_at, } end |