Class: Suretax::Connection
- Inherits:
-
Object
- Object
- Suretax::Connection
- Defined in:
- lib/suretax/connection.rb
Instance Attribute Summary collapse
-
#headers ⇒ Object
Returns the value of attribute headers.
Instance Method Summary collapse
- #cancel(body = {}) ⇒ Object
-
#initialize(args = {}) ⇒ Connection
constructor
A new instance of Connection.
- #post(body = {}) ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ Connection
Returns a new instance of Connection.
8 9 10 11 |
# File 'lib/suretax/connection.rb', line 8 def initialize(args = {}) @link = Excon.new(args[:base_url] || api_host) @headers = { "Content-Type" => "application/x-www-form-urlencoded" } end |
Instance Attribute Details
#headers ⇒ Object
Returns the value of attribute headers.
6 7 8 |
# File 'lib/suretax/connection.rb', line 6 def headers @headers end |