Class: UntitledApi::ApiV1IncomingJiraRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/untitled_api/models/api_v1_incoming_jira_request.rb

Overview

Request parameters

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

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(timestamp = SKIP,
               webhook_event = SKIP,
               issue_event_type_name = SKIP,
               user = SKIP,
               issue = SKIP,
               changelog = SKIP)
  @timestamp = timestamp unless timestamp == 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

#changelogObject

TODO: Write general description for this method

Returns:

  • (Object)


34
35
36
# File 'lib/untitled_api/models/api_v1_incoming_jira_request.rb', line 34

def changelog
  @changelog
end

#issueObject

TODO: Write general description for this method

Returns:

  • (Object)


30
31
32
# File 'lib/untitled_api/models/api_v1_incoming_jira_request.rb', line 30

def issue
  @issue
end

#issue_event_type_nameString

TODO: Write general description for this method

Returns:

  • (String)


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

#timestampFloat

TODO: Write general description for this method

Returns:

  • (Float)


14
15
16
# File 'lib/untitled_api/models/api_v1_incoming_jira_request.rb', line 14

def timestamp
  @timestamp
end

#userObject

TODO: Write general description for this method

Returns:

  • (Object)


26
27
28
# File 'lib/untitled_api/models/api_v1_incoming_jira_request.rb', line 26

def user
  @user
end

#webhook_eventString

TODO: Write general description for this method

Returns:

  • (String)


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.
  timestamp = 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(timestamp,
                               webhook_event,
                               issue_event_type_name,
                               user,
                               issue,
                               changelog)
end

.namesObject

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

.nullablesObject

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

.optionalsObject

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