Class: Verso::Credential

Inherits:
Base
  • Object
show all
Includes:
HTTPGettable
Defined in:
lib/verso/credential.rb

Overview

Credential Resource

The usual way to get a Credential would be to use CredentialList or to get one from a related object, such as a Course object.

Note:

Any attributes may be set upon instantiation, using Options Hash. The following are required:

Options Hash (attrs):

  • :id (Fixnum)

    Credential id Required

See Also:

Instance Attribute Summary collapse

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

attr_reader, #initialize

Constructor Details

This class inherits a constructor from Verso::Base

Instance Attribute Details

#admin_notesString (readonly)

Returns HTML-formatted test administration notes.

Returns:

  • (String)

    HTML-formatted test administration notes



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/verso/credential.rb', line 54

class Credential < Verso::Base
  include HTTPGettable
  attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal,
    :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score,
    :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type,
    :verified_credit
  alias amt_seal? amt_seal
  alias cte_seal? cte_seal
  alias has_ancestor? has_ancestor
  alias retired? retired
  alias verified_credit? verified_credit

  # VDOE contacts, each responding to #name, #email, and #phone, all Strings.
  #
  # @return [Array] VDOE contacts
  def contacts
    @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) }
  end

  # @return [String] Contractor name
  def contractor_name
    get_attr(:contractor_name).to_s
  end

  # @return [String] Details
  def details
    get_attr(:details).to_s # #to_s b/c API sometimes returns nil
  end

  # Source. Responds to #title, #url, and #contact_info. All are Strings or
  # nil. The last is HTML-formatted.
  #
  # @return [OpenStruct] Source
  def source
    # force update if we only have part of source
    attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url)
    OpenStruct.new(get_attr(:source))
  end

  # @return [Array] Collection of related {Verso::Course} objects
  def related_courses
    @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) }
  end

private

  def path
    "/credentials/#{id}"
  end

  def fetch
    super[:credential]
  end
end

#amt_sealBooelean (readonly) Also known as: amt_seal?

Returns Advanced Math and Technology seal.

Returns:

  • (Booelean)

    Advanced Math and Technology seal



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/verso/credential.rb', line 54

class Credential < Verso::Base
  include HTTPGettable
  attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal,
    :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score,
    :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type,
    :verified_credit
  alias amt_seal? amt_seal
  alias cte_seal? cte_seal
  alias has_ancestor? has_ancestor
  alias retired? retired
  alias verified_credit? verified_credit

  # VDOE contacts, each responding to #name, #email, and #phone, all Strings.
  #
  # @return [Array] VDOE contacts
  def contacts
    @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) }
  end

  # @return [String] Contractor name
  def contractor_name
    get_attr(:contractor_name).to_s
  end

  # @return [String] Details
  def details
    get_attr(:details).to_s # #to_s b/c API sometimes returns nil
  end

  # Source. Responds to #title, #url, and #contact_info. All are Strings or
  # nil. The last is HTML-formatted.
  #
  # @return [OpenStruct] Source
  def source
    # force update if we only have part of source
    attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url)
    OpenStruct.new(get_attr(:source))
  end

  # @return [Array] Collection of related {Verso::Course} objects
  def related_courses
    @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) }
  end

private

  def path
    "/credentials/#{id}"
  end

  def fetch
    super[:credential]
  end
end

#contact_infoString (readonly)

Returns Contractor contact information.

Returns:

  • (String)

    Contractor contact information



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/verso/credential.rb', line 54

class Credential < Verso::Base
  include HTTPGettable
  attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal,
    :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score,
    :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type,
    :verified_credit
  alias amt_seal? amt_seal
  alias cte_seal? cte_seal
  alias has_ancestor? has_ancestor
  alias retired? retired
  alias verified_credit? verified_credit

  # VDOE contacts, each responding to #name, #email, and #phone, all Strings.
  #
  # @return [Array] VDOE contacts
  def contacts
    @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) }
  end

  # @return [String] Contractor name
  def contractor_name
    get_attr(:contractor_name).to_s
  end

  # @return [String] Details
  def details
    get_attr(:details).to_s # #to_s b/c API sometimes returns nil
  end

  # Source. Responds to #title, #url, and #contact_info. All are Strings or
  # nil. The last is HTML-formatted.
  #
  # @return [OpenStruct] Source
  def source
    # force update if we only have part of source
    attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url)
    OpenStruct.new(get_attr(:source))
  end

  # @return [Array] Collection of related {Verso::Course} objects
  def related_courses
    @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) }
  end

private

  def path
    "/credentials/#{id}"
  end

  def fetch
    super[:credential]
  end
end

#costString (readonly)

Returns Cost.

Returns:

  • (String)

    Cost



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/verso/credential.rb', line 54

class Credential < Verso::Base
  include HTTPGettable
  attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal,
    :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score,
    :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type,
    :verified_credit
  alias amt_seal? amt_seal
  alias cte_seal? cte_seal
  alias has_ancestor? has_ancestor
  alias retired? retired
  alias verified_credit? verified_credit

  # VDOE contacts, each responding to #name, #email, and #phone, all Strings.
  #
  # @return [Array] VDOE contacts
  def contacts
    @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) }
  end

  # @return [String] Contractor name
  def contractor_name
    get_attr(:contractor_name).to_s
  end

  # @return [String] Details
  def details
    get_attr(:details).to_s # #to_s b/c API sometimes returns nil
  end

  # Source. Responds to #title, #url, and #contact_info. All are Strings or
  # nil. The last is HTML-formatted.
  #
  # @return [OpenStruct] Source
  def source
    # force update if we only have part of source
    attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url)
    OpenStruct.new(get_attr(:source))
  end

  # @return [Array] Collection of related {Verso::Course} objects
  def related_courses
    @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) }
  end

private

  def path
    "/credentials/#{id}"
  end

  def fetch
    super[:credential]
  end
end

#cte_sealBoolean (readonly) Also known as: cte_seal?

Returns CTE seal.

Returns:

  • (Boolean)

    CTE seal



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/verso/credential.rb', line 54

class Credential < Verso::Base
  include HTTPGettable
  attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal,
    :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score,
    :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type,
    :verified_credit
  alias amt_seal? amt_seal
  alias cte_seal? cte_seal
  alias has_ancestor? has_ancestor
  alias retired? retired
  alias verified_credit? verified_credit

  # VDOE contacts, each responding to #name, #email, and #phone, all Strings.
  #
  # @return [Array] VDOE contacts
  def contacts
    @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) }
  end

  # @return [String] Contractor name
  def contractor_name
    get_attr(:contractor_name).to_s
  end

  # @return [String] Details
  def details
    get_attr(:details).to_s # #to_s b/c API sometimes returns nil
  end

  # Source. Responds to #title, #url, and #contact_info. All are Strings or
  # nil. The last is HTML-formatted.
  #
  # @return [OpenStruct] Source
  def source
    # force update if we only have part of source
    attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url)
    OpenStruct.new(get_attr(:source))
  end

  # @return [Array] Collection of related {Verso::Course} objects
  def related_courses
    @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) }
  end

private

  def path
    "/credentials/#{id}"
  end

  def fetch
    super[:credential]
  end
end

#descriptionString (readonly)

Returns HTML-formatted text describing the credential.

Returns:

  • (String)

    HTML-formatted text describing the credential.



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/verso/credential.rb', line 54

class Credential < Verso::Base
  include HTTPGettable
  attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal,
    :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score,
    :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type,
    :verified_credit
  alias amt_seal? amt_seal
  alias cte_seal? cte_seal
  alias has_ancestor? has_ancestor
  alias retired? retired
  alias verified_credit? verified_credit

  # VDOE contacts, each responding to #name, #email, and #phone, all Strings.
  #
  # @return [Array] VDOE contacts
  def contacts
    @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) }
  end

  # @return [String] Contractor name
  def contractor_name
    get_attr(:contractor_name).to_s
  end

  # @return [String] Details
  def details
    get_attr(:details).to_s # #to_s b/c API sometimes returns nil
  end

  # Source. Responds to #title, #url, and #contact_info. All are Strings or
  # nil. The last is HTML-formatted.
  #
  # @return [OpenStruct] Source
  def source
    # force update if we only have part of source
    attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url)
    OpenStruct.new(get_attr(:source))
  end

  # @return [Array] Collection of related {Verso::Course} objects
  def related_courses
    @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) }
  end

private

  def path
    "/credentials/#{id}"
  end

  def fetch
    super[:credential]
  end
end

#has_ancestorBoolean (readonly) Also known as: has_ancestor?

Returns Did this credential exist in an earlier edition?.

Returns:

  • (Boolean)

    Did this credential exist in an earlier edition?



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/verso/credential.rb', line 54

class Credential < Verso::Base
  include HTTPGettable
  attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal,
    :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score,
    :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type,
    :verified_credit
  alias amt_seal? amt_seal
  alias cte_seal? cte_seal
  alias has_ancestor? has_ancestor
  alias retired? retired
  alias verified_credit? verified_credit

  # VDOE contacts, each responding to #name, #email, and #phone, all Strings.
  #
  # @return [Array] VDOE contacts
  def contacts
    @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) }
  end

  # @return [String] Contractor name
  def contractor_name
    get_attr(:contractor_name).to_s
  end

  # @return [String] Details
  def details
    get_attr(:details).to_s # #to_s b/c API sometimes returns nil
  end

  # Source. Responds to #title, #url, and #contact_info. All are Strings or
  # nil. The last is HTML-formatted.
  #
  # @return [OpenStruct] Source
  def source
    # force update if we only have part of source
    attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url)
    OpenStruct.new(get_attr(:source))
  end

  # @return [Array] Collection of related {Verso::Course} objects
  def related_courses
    @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) }
  end

private

  def path
    "/credentials/#{id}"
  end

  def fetch
    super[:credential]
  end
end

#how_to_earn_itString (readonly)

Returns HTML-formatted text about how to earn it.

Returns:

  • (String)

    HTML-formatted text about how to earn it.



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/verso/credential.rb', line 54

class Credential < Verso::Base
  include HTTPGettable
  attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal,
    :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score,
    :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type,
    :verified_credit
  alias amt_seal? amt_seal
  alias cte_seal? cte_seal
  alias has_ancestor? has_ancestor
  alias retired? retired
  alias verified_credit? verified_credit

  # VDOE contacts, each responding to #name, #email, and #phone, all Strings.
  #
  # @return [Array] VDOE contacts
  def contacts
    @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) }
  end

  # @return [String] Contractor name
  def contractor_name
    get_attr(:contractor_name).to_s
  end

  # @return [String] Details
  def details
    get_attr(:details).to_s # #to_s b/c API sometimes returns nil
  end

  # Source. Responds to #title, #url, and #contact_info. All are Strings or
  # nil. The last is HTML-formatted.
  #
  # @return [OpenStruct] Source
  def source
    # force update if we only have part of source
    attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url)
    OpenStruct.new(get_attr(:source))
  end

  # @return [Array] Collection of related {Verso::Course} objects
  def related_courses
    @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) }
  end

private

  def path
    "/credentials/#{id}"
  end

  def fetch
    super[:credential]
  end
end

#idFixnum (readonly)

Returns Credential id.

Returns:

  • (Fixnum)

    Credential id



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/verso/credential.rb', line 54

class Credential < Verso::Base
  include HTTPGettable
  attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal,
    :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score,
    :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type,
    :verified_credit
  alias amt_seal? amt_seal
  alias cte_seal? cte_seal
  alias has_ancestor? has_ancestor
  alias retired? retired
  alias verified_credit? verified_credit

  # VDOE contacts, each responding to #name, #email, and #phone, all Strings.
  #
  # @return [Array] VDOE contacts
  def contacts
    @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) }
  end

  # @return [String] Contractor name
  def contractor_name
    get_attr(:contractor_name).to_s
  end

  # @return [String] Details
  def details
    get_attr(:details).to_s # #to_s b/c API sometimes returns nil
  end

  # Source. Responds to #title, #url, and #contact_info. All are Strings or
  # nil. The last is HTML-formatted.
  #
  # @return [OpenStruct] Source
  def source
    # force update if we only have part of source
    attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url)
    OpenStruct.new(get_attr(:source))
  end

  # @return [Array] Collection of related {Verso::Course} objects
  def related_courses
    @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) }
  end

private

  def path
    "/credentials/#{id}"
  end

  def fetch
    super[:credential]
  end
end

#itemsString (readonly)

Returns Number of test items.

Returns:

  • (String)

    Number of test items



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/verso/credential.rb', line 54

class Credential < Verso::Base
  include HTTPGettable
  attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal,
    :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score,
    :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type,
    :verified_credit
  alias amt_seal? amt_seal
  alias cte_seal? cte_seal
  alias has_ancestor? has_ancestor
  alias retired? retired
  alias verified_credit? verified_credit

  # VDOE contacts, each responding to #name, #email, and #phone, all Strings.
  #
  # @return [Array] VDOE contacts
  def contacts
    @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) }
  end

  # @return [String] Contractor name
  def contractor_name
    get_attr(:contractor_name).to_s
  end

  # @return [String] Details
  def details
    get_attr(:details).to_s # #to_s b/c API sometimes returns nil
  end

  # Source. Responds to #title, #url, and #contact_info. All are Strings or
  # nil. The last is HTML-formatted.
  #
  # @return [OpenStruct] Source
  def source
    # force update if we only have part of source
    attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url)
    OpenStruct.new(get_attr(:source))
  end

  # @return [Array] Collection of related {Verso::Course} objects
  def related_courses
    @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) }
  end

private

  def path
    "/credentials/#{id}"
  end

  def fetch
    super[:credential]
  end
end

#passing_scoreSring (readonly)

Returns Passing score.

Returns:

  • (Sring)

    Passing score



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/verso/credential.rb', line 54

class Credential < Verso::Base
  include HTTPGettable
  attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal,
    :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score,
    :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type,
    :verified_credit
  alias amt_seal? amt_seal
  alias cte_seal? cte_seal
  alias has_ancestor? has_ancestor
  alias retired? retired
  alias verified_credit? verified_credit

  # VDOE contacts, each responding to #name, #email, and #phone, all Strings.
  #
  # @return [Array] VDOE contacts
  def contacts
    @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) }
  end

  # @return [String] Contractor name
  def contractor_name
    get_attr(:contractor_name).to_s
  end

  # @return [String] Details
  def details
    get_attr(:details).to_s # #to_s b/c API sometimes returns nil
  end

  # Source. Responds to #title, #url, and #contact_info. All are Strings or
  # nil. The last is HTML-formatted.
  #
  # @return [OpenStruct] Source
  def source
    # force update if we only have part of source
    attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url)
    OpenStruct.new(get_attr(:source))
  end

  # @return [Array] Collection of related {Verso::Course} objects
  def related_courses
    @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) }
  end

private

  def path
    "/credentials/#{id}"
  end

  def fetch
    super[:credential]
  end
end

#pretestBoolean? (readonly)

Returns Is a pre-test, study guide, or blueprint available?.

Returns:

  • (Boolean, nil)

    Is a pre-test, study guide, or blueprint available?



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/verso/credential.rb', line 54

class Credential < Verso::Base
  include HTTPGettable
  attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal,
    :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score,
    :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type,
    :verified_credit
  alias amt_seal? amt_seal
  alias cte_seal? cte_seal
  alias has_ancestor? has_ancestor
  alias retired? retired
  alias verified_credit? verified_credit

  # VDOE contacts, each responding to #name, #email, and #phone, all Strings.
  #
  # @return [Array] VDOE contacts
  def contacts
    @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) }
  end

  # @return [String] Contractor name
  def contractor_name
    get_attr(:contractor_name).to_s
  end

  # @return [String] Details
  def details
    get_attr(:details).to_s # #to_s b/c API sometimes returns nil
  end

  # Source. Responds to #title, #url, and #contact_info. All are Strings or
  # nil. The last is HTML-formatted.
  #
  # @return [OpenStruct] Source
  def source
    # force update if we only have part of source
    attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url)
    OpenStruct.new(get_attr(:source))
  end

  # @return [Array] Collection of related {Verso::Course} objects
  def related_courses
    @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) }
  end

private

  def path
    "/credentials/#{id}"
  end

  def fetch
    super[:credential]
  end
end

#proctorString (readonly)

Returns Test examiner/proctor.

Returns:

  • (String)

    Test examiner/proctor



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/verso/credential.rb', line 54

class Credential < Verso::Base
  include HTTPGettable
  attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal,
    :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score,
    :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type,
    :verified_credit
  alias amt_seal? amt_seal
  alias cte_seal? cte_seal
  alias has_ancestor? has_ancestor
  alias retired? retired
  alias verified_credit? verified_credit

  # VDOE contacts, each responding to #name, #email, and #phone, all Strings.
  #
  # @return [Array] VDOE contacts
  def contacts
    @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) }
  end

  # @return [String] Contractor name
  def contractor_name
    get_attr(:contractor_name).to_s
  end

  # @return [String] Details
  def details
    get_attr(:details).to_s # #to_s b/c API sometimes returns nil
  end

  # Source. Responds to #title, #url, and #contact_info. All are Strings or
  # nil. The last is HTML-formatted.
  #
  # @return [OpenStruct] Source
  def source
    # force update if we only have part of source
    attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url)
    OpenStruct.new(get_attr(:source))
  end

  # @return [Array] Collection of related {Verso::Course} objects
  def related_courses
    @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) }
  end

private

  def path
    "/credentials/#{id}"
  end

  def fetch
    super[:credential]
  end
end

#program_areaString (readonly)

Returns Title of associated program area.

Returns:

  • (String)

    Title of associated program area



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/verso/credential.rb', line 54

class Credential < Verso::Base
  include HTTPGettable
  attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal,
    :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score,
    :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type,
    :verified_credit
  alias amt_seal? amt_seal
  alias cte_seal? cte_seal
  alias has_ancestor? has_ancestor
  alias retired? retired
  alias verified_credit? verified_credit

  # VDOE contacts, each responding to #name, #email, and #phone, all Strings.
  #
  # @return [Array] VDOE contacts
  def contacts
    @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) }
  end

  # @return [String] Contractor name
  def contractor_name
    get_attr(:contractor_name).to_s
  end

  # @return [String] Details
  def details
    get_attr(:details).to_s # #to_s b/c API sometimes returns nil
  end

  # Source. Responds to #title, #url, and #contact_info. All are Strings or
  # nil. The last is HTML-formatted.
  #
  # @return [OpenStruct] Source
  def source
    # force update if we only have part of source
    attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url)
    OpenStruct.new(get_attr(:source))
  end

  # @return [Array] Collection of related {Verso::Course} objects
  def related_courses
    @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) }
  end

private

  def path
    "/credentials/#{id}"
  end

  def fetch
    super[:credential]
  end
end

#retiredBoolean (readonly) Also known as: retired?

Returns Is this credential slated for deletion?.

Returns:

  • (Boolean)

    Is this credential slated for deletion?



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/verso/credential.rb', line 54

class Credential < Verso::Base
  include HTTPGettable
  attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal,
    :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score,
    :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type,
    :verified_credit
  alias amt_seal? amt_seal
  alias cte_seal? cte_seal
  alias has_ancestor? has_ancestor
  alias retired? retired
  alias verified_credit? verified_credit

  # VDOE contacts, each responding to #name, #email, and #phone, all Strings.
  #
  # @return [Array] VDOE contacts
  def contacts
    @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) }
  end

  # @return [String] Contractor name
  def contractor_name
    get_attr(:contractor_name).to_s
  end

  # @return [String] Details
  def details
    get_attr(:details).to_s # #to_s b/c API sometimes returns nil
  end

  # Source. Responds to #title, #url, and #contact_info. All are Strings or
  # nil. The last is HTML-formatted.
  #
  # @return [OpenStruct] Source
  def source
    # force update if we only have part of source
    attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url)
    OpenStruct.new(get_attr(:source))
  end

  # @return [Array] Collection of related {Verso::Course} objects
  def related_courses
    @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) }
  end

private

  def path
    "/credentials/#{id}"
  end

  def fetch
    super[:credential]
  end
end

#siteString (readonly)

Returns Allowed testing site.

Returns:

  • (String)

    Allowed testing site



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/verso/credential.rb', line 54

class Credential < Verso::Base
  include HTTPGettable
  attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal,
    :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score,
    :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type,
    :verified_credit
  alias amt_seal? amt_seal
  alias cte_seal? cte_seal
  alias has_ancestor? has_ancestor
  alias retired? retired
  alias verified_credit? verified_credit

  # VDOE contacts, each responding to #name, #email, and #phone, all Strings.
  #
  # @return [Array] VDOE contacts
  def contacts
    @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) }
  end

  # @return [String] Contractor name
  def contractor_name
    get_attr(:contractor_name).to_s
  end

  # @return [String] Details
  def details
    get_attr(:details).to_s # #to_s b/c API sometimes returns nil
  end

  # Source. Responds to #title, #url, and #contact_info. All are Strings or
  # nil. The last is HTML-formatted.
  #
  # @return [OpenStruct] Source
  def source
    # force update if we only have part of source
    attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url)
    OpenStruct.new(get_attr(:source))
  end

  # @return [Array] Collection of related {Verso::Course} objects
  def related_courses
    @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) }
  end

private

  def path
    "/credentials/#{id}"
  end

  def fetch
    super[:credential]
  end
end

#timeString (readonly)

Returns Time allowed.

Returns:

  • (String)

    Time allowed



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/verso/credential.rb', line 54

class Credential < Verso::Base
  include HTTPGettable
  attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal,
    :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score,
    :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type,
    :verified_credit
  alias amt_seal? amt_seal
  alias cte_seal? cte_seal
  alias has_ancestor? has_ancestor
  alias retired? retired
  alias verified_credit? verified_credit

  # VDOE contacts, each responding to #name, #email, and #phone, all Strings.
  #
  # @return [Array] VDOE contacts
  def contacts
    @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) }
  end

  # @return [String] Contractor name
  def contractor_name
    get_attr(:contractor_name).to_s
  end

  # @return [String] Details
  def details
    get_attr(:details).to_s # #to_s b/c API sometimes returns nil
  end

  # Source. Responds to #title, #url, and #contact_info. All are Strings or
  # nil. The last is HTML-formatted.
  #
  # @return [OpenStruct] Source
  def source
    # force update if we only have part of source
    attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url)
    OpenStruct.new(get_attr(:source))
  end

  # @return [Array] Collection of related {Verso::Course} objects
  def related_courses
    @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) }
  end

private

  def path
    "/credentials/#{id}"
  end

  def fetch
    super[:credential]
  end
end

#titleString (readonly)

Returns Credential title.

Returns:

  • (String)

    Credential title



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/verso/credential.rb', line 54

class Credential < Verso::Base
  include HTTPGettable
  attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal,
    :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score,
    :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type,
    :verified_credit
  alias amt_seal? amt_seal
  alias cte_seal? cte_seal
  alias has_ancestor? has_ancestor
  alias retired? retired
  alias verified_credit? verified_credit

  # VDOE contacts, each responding to #name, #email, and #phone, all Strings.
  #
  # @return [Array] VDOE contacts
  def contacts
    @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) }
  end

  # @return [String] Contractor name
  def contractor_name
    get_attr(:contractor_name).to_s
  end

  # @return [String] Details
  def details
    get_attr(:details).to_s # #to_s b/c API sometimes returns nil
  end

  # Source. Responds to #title, #url, and #contact_info. All are Strings or
  # nil. The last is HTML-formatted.
  #
  # @return [OpenStruct] Source
  def source
    # force update if we only have part of source
    attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url)
    OpenStruct.new(get_attr(:source))
  end

  # @return [Array] Collection of related {Verso::Course} objects
  def related_courses
    @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) }
  end

private

  def path
    "/credentials/#{id}"
  end

  def fetch
    super[:credential]
  end
end

#type'Certification', 'License' (readonly)

Returns Credential type.

Returns:

  • ('Certification', 'License')

    Credential type



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/verso/credential.rb', line 54

class Credential < Verso::Base
  include HTTPGettable
  attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal,
    :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score,
    :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type,
    :verified_credit
  alias amt_seal? amt_seal
  alias cte_seal? cte_seal
  alias has_ancestor? has_ancestor
  alias retired? retired
  alias verified_credit? verified_credit

  # VDOE contacts, each responding to #name, #email, and #phone, all Strings.
  #
  # @return [Array] VDOE contacts
  def contacts
    @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) }
  end

  # @return [String] Contractor name
  def contractor_name
    get_attr(:contractor_name).to_s
  end

  # @return [String] Details
  def details
    get_attr(:details).to_s # #to_s b/c API sometimes returns nil
  end

  # Source. Responds to #title, #url, and #contact_info. All are Strings or
  # nil. The last is HTML-formatted.
  #
  # @return [OpenStruct] Source
  def source
    # force update if we only have part of source
    attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url)
    OpenStruct.new(get_attr(:source))
  end

  # @return [Array] Collection of related {Verso::Course} objects
  def related_courses
    @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) }
  end

private

  def path
    "/credentials/#{id}"
  end

  def fetch
    super[:credential]
  end
end

#verified_creditBoolean (readonly) Also known as: verified_credit?

Returns Verified credit.

Returns:

  • (Boolean)

    Verified credit



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/verso/credential.rb', line 54

class Credential < Verso::Base
  include HTTPGettable
  attr_reader :admin_notes, :amt_seal, :contact_info, :cost, :cte_seal,
    :description, :has_ancestor, :how_to_earn_it, :id, :items, :passing_score,
    :pretest, :proctor, :program_area, :retired, :site, :time, :title, :type,
    :verified_credit
  alias amt_seal? amt_seal
  alias cte_seal? cte_seal
  alias has_ancestor? has_ancestor
  alias retired? retired
  alias verified_credit? verified_credit

  # VDOE contacts, each responding to #name, #email, and #phone, all Strings.
  #
  # @return [Array] VDOE contacts
  def contacts
    @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) }
  end

  # @return [String] Contractor name
  def contractor_name
    get_attr(:contractor_name).to_s
  end

  # @return [String] Details
  def details
    get_attr(:details).to_s # #to_s b/c API sometimes returns nil
  end

  # Source. Responds to #title, #url, and #contact_info. All are Strings or
  # nil. The last is HTML-formatted.
  #
  # @return [OpenStruct] Source
  def source
    # force update if we only have part of source
    attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url)
    OpenStruct.new(get_attr(:source))
  end

  # @return [Array] Collection of related {Verso::Course} objects
  def related_courses
    @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) }
  end

private

  def path
    "/credentials/#{id}"
  end

  def fetch
    super[:credential]
  end
end

Instance Method Details

#contactsArray

VDOE contacts, each responding to #name, #email, and #phone, all Strings.

Returns:

  • (Array)

    VDOE contacts



69
70
71
# File 'lib/verso/credential.rb', line 69

def contacts
  @contacts ||= get_attr(:contacts).collect { |c| OpenStruct.new(c) }
end

#contractor_nameString

Returns Contractor name.

Returns:

  • (String)

    Contractor name



74
75
76
# File 'lib/verso/credential.rb', line 74

def contractor_name
  get_attr(:contractor_name).to_s
end

#detailsString

Returns Details.

Returns:

  • (String)

    Details



79
80
81
# File 'lib/verso/credential.rb', line 79

def details
  get_attr(:details).to_s # #to_s b/c API sometimes returns nil
end

Returns Collection of related Verso::Course objects.

Returns:



94
95
96
# File 'lib/verso/credential.rb', line 94

def related_courses
  @courses ||= get_attr(:related_courses).collect { |rc| Course.new(rc) }
end

#sourceOpenStruct

Source. Responds to #title, #url, and #contact_info. All are Strings or nil. The last is HTML-formatted.

Returns:

  • (OpenStruct)

    Source



87
88
89
90
91
# File 'lib/verso/credential.rb', line 87

def source
  # force update if we only have part of source
  attrs.merge!(fetch) unless attrs[:source] && attrs[:source].has_key?(:url)
  OpenStruct.new(get_attr(:source))
end