Class: ExistsResponse

Inherits:
Struct
  • Object
show all
Defined in:
lib/dto/posting/exists_response.rb

Overview

NOT USED

Class ExistsResponse represents server response on exists Posting API request. Server response is sent to from_hash method which creates object with attribute success accessible via getter:

response = ExistsResponse.from_hash("success" => "true")
response.success       # => true

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Struct

from_array, from_hash

Constructor Details

#initialize(hash = {}) ⇒ ExistsResponse

Returns a new instance of ExistsResponse.



11
12
13
14
15
# File 'lib/dto/posting/exists_response.rb', line 11

def initialize(hash = {})
  hash.each do |key, value|
    self.send("#{key}=".to_sym, value )
  end
end

Instance Attribute Details

#existsObject

Returns the value of attribute exists

Returns:

  • (Object)

    the current value of exists



10
11
12
# File 'lib/dto/posting/exists_response.rb', line 10

def exists
  @exists
end

#failuresObject

Returns the value of attribute failures

Returns:

  • (Object)

    the current value of failures



10
11
12
# File 'lib/dto/posting/exists_response.rb', line 10

def failures
  @failures
end

#indexedObject

Returns the value of attribute indexed

Returns:

  • (Object)

    the current value of indexed



10
11
12
# File 'lib/dto/posting/exists_response.rb', line 10

def indexed
  @indexed
end

#postKeyObject

Returns the value of attribute postKey

Returns:

  • (Object)

    the current value of postKey



10
11
12
# File 'lib/dto/posting/exists_response.rb', line 10

def postKey
  @postKey
end