class Beaver::CurrentIssue

CurrentIssue Model.

Attributes

additional_documents_required[RW]

TODO: Write general description for this method @return [List of String]

application_block[RW]

TODO: Write general description for this method @return [ApplicationBlock]

errant_fields[RW]

TODO: Write general description for this method @return [Hash]

in_review[RW]

TODO: Write general description for this method @return [List of String]

issue_type[RW]

TODO: Write general description for this method @return [IssueTypeEnum]

target[RW]

TODO: Write general description for this method @return [Target]

Public Class Methods

from_hash(hash) click to toggle source

Creates an instance of the object from a hash.

# File lib/beaver/models/current_issue.rb, line 61
def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  issue_type = hash['issue_type']
  target = Target.from_hash(hash['target']) if hash['target']
  additional_documents_required = hash['additional_documents_required']
  errant_fields = hash['errant_fields']
  in_review = hash['in_review']
  if hash['application_block']
    application_block = ApplicationBlock.from_hash(hash['application_block'])
  end

  # Create object from extracted values.
  CurrentIssue.new(issue_type,
                   target,
                   additional_documents_required,
                   errant_fields,
                   in_review,
                   application_block)
end
names() click to toggle source

A mapping from model property names to API property names.

# File lib/beaver/models/current_issue.rb, line 34
def self.names
  @_hash = {} if @_hash.nil?
  @_hash['additional_documents_required'] =
    'additional_documents_required'
  @_hash['errant_fields'] = 'errant_fields'
  @_hash['in_review'] = 'in_review'
  @_hash['application_block'] = 'application_block'
  @_hash['issue_type'] = 'issue_type'
  @_hash['target'] = 'target'
  @_hash
end
new(issue_type = nil, target = nil, additional_documents_required = nil, errant_fields = nil, in_review = nil, application_block = nil) click to toggle source
# File lib/beaver/models/current_issue.rb, line 46
def initialize(issue_type = nil,
               target = nil,
               additional_documents_required = nil,
               errant_fields = nil,
               in_review = nil,
               application_block = nil)
  @additional_documents_required = additional_documents_required
  @errant_fields = errant_fields
  @in_review = in_review
  @application_block = application_block
  @issue_type = issue_type
  @target = target
end