whop_sdk 0.0.37 → 0.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +61 -0
- data/README.md +1 -1
- data/lib/whop_sdk/client.rb +76 -10
- data/lib/whop_sdk/helpers/verify_user_token.rb +166 -34
- data/lib/whop_sdk/models/ad_campaign_list_params.rb +101 -0
- data/lib/whop_sdk/models/ad_campaign_list_response.rb +126 -0
- data/lib/whop_sdk/models/ad_campaign_pause_params.rb +20 -0
- data/lib/whop_sdk/models/ad_campaign_pause_response.rb +328 -0
- data/lib/whop_sdk/models/ad_campaign_retrieve_params.rb +20 -0
- data/lib/whop_sdk/models/ad_campaign_retrieve_response.rb +328 -0
- data/lib/whop_sdk/models/ad_campaign_unpause_params.rb +20 -0
- data/lib/whop_sdk/models/ad_campaign_unpause_response.rb +328 -0
- data/lib/whop_sdk/models/ad_campaign_update_params.rb +33 -0
- data/lib/whop_sdk/models/ad_campaign_update_response.rb +328 -0
- data/lib/whop_sdk/models/ad_group_delete_params.rb +20 -0
- data/lib/whop_sdk/models/ad_group_delete_response.rb +8 -0
- data/lib/whop_sdk/models/ad_group_list_params.rb +109 -0
- data/lib/whop_sdk/models/ad_group_list_response.rb +118 -0
- data/lib/whop_sdk/models/ad_group_retrieve_params.rb +20 -0
- data/lib/whop_sdk/models/ad_group_retrieve_response.rb +140 -0
- data/lib/whop_sdk/models/ad_group_update_params.rb +3207 -0
- data/lib/whop_sdk/models/ad_group_update_response.rb +140 -0
- data/lib/whop_sdk/models/ad_list_params.rb +115 -0
- data/lib/whop_sdk/models/ad_list_response.rb +89 -0
- data/lib/whop_sdk/models/ad_report_retrieve_params.rb +77 -0
- data/lib/whop_sdk/models/ad_report_retrieve_response.rb +312 -0
- data/lib/whop_sdk/models/ad_retrieve_params.rb +20 -0
- data/lib/whop_sdk/models/ad_retrieve_response.rb +133 -0
- data/lib/whop_sdk/models/authorized_user_roles.rb +1 -0
- data/lib/whop_sdk/models/bounty_create_params.rb +105 -0
- data/lib/whop_sdk/models/bounty_create_response.rb +126 -0
- data/lib/whop_sdk/models/bounty_list_params.rb +85 -0
- data/lib/whop_sdk/models/bounty_list_response.rb +126 -0
- data/lib/whop_sdk/models/bounty_retrieve_params.rb +20 -0
- data/lib/whop_sdk/models/bounty_retrieve_response.rb +126 -0
- data/lib/whop_sdk/models/checkout_configuration.rb +20 -2
- data/lib/whop_sdk/models/checkout_configuration_create_params.rb +97 -23
- data/lib/whop_sdk/models/checkout_configuration_list_response.rb +20 -2
- data/lib/whop_sdk/models/company_create_api_key_params.rb +109 -0
- data/lib/whop_sdk/models/company_create_api_key_response.rb +35 -0
- data/lib/whop_sdk/models/conversion_create_params.rb +462 -0
- data/lib/whop_sdk/models/conversion_create_response.rb +19 -0
- data/lib/whop_sdk/models/currency.rb +1 -0
- data/lib/whop_sdk/models/file_create_params.rb +22 -1
- data/lib/whop_sdk/models/file_create_response.rb +26 -3
- data/lib/whop_sdk/models/file_retrieve_response.rb +26 -3
- data/lib/whop_sdk/models/forum_post_list_params.rb +9 -1
- data/lib/whop_sdk/models/forum_update_params.rb +10 -1
- data/lib/whop_sdk/models/invoice_create_params.rb +36 -18
- data/lib/whop_sdk/models/invoice_update_params.rb +29 -7
- data/lib/whop_sdk/models/ledger_account_retrieve_response.rb +2 -2
- data/lib/whop_sdk/models/membership.rb +11 -1
- data/lib/whop_sdk/models/membership_list_response.rb +11 -1
- data/lib/whop_sdk/models/payment.rb +47 -2
- data/lib/whop_sdk/models/payment_list_response.rb +29 -2
- data/lib/whop_sdk/models/payment_method_types.rb +16 -0
- data/lib/whop_sdk/models/payment_refund_params.rb +4 -3
- data/lib/whop_sdk/models/payout_account_retrieve_response.rb +2 -2
- data/lib/whop_sdk/models/payout_account_status_updated_webhook_event.rb +2 -2
- data/lib/whop_sdk/models/plan.rb +12 -3
- data/lib/whop_sdk/models/plan_create_params.rb +26 -6
- data/lib/whop_sdk/models/plan_list_response.rb +12 -3
- data/lib/whop_sdk/models/plan_update_params.rb +26 -6
- data/lib/whop_sdk/models/support_channel_list_params.rb +31 -9
- data/lib/whop_sdk/models/user_retrieve_params.rb +14 -1
- data/lib/whop_sdk/models/{user_update_profile_params.rb → user_update_params.rb} +24 -7
- data/lib/whop_sdk/models/verification_list_response.rb +2 -2
- data/lib/whop_sdk/models/verification_retrieve_response.rb +2 -2
- data/lib/whop_sdk/models/verification_status.rb +1 -0
- data/lib/whop_sdk/models/verification_succeeded_webhook_event.rb +2 -2
- data/lib/whop_sdk/models.rb +35 -1
- data/lib/whop_sdk/resources/ad_campaigns.rb +163 -0
- data/lib/whop_sdk/resources/ad_groups.rb +151 -0
- data/lib/whop_sdk/resources/ad_reports.rb +59 -0
- data/lib/whop_sdk/resources/ads.rb +88 -0
- data/lib/whop_sdk/resources/bounties.rb +124 -0
- data/lib/whop_sdk/resources/companies.rb +34 -0
- data/lib/whop_sdk/resources/conversions.rb +67 -0
- data/lib/whop_sdk/resources/files.rb +3 -1
- data/lib/whop_sdk/resources/forum_posts.rb +3 -1
- data/lib/whop_sdk/resources/forums.rb +3 -1
- data/lib/whop_sdk/resources/invoices.rb +9 -2
- data/lib/whop_sdk/resources/payments.rb +1 -1
- data/lib/whop_sdk/resources/plans.rb +6 -2
- data/lib/whop_sdk/resources/support_channels.rb +6 -4
- data/lib/whop_sdk/resources/users.rb +49 -37
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +41 -1
- data/rbi/whop_sdk/client.rbi +24 -0
- data/rbi/whop_sdk/models/ad_campaign_list_params.rbi +142 -0
- data/rbi/whop_sdk/models/ad_campaign_list_response.rbi +239 -0
- data/rbi/whop_sdk/models/ad_campaign_pause_params.rbi +35 -0
- data/rbi/whop_sdk/models/ad_campaign_pause_response.rbi +668 -0
- data/rbi/whop_sdk/models/ad_campaign_retrieve_params.rbi +35 -0
- data/rbi/whop_sdk/models/ad_campaign_retrieve_response.rbi +679 -0
- data/rbi/whop_sdk/models/ad_campaign_unpause_params.rbi +35 -0
- data/rbi/whop_sdk/models/ad_campaign_unpause_response.rbi +675 -0
- data/rbi/whop_sdk/models/ad_campaign_update_params.rbi +51 -0
- data/rbi/whop_sdk/models/ad_campaign_update_response.rbi +670 -0
- data/rbi/whop_sdk/models/ad_group_delete_params.rbi +35 -0
- data/rbi/whop_sdk/models/ad_group_delete_response.rbi +8 -0
- data/rbi/whop_sdk/models/ad_group_list_params.rbi +145 -0
- data/rbi/whop_sdk/models/ad_group_list_response.rbi +228 -0
- data/rbi/whop_sdk/models/ad_group_retrieve_params.rbi +35 -0
- data/rbi/whop_sdk/models/ad_group_retrieve_response.rbi +277 -0
- data/rbi/whop_sdk/models/ad_group_update_params.rbi +6133 -0
- data/rbi/whop_sdk/models/ad_group_update_response.rbi +274 -0
- data/rbi/whop_sdk/models/ad_list_params.rbi +146 -0
- data/rbi/whop_sdk/models/ad_list_response.rbi +146 -0
- data/rbi/whop_sdk/models/ad_report_retrieve_params.rbi +99 -0
- data/rbi/whop_sdk/models/ad_report_retrieve_response.rbi +629 -0
- data/rbi/whop_sdk/models/ad_retrieve_params.rbi +35 -0
- data/rbi/whop_sdk/models/ad_retrieve_response.rbi +245 -0
- data/rbi/whop_sdk/models/authorized_user_roles.rbi +2 -0
- data/rbi/whop_sdk/models/bounty_create_params.rbi +129 -0
- data/rbi/whop_sdk/models/bounty_create_response.rbi +196 -0
- data/rbi/whop_sdk/models/bounty_list_params.rbi +115 -0
- data/rbi/whop_sdk/models/bounty_list_response.rbi +189 -0
- data/rbi/whop_sdk/models/bounty_retrieve_params.rbi +35 -0
- data/rbi/whop_sdk/models/bounty_retrieve_response.rbi +199 -0
- data/rbi/whop_sdk/models/checkout_configuration.rbi +20 -0
- data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +84 -16
- data/rbi/whop_sdk/models/checkout_configuration_list_response.rbi +20 -0
- data/rbi/whop_sdk/models/company_create_api_key_params.rbi +184 -0
- data/rbi/whop_sdk/models/company_create_api_key_response.rbi +51 -0
- data/rbi/whop_sdk/models/conversion_create_params.rbi +661 -0
- data/rbi/whop_sdk/models/conversion_create_response.rbi +31 -0
- data/rbi/whop_sdk/models/currency.rbi +1 -0
- data/rbi/whop_sdk/models/file_create_params.rbi +41 -1
- data/rbi/whop_sdk/models/file_create_response.rbi +52 -5
- data/rbi/whop_sdk/models/file_retrieve_response.rbi +53 -5
- data/rbi/whop_sdk/models/forum_post_list_params.rbi +8 -0
- data/rbi/whop_sdk/models/forum_update_params.rbi +10 -0
- data/rbi/whop_sdk/models/invoice_create_params.rbi +46 -26
- data/rbi/whop_sdk/models/invoice_update_params.rbi +28 -6
- data/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +2 -2
- data/rbi/whop_sdk/models/membership.rbi +12 -0
- data/rbi/whop_sdk/models/membership_list_response.rbi +12 -0
- data/rbi/whop_sdk/models/payment.rbi +57 -3
- data/rbi/whop_sdk/models/payment_list_response.rbi +37 -3
- data/rbi/whop_sdk/models/payment_method_types.rbi +31 -0
- data/rbi/whop_sdk/models/payment_refund_params.rbi +6 -4
- data/rbi/whop_sdk/models/payout_account_retrieve_response.rbi +2 -2
- data/rbi/whop_sdk/models/payout_account_status_updated_webhook_event.rbi +2 -2
- data/rbi/whop_sdk/models/plan.rbi +12 -2
- data/rbi/whop_sdk/models/plan_create_params.rbi +22 -4
- data/rbi/whop_sdk/models/plan_list_response.rbi +12 -2
- data/rbi/whop_sdk/models/plan_update_params.rbi +22 -4
- data/rbi/whop_sdk/models/support_channel_list_params.rbi +50 -8
- data/rbi/whop_sdk/models/user_retrieve_params.rbi +18 -2
- data/rbi/whop_sdk/models/{user_update_profile_params.rbi → user_update_params.rbi} +25 -9
- data/rbi/whop_sdk/models/verification_list_response.rbi +2 -2
- data/rbi/whop_sdk/models/verification_retrieve_response.rbi +2 -2
- data/rbi/whop_sdk/models/verification_status.rbi +2 -0
- data/rbi/whop_sdk/models/verification_succeeded_webhook_event.rbi +2 -2
- data/rbi/whop_sdk/models.rbi +35 -1
- data/rbi/whop_sdk/resources/ad_campaigns.rbi +134 -0
- data/rbi/whop_sdk/resources/ad_groups.rbi +139 -0
- data/rbi/whop_sdk/resources/ad_reports.rbi +55 -0
- data/rbi/whop_sdk/resources/ads.rbi +81 -0
- data/rbi/whop_sdk/resources/bounties.rbi +116 -0
- data/rbi/whop_sdk/resources/companies.rbi +32 -0
- data/rbi/whop_sdk/resources/conversions.rbi +71 -0
- data/rbi/whop_sdk/resources/files.rbi +5 -0
- data/rbi/whop_sdk/resources/forum_posts.rbi +3 -0
- data/rbi/whop_sdk/resources/forums.rbi +4 -0
- data/rbi/whop_sdk/resources/invoices.rbi +10 -1
- data/rbi/whop_sdk/resources/payments.rbi +3 -2
- data/rbi/whop_sdk/resources/plans.rbi +6 -0
- data/rbi/whop_sdk/resources/support_channels.rbi +8 -3
- data/rbi/whop_sdk/resources/users.rbi +42 -29
- data/sig/whop_sdk/client.rbs +12 -0
- data/sig/whop_sdk/models/ad_campaign_list_params.rbs +82 -0
- data/sig/whop_sdk/models/ad_campaign_list_response.rbs +98 -0
- data/sig/whop_sdk/models/ad_campaign_pause_params.rbs +20 -0
- data/sig/whop_sdk/models/ad_campaign_pause_response.rbs +232 -0
- data/sig/whop_sdk/models/ad_campaign_retrieve_params.rbs +20 -0
- data/sig/whop_sdk/models/ad_campaign_retrieve_response.rbs +232 -0
- data/sig/whop_sdk/models/ad_campaign_unpause_params.rbs +20 -0
- data/sig/whop_sdk/models/ad_campaign_unpause_response.rbs +232 -0
- data/sig/whop_sdk/models/ad_campaign_update_params.rbs +28 -0
- data/sig/whop_sdk/models/ad_campaign_update_response.rbs +232 -0
- data/sig/whop_sdk/models/ad_group_delete_params.rbs +20 -0
- data/sig/whop_sdk/models/ad_group_delete_response.rbs +5 -0
- data/sig/whop_sdk/models/ad_group_list_params.rbs +87 -0
- data/sig/whop_sdk/models/ad_group_list_response.rbs +93 -0
- data/sig/whop_sdk/models/ad_group_retrieve_params.rbs +20 -0
- data/sig/whop_sdk/models/ad_group_retrieve_response.rbs +108 -0
- data/sig/whop_sdk/models/ad_group_update_params.rbs +2439 -0
- data/sig/whop_sdk/models/ad_group_update_response.rbs +108 -0
- data/sig/whop_sdk/models/ad_list_params.rbs +87 -0
- data/sig/whop_sdk/models/ad_list_response.rbs +72 -0
- data/sig/whop_sdk/models/ad_report_retrieve_params.rbs +56 -0
- data/sig/whop_sdk/models/ad_report_retrieve_response.rbs +278 -0
- data/sig/whop_sdk/models/ad_retrieve_params.rbs +20 -0
- data/sig/whop_sdk/models/ad_retrieve_response.rbs +102 -0
- data/sig/whop_sdk/models/authorized_user_roles.rbs +2 -0
- data/sig/whop_sdk/models/bounty_create_params.rbs +71 -0
- data/sig/whop_sdk/models/bounty_create_response.rbs +93 -0
- data/sig/whop_sdk/models/bounty_list_params.rbs +67 -0
- data/sig/whop_sdk/models/bounty_list_response.rbs +93 -0
- data/sig/whop_sdk/models/bounty_retrieve_params.rbs +20 -0
- data/sig/whop_sdk/models/bounty_retrieve_response.rbs +93 -0
- data/sig/whop_sdk/models/checkout_configuration.rbs +10 -0
- data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +51 -16
- data/sig/whop_sdk/models/checkout_configuration_list_response.rbs +10 -0
- data/sig/whop_sdk/models/company_create_api_key_params.rbs +83 -0
- data/sig/whop_sdk/models/company_create_api_key_response.rbs +18 -0
- data/sig/whop_sdk/models/conversion_create_params.rbs +349 -0
- data/sig/whop_sdk/models/conversion_create_response.rbs +13 -0
- data/sig/whop_sdk/models/currency.rbs +2 -0
- data/sig/whop_sdk/models/file_create_params.rbs +20 -1
- data/sig/whop_sdk/models/file_create_response.rbs +19 -3
- data/sig/whop_sdk/models/file_retrieve_response.rbs +19 -3
- data/sig/whop_sdk/models/forum_post_list_params.rbs +5 -0
- data/sig/whop_sdk/models/forum_update_params.rbs +5 -0
- data/sig/whop_sdk/models/invoice_create_params.rbs +24 -14
- data/sig/whop_sdk/models/invoice_update_params.rbs +15 -5
- data/sig/whop_sdk/models/membership.rbs +5 -0
- data/sig/whop_sdk/models/membership_list_response.rbs +5 -0
- data/sig/whop_sdk/models/payment.rbs +25 -3
- data/sig/whop_sdk/models/payment_list_response.rbs +15 -3
- data/sig/whop_sdk/models/payment_method_types.rbs +32 -0
- data/sig/whop_sdk/models/plan.rbs +5 -0
- data/sig/whop_sdk/models/plan_create_params.rbs +14 -4
- data/sig/whop_sdk/models/plan_list_response.rbs +5 -0
- data/sig/whop_sdk/models/plan_update_params.rbs +14 -4
- data/sig/whop_sdk/models/support_channel_list_params.rbs +23 -6
- data/sig/whop_sdk/models/user_retrieve_params.rbs +10 -2
- data/sig/whop_sdk/models/{user_update_profile_params.rbs → user_update_params.rbs} +16 -6
- data/sig/whop_sdk/models/verification_status.rbs +2 -0
- data/sig/whop_sdk/models.rbs +35 -1
- data/sig/whop_sdk/resources/ad_campaigns.rbs +41 -0
- data/sig/whop_sdk/resources/ad_groups.rbs +40 -0
- data/sig/whop_sdk/resources/ad_reports.rbs +18 -0
- data/sig/whop_sdk/resources/ads.rbs +26 -0
- data/sig/whop_sdk/resources/bounties.rbs +37 -0
- data/sig/whop_sdk/resources/companies.rbs +9 -0
- data/sig/whop_sdk/resources/conversions.rbs +25 -0
- data/sig/whop_sdk/resources/files.rbs +1 -0
- data/sig/whop_sdk/resources/forum_posts.rbs +1 -0
- data/sig/whop_sdk/resources/forums.rbs +1 -0
- data/sig/whop_sdk/resources/invoices.rbs +2 -0
- data/sig/whop_sdk/resources/plans.rbs +2 -0
- data/sig/whop_sdk/resources/support_channels.rbs +2 -1
- data/sig/whop_sdk/resources/users.rbs +11 -8
- metadata +125 -5
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Resources
|
|
5
|
+
# Ad groups
|
|
6
|
+
class AdGroups
|
|
7
|
+
# Retrieves a single ad group by its unique identifier.
|
|
8
|
+
#
|
|
9
|
+
# Required permissions:
|
|
10
|
+
#
|
|
11
|
+
# - `ad_campaign:basic:read`
|
|
12
|
+
sig do
|
|
13
|
+
params(
|
|
14
|
+
id: String,
|
|
15
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
16
|
+
).returns(WhopSDK::Models::AdGroupRetrieveResponse)
|
|
17
|
+
end
|
|
18
|
+
def retrieve(
|
|
19
|
+
# The unique identifier of the ad group.
|
|
20
|
+
id,
|
|
21
|
+
request_options: {}
|
|
22
|
+
)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Updates an existing ad group.
|
|
26
|
+
#
|
|
27
|
+
# Required permissions:
|
|
28
|
+
#
|
|
29
|
+
# - `ad_campaign:update`
|
|
30
|
+
# - `ad_campaign:basic:read`
|
|
31
|
+
sig do
|
|
32
|
+
params(
|
|
33
|
+
id: String,
|
|
34
|
+
budget: T.nilable(Float),
|
|
35
|
+
budget_type:
|
|
36
|
+
T.nilable(WhopSDK::AdGroupUpdateParams::BudgetType::OrSymbol),
|
|
37
|
+
config: T.nilable(WhopSDK::AdGroupUpdateParams::Config::OrHash),
|
|
38
|
+
daily_budget: T.nilable(Float),
|
|
39
|
+
name: T.nilable(String),
|
|
40
|
+
platform_config:
|
|
41
|
+
T.nilable(WhopSDK::AdGroupUpdateParams::PlatformConfig::OrHash),
|
|
42
|
+
status: T.nilable(WhopSDK::AdGroupUpdateParams::Status::OrSymbol),
|
|
43
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
44
|
+
).returns(WhopSDK::Models::AdGroupUpdateResponse)
|
|
45
|
+
end
|
|
46
|
+
def update(
|
|
47
|
+
# The unique identifier of the ad group to update.
|
|
48
|
+
id,
|
|
49
|
+
# Budget amount in dollars.
|
|
50
|
+
budget: nil,
|
|
51
|
+
# The budget type for an ad campaign or ad group.
|
|
52
|
+
budget_type: nil,
|
|
53
|
+
# Unified ad group configuration (bidding, optimization, targeting).
|
|
54
|
+
config: nil,
|
|
55
|
+
# Daily budget in dollars.
|
|
56
|
+
daily_budget: nil,
|
|
57
|
+
# Human-readable ad group name.
|
|
58
|
+
name: nil,
|
|
59
|
+
# Platform-specific ad group configuration.
|
|
60
|
+
platform_config: nil,
|
|
61
|
+
# The status of an external ad group.
|
|
62
|
+
status: nil,
|
|
63
|
+
request_options: {}
|
|
64
|
+
)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Returns a paginated list of ad groups scoped by campaign or company, with
|
|
68
|
+
# optional filtering by status and creation date.
|
|
69
|
+
#
|
|
70
|
+
# Required permissions:
|
|
71
|
+
#
|
|
72
|
+
# - `ad_campaign:basic:read`
|
|
73
|
+
sig do
|
|
74
|
+
params(
|
|
75
|
+
after: T.nilable(String),
|
|
76
|
+
before: T.nilable(String),
|
|
77
|
+
campaign_id: T.nilable(String),
|
|
78
|
+
company_id: T.nilable(String),
|
|
79
|
+
created_after: T.nilable(Time),
|
|
80
|
+
created_before: T.nilable(Time),
|
|
81
|
+
first: T.nilable(Integer),
|
|
82
|
+
last: T.nilable(Integer),
|
|
83
|
+
query: T.nilable(String),
|
|
84
|
+
status: T.nilable(WhopSDK::AdGroupListParams::Status::OrSymbol),
|
|
85
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
86
|
+
).returns(
|
|
87
|
+
WhopSDK::Internal::CursorPage[WhopSDK::Models::AdGroupListResponse]
|
|
88
|
+
)
|
|
89
|
+
end
|
|
90
|
+
def list(
|
|
91
|
+
# Returns the elements in the list that come after the specified cursor.
|
|
92
|
+
after: nil,
|
|
93
|
+
# Returns the elements in the list that come before the specified cursor.
|
|
94
|
+
before: nil,
|
|
95
|
+
# Filter by campaign. Provide exactly one of campaign_id or company_id.
|
|
96
|
+
campaign_id: nil,
|
|
97
|
+
# Filter by company. Provide exactly one of campaign_id or company_id.
|
|
98
|
+
company_id: nil,
|
|
99
|
+
# Only return ad groups created after this timestamp.
|
|
100
|
+
created_after: nil,
|
|
101
|
+
# Only return ad groups created before this timestamp.
|
|
102
|
+
created_before: nil,
|
|
103
|
+
# Returns the first _n_ elements from the list.
|
|
104
|
+
first: nil,
|
|
105
|
+
# Returns the last _n_ elements from the list.
|
|
106
|
+
last: nil,
|
|
107
|
+
# Case-insensitive substring match against the ad group name.
|
|
108
|
+
query: nil,
|
|
109
|
+
# The status of an external ad group.
|
|
110
|
+
status: nil,
|
|
111
|
+
request_options: {}
|
|
112
|
+
)
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Soft-deletes an ad group.
|
|
116
|
+
#
|
|
117
|
+
# Required permissions:
|
|
118
|
+
#
|
|
119
|
+
# - `ad_campaign:update`
|
|
120
|
+
sig do
|
|
121
|
+
params(
|
|
122
|
+
id: String,
|
|
123
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
124
|
+
).returns(T::Boolean)
|
|
125
|
+
end
|
|
126
|
+
def delete(
|
|
127
|
+
# The unique identifier of the ad group to delete.
|
|
128
|
+
id,
|
|
129
|
+
request_options: {}
|
|
130
|
+
)
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# @api private
|
|
134
|
+
sig { params(client: WhopSDK::Client).returns(T.attached_class) }
|
|
135
|
+
def self.new(client:)
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Resources
|
|
5
|
+
# Ad reports
|
|
6
|
+
class AdReports
|
|
7
|
+
# Performance report for an ad campaign, ad group, or ad. Returns aggregate totals
|
|
8
|
+
# and an optional per-day breakdown. Exactly one of `adCampaignId`, `adGroupId`,
|
|
9
|
+
# or `adId` must be provided.
|
|
10
|
+
#
|
|
11
|
+
# Required permissions:
|
|
12
|
+
#
|
|
13
|
+
# - `ad_campaign:stats:read`
|
|
14
|
+
sig do
|
|
15
|
+
params(
|
|
16
|
+
from: Time,
|
|
17
|
+
to: Time,
|
|
18
|
+
ad_campaign_id: T.nilable(String),
|
|
19
|
+
ad_group_id: T.nilable(String),
|
|
20
|
+
ad_id: T.nilable(String),
|
|
21
|
+
currency: T.nilable(String),
|
|
22
|
+
include_daily: T.nilable(T::Boolean),
|
|
23
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
24
|
+
).returns(WhopSDK::Models::AdReportRetrieveResponse)
|
|
25
|
+
end
|
|
26
|
+
def retrieve(
|
|
27
|
+
# Inclusive start of the reporting window.
|
|
28
|
+
from:,
|
|
29
|
+
# Inclusive end of the reporting window.
|
|
30
|
+
to:,
|
|
31
|
+
# The unique identifier of an ad campaign. Mutually exclusive with `adGroupId` and
|
|
32
|
+
# `adId`.
|
|
33
|
+
ad_campaign_id: nil,
|
|
34
|
+
# The unique identifier of an ad group. Mutually exclusive with `adCampaignId` and
|
|
35
|
+
# `adId`.
|
|
36
|
+
ad_group_id: nil,
|
|
37
|
+
# The unique identifier of an ad. Mutually exclusive with `adCampaignId` and
|
|
38
|
+
# `adGroupId`.
|
|
39
|
+
ad_id: nil,
|
|
40
|
+
# ISO 4217 currency code to report `spend` in. Defaults to the company's ads
|
|
41
|
+
# reporting currency.
|
|
42
|
+
currency: nil,
|
|
43
|
+
# When true, includes a per-day breakdown alongside the summary.
|
|
44
|
+
include_daily: nil,
|
|
45
|
+
request_options: {}
|
|
46
|
+
)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# @api private
|
|
50
|
+
sig { params(client: WhopSDK::Client).returns(T.attached_class) }
|
|
51
|
+
def self.new(client:)
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Resources
|
|
5
|
+
# Ads
|
|
6
|
+
class Ads
|
|
7
|
+
# Retrieve an ad by its unique identifier.
|
|
8
|
+
#
|
|
9
|
+
# Required permissions:
|
|
10
|
+
#
|
|
11
|
+
# - `ad_campaign:basic:read`
|
|
12
|
+
sig do
|
|
13
|
+
params(
|
|
14
|
+
id: String,
|
|
15
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
16
|
+
).returns(WhopSDK::Models::AdRetrieveResponse)
|
|
17
|
+
end
|
|
18
|
+
def retrieve(
|
|
19
|
+
# The unique identifier of the ad.
|
|
20
|
+
id,
|
|
21
|
+
request_options: {}
|
|
22
|
+
)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# List ads scoped by ad group, campaign, or company.
|
|
26
|
+
#
|
|
27
|
+
# Required permissions:
|
|
28
|
+
#
|
|
29
|
+
# - `ad_campaign:basic:read`
|
|
30
|
+
sig do
|
|
31
|
+
params(
|
|
32
|
+
ad_group_id: T.nilable(String),
|
|
33
|
+
after: T.nilable(String),
|
|
34
|
+
before: T.nilable(String),
|
|
35
|
+
campaign_id: T.nilable(String),
|
|
36
|
+
company_id: T.nilable(String),
|
|
37
|
+
created_after: T.nilable(Time),
|
|
38
|
+
created_before: T.nilable(Time),
|
|
39
|
+
first: T.nilable(Integer),
|
|
40
|
+
last: T.nilable(Integer),
|
|
41
|
+
status: T.nilable(WhopSDK::AdListParams::Status::OrSymbol),
|
|
42
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
43
|
+
).returns(
|
|
44
|
+
WhopSDK::Internal::CursorPage[WhopSDK::Models::AdListResponse]
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
def list(
|
|
48
|
+
# Filter by ad group. Provide exactly one of ad_group_id, campaign_id, or
|
|
49
|
+
# company_id.
|
|
50
|
+
ad_group_id: nil,
|
|
51
|
+
# Returns the elements in the list that come after the specified cursor.
|
|
52
|
+
after: nil,
|
|
53
|
+
# Returns the elements in the list that come before the specified cursor.
|
|
54
|
+
before: nil,
|
|
55
|
+
# Filter by campaign. Provide exactly one of ad_group_id, campaign_id, or
|
|
56
|
+
# company_id.
|
|
57
|
+
campaign_id: nil,
|
|
58
|
+
# Filter by company. Provide exactly one of ad_group_id, campaign_id, or
|
|
59
|
+
# company_id.
|
|
60
|
+
company_id: nil,
|
|
61
|
+
# Only return ads created after this timestamp.
|
|
62
|
+
created_after: nil,
|
|
63
|
+
# Only return ads created before this timestamp.
|
|
64
|
+
created_before: nil,
|
|
65
|
+
# Returns the first _n_ elements from the list.
|
|
66
|
+
first: nil,
|
|
67
|
+
# Returns the last _n_ elements from the list.
|
|
68
|
+
last: nil,
|
|
69
|
+
# The status of an external ad.
|
|
70
|
+
status: nil,
|
|
71
|
+
request_options: {}
|
|
72
|
+
)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# @api private
|
|
76
|
+
sig { params(client: WhopSDK::Client).returns(T.attached_class) }
|
|
77
|
+
def self.new(client:)
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Resources
|
|
5
|
+
# Bounties
|
|
6
|
+
class Bounties
|
|
7
|
+
# Create a new workforce bounty by funding a dedicated bounty pool.
|
|
8
|
+
#
|
|
9
|
+
# Required permissions:
|
|
10
|
+
#
|
|
11
|
+
# - `bounty:create`
|
|
12
|
+
sig do
|
|
13
|
+
params(
|
|
14
|
+
base_unit_amount: Float,
|
|
15
|
+
currency: WhopSDK::Currency::OrSymbol,
|
|
16
|
+
description: String,
|
|
17
|
+
title: String,
|
|
18
|
+
accepted_submissions_limit: T.nilable(Integer),
|
|
19
|
+
allowed_country_codes: T.nilable(T::Array[String]),
|
|
20
|
+
experience_id: T.nilable(String),
|
|
21
|
+
origin_account_id: T.nilable(String),
|
|
22
|
+
post_markdown_content: T.nilable(String),
|
|
23
|
+
post_title: T.nilable(String),
|
|
24
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
25
|
+
).returns(WhopSDK::Models::BountyCreateResponse)
|
|
26
|
+
end
|
|
27
|
+
def create(
|
|
28
|
+
# The amount paid to each approved submission. The total bounty pool funded is
|
|
29
|
+
# this amount times accepted_submissions_limit.
|
|
30
|
+
base_unit_amount:,
|
|
31
|
+
# The currency for the bounty pool funding amount.
|
|
32
|
+
currency:,
|
|
33
|
+
# The description of the bounty.
|
|
34
|
+
description:,
|
|
35
|
+
# The title of the bounty.
|
|
36
|
+
title:,
|
|
37
|
+
# The number of submissions that can be approved before the bounty closes.
|
|
38
|
+
# Defaults to 1.
|
|
39
|
+
accepted_submissions_limit: nil,
|
|
40
|
+
# The ISO3166 country codes where this bounty should be visible. Empty means
|
|
41
|
+
# globally visible.
|
|
42
|
+
allowed_country_codes: nil,
|
|
43
|
+
# An optional experience to scope the bounty to.
|
|
44
|
+
experience_id: nil,
|
|
45
|
+
# The user (user*\*) or company (biz*\*) tag whose balance funds this bounty pool.
|
|
46
|
+
# Defaults to the requester's personal balance when omitted. The requester must be
|
|
47
|
+
# the user themself or an owner/admin of the company.
|
|
48
|
+
origin_account_id: nil,
|
|
49
|
+
# Optional markdown body for the anchor forum post. Falls back to the bounty
|
|
50
|
+
# description when omitted.
|
|
51
|
+
post_markdown_content: nil,
|
|
52
|
+
# Optional title for the anchor forum post. Falls back to the bounty title when
|
|
53
|
+
# omitted.
|
|
54
|
+
post_title: nil,
|
|
55
|
+
request_options: {}
|
|
56
|
+
)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Retrieves a workforce bounty for the current authenticated user.
|
|
60
|
+
sig do
|
|
61
|
+
params(
|
|
62
|
+
id: String,
|
|
63
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
64
|
+
).returns(WhopSDK::Models::BountyRetrieveResponse)
|
|
65
|
+
end
|
|
66
|
+
def retrieve(
|
|
67
|
+
# The unique identifier of the workforce bounty to retrieve.
|
|
68
|
+
id,
|
|
69
|
+
request_options: {}
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Returns a paginated list of workforce bounties. When experienceId is provided,
|
|
74
|
+
# returns bounties scoped to that experience. When omitted, returns bounties with
|
|
75
|
+
# no experience.
|
|
76
|
+
sig do
|
|
77
|
+
params(
|
|
78
|
+
after: T.nilable(String),
|
|
79
|
+
before: T.nilable(String),
|
|
80
|
+
direction: T.nilable(WhopSDK::Direction::OrSymbol),
|
|
81
|
+
experience_id: T.nilable(String),
|
|
82
|
+
first: T.nilable(Integer),
|
|
83
|
+
last: T.nilable(Integer),
|
|
84
|
+
status: T.nilable(WhopSDK::BountyListParams::Status::OrSymbol),
|
|
85
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
86
|
+
).returns(
|
|
87
|
+
WhopSDK::Internal::CursorPage[WhopSDK::Models::BountyListResponse]
|
|
88
|
+
)
|
|
89
|
+
end
|
|
90
|
+
def list(
|
|
91
|
+
# Returns the elements in the list that come after the specified cursor.
|
|
92
|
+
after: nil,
|
|
93
|
+
# Returns the elements in the list that come before the specified cursor.
|
|
94
|
+
before: nil,
|
|
95
|
+
# The direction of the sort.
|
|
96
|
+
direction: nil,
|
|
97
|
+
# The experience to list bounties for. When omitted, returns bounties with no
|
|
98
|
+
# experience.
|
|
99
|
+
experience_id: nil,
|
|
100
|
+
# Returns the first _n_ elements from the list.
|
|
101
|
+
first: nil,
|
|
102
|
+
# Returns the last _n_ elements from the list.
|
|
103
|
+
last: nil,
|
|
104
|
+
# The available bounty statuses to choose from.
|
|
105
|
+
status: nil,
|
|
106
|
+
request_options: {}
|
|
107
|
+
)
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# @api private
|
|
111
|
+
sig { params(client: WhopSDK::Client).returns(T.attached_class) }
|
|
112
|
+
def self.new(client:)
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|
|
@@ -175,6 +175,38 @@ module WhopSDK
|
|
|
175
175
|
)
|
|
176
176
|
end
|
|
177
177
|
|
|
178
|
+
# Create an API key for a connected account (child company) owned by a parent
|
|
179
|
+
# company.
|
|
180
|
+
sig do
|
|
181
|
+
params(
|
|
182
|
+
parent_company_id: String,
|
|
183
|
+
child_company_id: String,
|
|
184
|
+
name: T.nilable(String),
|
|
185
|
+
permissions:
|
|
186
|
+
T.nilable(
|
|
187
|
+
T::Array[WhopSDK::CompanyCreateAPIKeyParams::Permission::OrHash]
|
|
188
|
+
),
|
|
189
|
+
role: T.nilable(WhopSDK::CompanyCreateAPIKeyParams::Role::OrSymbol),
|
|
190
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
191
|
+
).returns(WhopSDK::Models::CompanyCreateAPIKeyResponse)
|
|
192
|
+
end
|
|
193
|
+
def create_api_key(
|
|
194
|
+
# The unique identifier of the parent platform company (e.g. 'biz_xxx').
|
|
195
|
+
parent_company_id,
|
|
196
|
+
# The unique identifier of the connected account to create the API key for (e.g.
|
|
197
|
+
# 'biz_xxx').
|
|
198
|
+
child_company_id:,
|
|
199
|
+
# A human-readable name for the API key, such as 'Production API Key'.
|
|
200
|
+
name: nil,
|
|
201
|
+
# Granular permission statements defining which actions this API key can perform.
|
|
202
|
+
# Either permissions or role must be provided.
|
|
203
|
+
permissions: nil,
|
|
204
|
+
# The different system roles that can be assigned.
|
|
205
|
+
role: nil,
|
|
206
|
+
request_options: {}
|
|
207
|
+
)
|
|
208
|
+
end
|
|
209
|
+
|
|
178
210
|
# @api private
|
|
179
211
|
sig { params(client: WhopSDK::Client).returns(T.attached_class) }
|
|
180
212
|
def self.new(client:)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Resources
|
|
5
|
+
# Conversions
|
|
6
|
+
class Conversions
|
|
7
|
+
# Track a conversion or engagement event for a company.
|
|
8
|
+
#
|
|
9
|
+
# Required permissions:
|
|
10
|
+
#
|
|
11
|
+
# - `event:create`
|
|
12
|
+
sig do
|
|
13
|
+
params(
|
|
14
|
+
company_id: String,
|
|
15
|
+
event_name: WhopSDK::ConversionCreateParams::EventName::OrSymbol,
|
|
16
|
+
action_source:
|
|
17
|
+
T.nilable(WhopSDK::ConversionCreateParams::ActionSource::OrSymbol),
|
|
18
|
+
context: T.nilable(WhopSDK::ConversionCreateParams::Context::OrHash),
|
|
19
|
+
currency: T.nilable(WhopSDK::Currency::OrSymbol),
|
|
20
|
+
custom_name: T.nilable(String),
|
|
21
|
+
event_id: T.nilable(String),
|
|
22
|
+
event_time: T.nilable(Time),
|
|
23
|
+
plan_id: T.nilable(String),
|
|
24
|
+
product_id: T.nilable(String),
|
|
25
|
+
referrer_url: T.nilable(String),
|
|
26
|
+
url: T.nilable(String),
|
|
27
|
+
user: T.nilable(WhopSDK::ConversionCreateParams::User::OrHash),
|
|
28
|
+
value: T.nilable(Float),
|
|
29
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
30
|
+
).returns(WhopSDK::Models::ConversionCreateResponse)
|
|
31
|
+
end
|
|
32
|
+
def create(
|
|
33
|
+
# The company to associate with this event.
|
|
34
|
+
company_id:,
|
|
35
|
+
# The type of event.
|
|
36
|
+
event_name:,
|
|
37
|
+
# The channel where an event originated
|
|
38
|
+
action_source: nil,
|
|
39
|
+
# Tracking and attribution context.
|
|
40
|
+
context: nil,
|
|
41
|
+
# The available currencies on the platform
|
|
42
|
+
currency: nil,
|
|
43
|
+
# Custom event name when event_name is 'custom'.
|
|
44
|
+
custom_name: nil,
|
|
45
|
+
# Client-provided identifier for deduplication. Generated if omitted.
|
|
46
|
+
event_id: nil,
|
|
47
|
+
# When the event occurred. Defaults to now.
|
|
48
|
+
event_time: nil,
|
|
49
|
+
# The plan associated with the event.
|
|
50
|
+
plan_id: nil,
|
|
51
|
+
# The product associated with the event.
|
|
52
|
+
product_id: nil,
|
|
53
|
+
# The referring URL.
|
|
54
|
+
referrer_url: nil,
|
|
55
|
+
# The URL where the event occurred.
|
|
56
|
+
url: nil,
|
|
57
|
+
# User identity and profile data.
|
|
58
|
+
user: nil,
|
|
59
|
+
# Monetary value associated with the event.
|
|
60
|
+
value: nil,
|
|
61
|
+
request_options: {}
|
|
62
|
+
)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# @api private
|
|
66
|
+
sig { params(client: WhopSDK::Client).returns(T.attached_class) }
|
|
67
|
+
def self.new(client:)
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
@@ -9,6 +9,8 @@ module WhopSDK
|
|
|
9
9
|
sig do
|
|
10
10
|
params(
|
|
11
11
|
filename: String,
|
|
12
|
+
visibility:
|
|
13
|
+
T.nilable(WhopSDK::FileCreateParams::Visibility::OrSymbol),
|
|
12
14
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
13
15
|
).returns(WhopSDK::Models::FileCreateResponse)
|
|
14
16
|
end
|
|
@@ -16,6 +18,9 @@ module WhopSDK
|
|
|
16
18
|
# The name of the file including its extension (e.g., "photo.png" or
|
|
17
19
|
# "document.pdf").
|
|
18
20
|
filename:,
|
|
21
|
+
# Controls whether an uploaded file is publicly accessible or requires
|
|
22
|
+
# authentication to access.
|
|
23
|
+
visibility: nil,
|
|
19
24
|
request_options: {}
|
|
20
25
|
)
|
|
21
26
|
end
|
|
@@ -140,6 +140,7 @@ module WhopSDK
|
|
|
140
140
|
after: T.nilable(String),
|
|
141
141
|
before: T.nilable(String),
|
|
142
142
|
first: T.nilable(Integer),
|
|
143
|
+
include_bounty_anchors: T.nilable(T::Boolean),
|
|
143
144
|
last: T.nilable(Integer),
|
|
144
145
|
parent_id: T.nilable(String),
|
|
145
146
|
pinned: T.nilable(T::Boolean),
|
|
@@ -157,6 +158,8 @@ module WhopSDK
|
|
|
157
158
|
before: nil,
|
|
158
159
|
# Returns the first _n_ elements from the list.
|
|
159
160
|
first: nil,
|
|
161
|
+
# Whether to include top-level bounty discussion anchors as rich forum items.
|
|
162
|
+
include_bounty_anchors: nil,
|
|
160
163
|
# Returns the last _n_ elements from the list.
|
|
161
164
|
last: nil,
|
|
162
165
|
# The unique identifier of a parent post to list comments for. When set, returns
|
|
@@ -31,6 +31,7 @@ module WhopSDK
|
|
|
31
31
|
sig do
|
|
32
32
|
params(
|
|
33
33
|
id: String,
|
|
34
|
+
banned_words: T.nilable(T::Array[String]),
|
|
34
35
|
banner_image:
|
|
35
36
|
T.nilable(WhopSDK::ForumUpdateParams::BannerImage::OrHash),
|
|
36
37
|
email_notification_preference:
|
|
@@ -44,6 +45,9 @@ module WhopSDK
|
|
|
44
45
|
# The unique identifier of the forum to update. Accepts either an experience ID
|
|
45
46
|
# (e.g. 'exp_xxxxx') or a forum ID.
|
|
46
47
|
id,
|
|
48
|
+
# A list of words that are automatically blocked from posts in this forum. For
|
|
49
|
+
# example, ['spam', 'scam'].
|
|
50
|
+
banned_words: nil,
|
|
47
51
|
# The banner image displayed at the top of the forum page. Pass null to remove the
|
|
48
52
|
# existing banner.
|
|
49
53
|
banner_image: nil,
|
|
@@ -67,13 +67,17 @@ module WhopSDK
|
|
|
67
67
|
member_id: T.nilable(String),
|
|
68
68
|
payment_method_id: T.nilable(String),
|
|
69
69
|
plan: T.nilable(WhopSDK::InvoiceUpdateParams::Plan::OrHash),
|
|
70
|
+
product_id: T.nilable(String),
|
|
71
|
+
subscription_billing_anchor_at: T.nilable(Time),
|
|
70
72
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
71
73
|
).returns(WhopSDK::Invoice)
|
|
72
74
|
end
|
|
73
75
|
def update(
|
|
74
76
|
# The unique identifier of the invoice to update.
|
|
75
77
|
id,
|
|
76
|
-
# The date and time when the invoice will be automatically finalized
|
|
78
|
+
# The date and time when the invoice will be automatically finalized. For
|
|
79
|
+
# charge_automatically, triggers an automatic charge. For send_invoice, sends the
|
|
80
|
+
# invoice email at the specified time.
|
|
77
81
|
automatically_finalizes_at: nil,
|
|
78
82
|
# Inline billing address to create or update a mailing address for this invoice.
|
|
79
83
|
billing_address: nil,
|
|
@@ -97,6 +101,11 @@ module WhopSDK
|
|
|
97
101
|
payment_method_id: nil,
|
|
98
102
|
# Updated plan attributes.
|
|
99
103
|
plan: nil,
|
|
104
|
+
# The unique identifier of an existing product to attach to this invoice. Only
|
|
105
|
+
# allowed while the invoice is still a draft.
|
|
106
|
+
product_id: nil,
|
|
107
|
+
# The date that defines when the subscription billing cycle should start.
|
|
108
|
+
subscription_billing_anchor_at: nil,
|
|
100
109
|
request_options: {}
|
|
101
110
|
)
|
|
102
111
|
end
|
|
@@ -211,8 +211,9 @@ module WhopSDK
|
|
|
211
211
|
def refund(
|
|
212
212
|
# The unique identifier of the payment to refund.
|
|
213
213
|
id,
|
|
214
|
-
# The amount to refund
|
|
215
|
-
#
|
|
214
|
+
# The amount to refund. For multi-currency payments, this is in the charge
|
|
215
|
+
# currency (what the buyer paid). For single-currency, this is in the payment
|
|
216
|
+
# currency. If omitted, the full payment amount is refunded.
|
|
216
217
|
partial_amount: nil,
|
|
217
218
|
request_options: {}
|
|
218
219
|
)
|
|
@@ -16,6 +16,7 @@ module WhopSDK
|
|
|
16
16
|
params(
|
|
17
17
|
company_id: String,
|
|
18
18
|
product_id: String,
|
|
19
|
+
adaptive_pricing_enabled: T.nilable(T::Boolean),
|
|
19
20
|
billing_period: T.nilable(Integer),
|
|
20
21
|
checkout_styling:
|
|
21
22
|
T.nilable(WhopSDK::PlanCreateParams::CheckoutStyling::OrHash),
|
|
@@ -50,6 +51,8 @@ module WhopSDK
|
|
|
50
51
|
company_id:,
|
|
51
52
|
# The unique identifier of the product to attach this plan to.
|
|
52
53
|
product_id:,
|
|
54
|
+
# Whether this plan accepts local currency payments via adaptive pricing.
|
|
55
|
+
adaptive_pricing_enabled: nil,
|
|
53
56
|
# The number of days between recurring charges. For example, 30 for monthly or 365
|
|
54
57
|
# for yearly.
|
|
55
58
|
billing_period: nil,
|
|
@@ -135,6 +138,7 @@ module WhopSDK
|
|
|
135
138
|
sig do
|
|
136
139
|
params(
|
|
137
140
|
id: String,
|
|
141
|
+
adaptive_pricing_enabled: T.nilable(T::Boolean),
|
|
138
142
|
billing_period: T.nilable(Integer),
|
|
139
143
|
checkout_styling:
|
|
140
144
|
T.nilable(WhopSDK::PlanUpdateParams::CheckoutStyling::OrHash),
|
|
@@ -167,6 +171,8 @@ module WhopSDK
|
|
|
167
171
|
def update(
|
|
168
172
|
# The unique identifier of the plan to update.
|
|
169
173
|
id,
|
|
174
|
+
# Whether this plan accepts local currency payments via adaptive pricing.
|
|
175
|
+
adaptive_pricing_enabled: nil,
|
|
170
176
|
# The number of days between recurring charges. For example, 30 for monthly or 365
|
|
171
177
|
# for yearly.
|
|
172
178
|
billing_period: nil,
|
|
@@ -56,14 +56,15 @@ module WhopSDK
|
|
|
56
56
|
# - `support_chat:read`
|
|
57
57
|
sig do
|
|
58
58
|
params(
|
|
59
|
-
company_id: String,
|
|
60
59
|
after: T.nilable(String),
|
|
61
60
|
before: T.nilable(String),
|
|
61
|
+
company_id: T.nilable(String),
|
|
62
62
|
direction: T.nilable(WhopSDK::Direction::OrSymbol),
|
|
63
63
|
first: T.nilable(Integer),
|
|
64
64
|
last: T.nilable(Integer),
|
|
65
65
|
open_: T.nilable(T::Boolean),
|
|
66
66
|
order: T.nilable(WhopSDK::SupportChannelListParams::Order::OrSymbol),
|
|
67
|
+
view: T.nilable(WhopSDK::SupportChannelListParams::View::OrSymbol),
|
|
67
68
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
68
69
|
).returns(
|
|
69
70
|
WhopSDK::Internal::CursorPage[
|
|
@@ -72,12 +73,14 @@ module WhopSDK
|
|
|
72
73
|
)
|
|
73
74
|
end
|
|
74
75
|
def list(
|
|
75
|
-
# The unique identifier of the company to list support channels for.
|
|
76
|
-
company_id:,
|
|
77
76
|
# Returns the elements in the list that come after the specified cursor.
|
|
78
77
|
after: nil,
|
|
79
78
|
# Returns the elements in the list that come before the specified cursor.
|
|
80
79
|
before: nil,
|
|
80
|
+
# The unique identifier of the company to list support channels for. Includes
|
|
81
|
+
# channels of child companies. When omitted, returns support channels across all
|
|
82
|
+
# companies the user has access to.
|
|
83
|
+
company_id: nil,
|
|
81
84
|
# The direction of the sort.
|
|
82
85
|
direction: nil,
|
|
83
86
|
# Returns the first _n_ elements from the list.
|
|
@@ -89,6 +92,8 @@ module WhopSDK
|
|
|
89
92
|
open_: nil,
|
|
90
93
|
# Sort options for message channels
|
|
91
94
|
order: nil,
|
|
95
|
+
# The perspective to filter support channels by.
|
|
96
|
+
view: nil,
|
|
92
97
|
request_options: {}
|
|
93
98
|
)
|
|
94
99
|
end
|