Class: WhopSDK::Models::Workforce::WorkforceBounty

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/workforce/workforce_bounty.rb,
sig/whop_sdk/models/workforce/workforce_bounty.rbs

Overview

See Also:

  • WhopSDK::Resources::Workforce::Bounties#retrieve

Defined Under Namespace

Modules: BusinessGoalType, ScheduledFrequency, Status Classes: FundingAccount, Poster

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(url:) ⇒ Object

Some parameter documentations has been truncated, see WhopSDK::Models::Workforce::WorkforceBounty::Poster::ProfilePicture for more details.

Avatar wrapper; its url is always present, using a generated placeholder when the user set no picture.

Parameters:

  • url (String)

    Avatar image URL. Always present — a generated placeholder when the user set no



# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 160

Instance Attribute Details

#accepted_submissions_countInteger

Submissions accepted so far.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


18
# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 18

required :accepted_submissions_count, Integer

#accepted_submissions_limitInteger

Number of submissions that can be accepted (winner slots).

Parameters:

  • value (Integer)

Returns:

  • (Integer)


24
# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 24

required :accepted_submissions_limit, Integer

#allowed_country_codesArray<String>

Parameters:

  • value (::Array[String])

Returns:

  • (Array<String>)


29
# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 29

required :allowed_country_codes, WhopSDK::Internal::Type::ArrayOf[String]

#budget_amountFloat

Total gross budget committed to the bounty: gross_reward_amount times accepted_submissions_limit.

Parameters:

  • value (Float)

Returns:

  • (Float)


36
# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 36

required :budget_amount, Float

#business_goal_typeSymbol, ...

What the poster wants the work to achieve.

Parameters:

  • value (WhopSDK::Models::Workforce::WorkforceBounty::business_goal_type, nil)

Returns:



42
43
44
# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 42

required :business_goal_type,
enum: -> { WhopSDK::Workforce::WorkforceBounty::BusinessGoalType },
nil?: true

#created_atString

When the bounty was created, as an ISO 8601 timestamp.

Parameters:

  • value (String)

Returns:

  • (String)


50
# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 50

required :created_at, String

#currencyString

Currency for all amounts on the bounty, as a lowercase ISO 4217 code.

Parameters:

  • value (String)

Returns:

  • (String)


56
# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 56

required :currency, String

#descriptionString

Full task instructions shown to workers.

Parameters:

  • value (String)

Returns:

  • (String)


62
# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 62

required :description, String

#experience_idString?

Experience the bounty is hosted in, prefixed exp_. Null for platform-wide bounties; may belong to a different account than the funder.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


69
# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 69

required :experience_id, String, nil?: true

#funding_accountWhopSDK::Models::Workforce::WorkforceBounty::FundingAccount?

The account whose balance funds the bounty pool, or null when a user funds it personally. May differ from the account hosting experience_id.

Parameters:

  • value (WhopSDK::Workforce::WorkforceBounty::FundingAccount, nil)

Returns:



76
# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 76

required :funding_account, -> { WhopSDK::Workforce::WorkforceBounty::FundingAccount }, nil?: true

#gross_paid_out_amountFloat

Gross amount paid out from the bounty pool across accepted submissions — worker payouts, platform fees, and affiliate shares together. Tips and reviewer rewards are excluded.

Parameters:

  • value (Float)

Returns:

  • (Float)


84
# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 84

required :gross_paid_out_amount, Float

#gross_reward_amountFloat

Gross bounty-pool amount allocated per accepted submission, in whole currency units.

Parameters:

  • value (Float)

Returns:

  • (Float)


91
# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 91

required :gross_reward_amount, Float

#idString

Bounty ID, prefixed bnty_.

Parameters:

  • value (String)

Returns:

  • (String)


12
# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 12

required :id, String

#posterWhopSDK::Models::Workforce::WorkforceBounty::Poster

The user who posted the bounty.

Parameters:

  • value (WhopSDK::Workforce::WorkforceBounty::Poster)

Returns:



97
# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 97

required :poster, -> { WhopSDK::Workforce::WorkforceBounty::Poster }

#scheduled_frequencySymbol, ...

How often the schedule creates a new bounty. Each occurrence is a separate bounty; the original is not republished.

Parameters:

  • value (WhopSDK::Models::Workforce::WorkforceBounty::scheduled_frequency, nil)

Returns:



104
105
106
# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 104

required :scheduled_frequency,
enum: -> { WhopSDK::Workforce::WorkforceBounty::ScheduledFrequency },
nil?: true

#scheduled_publish_atString?

When a scheduled bounty will publish, as an ISO 8601 timestamp. Null once published, for bounties that were never scheduled, and for terminally failed drafts parked for manual rescheduling.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


114
# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 114

required :scheduled_publish_at, String, nil?: true

#spots_remainingInteger

Unfilled winner capacity: accepted_submissions_limit minus accepted_submissions_count, clamped to zero. Not a signal that the bounty currently accepts new claims.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


122
# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 122

required :spots_remaining, Integer

#statusSymbol, WhopSDK::Models::Workforce::WorkforceBounty::Status

Lifecycle state. scheduled bounties are unpublished drafts, visible to their poster and the account's authorized managers; open bounties accept new submissions; closed bounties are live but no longer accept new submissions; completed bounties paid out every winner slot; canceled bounties ended before filling their slots.

Parameters:

  • value (WhopSDK::Models::Workforce::WorkforceBounty::status)

Returns:



132
# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 132

required :status, enum: -> { WhopSDK::Workforce::WorkforceBounty::Status }

#submissions_closed_atString?

When new submissions were explicitly stopped, as an ISO 8601 timestamp. Null when submissions were never explicitly stopped — including closed or completed bounties that simply filled every winner slot.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


140
# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 140

required :submissions_closed_at, String, nil?: true

#titleString

Short name of the task shown to workers.

Parameters:

  • value (String)

Returns:

  • (String)


146
# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 146

required :title, String

#unresolved_submissions_countInteger

Submissions still awaiting an outcome: in progress or pending review.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


152
# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 152

required :unresolved_submissions_count, Integer

#updated_atString

When the bounty was last updated, as an ISO 8601 timestamp.

Parameters:

  • value (String)

Returns:

  • (String)


158
# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 158

required :updated_at, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/whop_sdk/models/workforce/workforce_bounty.rb', line 221

Instance Method Details

#to_hash{

Returns:

  • ({)


102
# File 'sig/whop_sdk/models/workforce/workforce_bounty.rbs', line 102

def to_hash: -> {