Class: WhopSDK::Resources::SupportChannels
- Inherits:
-
Object
- Object
- WhopSDK::Resources::SupportChannels
- Defined in:
- lib/whop_sdk/resources/support_channels.rb
Overview
Support channels
Instance Method Summary collapse
-
#create(company_id:, user_id:, custom_name: nil, request_options: {}) ⇒ WhopSDK::Models::SupportChannel
Some parameter documentations has been truncated, see Models::SupportChannelCreateParams for more details.
-
#initialize(client:) ⇒ SupportChannels
constructor
private
A new instance of SupportChannels.
-
#list(company_id:, after: nil, before: nil, direction: nil, first: nil, last: nil, open_: nil, order: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::SupportChannelListResponse>
Some parameter documentations has been truncated, see Models::SupportChannelListParams for more details.
-
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::SupportChannel
Retrieves the details of an existing support channel.
Constructor Details
#initialize(client:) ⇒ SupportChannels
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 SupportChannels.
114 115 116 |
# File 'lib/whop_sdk/resources/support_channels.rb', line 114 def initialize(client:) @client = client end |
Instance Method Details
#create(company_id:, user_id:, custom_name: nil, request_options: {}) ⇒ WhopSDK::Models::SupportChannel
Some parameter documentations has been truncated, see Models::SupportChannelCreateParams for more details.
Open a new support channel between a company team member and a customer. Returns the existing channel if one already exists for that user.
Required permissions:
-
‘support_chat:create`
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/whop_sdk/resources/support_channels.rb', line 30 def create(params) parsed, = WhopSDK::SupportChannelCreateParams.dump_request(params) @client.request( method: :post, path: "support_channels", body: parsed, model: WhopSDK::SupportChannel, options: ) end |
#list(company_id:, after: nil, before: nil, direction: nil, first: nil, last: nil, open_: nil, order: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::SupportChannelListResponse>
Some parameter documentations has been truncated, see Models::SupportChannelListParams for more details.
Returns a paginated list of support channels for a specific company, with optional filtering by resolution status and custom sorting.
Required permissions:
-
‘support_chat:read`
98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/whop_sdk/resources/support_channels.rb', line 98 def list(params) parsed, = WhopSDK::SupportChannelListParams.dump_request(params) query = WhopSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "support_channels", query: query.transform_keys(open_: "open"), page: WhopSDK::Internal::CursorPage, model: WhopSDK::Models::SupportChannelListResponse, options: ) end |
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::SupportChannel
Retrieves the details of an existing support channel.
Required permissions:
-
‘support_chat:read`
56 57 58 59 60 61 62 63 |
# File 'lib/whop_sdk/resources/support_channels.rb', line 56 def retrieve(id, params = {}) @client.request( method: :get, path: ["support_channels/%1$s", id], model: WhopSDK::SupportChannel, options: params[:request_options] ) end |