Class: KaveRestApi::ResponseCountPostalCode

Inherits:
Object
  • Object
show all
Defined in:
lib/kavenegar-ruby/responds/countpostalcode.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



3
4
5
# File 'lib/kavenegar-ruby/responds/countpostalcode.rb', line 3

def response
  @response
end

#sectionObject

Returns the value of attribute section.



4
5
6
# File 'lib/kavenegar-ruby/responds/countpostalcode.rb', line 4

def section
  @section
end

#statusObject (readonly)

Returns the value of attribute status.



3
4
5
# File 'lib/kavenegar-ruby/responds/countpostalcode.rb', line 3

def status
  @status
end

#statusmessageObject (readonly)

Returns the value of attribute statusmessage.



3
4
5
# File 'lib/kavenegar-ruby/responds/countpostalcode.rb', line 3

def statusmessage
  @statusmessage
end

#valueObject

Returns the value of attribute value.



4
5
6
# File 'lib/kavenegar-ruby/responds/countpostalcode.rb', line 4

def value
  @value
end

Instance Method Details

#entriesObject



16
17
18
# File 'lib/kavenegar-ruby/responds/countpostalcode.rb', line 16

def entries
    return @response['entries']
end

#full_message_errorsObject



20
21
22
# File 'lib/kavenegar-ruby/responds/countpostalcode.rb', line 20

def full_message_errors
  return KaveRestApi::ERRORS[@response['return']['status'].to_s]
end

#valid?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/kavenegar-ruby/responds/countpostalcode.rb', line 12

def valid?
  @valid
end

#validate(response = nil) ⇒ Object



6
7
8
9
10
# File 'lib/kavenegar-ruby/responds/countpostalcode.rb', line 6

def validate(response = nil)
  @response = response
  perform_validation
  return self
end