Class: WhopSDK::Resources::Companies
- Inherits:
-
Object
- Object
- WhopSDK::Resources::Companies
- Defined in:
- lib/whop_sdk/resources/companies.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Companies
constructor
private
A new instance of Companies.
-
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::Company
Retrieves an company by ID or its url route.
Constructor Details
#initialize(client:) ⇒ Companies
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Companies.
32 33 34 |
# File 'lib/whop_sdk/resources/companies.rb', line 32 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::Company
Retrieves an company by ID or its url route
Required permissions:
-
‘company:basic:read`
20 21 22 23 24 25 26 27 |
# File 'lib/whop_sdk/resources/companies.rb', line 20 def retrieve(id, params = {}) @client.request( method: :get, path: ["companies/%1$s", id], model: WhopSDK::Company, options: params[:request_options] ) end |