Class: WhopSDK::Resources::Bounties
- Inherits:
-
Object
- Object
- WhopSDK::Resources::Bounties
- Defined in:
- lib/whop_sdk/resources/bounties.rb,
sig/whop_sdk/resources/bounties.rbs
Instance Method Summary collapse
-
#create(base_unit_amount:, currency:, description:, title:, accepted_submissions_limit: nil, allowed_country_codes: nil, business_goal_type: nil, experience_id: nil, origin_account_id: nil, post_markdown_content: nil, post_title: nil, scheduled_frequency: nil, scheduled_publish_at: nil, scheduled_timezone: nil, request_options: {}) ⇒ WhopSDK::Models::BountyCreateResponse
Some parameter documentations has been truncated, see Models::BountyCreateParams for more details.
-
#initialize(client:) ⇒ Bounties
constructor
private
A new instance of Bounties.
-
#list(after: nil, before: nil, direction: nil, experience_id: nil, first: nil, last: nil, status: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::BountyListResponse>
Some parameter documentations has been truncated, see Models::BountyListParams for more details.
-
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::BountyRetrieveResponse
Retrieves a workforce bounty for the current authenticated user.
Constructor Details
#initialize(client:) ⇒ Bounties
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 Bounties.
126 127 128 |
# File 'lib/whop_sdk/resources/bounties.rb', line 126 def initialize(client:) @client = client end |
Instance Method Details
#create(base_unit_amount:, currency:, description:, title:, accepted_submissions_limit: nil, allowed_country_codes: nil, business_goal_type: nil, experience_id: nil, origin_account_id: nil, post_markdown_content: nil, post_title: nil, scheduled_frequency: nil, scheduled_publish_at: nil, scheduled_timezone: nil, request_options: {}) ⇒ WhopSDK::Models::BountyCreateResponse
Some parameter documentations has been truncated, see Models::BountyCreateParams for more details.
Create a new workforce bounty by funding a dedicated bounty pool.
Required permissions:
bounty:create
D
51 52 53 54 55 56 57 58 59 60 |
# File 'lib/whop_sdk/resources/bounties.rb', line 51 def create(params) parsed, = WhopSDK::BountyCreateParams.dump_request(params) @client.request( method: :post, path: "bounties", body: parsed, model: WhopSDK::Models::BountyCreateResponse, options: ) end |
#list(after: nil, before: nil, direction: nil, experience_id: nil, first: nil, last: nil, status: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::BountyListResponse>
Some parameter documentations has been truncated, see Models::BountyListParams for more details.
Returns a paginated list of workforce bounties. When experienceId is provided, returns bounties scoped to that experience. When omitted, returns bounties with no experience.
110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/whop_sdk/resources/bounties.rb', line 110 def list(params = {}) parsed, = WhopSDK::BountyListParams.dump_request(params) query = WhopSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "bounties", query: query, page: WhopSDK::Internal::CursorPage, model: WhopSDK::Models::BountyListResponse, options: ) end |
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::BountyRetrieveResponse
Retrieves a workforce bounty for the current authenticated user.
73 74 75 76 77 78 79 80 |
# File 'lib/whop_sdk/resources/bounties.rb', line 73 def retrieve(id, params = {}) @client.request( method: :get, path: ["bounties/%1$s", id], model: WhopSDK::Models::BountyRetrieveResponse, options: params[:request_options] ) end |