Class: Velocify::Model::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/velocify/model.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRequest

Returns a new instance of Request.



49
50
51
52
# File 'lib/velocify/model.rb', line 49

def initialize
  @destruct_response = false
  @requires_auth = false
end

Instance Attribute Details

#destruct_response=(value) ⇒ Object (writeonly)

Sets the attribute destruct_response

Parameters:

  • value

    the value to set the attribute destruct_response to.



45
46
47
# File 'lib/velocify/model.rb', line 45

def destruct_response=(value)
  @destruct_response = value
end

#operationObject

Returns the value of attribute operation.



47
48
49
# File 'lib/velocify/model.rb', line 47

def operation
  @operation
end

#payloadObject



62
63
64
# File 'lib/velocify/model.rb', line 62

def payload
  @payload.render
end

#requires_auth=(value) ⇒ Object (writeonly)

Sets the attribute requires_auth

Parameters:

  • value

    the value to set the attribute requires_auth to.



45
46
47
# File 'lib/velocify/model.rb', line 45

def requires_auth=(value)
  @requires_auth = value
end

#transformObject

Returns the value of attribute transform.



46
47
48
# File 'lib/velocify/model.rb', line 46

def transform
  @transform
end

Instance Method Details

#authenticate(username:, password:) ⇒ Object



54
55
56
# File 'lib/velocify/model.rb', line 54

def authenticate username:, password:
  @payload.authenticate username: username, password: password
end

#destruct_response?Boolean

Returns:

  • (Boolean)


66
# File 'lib/velocify/model.rb', line 66

def destruct_response? ; @destruct_response ; end

#requires_auth?Boolean

Returns:

  • (Boolean)


67
# File 'lib/velocify/model.rb', line 67

def requires_auth?     ; @requires_auth     ; end