Class: EposNowClient::Client
- Inherits:
-
Object
- Object
- EposNowClient::Client
- Defined in:
- lib/epos_now_client/client.rb
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
Instance Method Summary collapse
- #brands ⇒ Object
- #categories ⇒ Object
- #customers ⇒ Object
- #devices ⇒ Object
-
#initialize(api_key: nil, api_secret: nil, base_url: nil) ⇒ Client
constructor
A new instance of Client.
- #locations ⇒ Object
- #products ⇒ Object
- #staff ⇒ Object
- #tax_groups ⇒ Object
- #tender_types ⇒ Object
- #transactions ⇒ Object
Constructor Details
#initialize(api_key: nil, api_secret: nil, base_url: nil) ⇒ Client
Returns a new instance of Client.
7 8 9 10 |
# File 'lib/epos_now_client/client.rb', line 7 def initialize(api_key: nil, api_secret: nil, base_url: nil, **) @configuration = build_configuration(api_key, api_secret, base_url, **) @connection = Connection.new(@configuration) end |
Instance Attribute Details
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
5 6 7 |
# File 'lib/epos_now_client/client.rb', line 5 def configuration @configuration end |
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
5 6 7 |
# File 'lib/epos_now_client/client.rb', line 5 def connection @connection end |
Instance Method Details
#brands ⇒ Object
44 45 46 |
# File 'lib/epos_now_client/client.rb', line 44 def brands @brands ||= Resources::Brands.new(connection) end |
#categories ⇒ Object
12 13 14 |
# File 'lib/epos_now_client/client.rb', line 12 def categories @categories ||= Resources::Categories.new(connection) end |
#customers ⇒ Object
32 33 34 |
# File 'lib/epos_now_client/client.rb', line 32 def customers @customers ||= Resources::Customers.new(connection) end |
#devices ⇒ Object
40 41 42 |
# File 'lib/epos_now_client/client.rb', line 40 def devices @devices ||= Resources::Devices.new(connection) end |
#locations ⇒ Object
48 49 50 |
# File 'lib/epos_now_client/client.rb', line 48 def locations @locations ||= Resources::Locations.new(connection) end |
#products ⇒ Object
16 17 18 |
# File 'lib/epos_now_client/client.rb', line 16 def products @products ||= Resources::Products.new(connection) end |
#staff ⇒ Object
36 37 38 |
# File 'lib/epos_now_client/client.rb', line 36 def staff @staff ||= Resources::Staff.new(connection) end |
#tax_groups ⇒ Object
28 29 30 |
# File 'lib/epos_now_client/client.rb', line 28 def tax_groups @tax_groups ||= Resources::TaxGroups.new(connection) end |
#tender_types ⇒ Object
24 25 26 |
# File 'lib/epos_now_client/client.rb', line 24 def tender_types @tender_types ||= Resources::TenderTypes.new(connection) end |
#transactions ⇒ Object
20 21 22 |
# File 'lib/epos_now_client/client.rb', line 20 def transactions @transactions ||= Resources::Transactions.new(connection) end |