Class: Teamsupport::Ticket

Inherits:
Identity show all
Includes:
Creatable
Defined in:
lib/teamsupport/ticket.rb

Direct Known Subclasses

TicketAction

Instance Attribute Summary collapse

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods included from Creatable

#DateCreated, #DateModified

Methods inherited from Identity

#initialize

Methods inherited from Base

#[], attr_reader, define_attribute_method, define_predicate_method, #initialize, object_attr_reader, predicate_attr_reader

Methods included from Utils

flat_pmap, pmap

Constructor Details

This class inherits a constructor from Teamsupport::Identity

Instance Attribute Details

#CloserIDInteger (readonly)

Returns:

  • (Integer)


10
11
12
# File 'lib/teamsupport/ticket.rb', line 10

def CloserID
  @CloserID
end

#CloserNameString (readonly)

Returns:

  • (String)


14
15
16
# File 'lib/teamsupport/ticket.rb', line 14

def CloserName
  @CloserName
end

#CreatorIDInteger (readonly)

Returns:

  • (Integer)


10
11
12
# File 'lib/teamsupport/ticket.rb', line 10

def CreatorID
  @CreatorID
end

#CreatorNameString (readonly)

Returns:

  • (String)


14
15
16
# File 'lib/teamsupport/ticket.rb', line 14

def CreatorName
  @CreatorName
end

#DaysClosedInteger (readonly)

Returns:

  • (Integer)


10
11
12
# File 'lib/teamsupport/ticket.rb', line 10

def DaysClosed
  @DaysClosed
end

#DaysOpenedInteger (readonly)

Returns:

  • (Integer)


10
11
12
# File 'lib/teamsupport/ticket.rb', line 10

def DaysOpened
  @DaysOpened
end

#GroupIDInteger (readonly)

Returns:

  • (Integer)


10
11
12
# File 'lib/teamsupport/ticket.rb', line 10

def GroupID
  @GroupID
end

#GroupNameString (readonly)

Returns:

  • (String)


14
15
16
# File 'lib/teamsupport/ticket.rb', line 14

def GroupName
  @GroupName
end

#HoursSpentFloat (readonly)

Returns:

  • (Float)


12
13
14
# File 'lib/teamsupport/ticket.rb', line 12

def HoursSpent
  @HoursSpent
end

#IDInteger (readonly)

Returns:

  • (Integer)


10
11
12
# File 'lib/teamsupport/ticket.rb', line 10

def ID
  @ID
end

#KnowledgeBaseCategoryIDInteger (readonly)

Returns:

  • (Integer)


10
11
12
# File 'lib/teamsupport/ticket.rb', line 10

def KnowledgeBaseCategoryID
  @KnowledgeBaseCategoryID
end

#KnowledgeBaseCategoryNameString (readonly)

Returns:

  • (String)


14
15
16
# File 'lib/teamsupport/ticket.rb', line 14

def KnowledgeBaseCategoryName
  @KnowledgeBaseCategoryName
end

#ModifierIDInteger (readonly)

Returns:

  • (Integer)


10
11
12
# File 'lib/teamsupport/ticket.rb', line 10

def ModifierID
  @ModifierID
end

#ModifierNameString (readonly)

Returns:

  • (String)


14
15
16
# File 'lib/teamsupport/ticket.rb', line 14

def ModifierName
  @ModifierName
end

#NameString (readonly)

Returns:

  • (String)


14
15
16
# File 'lib/teamsupport/ticket.rb', line 14

def Name
  @Name
end

#OrganizationIDInteger (readonly)

Returns:

  • (Integer)


10
11
12
# File 'lib/teamsupport/ticket.rb', line 10

def OrganizationID
  @OrganizationID
end

#ParentIDInteger (readonly)

Returns:

  • (Integer)


10
11
12
# File 'lib/teamsupport/ticket.rb', line 10

def ParentID
  @ParentID
end

#ProductIDInteger (readonly)

Returns:

  • (Integer)


10
11
12
# File 'lib/teamsupport/ticket.rb', line 10

def ProductID
  @ProductID
end

#ProductNameString (readonly)

Returns:

  • (String)


14
15
16
# File 'lib/teamsupport/ticket.rb', line 14

def ProductName
  @ProductName
end

#ReportedVersionString (readonly)

Returns:

  • (String)


14
15
16
# File 'lib/teamsupport/ticket.rb', line 14

def ReportedVersion
  @ReportedVersion
end

#ReportedVersionIDInteger (readonly)

Returns:

  • (Integer)


10
11
12
# File 'lib/teamsupport/ticket.rb', line 10

def ReportedVersionID
  @ReportedVersionID
end

#SeverityString (readonly)

Returns:

  • (String)


14
15
16
# File 'lib/teamsupport/ticket.rb', line 14

def Severity
  @Severity
end

#SeverityPositionInteger (readonly)

Returns:

  • (Integer)


10
11
12
# File 'lib/teamsupport/ticket.rb', line 10

def SeverityPosition
  @SeverityPosition
end

#SlaViolationHoursFloat (readonly)

Returns:

  • (Float)


12
13
14
# File 'lib/teamsupport/ticket.rb', line 12

def SlaViolationHours
  @SlaViolationHours
end

#SlaViolationTimeFloat (readonly)

Returns:

  • (Float)


12
13
14
# File 'lib/teamsupport/ticket.rb', line 12

def SlaViolationTime
  @SlaViolationTime
end

#SlaWarningHoursFloat (readonly)

Returns:

  • (Float)


12
13
14
# File 'lib/teamsupport/ticket.rb', line 12

def SlaWarningHours
  @SlaWarningHours
end

#SlaWarningTimeFloat (readonly)

Returns:

  • (Float)


12
13
14
# File 'lib/teamsupport/ticket.rb', line 12

def SlaWarningTime
  @SlaWarningTime
end

#SolvedVersionString (readonly)

Returns:

  • (String)


14
15
16
# File 'lib/teamsupport/ticket.rb', line 14

def SolvedVersion
  @SolvedVersion
end

#SolvedVersionIDInteger (readonly)

Returns:

  • (Integer)


10
11
12
# File 'lib/teamsupport/ticket.rb', line 10

def SolvedVersionID
  @SolvedVersionID
end

#StatusString (readonly)

Returns:

  • (String)


14
15
16
# File 'lib/teamsupport/ticket.rb', line 14

def Status
  @Status
end

#StatusPositionInteger (readonly)

Returns:

  • (Integer)


10
11
12
# File 'lib/teamsupport/ticket.rb', line 10

def StatusPosition
  @StatusPosition
end

#TicketNumberInteger (readonly)

Returns:

  • (Integer)


10
11
12
# File 'lib/teamsupport/ticket.rb', line 10

def TicketNumber
  @TicketNumber
end

#TicketSeverityIDInteger (readonly)

Returns:

  • (Integer)


10
11
12
# File 'lib/teamsupport/ticket.rb', line 10

def TicketSeverityID
  @TicketSeverityID
end

#TicketSourceString (readonly)

Returns:

  • (String)


14
15
16
# File 'lib/teamsupport/ticket.rb', line 14

def TicketSource
  @TicketSource
end

#TicketStatusIDInteger (readonly)

Returns:

  • (Integer)


10
11
12
# File 'lib/teamsupport/ticket.rb', line 10

def TicketStatusID
  @TicketStatusID
end

#TicketTypeIDInteger (readonly)

Returns:

  • (Integer)


10
11
12
# File 'lib/teamsupport/ticket.rb', line 10

def TicketTypeID
  @TicketTypeID
end

#TicketTypeNameString (readonly)

Returns:

  • (String)


14
15
16
# File 'lib/teamsupport/ticket.rb', line 14

def TicketTypeName
  @TicketTypeName
end

#UserIDInteger (readonly)

Returns:

  • (Integer)


10
11
12
# File 'lib/teamsupport/ticket.rb', line 10

def UserID
  @UserID
end

#UserNameString (readonly)

Returns:

  • (String)


14
15
16
# File 'lib/teamsupport/ticket.rb', line 14

def UserName
  @UserName
end

Instance Method Details

#DateClosedTime

Time when the Ticket was closed on Teamsupport

Examples:

teamsupport_ticket = Teamsupport::Ticket.new(DateClosed: '4/4/2015 10:00 AM')
teamsupport_ticket.DateClosed

Returns:

  • (Time)


64
65
66
# File 'lib/teamsupport/ticket.rb', line 64

def DateClosed # rubocop:disable Style/MethodName
  Time.strptime(@attrs[:DateClosed], '%m/%d/%Y %l:%M %p').utc unless @attrs[:DateClosed].nil?
end

#DueDateTime

Time when the Ticket is due to be completed on Teamsupport

Examples:

teamsupport_ticket = Teamsupport::Ticket.new(DueDate: '4/4/2015 10:15 AM')
teamsupport_ticket.DueDate

Returns:

  • (Time)


77
78
79
# File 'lib/teamsupport/ticket.rb', line 77

def DueDate # rubocop:disable Style/MethodName
  Time.strptime(@attrs[:DueDate], '%m/%d/%Y %l:%M %p').utc unless @attrs[:DueDate].nil?
end

#IsClosedBoolean

Boolean indicating whether a Ticket is closed on Teamsupport

Examples:

teamsupport_ticket = Teamsupport::Ticket.new(IsClosed: true)
teamsupport_ticket.IsClosed

Returns:

  • (Boolean)


25
26
27
# File 'lib/teamsupport/ticket.rb', line 25

def IsClosed # rubocop:disable Style/MethodName
  @attrs[:IsClosed] == 'True' ? true : false
end

#IsKnowledgeBaseBoolean

Boolean indicating whether a Ticket is shown in the knowledgebase on Teamsupport

Examples:

teamsupport_ticket = Teamsupport::Ticket.new(IsKnowledgeBase: true)
teamsupport_ticket.IsKnowledgeBase

Returns:

  • (Boolean)


51
52
53
# File 'lib/teamsupport/ticket.rb', line 51

def IsKnowledgeBase # rubocop:disable Style/MethodName
  @attrs[:IsKnowledgeBase] == 'True' ? true : false
end

#IsVisibleOnPortalBoolean

Boolean indicating whether a Ticket is visible via the portal on Teamsupport

Examples:

teamsupport_ticket = Teamsupport::Ticket.new(IsVisibleOnPortal: true)
teamsupport_ticket.IsVisibleOnPortal

Returns:

  • (Boolean)


38
39
40
# File 'lib/teamsupport/ticket.rb', line 38

def IsVisibleOnPortal # rubocop:disable Style/MethodName
  @attrs[:IsVisibleOnPortal] == 'True' ? true : false
end