Class: Formable::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/formable/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key:, base_url: nil, timeout: 60, connection: nil) ⇒ Client

Returns a new instance of Client.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/formable/client.rb', line 7

def initialize(api_key:, base_url: nil, timeout: 60, connection: nil)
  @http = Http.new(
    api_key: api_key,
    base_url: base_url,
    timeout: timeout,
    connection: connection
  )
  @templates = Templates.new(@http)
  @signature_requests = SignatureRequests.new(@http)
  @redline_requests = RedlineRequests.new(@http)
end

Instance Attribute Details

#redline_requestsObject (readonly)

Returns the value of attribute redline_requests.



5
6
7
# File 'lib/formable/client.rb', line 5

def redline_requests
  @redline_requests
end

#signature_requestsObject (readonly)

Returns the value of attribute signature_requests.



5
6
7
# File 'lib/formable/client.rb', line 5

def signature_requests
  @signature_requests
end

#templatesObject (readonly)

Returns the value of attribute templates.



5
6
7
# File 'lib/formable/client.rb', line 5

def templates
  @templates
end

Instance Method Details

#billingObject



19
20
21
# File 'lib/formable/client.rb', line 19

def billing
  @http.get("/billing")
end

#closeObject



27
28
29
# File 'lib/formable/client.rb', line 27

def close
  @http.close
end

#healthObject



23
24
25
# File 'lib/formable/client.rb', line 23

def health
  @http.get("/health")
end