Class: NextErpBridge::Core::Client

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/next_erp_bridge/core/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeClient

Returns a new instance of Client.



11
12
13
14
15
16
17
18
# File 'lib/next_erp_bridge/core/client.rb', line 11

def initialize
  @credentials = Credentials
  @frappe_client = FrappeClient.new(
                    credentials.host,
                    credentials.username,
                    credentials.password
                  )
end

Instance Attribute Details

#credentialsObject

Returns the value of attribute credentials.



8
9
10
# File 'lib/next_erp_bridge/core/client.rb', line 8

def credentials
  @credentials
end

#frappe_clientObject

Returns the value of attribute frappe_client.



8
9
10
# File 'lib/next_erp_bridge/core/client.rb', line 8

def frappe_client
  @frappe_client
end

Instance Method Details

#loginObject



20
21
22
# File 'lib/next_erp_bridge/core/client.rb', line 20

def 
  @frappe_client.(credentials.username, credentials.password)
end