Class: UntitledApi::ApiV1IncomingJiraRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- UntitledApi::ApiV1IncomingJiraRequest
- Defined in:
- lib/untitled_api/models/api_v1_incoming_jira_request.rb
Overview
Request parameters
Instance Attribute Summary collapse
-
#changelog ⇒ Object
TODO: Write general description for this method.
-
#issue ⇒ Object
TODO: Write general description for this method.
-
#issue_event_type_name ⇒ String
TODO: Write general description for this method.
-
#timestamp ⇒ Float
TODO: Write general description for this method.
-
#user ⇒ Object
TODO: Write general description for this method.
-
#webhook_event ⇒ String
TODO: Write general description for this method.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(timestamp = SKIP, webhook_event = SKIP, issue_event_type_name = SKIP, user = SKIP, issue = SKIP, changelog = SKIP) ⇒ ApiV1IncomingJiraRequest
constructor
A new instance of ApiV1IncomingJiraRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(timestamp = SKIP, webhook_event = SKIP, issue_event_type_name = SKIP, user = SKIP, issue = SKIP, changelog = SKIP) ⇒ ApiV1IncomingJiraRequest
Returns a new instance of ApiV1IncomingJiraRequest.
65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/untitled_api/models/api_v1_incoming_jira_request.rb', line 65 def initialize( = SKIP, webhook_event = SKIP, issue_event_type_name = SKIP, user = SKIP, issue = SKIP, changelog = SKIP) @timestamp = unless == SKIP @webhook_event = webhook_event unless webhook_event == SKIP @issue_event_type_name = issue_event_type_name unless issue_event_type_name == SKIP @user = user unless user == SKIP @issue = issue unless issue == SKIP @changelog = changelog unless changelog == SKIP end |
Instance Attribute Details
#changelog ⇒ Object
TODO: Write general description for this method
34 35 36 |
# File 'lib/untitled_api/models/api_v1_incoming_jira_request.rb', line 34 def changelog @changelog end |
#issue ⇒ Object
TODO: Write general description for this method
30 31 32 |
# File 'lib/untitled_api/models/api_v1_incoming_jira_request.rb', line 30 def issue @issue end |
#issue_event_type_name ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/untitled_api/models/api_v1_incoming_jira_request.rb', line 22 def issue_event_type_name @issue_event_type_name end |
#timestamp ⇒ Float
TODO: Write general description for this method
14 15 16 |
# File 'lib/untitled_api/models/api_v1_incoming_jira_request.rb', line 14 def @timestamp end |
#user ⇒ Object
TODO: Write general description for this method
26 27 28 |
# File 'lib/untitled_api/models/api_v1_incoming_jira_request.rb', line 26 def user @user end |
#webhook_event ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/untitled_api/models/api_v1_incoming_jira_request.rb', line 18 def webhook_event @webhook_event end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/untitled_api/models/api_v1_incoming_jira_request.rb', line 80 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. = hash.key?('timestamp') ? hash['timestamp'] : SKIP webhook_event = hash.key?('webhookEvent') ? hash['webhookEvent'] : SKIP issue_event_type_name = hash.key?('issue_event_type_name') ? hash['issue_event_type_name'] : SKIP user = hash.key?('user') ? hash['user'] : SKIP issue = hash.key?('issue') ? hash['issue'] : SKIP changelog = hash.key?('changelog') ? hash['changelog'] : SKIP # Create object from extracted values. ApiV1IncomingJiraRequest.new(, webhook_event, issue_event_type_name, user, issue, changelog) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/untitled_api/models/api_v1_incoming_jira_request.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['timestamp'] = 'timestamp' @_hash['webhook_event'] = 'webhookEvent' @_hash['issue_event_type_name'] = 'issue_event_type_name' @_hash['user'] = 'user' @_hash['issue'] = 'issue' @_hash['changelog'] = 'changelog' @_hash end |
.nullables ⇒ Object
An array for nullable fields
61 62 63 |
# File 'lib/untitled_api/models/api_v1_incoming_jira_request.rb', line 61 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/untitled_api/models/api_v1_incoming_jira_request.rb', line 49 def self.optionals %w[ timestamp webhook_event issue_event_type_name user issue changelog ] end |