Class: WhopSDK::Resources::Entries
- Inherits:
-
Object
- Object
- WhopSDK::Resources::Entries
- Defined in:
- lib/whop_sdk/resources/entries.rb
Overview
Entries
Instance Method Summary collapse
-
#approve(id, request_options: {}) ⇒ WhopSDK::Models::EntryApproveResponse
Approve a pending waitlist entry, triggering the checkout process to grant the user access to the plan.
-
#deny(id, request_options: {}) ⇒ WhopSDK::Models::Entry
Deny a pending waitlist entry, preventing the user from gaining access to the plan.
-
#initialize(client:) ⇒ Entries
constructor
private
A new instance of Entries.
-
#list(company_id:, after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, order: nil, plan_ids: nil, product_ids: nil, statuses: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::EntryListResponse>
Returns a paginated list of waitlist entries for a company, with optional filtering by product, plan, status, and creation date.
-
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::Entry
Retrieves the details of an existing waitlist entry.
Constructor Details
#initialize(client:) ⇒ Entries
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 Entries.
139 140 141 |
# File 'lib/whop_sdk/resources/entries.rb', line 139 def initialize(client:) @client = client end |
Instance Method Details
#approve(id, request_options: {}) ⇒ WhopSDK::Models::EntryApproveResponse
Approve a pending waitlist entry, triggering the checkout process to grant the user access to the plan.
Required permissions:
-
‘plan:waitlist:manage`
100 101 102 103 104 105 106 107 |
# File 'lib/whop_sdk/resources/entries.rb', line 100 def approve(id, params = {}) @client.request( method: :post, path: ["entries/%1$s/approve", id], model: WhopSDK::Models::EntryApproveResponse, options: params[:request_options] ) end |
#deny(id, request_options: {}) ⇒ WhopSDK::Models::Entry
Deny a pending waitlist entry, preventing the user from gaining access to the plan.
Required permissions:
-
‘plan:waitlist:manage`
-
‘plan:basic:read`
-
‘member:email:read`
127 128 129 130 131 132 133 134 |
# File 'lib/whop_sdk/resources/entries.rb', line 127 def deny(id, params = {}) @client.request( method: :post, path: ["entries/%1$s/deny", id], model: WhopSDK::Entry, options: params[:request_options] ) end |
#list(company_id:, after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, order: nil, plan_ids: nil, product_ids: nil, statuses: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::EntryListResponse>
Returns a paginated list of waitlist entries for a company, with optional filtering by product, plan, status, and creation date.
Required permissions:
-
‘plan:waitlist:read`
-
‘member:email:read`
71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/whop_sdk/resources/entries.rb', line 71 def list(params) parsed, = WhopSDK::EntryListParams.dump_request(params) query = WhopSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "entries", query: query, page: WhopSDK::Internal::CursorPage, model: WhopSDK::Models::EntryListResponse, options: ) end |
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::Entry
Retrieves the details of an existing waitlist entry.
Required permissions:
-
‘plan:waitlist:read`
-
‘member:email:read`
23 24 25 26 27 28 29 30 |
# File 'lib/whop_sdk/resources/entries.rb', line 23 def retrieve(id, params = {}) @client.request( method: :get, path: ["entries/%1$s", id], model: WhopSDK::Entry, options: params[:request_options] ) end |