Class: Formable::Client
- Inherits:
-
Object
- Object
- Formable::Client
- Defined in:
- lib/formable/client.rb
Instance Attribute Summary collapse
-
#redline_requests ⇒ Object
readonly
Returns the value of attribute redline_requests.
-
#signature_requests ⇒ Object
readonly
Returns the value of attribute signature_requests.
-
#templates ⇒ Object
readonly
Returns the value of attribute templates.
Instance Method Summary collapse
- #billing ⇒ Object
- #close ⇒ Object
- #health ⇒ Object
-
#initialize(api_key:, base_url: nil, timeout: 60, connection: nil) ⇒ Client
constructor
A new instance of Client.
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_requests ⇒ Object (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_requests ⇒ Object (readonly)
Returns the value of attribute signature_requests.
5 6 7 |
# File 'lib/formable/client.rb', line 5 def signature_requests @signature_requests end |
#templates ⇒ Object (readonly)
Returns the value of attribute templates.
5 6 7 |
# File 'lib/formable/client.rb', line 5 def templates @templates end |
Instance Method Details
#billing ⇒ Object
19 20 21 |
# File 'lib/formable/client.rb', line 19 def billing @http.get("/billing") end |
#close ⇒ Object
27 28 29 |
# File 'lib/formable/client.rb', line 27 def close @http.close end |
#health ⇒ Object
23 24 25 |
# File 'lib/formable/client.rb', line 23 def health @http.get("/health") end |