Class: Infobeep::BaseRequestModel

Inherits:
Model
  • Object
show all
Defined in:
lib/infobeep/requests/base_request_model.rb

Instance Method Summary collapse

Methods inherited from Model

#hash_attributes

Instance Method Details

#headersObject



14
15
16
17
18
19
20
# File 'lib/infobeep/requests/base_request_model.rb', line 14

def headers
  if http_method == :get
    {params: hash_attributes}
  else
    {}
  end
end

#payloadObject



6
7
8
9
10
11
12
# File 'lib/infobeep/requests/base_request_model.rb', line 6

def payload
  if http_method == :get
    nil
  else
    hash_attributes.to_json
  end
end