Module: Justifi::JustifiOperations

Extended by:
APIOperations::ClassMethods
Included in:
JustifiObject
Defined in:
lib/justifi/justifi_operations.rb

Class Method Summary collapse

Methods included from APIOperations::ClassMethods

execute_get_request, execute_patch_request, execute_post_request, http_connection, idempotently_request

Class Method Details

.execute_get_request(path, params, headers) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/justifi/justifi_operations.rb', line 16

def execute_get_request(path, params, headers)
  query = Util.encode_parameters(params)
  headers[:authorization] = "Bearer #{Justifi::OAuth.get_token}"
  headers = Util.normalize_headers(headers)

  super(path, query, headers)
end

.execute_patch_request(path, params, headers) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/justifi/justifi_operations.rb', line 24

def execute_patch_request(path, params, headers)
  params = Util.normalize_params(params)
  headers[:authorization] = "Bearer #{Justifi::OAuth.get_token}"

  headers = Util.normalize_headers(headers)
  super(path, params, headers)
end

.execute_post_request(path, params, headers) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/justifi/justifi_operations.rb', line 8

def execute_post_request(path, params, headers)
  params = Util.normalize_params(params)
  headers[:authorization] = "Bearer #{Justifi::OAuth.get_token}"

  headers = Util.normalize_headers(headers)
  super(path, params, headers)
end

.list(path, params = {}, headers = {}) ⇒ Object



32
33
34
# File 'lib/justifi/justifi_operations.rb', line 32

def list(path, params = {}, headers = {})
  Justifi::ListObject.list(path, params, headers)
end