Class: NextErpBridge::Core::Client
- Inherits:
-
Object
- Object
- NextErpBridge::Core::Client
- Includes:
- Singleton
- Defined in:
- lib/next_erp_bridge/core/client.rb
Instance Attribute Summary collapse
-
#credentials ⇒ Object
Returns the value of attribute credentials.
-
#frappe_client ⇒ Object
Returns the value of attribute frappe_client.
Instance Method Summary collapse
-
#initialize ⇒ Client
constructor
A new instance of Client.
- #login ⇒ Object
Constructor Details
#initialize ⇒ Client
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
#credentials ⇒ Object
Returns the value of attribute credentials.
8 9 10 |
# File 'lib/next_erp_bridge/core/client.rb', line 8 def credentials @credentials end |
#frappe_client ⇒ Object
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
#login ⇒ Object
20 21 22 |
# File 'lib/next_erp_bridge/core/client.rb', line 20 def login @frappe_client.login(credentials.username, credentials.password) end |