whop_sdk 2.3.0 → 2.4.0
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/.fern/metadata.json +3 -3
- data/.fern/replay.lock +91 -1
- data/lib/whop_sdk/ad_groups/types/post_ad_group_updated_payload.rb +25 -0
- data/lib/whop_sdk/ad_groups/types/post_ad_group_updated_payload_api_version.rb +13 -0
- data/lib/whop_sdk/ad_groups/types/post_ad_group_updated_payload_data.rb +77 -0
- data/lib/whop_sdk/ad_groups/types/post_ad_group_updated_payload_data_bid_type.rb +15 -0
- data/lib/whop_sdk/ad_groups/types/post_ad_group_updated_payload_data_budget_type.rb +14 -0
- data/lib/whop_sdk/ad_groups/types/post_ad_group_updated_payload_data_conversion_location.rb +21 -0
- data/lib/whop_sdk/ad_groups/types/post_ad_group_updated_payload_data_delivery_status.rb +27 -0
- data/lib/whop_sdk/ad_groups/types/post_ad_group_updated_payload_data_message_apps_item.rb +15 -0
- data/lib/whop_sdk/ad_groups/types/post_ad_group_updated_payload_data_optimization_goal.rb +30 -0
- data/lib/whop_sdk/ad_groups/types/post_ad_group_updated_payload_data_platform.rb +15 -0
- data/lib/whop_sdk/ad_groups/types/post_ad_group_updated_payload_data_status.rb +16 -0
- data/lib/whop_sdk/ad_groups/types/post_ad_group_updated_payload_type.rb +13 -0
- data/lib/whop_sdk/ad_pixels/client.rb +241 -0
- data/lib/whop_sdk/ad_pixels/types/create_ad_pixels_request.rb +17 -0
- data/lib/whop_sdk/ad_pixels/types/create_ad_pixels_request_platform.rb +13 -0
- data/lib/whop_sdk/ad_pixels/types/delete_ad_pixels_request.rb +11 -0
- data/lib/whop_sdk/ad_pixels/types/delete_ad_pixels_response.rb +13 -0
- data/lib/whop_sdk/ad_pixels/types/list_ad_pixels_request.rb +23 -0
- data/lib/whop_sdk/ad_pixels/types/list_ad_pixels_request_direction.rb +14 -0
- data/lib/whop_sdk/ad_pixels/types/list_ad_pixels_request_order.rb +13 -0
- data/lib/whop_sdk/ad_pixels/types/list_ad_pixels_response.rb +13 -0
- data/lib/whop_sdk/ad_pixels/types/list_ad_pixels_response_page_info.rb +17 -0
- data/lib/whop_sdk/ad_pixels/types/retrieve_ad_pixels_request.rb +11 -0
- data/lib/whop_sdk/ad_pixels/types/update_ad_pixels_request.rb +13 -0
- data/lib/whop_sdk/api_keys/types/create_api_keys_request_api_version_date.rb +3 -0
- data/lib/whop_sdk/api_keys/types/update_api_keys_request_api_version_date.rb +3 -0
- data/lib/whop_sdk/apps/types/create_apps_request.rb +2 -0
- data/lib/whop_sdk/apps/types/list_apps_request_order.rb +1 -0
- data/lib/whop_sdk/card_transactions/client.rb +8 -4
- data/lib/whop_sdk/card_transactions/types/list_card_transactions_request.rb +2 -0
- data/lib/whop_sdk/card_transactions/types/retrieve_card_transactions_request.rb +2 -0
- data/lib/whop_sdk/client.rb +6 -1
- data/lib/whop_sdk/domains/client.rb +5 -3
- data/lib/whop_sdk/domains/types/list_domains_request.rb +5 -3
- data/lib/whop_sdk/domains/types/list_domains_request_platform.rb +17 -0
- data/lib/whop_sdk/domains/types/list_domains_request_registration.rb +17 -0
- data/lib/whop_sdk/domains/types/list_domains_request_verification.rb +17 -0
- data/lib/whop_sdk/domains/types/list_domains_request_website.rb +17 -0
- data/lib/whop_sdk/economic_intelligence/client.rb +3 -1
- data/lib/whop_sdk/experiments/client.rb +11 -16
- data/lib/whop_sdk/feedback_submissions/client.rb +3 -3
- data/lib/whop_sdk/internal/http/raw_client.rb +1 -1
- data/lib/whop_sdk/notifications/topics/client.rb +1 -1
- data/lib/whop_sdk/partner_referral_requests/types/create_partner_referral_requests_request_body_code.rb +1 -2
- data/lib/whop_sdk/payment_quotes/types/create_payment_quotes_request.rb +2 -0
- data/lib/whop_sdk/payment_quotes/types/create_payment_quotes_request_address.rb +1 -1
- data/lib/whop_sdk/payments/client.rb +38 -0
- data/lib/whop_sdk/payments/types/generate_pdf_payments_request.rb +11 -0
- data/lib/whop_sdk/promo_codes/client.rb +1 -1
- data/lib/whop_sdk/transfers/client.rb +4 -7
- data/lib/whop_sdk/transfers/types/create_transfers_request_body.rb +17 -0
- data/lib/whop_sdk/transfers/types/{create_transfers_request.rb → create_transfers_request_body_balance.rb} +6 -10
- data/lib/whop_sdk/transfers/types/{create_transfers_request_feed_type.rb → create_transfers_request_body_balance_feed_type.rb} +1 -1
- data/lib/whop_sdk/transfers/types/create_transfers_request_body_claim_link.rb +18 -0
- data/lib/whop_sdk/transfers/types/create_transfers_response.rb +0 -2
- data/lib/whop_sdk/transfers/types/create_transfers_response_transfer.rb +15 -17
- data/lib/whop_sdk/transfers/types/create_transfers_response_transfer_destination.rb +5 -5
- data/lib/whop_sdk/transfers/types/{create_transfers_request_type.rb → create_transfers_response_transfer_destination_object.rb} +3 -4
- data/lib/whop_sdk/transfers/types/create_transfers_response_transfer_origin.rb +5 -5
- data/lib/whop_sdk/transfers/types/create_transfers_response_transfer_origin_object.rb +14 -0
- data/lib/whop_sdk/transfers/types/list_transfers_response_data_item.rb +16 -14
- data/lib/whop_sdk/transfers/types/list_transfers_response_data_item_destination.rb +18 -0
- data/lib/whop_sdk/transfers/types/list_transfers_response_data_item_destination_object.rb +14 -0
- data/lib/whop_sdk/transfers/types/list_transfers_response_data_item_origin.rb +18 -0
- data/lib/whop_sdk/transfers/types/list_transfers_response_data_item_origin_object.rb +14 -0
- data/lib/whop_sdk/transfers/types/post_transfer_completed_payload_data.rb +16 -18
- data/lib/whop_sdk/transfers/types/post_transfer_completed_payload_data_destination.rb +5 -5
- data/lib/whop_sdk/transfers/types/post_transfer_completed_payload_data_destination_object.rb +14 -0
- data/lib/whop_sdk/transfers/types/post_transfer_completed_payload_data_origin.rb +5 -5
- data/lib/whop_sdk/transfers/types/post_transfer_completed_payload_data_origin_object.rb +14 -0
- data/lib/whop_sdk/transfers/types/post_transfer_created_payload_data.rb +16 -18
- data/lib/whop_sdk/transfers/types/post_transfer_created_payload_data_destination.rb +5 -5
- data/lib/whop_sdk/transfers/types/post_transfer_created_payload_data_destination_object.rb +14 -0
- data/lib/whop_sdk/transfers/types/post_transfer_created_payload_data_origin.rb +5 -5
- data/lib/whop_sdk/transfers/types/post_transfer_created_payload_data_origin_object.rb +14 -0
- data/lib/whop_sdk/transfers/types/post_transfer_failed_payload_data.rb +16 -18
- data/lib/whop_sdk/transfers/types/post_transfer_failed_payload_data_destination.rb +5 -5
- data/lib/whop_sdk/transfers/types/post_transfer_failed_payload_data_destination_object.rb +14 -0
- data/lib/whop_sdk/transfers/types/post_transfer_failed_payload_data_origin.rb +5 -5
- data/lib/whop_sdk/transfers/types/post_transfer_failed_payload_data_origin_object.rb +14 -0
- data/lib/whop_sdk/transfers/types/retrieve_transfers_response.rb +16 -18
- data/lib/whop_sdk/transfers/types/retrieve_transfers_response_destination.rb +5 -5
- data/lib/whop_sdk/transfers/types/retrieve_transfers_response_destination_object.rb +14 -0
- data/lib/whop_sdk/transfers/types/retrieve_transfers_response_origin.rb +5 -5
- data/lib/whop_sdk/transfers/types/retrieve_transfers_response_origin_object.rb +14 -0
- data/lib/whop_sdk/types/ad_pixel.rb +25 -0
- data/lib/whop_sdk/types/ad_pixel_platform.rb +11 -0
- data/lib/whop_sdk/types/ad_pixel_status.rb +13 -0
- data/lib/whop_sdk/types/api_key_api_version_date.rb +3 -0
- data/lib/whop_sdk/types/app.rb +3 -3
- data/lib/whop_sdk/types/app_list_item.rb +3 -3
- data/lib/whop_sdk/types/domain.rb +2 -0
- data/lib/whop_sdk/types/domain_issue_capability.rb +1 -0
- data/lib/whop_sdk/types/domain_list_item.rb +2 -0
- data/lib/whop_sdk/types/domain_platform.rb +9 -0
- data/lib/whop_sdk/types/domain_platform_state.rb +14 -0
- data/lib/whop_sdk/types/payment.rb +0 -2
- data/lib/whop_sdk/types/payment_pdf.rb +11 -0
- data/lib/whop_sdk/types/payment_quote_located_by.rb +1 -0
- data/lib/whop_sdk/types/permission_action.rb +2 -0
- data/lib/whop_sdk/types/user.rb +2 -0
- data/lib/whop_sdk/types/user_preferences.rb +2 -0
- data/lib/whop_sdk/types/webhook_event.rb +1 -0
- data/lib/whop_sdk/types/webhook_events_item.rb +1 -0
- data/lib/whop_sdk/types/webhook_list_item_events_item.rb +1 -0
- data/lib/whop_sdk/types/webhook_testable_events_item.rb +1 -0
- data/lib/whop_sdk/users/client.rb +2 -2
- data/lib/whop_sdk/users/preferences/types/update_preferences_request.rb +2 -0
- data/lib/whop_sdk/variants/client.rb +8 -2
- data/lib/whop_sdk/variants/types/list_variants_request.rb +2 -0
- data/lib/whop_sdk/variants/types/retrieve_variants_request.rb +2 -0
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk/webhooks/types/create_webhooks_request_events_item.rb +1 -0
- data/lib/whop_sdk/webhooks/types/update_webhooks_request_events_item.rb +1 -0
- data/lib/whop_sdk.rb +53 -32
- data/reference.md +565 -143
- metadata +55 -34
- data/lib/whop_sdk/transfers/types/create_transfers_response_send.rb +0 -20
- data/lib/whop_sdk/transfers/types/create_transfers_response_send_destination.rb +0 -13
- data/lib/whop_sdk/transfers/types/create_transfers_response_send_source.rb +0 -13
- data/lib/whop_sdk/transfers/types/create_transfers_response_transfer_created_by_user.rb +0 -17
- data/lib/whop_sdk/transfers/types/create_transfers_response_transfer_destination_company.rb +0 -15
- data/lib/whop_sdk/transfers/types/create_transfers_response_transfer_destination_user.rb +0 -15
- data/lib/whop_sdk/transfers/types/create_transfers_response_transfer_origin_company.rb +0 -15
- data/lib/whop_sdk/transfers/types/create_transfers_response_transfer_origin_user.rb +0 -15
- data/lib/whop_sdk/transfers/types/list_transfers_response_data_item_created_by_user.rb +0 -17
- data/lib/whop_sdk/transfers/types/post_transfer_completed_payload_data_created_by_user.rb +0 -17
- data/lib/whop_sdk/transfers/types/post_transfer_completed_payload_data_destination_company.rb +0 -15
- data/lib/whop_sdk/transfers/types/post_transfer_completed_payload_data_destination_user.rb +0 -15
- data/lib/whop_sdk/transfers/types/post_transfer_completed_payload_data_origin_company.rb +0 -15
- data/lib/whop_sdk/transfers/types/post_transfer_completed_payload_data_origin_user.rb +0 -15
- data/lib/whop_sdk/transfers/types/post_transfer_created_payload_data_created_by_user.rb +0 -17
- data/lib/whop_sdk/transfers/types/post_transfer_created_payload_data_destination_company.rb +0 -15
- data/lib/whop_sdk/transfers/types/post_transfer_created_payload_data_destination_user.rb +0 -15
- data/lib/whop_sdk/transfers/types/post_transfer_created_payload_data_origin_company.rb +0 -15
- data/lib/whop_sdk/transfers/types/post_transfer_created_payload_data_origin_user.rb +0 -15
- data/lib/whop_sdk/transfers/types/post_transfer_failed_payload_data_created_by_user.rb +0 -17
- data/lib/whop_sdk/transfers/types/post_transfer_failed_payload_data_destination_company.rb +0 -15
- data/lib/whop_sdk/transfers/types/post_transfer_failed_payload_data_destination_user.rb +0 -15
- data/lib/whop_sdk/transfers/types/post_transfer_failed_payload_data_origin_company.rb +0 -15
- data/lib/whop_sdk/transfers/types/post_transfer_failed_payload_data_origin_user.rb +0 -15
- data/lib/whop_sdk/transfers/types/retrieve_transfers_response_created_by_user.rb +0 -17
- data/lib/whop_sdk/transfers/types/retrieve_transfers_response_destination_company.rb +0 -15
- data/lib/whop_sdk/transfers/types/retrieve_transfers_response_destination_user.rb +0 -15
- data/lib/whop_sdk/transfers/types/retrieve_transfers_response_origin_company.rb +0 -15
- data/lib/whop_sdk/transfers/types/retrieve_transfers_response_origin_user.rb +0 -15
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Whop_sdk
|
|
4
|
+
module AdPixels
|
|
5
|
+
module Types
|
|
6
|
+
class CreateAdPixelsRequest < Internal::Types::Model
|
|
7
|
+
field :access_token, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :account_id, -> { String }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :external_id, -> { String }, optional: false, nullable: false
|
|
12
|
+
|
|
13
|
+
field :platform, -> { Whop_sdk::AdPixels::Types::CreateAdPixelsRequestPlatform }, optional: false, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Whop_sdk
|
|
4
|
+
module AdPixels
|
|
5
|
+
module Types
|
|
6
|
+
class DeleteAdPixelsResponse < Internal::Types::Model
|
|
7
|
+
field :deleted, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Whop_sdk
|
|
4
|
+
module AdPixels
|
|
5
|
+
module Types
|
|
6
|
+
class ListAdPixelsRequest < Internal::Types::Model
|
|
7
|
+
field :account_id, -> { String }, optional: true, nullable: false
|
|
8
|
+
|
|
9
|
+
field :first, -> { Integer }, optional: true, nullable: false
|
|
10
|
+
|
|
11
|
+
field :after, -> { String }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :last, -> { Integer }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :before, -> { String }, optional: true, nullable: false
|
|
16
|
+
|
|
17
|
+
field :order, -> { Whop_sdk::AdPixels::Types::ListAdPixelsRequestOrder }, optional: true, nullable: false
|
|
18
|
+
|
|
19
|
+
field :direction, -> { Whop_sdk::AdPixels::Types::ListAdPixelsRequestDirection }, optional: true, nullable: false
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Whop_sdk
|
|
4
|
+
module AdPixels
|
|
5
|
+
module Types
|
|
6
|
+
class ListAdPixelsResponse < Internal::Types::Model
|
|
7
|
+
field :data, -> { Internal::Types::Array[Whop_sdk::Types::AdPixel] }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :page_info, -> { Whop_sdk::AdPixels::Types::ListAdPixelsResponsePageInfo }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Whop_sdk
|
|
4
|
+
module AdPixels
|
|
5
|
+
module Types
|
|
6
|
+
class ListAdPixelsResponsePageInfo < Internal::Types::Model
|
|
7
|
+
field :end_cursor, -> { String }, optional: false, nullable: true
|
|
8
|
+
|
|
9
|
+
field :has_next_page, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :has_previous_page, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
12
|
+
|
|
13
|
+
field :start_cursor, -> { String }, optional: false, nullable: true
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Whop_sdk
|
|
4
|
+
module AdPixels
|
|
5
|
+
module Types
|
|
6
|
+
class UpdateAdPixelsRequest < Internal::Types::Model
|
|
7
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :access_token, -> { String }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -67,6 +67,9 @@ module Whop_sdk
|
|
|
67
67
|
TWO_THOUSAND_TWENTY_SIX10071 = "2026-10-07-1"
|
|
68
68
|
TWO_THOUSAND_TWENTY_SIX10072 = "2026-10-07-2"
|
|
69
69
|
TWO_THOUSAND_TWENTY_SIX1008 = "2026-10-08"
|
|
70
|
+
TWO_THOUSAND_TWENTY_SIX1009 = "2026-10-09"
|
|
71
|
+
TWO_THOUSAND_TWENTY_SIX10091 = "2026-10-09-1"
|
|
72
|
+
TWO_THOUSAND_TWENTY_SIX10092 = "2026-10-09-2"
|
|
70
73
|
end
|
|
71
74
|
end
|
|
72
75
|
end
|
|
@@ -67,6 +67,9 @@ module Whop_sdk
|
|
|
67
67
|
TWO_THOUSAND_TWENTY_SIX10071 = "2026-10-07-1"
|
|
68
68
|
TWO_THOUSAND_TWENTY_SIX10072 = "2026-10-07-2"
|
|
69
69
|
TWO_THOUSAND_TWENTY_SIX1008 = "2026-10-08"
|
|
70
|
+
TWO_THOUSAND_TWENTY_SIX1009 = "2026-10-09"
|
|
71
|
+
TWO_THOUSAND_TWENTY_SIX10091 = "2026-10-09-1"
|
|
72
|
+
TWO_THOUSAND_TWENTY_SIX10092 = "2026-10-09-2"
|
|
70
73
|
end
|
|
71
74
|
end
|
|
72
75
|
end
|
|
@@ -10,6 +10,8 @@ module Whop_sdk
|
|
|
10
10
|
|
|
11
11
|
field :base_url, -> { String }, optional: true, nullable: false
|
|
12
12
|
|
|
13
|
+
field :domain_id, -> { String }, optional: true, nullable: false
|
|
14
|
+
|
|
13
15
|
field :icon, -> { Whop_sdk::Apps::Types::CreateAppsRequestIcon }, optional: true, nullable: false
|
|
14
16
|
|
|
15
17
|
field :imported_from_url, -> { String }, optional: true, nullable: false
|
|
@@ -8,6 +8,7 @@ module Whop_sdk
|
|
|
8
8
|
|
|
9
9
|
CREATED_AT = "created_at"
|
|
10
10
|
DISCOVERABLE_AT = "discoverable_at"
|
|
11
|
+
TEMPLATE_RECENT_SALES = "template_recent_sales"
|
|
11
12
|
TEMPLATE_USAGE = "template_usage"
|
|
12
13
|
TOTAL_INSTALLS_LAST30DAYS = "total_installs_last_30_days"
|
|
13
14
|
TOTAL_INSTALLS_LAST7DAYS = "total_installs_last_7_days"
|
|
@@ -14,10 +14,10 @@ module Whop_sdk
|
|
|
14
14
|
@environment = environment
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
# Lists an account
|
|
18
|
-
# every card the owner has ever had, including canceled cards and spend that predates a
|
|
19
|
-
# members only see transactions on the cards assigned to them. Pass `transaction_ids` to
|
|
20
|
-
# transactions instead of paging for them.
|
|
17
|
+
# Lists the card transactions of an account or a user, newest first. Defaults to the account the credential
|
|
18
|
+
# belongs to. Covers every card the owner has ever had, including canceled cards and spend that predates a
|
|
19
|
+
# re-application, and team members only see transactions on the cards assigned to them. Pass `transaction_ids` to
|
|
20
|
+
# fetch specific transactions instead of paging for them.
|
|
21
21
|
#
|
|
22
22
|
# @param request_options [Hash]
|
|
23
23
|
# @param params [Hash]
|
|
@@ -27,6 +27,7 @@ module Whop_sdk
|
|
|
27
27
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
28
28
|
# @option request_options [Integer] :timeout_in_seconds
|
|
29
29
|
# @option params [String, nil] :account_id
|
|
30
|
+
# @option params [String, nil] :user_id
|
|
30
31
|
# @option params [String, nil] :transaction_ids
|
|
31
32
|
# @option params [String, nil] :card_id
|
|
32
33
|
# @option params [String, nil] :cardholder_id
|
|
@@ -52,6 +53,7 @@ module Whop_sdk
|
|
|
52
53
|
params = Whop_sdk::Internal::Types::Utils.normalize_keys(params)
|
|
53
54
|
query_params = {}
|
|
54
55
|
query_params["account_id"] = params[:account_id] if params.key?(:account_id)
|
|
56
|
+
query_params["user_id"] = params[:user_id] if params.key?(:user_id)
|
|
55
57
|
query_params["transaction_ids"] = params[:transaction_ids] if params.key?(:transaction_ids)
|
|
56
58
|
query_params["card_id"] = params[:card_id] if params.key?(:card_id)
|
|
57
59
|
query_params["cardholder_id"] = params[:cardholder_id] if params.key?(:cardholder_id)
|
|
@@ -106,6 +108,7 @@ module Whop_sdk
|
|
|
106
108
|
# @option request_options [Integer] :timeout_in_seconds
|
|
107
109
|
# @option params [String] :id
|
|
108
110
|
# @option params [String, nil] :account_id
|
|
111
|
+
# @option params [String, nil] :user_id
|
|
109
112
|
#
|
|
110
113
|
# @example
|
|
111
114
|
# client.card_transactions.retrieve(id: "id")
|
|
@@ -115,6 +118,7 @@ module Whop_sdk
|
|
|
115
118
|
params = Whop_sdk::Internal::Types::Utils.normalize_keys(params)
|
|
116
119
|
query_params = {}
|
|
117
120
|
query_params["account_id"] = params[:account_id] if params.key?(:account_id)
|
|
121
|
+
query_params["user_id"] = params[:user_id] if params.key?(:user_id)
|
|
118
122
|
|
|
119
123
|
request = Whop_sdk::Internal::JSON::Request.new(
|
|
120
124
|
base_url: request_options[:base_url] || @base_url || @environment&.dig(:api),
|
|
@@ -6,6 +6,8 @@ module Whop_sdk
|
|
|
6
6
|
class ListCardTransactionsRequest < Internal::Types::Model
|
|
7
7
|
field :account_id, -> { String }, optional: true, nullable: false
|
|
8
8
|
|
|
9
|
+
field :user_id, -> { String }, optional: true, nullable: false
|
|
10
|
+
|
|
9
11
|
field :transaction_ids, -> { String }, optional: true, nullable: false
|
|
10
12
|
|
|
11
13
|
field :card_id, -> { String }, optional: true, nullable: false
|
data/lib/whop_sdk/client.rb
CHANGED
|
@@ -10,7 +10,7 @@ module Whop_sdk
|
|
|
10
10
|
# @param max_retries [Integer]
|
|
11
11
|
#
|
|
12
12
|
# @return [void]
|
|
13
|
-
def initialize(token:, base_url: nil, environment: Whop_sdk::Environment::PRODUCTION, api_version_date: "2026-10-
|
|
13
|
+
def initialize(token:, base_url: nil, environment: Whop_sdk::Environment::PRODUCTION, api_version_date: "2026-10-09-2", idempotency_key: nil, max_retries: 2)
|
|
14
14
|
@base_url = base_url
|
|
15
15
|
@environment = environment
|
|
16
16
|
|
|
@@ -58,6 +58,11 @@ module Whop_sdk
|
|
|
58
58
|
@ad_groups ||= Whop_sdk::AdGroups::Client.new(client: @raw_client, base_url: @base_url, environment: @environment)
|
|
59
59
|
end
|
|
60
60
|
|
|
61
|
+
# @return [Whop_sdk::AdPixels::Client]
|
|
62
|
+
def ad_pixels
|
|
63
|
+
@ad_pixels ||= Whop_sdk::AdPixels::Client.new(client: @raw_client, base_url: @base_url, environment: @environment)
|
|
64
|
+
end
|
|
65
|
+
|
|
61
66
|
# @return [Whop_sdk::Ads::Client]
|
|
62
67
|
def ads
|
|
63
68
|
@ads ||= Whop_sdk::Ads::Client.new(client: @raw_client, base_url: @base_url, environment: @environment)
|
|
@@ -38,9 +38,10 @@ module Whop_sdk
|
|
|
38
38
|
# @option params [String, nil] :search
|
|
39
39
|
# @option params [String, nil] :tlds
|
|
40
40
|
# @option params [String, nil] :domain
|
|
41
|
-
# @option params [
|
|
42
|
-
# @option params [
|
|
43
|
-
# @option params [
|
|
41
|
+
# @option params [Whop_sdk::Domains::Types::ListDomainsRequestVerification, nil] :verification
|
|
42
|
+
# @option params [Whop_sdk::Domains::Types::ListDomainsRequestRegistration, nil] :registration
|
|
43
|
+
# @option params [Whop_sdk::Domains::Types::ListDomainsRequestPlatform, nil] :platform
|
|
44
|
+
# @option params [Whop_sdk::Domains::Types::ListDomainsRequestWebsite, nil] :website
|
|
44
45
|
#
|
|
45
46
|
# @example
|
|
46
47
|
# client.domains.list(tlds: ["com"])
|
|
@@ -63,6 +64,7 @@ module Whop_sdk
|
|
|
63
64
|
query_params["domain"] = params[:domain] if params.key?(:domain)
|
|
64
65
|
query_params["verification"] = params[:verification] if params.key?(:verification)
|
|
65
66
|
query_params["registration"] = params[:registration] if params.key?(:registration)
|
|
67
|
+
query_params["platform"] = params[:platform] if params.key?(:platform)
|
|
66
68
|
query_params["website"] = params[:website] if params.key?(:website)
|
|
67
69
|
|
|
68
70
|
Whop_sdk::Internal::CursorItemIterator.new(
|
|
@@ -28,11 +28,13 @@ module Whop_sdk
|
|
|
28
28
|
|
|
29
29
|
field :domain, -> { String }, optional: true, nullable: false
|
|
30
30
|
|
|
31
|
-
field :verification, -> {
|
|
31
|
+
field :verification, -> { Whop_sdk::Domains::Types::ListDomainsRequestVerification }, optional: true, nullable: false
|
|
32
32
|
|
|
33
|
-
field :registration, -> {
|
|
33
|
+
field :registration, -> { Whop_sdk::Domains::Types::ListDomainsRequestRegistration }, optional: true, nullable: false
|
|
34
34
|
|
|
35
|
-
field :
|
|
35
|
+
field :platform, -> { Whop_sdk::Domains::Types::ListDomainsRequestPlatform }, optional: true, nullable: false
|
|
36
|
+
|
|
37
|
+
field :website, -> { Whop_sdk::Domains::Types::ListDomainsRequestWebsite }, optional: true, nullable: false
|
|
36
38
|
end
|
|
37
39
|
end
|
|
38
40
|
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Whop_sdk
|
|
4
|
+
module Domains
|
|
5
|
+
module Types
|
|
6
|
+
module ListDomainsRequestPlatform
|
|
7
|
+
extend Whop_sdk::Internal::Types::Enum
|
|
8
|
+
|
|
9
|
+
PENDING = "pending"
|
|
10
|
+
READY = "ready"
|
|
11
|
+
ACTION_REQUIRED = "action_required"
|
|
12
|
+
RELEASING = "releasing"
|
|
13
|
+
ANY = "any"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Whop_sdk
|
|
4
|
+
module Domains
|
|
5
|
+
module Types
|
|
6
|
+
module ListDomainsRequestRegistration
|
|
7
|
+
extend Whop_sdk::Internal::Types::Enum
|
|
8
|
+
|
|
9
|
+
PENDING = "pending"
|
|
10
|
+
READY = "ready"
|
|
11
|
+
ACTION_REQUIRED = "action_required"
|
|
12
|
+
RELEASING = "releasing"
|
|
13
|
+
ANY = "any"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Whop_sdk
|
|
4
|
+
module Domains
|
|
5
|
+
module Types
|
|
6
|
+
module ListDomainsRequestVerification
|
|
7
|
+
extend Whop_sdk::Internal::Types::Enum
|
|
8
|
+
|
|
9
|
+
PENDING = "pending"
|
|
10
|
+
READY = "ready"
|
|
11
|
+
ACTION_REQUIRED = "action_required"
|
|
12
|
+
RELEASING = "releasing"
|
|
13
|
+
ANY = "any"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Whop_sdk
|
|
4
|
+
module Domains
|
|
5
|
+
module Types
|
|
6
|
+
module ListDomainsRequestWebsite
|
|
7
|
+
extend Whop_sdk::Internal::Types::Enum
|
|
8
|
+
|
|
9
|
+
PENDING = "pending"
|
|
10
|
+
READY = "ready"
|
|
11
|
+
ACTION_REQUIRED = "action_required"
|
|
12
|
+
RELEASING = "releasing"
|
|
13
|
+
ANY = "any"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -14,7 +14,9 @@ module Whop_sdk
|
|
|
14
14
|
@environment = environment
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
# Lists an account's recommendations and generation requests, newest first by default.
|
|
17
|
+
# Lists an account's recommendations and generation requests, newest first by default. For callers with
|
|
18
|
+
# company:update permission, listing queues generation when no recommendations are ready or in progress, with a
|
|
19
|
+
# ten-minute cooldown after an unsuccessful request; unsuccessful requests are not listed. Without an account,
|
|
18
20
|
# signed-out visitors receive a business-setup template and eligible users receive their saved setup
|
|
19
21
|
# recommendation. With `has_run` and no account, users receive the recommendations run on every account they can
|
|
20
22
|
# read that has Economic Intelligence. An account's executed recommendations and runs stay listed after Economic
|
|
@@ -14,8 +14,7 @@ module Whop_sdk
|
|
|
14
14
|
@environment = environment
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
# Lists experiments for one account with experiment:read permission.
|
|
18
|
-
# internal experiments, which requires Whop internal access.
|
|
17
|
+
# Lists experiments for one account with experiment:read permission.
|
|
19
18
|
#
|
|
20
19
|
# @param request_options [Hash]
|
|
21
20
|
# @param params [Hash]
|
|
@@ -80,7 +79,7 @@ module Whop_sdk
|
|
|
80
79
|
end
|
|
81
80
|
end
|
|
82
81
|
|
|
83
|
-
# Creates a draft experiment for the specified account.
|
|
82
|
+
# Creates a draft experiment for the specified account.
|
|
84
83
|
#
|
|
85
84
|
# @param request_options [Hash]
|
|
86
85
|
# @param params [Whop_sdk::Experiments::Types::CreateExperimentsRequest]
|
|
@@ -92,7 +91,7 @@ module Whop_sdk
|
|
|
92
91
|
#
|
|
93
92
|
# @example
|
|
94
93
|
# client.experiments.create(
|
|
95
|
-
# account_id: "
|
|
94
|
+
# account_id: "biz_xxxxxxxxxxxxxx",
|
|
96
95
|
# flag_key: "checkout_redesign_v2"
|
|
97
96
|
# )
|
|
98
97
|
#
|
|
@@ -125,13 +124,11 @@ module Whop_sdk
|
|
|
125
124
|
# bucketing identity and account_id for experiment ownership.
|
|
126
125
|
#
|
|
127
126
|
# Pass `flag_key` to check a single flag, or omit it to fetch active flags in the account and related resource
|
|
128
|
-
# scope.
|
|
129
|
-
# explicit `subject[anonymous_id]` takes precedence.
|
|
127
|
+
# scope.
|
|
130
128
|
#
|
|
131
129
|
# Assignments use exactly the configured `bucket_by`: `subject[user_id]`, `subject[account_id]`, or
|
|
132
|
-
# `subject[anonymous_id]`.
|
|
133
|
-
#
|
|
134
|
-
# treatment ranges receive control.
|
|
130
|
+
# `subject[anonymous_id]`. Missing the required identity fails single evaluation and omits the experiment from
|
|
131
|
+
# batch evaluation. Subjects outside all treatment ranges receive control.
|
|
135
132
|
#
|
|
136
133
|
# Pass `subject[account_id]` to enable account-level targeting rules. Pass `properties` as a JSON object to supply
|
|
137
134
|
# the values that `property` targeting conditions match against.
|
|
@@ -190,7 +187,7 @@ module Whop_sdk
|
|
|
190
187
|
end
|
|
191
188
|
|
|
192
189
|
# Retrieves a single experiment or feature flag by its `expt_` id or flag_key handle. Requires the corresponding
|
|
193
|
-
# experiment permission on the owning account
|
|
190
|
+
# experiment permission on the owning account.
|
|
194
191
|
#
|
|
195
192
|
# @param request_options [Hash]
|
|
196
193
|
# @param params [Hash]
|
|
@@ -235,8 +232,7 @@ module Whop_sdk
|
|
|
235
232
|
# Updates the targeting rules, treatment allocation, metrics, or hypothesis of an existing experiment or feature
|
|
236
233
|
# flag. Weights and metrics can only grow, so enrolled users never change arms and an existing metric is never
|
|
237
234
|
# dropped. Lifecycle moves through the transition endpoints (`activate`, `pause`, `end`), never through this
|
|
238
|
-
# update. Requires the corresponding experiment permission on the owning account
|
|
239
|
-
# internal experiments.
|
|
235
|
+
# update. Requires the corresponding experiment permission on the owning account.
|
|
240
236
|
#
|
|
241
237
|
# @param request_options [Hash]
|
|
242
238
|
# @param params [Whop_sdk::Experiments::Types::UpdateExperimentsRequest]
|
|
@@ -285,8 +281,7 @@ module Whop_sdk
|
|
|
285
281
|
|
|
286
282
|
# Starts (or resumes) an experiment or feature flag so evaluation begins serving it. Activating a draft stamps
|
|
287
283
|
# `started_at`; resuming a paused experiment keeps the original start. Only drafts and paused experiments can be
|
|
288
|
-
# activated. Requires the corresponding experiment permission on the owning account
|
|
289
|
-
# internal experiments.
|
|
284
|
+
# activated. Requires the corresponding experiment permission on the owning account.
|
|
290
285
|
#
|
|
291
286
|
# @param request_options [Hash]
|
|
292
287
|
# @param params [Whop_sdk::Experiments::Types::ActivateExperimentsRequest]
|
|
@@ -335,7 +330,7 @@ module Whop_sdk
|
|
|
335
330
|
|
|
336
331
|
# Concludes the experiment and records required `findings`. Pass `winning_arm` to serve the winning treatment to
|
|
337
332
|
# everyone; omit it when control won. Ended experiments cannot restart, but may be ended again to correct the
|
|
338
|
-
# winner. Requires experiment:manage on the account
|
|
333
|
+
# winner. Requires experiment:manage on the account.
|
|
339
334
|
#
|
|
340
335
|
# @param request_options [Hash]
|
|
341
336
|
# @param params [Whop_sdk::Experiments::Types::EndExperimentsRequest]
|
|
@@ -387,7 +382,7 @@ module Whop_sdk
|
|
|
387
382
|
|
|
388
383
|
# Pauses an active experiment or feature flag: evaluation stops serving it and exposures stop flowing. Assignments
|
|
389
384
|
# are keyed on stable identity, so users return to their original arm when the experiment resumes. Requires the
|
|
390
|
-
# corresponding experiment permission on the owning account
|
|
385
|
+
# corresponding experiment permission on the owning account.
|
|
391
386
|
#
|
|
392
387
|
# @param request_options [Hash]
|
|
393
388
|
# @param params [Hash]
|
|
@@ -14,9 +14,9 @@ module Whop_sdk
|
|
|
14
14
|
@environment = environment
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
# Submits an issue or an unanswered question to Whop for
|
|
18
|
-
#
|
|
19
|
-
#
|
|
17
|
+
# Submits an issue or an unanswered question to Whop for review, recorded under the authenticated user, account,
|
|
18
|
+
# or app. Returns a receipt once the submission is accepted; processing is asynchronous and no reply is sent.
|
|
19
|
+
# Accepts user, account, and app credentials.
|
|
20
20
|
#
|
|
21
21
|
# @param request_options [Hash]
|
|
22
22
|
# @param params [Whop_sdk::FeedbackSubmissions::Types::CreateFeedbackSubmissionsRequest]
|
|
@@ -35,7 +35,7 @@ module Whop_sdk
|
|
|
35
35
|
@default_headers = {
|
|
36
36
|
"X-Fern-Language": "Ruby",
|
|
37
37
|
"X-Fern-SDK-Name": "whop_sdk",
|
|
38
|
-
"X-Fern-SDK-Version": "2.
|
|
38
|
+
"X-Fern-SDK-Version": "2.4.0"
|
|
39
39
|
}.merge(headers)
|
|
40
40
|
@overridable_headers = overridable_headers.to_set { |name| name.to_s.downcase }
|
|
41
41
|
end
|
|
@@ -16,7 +16,7 @@ module Whop_sdk
|
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
# Lists the platform's visible notification topics — the categories users can set notification preferences on.
|
|
19
|
-
# App-created topics are
|
|
19
|
+
# App-created topics are not returned.
|
|
20
20
|
#
|
|
21
21
|
# @param request_options [Hash]
|
|
22
22
|
# @param params [Hash]
|
|
@@ -5,8 +5,7 @@ module Whop_sdk
|
|
|
5
5
|
module Types
|
|
6
6
|
# Create your own referral link with an optional custom code and redemption limit. Without configuration, returns
|
|
7
7
|
# your oldest saved link for the selected team membership, or your personal context when `authorized_user_id` is
|
|
8
|
-
# omitted, creating a random code when none exists.
|
|
9
|
-
# partner.
|
|
8
|
+
# omitted, creating a random code when none exists.
|
|
10
9
|
class CreatePartnerReferralRequestsRequestBodyCode < Internal::Types::Model
|
|
11
10
|
field :authorized_user_id, -> { String }, optional: true, nullable: false
|
|
12
11
|
|
|
@@ -8,6 +8,8 @@ module Whop_sdk
|
|
|
8
8
|
|
|
9
9
|
field :ip_address, -> { String }, optional: true, nullable: false
|
|
10
10
|
|
|
11
|
+
field :presentment_country, -> { String }, optional: true, nullable: false
|
|
12
|
+
|
|
11
13
|
field :presentment_currency, -> { String }, optional: true, nullable: false
|
|
12
14
|
|
|
13
15
|
field :shipping_address, -> { Whop_sdk::PaymentQuotes::Types::CreatePaymentQuotesRequestShippingAddress }, optional: true, nullable: false
|
|
@@ -5,7 +5,7 @@ module Whop_sdk
|
|
|
5
5
|
module Types
|
|
6
6
|
# The buyer's billing address. Where tax is calculated when no shipping address is given, and the address a tax
|
|
7
7
|
# registration belongs to. A seller that collects tax on this purchase needs the buyer located by a `country`
|
|
8
|
-
# here, on `shipping_address`, or an `ip_address`; without one the quote is refused with
|
|
8
|
+
# here, on `shipping_address`, a `presentment_country`, or an `ip_address`; without one the quote is refused with
|
|
9
9
|
# `quote_location_required`. Only the keys you supply are kept. The payment that consumes the quote must put the
|
|
10
10
|
# buyer in the same place, by country, state and postal code, through its own `shipping_address` or its
|
|
11
11
|
# confirmation token's billing address, or it is refused with `quote_mismatch`.
|
|
@@ -307,6 +307,44 @@ module Whop_sdk
|
|
|
307
307
|
end
|
|
308
308
|
end
|
|
309
309
|
|
|
310
|
+
# Generates the payment's receipt (invoice) as a PDF and returns a short-lived link to download it. Each call
|
|
311
|
+
# generates a new file and link, so this endpoint does not replay `Idempotency-Key` responses.
|
|
312
|
+
#
|
|
313
|
+
# @param request_options [Hash]
|
|
314
|
+
# @param params [Hash]
|
|
315
|
+
# @option request_options [String] :base_url
|
|
316
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
317
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
318
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
319
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
320
|
+
# @option params [String] :id
|
|
321
|
+
#
|
|
322
|
+
# @example
|
|
323
|
+
# client.payments.generate_pdf(id: "id")
|
|
324
|
+
#
|
|
325
|
+
# @return [Whop_sdk::Types::PaymentPdf]
|
|
326
|
+
def generate_pdf(request_options: {}, **params)
|
|
327
|
+
params = Whop_sdk::Internal::Types::Utils.normalize_keys(params)
|
|
328
|
+
request = Whop_sdk::Internal::JSON::Request.new(
|
|
329
|
+
base_url: request_options[:base_url] || @base_url || @environment&.dig(:api),
|
|
330
|
+
method: "POST",
|
|
331
|
+
path: "payments/#{URI.encode_uri_component(params[:id].to_s)}/generate_pdf",
|
|
332
|
+
request_options: request_options
|
|
333
|
+
)
|
|
334
|
+
begin
|
|
335
|
+
response = @client.send(request)
|
|
336
|
+
rescue Net::HTTPRequestTimeout
|
|
337
|
+
raise Whop_sdk::Errors::TimeoutError
|
|
338
|
+
end
|
|
339
|
+
code = response.code.to_i
|
|
340
|
+
if code.between?(200, 299)
|
|
341
|
+
(response.body.to_s.empty? ? nil : Whop_sdk::Types::PaymentPdf.load(response.body))
|
|
342
|
+
else
|
|
343
|
+
error_class = Whop_sdk::Errors::ResponseError.subclass_for_code(code)
|
|
344
|
+
raise error_class.new(response.body, code: code)
|
|
345
|
+
end
|
|
346
|
+
end
|
|
347
|
+
|
|
310
348
|
# Issues a full or partial refund for a payment. The refund is processed through the original payment processor
|
|
311
349
|
# and the membership status is updated accordingly.
|
|
312
350
|
#
|