Class: Teamsupport::Customer

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

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

#CreatedByString (readonly)

Returns:

  • (String)


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

def CreatedBy
  @CreatedBy
end

#CreatorIDInteger (readonly)

Returns:

  • (Integer)


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

def CreatorID
  @CreatorID
end

#CRMLinkIdString (readonly)

Returns:

  • (String)


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

def CRMLinkId
  @CRMLinkId
end

#DefaultSupportGroupString (readonly)

Returns:

  • (String)


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

def DefaultSupportGroup
  @DefaultSupportGroup
end

#DefaultSupportGroupIDInteger (readonly)

Returns:

  • (Integer)


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

def DefaultSupportGroupID
  @DefaultSupportGroupID
end

#DefaultSupportUserString (readonly)

Returns:

  • (String)


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

def DefaultSupportUser
  @DefaultSupportUser
end

#DefaultSupportUserIDInteger (readonly)

Returns:

  • (Integer)


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

def DefaultSupportUserID
  @DefaultSupportUserID
end

#DefaultWikiArticleString (readonly)

Returns:

  • (String)


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

def DefaultWikiArticle
  @DefaultWikiArticle
end

#DescriptionString (readonly)

Returns:

  • (String)


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

def Description
  @Description
end

#DomainsString (readonly)

Returns:

  • (String)


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

def Domains
  @Domains
end

#IDInteger (readonly)

Returns:

  • (Integer)


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

def ID
  @ID
end

#InActiveReasonString (readonly)

Returns:

  • (String)


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

def InActiveReason
  @InActiveReason
end

#LastModifiedByString (readonly)

Returns:

  • (String)


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

def LastModifiedBy
  @LastModifiedBy
end

#ModifierIDInteger (readonly)

Returns:

  • (Integer)


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

def ModifierID
  @ModifierID
end

#NameString (readonly)

Returns:

  • (String)


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

def Name
  @Name
end

#PrimaryContactString (readonly)

Returns:

  • (String)


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

def PrimaryContact
  @PrimaryContact
end

#PrimaryUserIDInteger (readonly)

Returns:

  • (Integer)


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

def PrimaryUserID
  @PrimaryUserID
end

#SlaLevelIDInteger (readonly)

Returns:

  • (Integer)


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

def SlaLevelID
  @SlaLevelID
end

#SlaNameString (readonly)

Returns:

  • (String)


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

def SlaName
  @SlaName
end

#SupportHoursMonthInteger (readonly)

Returns:

  • (Integer)


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

def SupportHoursMonth
  @SupportHoursMonth
end

#SupportHoursRemainingInteger (readonly)

Returns:

  • (Integer)


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

def SupportHoursRemaining
  @SupportHoursRemaining
end

#SupportHoursUsedInteger (readonly)

Returns:

  • (Integer)


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

def SupportHoursUsed
  @SupportHoursUsed
end

#WebsiteString (readonly)

Returns:

  • (String)


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

def Website
  @Website
end

Instance Method Details

#HasPortalAccessBoolean

Boolean indicating whether a Customer has portal access on Teamsupport

Examples:

teamsupport_customer = Teamsupport::Customer.new(HasPortalAccess: true)
teamsupport_customer.HasPortalAccess

Returns:

  • (Boolean)


36
37
38
# File 'lib/teamsupport/customer.rb', line 36

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

#IsActiveBoolean

Boolean indicating whether a Customer is active on Teamsupport

Examples:

teamsupport_customer = Teamsupport::Customer.new(IsActive: true)
teamsupport_customer.IsActive

Returns:

  • (Boolean)


23
24
25
# File 'lib/teamsupport/customer.rb', line 23

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

#NeedsIndexingBoolean

Boolean indicating whether a Customer needs indexing on Teamsupport

Examples:

teamsupport_customer = Teamsupport::Customer.new(NeedsIndexing: true)
teamsupport_customer.NeedsIndexing

Returns:

  • (Boolean)


49
50
51
# File 'lib/teamsupport/customer.rb', line 49

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

#SAExpirationDateTime

Time when the Customer's Service Agreement expires on Teamsupport

Examples:

teamsupport_customer = Teamsupport::Customer.new(SAExpirationDate: '4/4/2015 10:15 AM')
teamsupport_customer.SAExpirationDate

Returns:

  • (Time)


62
63
64
# File 'lib/teamsupport/customer.rb', line 62

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