Class: KcSdkCompany::Api
- Inherits:
-
Object
- Object
- KcSdkCompany::Api
- Defined in:
- lib/kc-sdk-company/api.rb,
lib/kc-sdk-company/api/base.rb,
lib/kc-sdk-company/api/orders.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#orders ⇒ Object
Returns the value of attribute orders.
Instance Method Summary collapse
-
#initialize ⇒ Api
constructor
A new instance of Api.
- #resource ⇒ Object
Constructor Details
#initialize ⇒ Api
Returns a new instance of Api.
8 9 10 |
# File 'lib/kc-sdk-company/api.rb', line 8 def initialize self.orders = KcSdkCompany::Api::Orders.new(self) end |
Instance Attribute Details
#orders ⇒ Object
Returns the value of attribute orders.
6 7 8 |
# File 'lib/kc-sdk-company/api.rb', line 6 def orders @orders end |
Instance Method Details
#resource ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/kc-sdk-company/api.rb', line 12 def resource @resource ||= RestClient::Resource.new( "#{KcSdkCompany.configuration.api_url}/api/company", log: KcSdkCompany.configuration.logger, headers: { 'Authorization': "Bearer #{KcSdkCompany.configuration.access_token}" } ) end |