Class: ACube::Endpoint::ItApiBase

Inherits:
Object
  • Object
show all
Defined in:
lib/acube/endpoint/it_api_base.rb

Direct Known Subclasses

Invoices

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeItApiBase

Returns a new instance of ItApiBase.



8
9
10
11
12
13
14
15
16
17
# File 'lib/acube/endpoint/it_api_base.rb', line 8

def initialize
  @connection = Faraday.new(
    url: ACube.invoice_endpoint,
    headers: {
      'Content-Type' => 'application/xml',
      'Authorization' => 'Bearer ' + ACube::Endpoint::Auth.new.token!,
      'X-SendAsync' => 'true'
    }
  )
end

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



6
7
8
# File 'lib/acube/endpoint/it_api_base.rb', line 6

def connection
  @connection
end