Class: Velocify::Status

Inherits:
Object
  • Object
show all
Includes:
Model
Defined in:
lib/velocify/status.rb

Class Method Summary collapse

Methods included from Model

included

Class Method Details

.find_all(destruct: false, return_array: false) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/velocify/status.rb', line 5

def self.find_all destruct: false, return_array: false
  verify_credentials!

  request do
    destruct_response? destruct
    operation :get_statuses
    authenticate? true
    transform do |resp|
      if return_array
        arrayify resp[:statuses][:status]
      else
        resp
      end
    end
  end
end