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

#CreatedBy ⇒ String (readonly)

Returns:

  • (String)


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

def CreatedBy
  @CreatedBy
end

#CreatorID ⇒ Integer (readonly)

Returns:

  • (Integer)


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

def CreatorID
  @CreatorID
end

#CRMLinkId ⇒ String (readonly)

Returns:

  • (String)


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

def CRMLinkId
  @CRMLinkId
end

#DefaultSupportGroup ⇒ String (readonly)

Returns:

  • (String)


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

def DefaultSupportGroup
  @DefaultSupportGroup
end

#DefaultSupportGroupID ⇒ Integer (readonly)

Returns:

  • (Integer)


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

def DefaultSupportGroupID
  @DefaultSupportGroupID
end

#DefaultSupportUser ⇒ String (readonly)

Returns:

  • (String)


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

def DefaultSupportUser
  @DefaultSupportUser
end

#DefaultSupportUserID ⇒ Integer (readonly)

Returns:

  • (Integer)


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

def DefaultSupportUserID
  @DefaultSupportUserID
end

#DefaultWikiArticle ⇒ String (readonly)

Returns:

  • (String)


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

def DefaultWikiArticle
  @DefaultWikiArticle
end

#Description ⇒ String (readonly)

Returns:

  • (String)


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

def Description
  @Description
end

#Domains ⇒ String (readonly)

Returns:

  • (String)


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

def Domains
  @Domains
end

#ID ⇒ Integer (readonly)

Returns:

  • (Integer)


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

def ID
  @ID
end

#InActiveReason ⇒ String (readonly)

Returns:

  • (String)


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

def InActiveReason
  @InActiveReason
end

#LastModifiedBy ⇒ String (readonly)

Returns:

  • (String)


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

def LastModifiedBy
  @LastModifiedBy
end

#ModifierID ⇒ Integer (readonly)

Returns:

  • (Integer)


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

def ModifierID
  @ModifierID
end

#Name ⇒ String (readonly)

Returns:

  • (String)


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

def Name
  @Name
end

#PrimaryContact ⇒ String (readonly)

Returns:

  • (String)


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

def PrimaryContact
  @PrimaryContact
end

#PrimaryUserID ⇒ Integer (readonly)

Returns:

  • (Integer)


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

def PrimaryUserID
  @PrimaryUserID
end

#SlaLevelID ⇒ Integer (readonly)

Returns:

  • (Integer)


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

def SlaLevelID
  @SlaLevelID
end

#SlaName ⇒ String (readonly)

Returns:

  • (String)


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

def SlaName
  @SlaName
end

#SupportHoursMonth ⇒ Integer (readonly)

Returns:

  • (Integer)


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

def SupportHoursMonth
  @SupportHoursMonth
end

#SupportHoursRemaining ⇒ Integer (readonly)

Returns:

  • (Integer)


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

def SupportHoursRemaining
  @SupportHoursRemaining
end

#SupportHoursUsed ⇒ Integer (readonly)

Returns:

  • (Integer)


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

def SupportHoursUsed
  @SupportHoursUsed
end

#Website ⇒ String (readonly)

Returns:

  • (String)


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

def Website
  @Website
end

Instance Method Details

#HasPortalAccess ⇒ Boolean

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

#IsActive ⇒ Boolean

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

#NeedsIndexing ⇒ Boolean

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

#SAExpirationDate ⇒ Time

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