whop_sdk 2.2.0 → 2.3.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 +457 -1
- data/lib/whop_sdk/accounts/preferences/client.rb +1 -1
- data/lib/whop_sdk/accounts/preferences/types/retrieve_preferences_response.rb +11 -1
- data/lib/whop_sdk/accounts/preferences/types/retrieve_preferences_response_ads_triple_whale_integration.rb +4 -5
- data/lib/whop_sdk/accounts/preferences/types/retrieve_preferences_response_economic_intelligence_offers_item.rb +2 -0
- data/lib/whop_sdk/accounts/preferences/types/retrieve_preferences_response_economic_intelligence_offers_item_key.rb +1 -0
- data/lib/whop_sdk/accounts/preferences/types/retrieve_preferences_response_economic_intelligence_previous_period.rb +17 -0
- data/lib/whop_sdk/accounts/preferences/types/retrieve_preferences_response_preferred_settlement_currency.rb +19 -0
- data/lib/whop_sdk/accounts/preferences/types/update_preferences_request.rb +4 -0
- data/lib/whop_sdk/accounts/preferences/types/update_preferences_request_ads_triple_whale_integration.rb +1 -3
- data/lib/whop_sdk/accounts/preferences/types/update_preferences_request_economic_intelligence_duration_key.rb +1 -0
- data/lib/whop_sdk/accounts/preferences/types/update_preferences_request_preferred_settlement_currency.rb +19 -0
- data/lib/whop_sdk/accounts/preferences/types/update_preferences_response.rb +11 -1
- data/lib/whop_sdk/accounts/preferences/types/update_preferences_response_ads_triple_whale_integration.rb +4 -5
- data/lib/whop_sdk/accounts/preferences/types/update_preferences_response_economic_intelligence_offers_item.rb +2 -0
- data/lib/whop_sdk/accounts/preferences/types/update_preferences_response_economic_intelligence_offers_item_key.rb +1 -0
- data/lib/whop_sdk/accounts/preferences/types/update_preferences_response_economic_intelligence_previous_period.rb +17 -0
- data/lib/whop_sdk/accounts/preferences/types/update_preferences_response_preferred_settlement_currency.rb +19 -0
- data/lib/whop_sdk/ad_campaigns/client.rb +8 -1
- data/lib/whop_sdk/ad_campaigns/types/create_ad_campaigns_request.rb +2 -0
- data/lib/whop_sdk/ad_campaigns/types/create_ad_campaigns_request_campaign_type.rb +14 -0
- data/lib/whop_sdk/ad_campaigns/types/list_ad_campaigns_request.rb +2 -0
- data/lib/whop_sdk/{trades/types/update_leverage_trades_request_margin_mode.rb → ad_campaigns/types/list_ad_campaigns_request_campaign_type.rb} +4 -4
- data/lib/whop_sdk/ad_campaigns/types/post_ad_campaign_payment_failed_payload_data.rb +2 -0
- data/lib/whop_sdk/ad_campaigns/types/post_ad_campaign_payment_failed_payload_data_campaign_type.rb +14 -0
- data/lib/whop_sdk/ad_campaigns/types/post_ad_campaign_updated_payload_data.rb +2 -0
- data/lib/whop_sdk/ad_campaigns/types/post_ad_campaign_updated_payload_data_campaign_type.rb +14 -0
- data/lib/whop_sdk/ad_campaigns/types/update_ad_campaigns_request.rb +4 -0
- data/lib/whop_sdk/ad_campaigns/types/update_ad_campaigns_request_campaign_type.rb +14 -0
- data/lib/whop_sdk/ad_campaigns/types/update_ad_campaigns_request_x_ads_platform.rb +15 -0
- data/lib/whop_sdk/ad_groups/client.rb +16 -2
- data/lib/whop_sdk/ad_groups/types/create_ad_groups_request.rb +4 -0
- data/lib/whop_sdk/ad_groups/types/create_ad_groups_request_keywords_item.rb +15 -0
- data/lib/whop_sdk/ad_groups/types/create_ad_groups_request_keywords_item_match_type.rb +15 -0
- data/lib/whop_sdk/ad_groups/types/create_ad_groups_request_x_ads_platform.rb +15 -0
- data/lib/whop_sdk/ad_groups/types/update_ad_groups_request.rb +4 -0
- data/lib/whop_sdk/ad_groups/types/update_ad_groups_request_keywords_item.rb +15 -0
- data/lib/whop_sdk/ad_groups/types/update_ad_groups_request_keywords_item_match_type.rb +15 -0
- data/lib/whop_sdk/ad_groups/types/update_ad_groups_request_x_ads_platform.rb +15 -0
- data/lib/whop_sdk/ads/client.rb +16 -2
- data/lib/whop_sdk/ads/types/create_ads_request.rb +4 -2
- data/lib/whop_sdk/ads/types/{create_ads_request_social_accounts_item.rb → create_ads_request_external_accounts_item.rb} +1 -1
- data/lib/whop_sdk/ads/types/create_ads_request_x_ads_platform.rb +15 -0
- data/lib/whop_sdk/ads/types/post_ad_updated_payload_data.rb +2 -2
- data/lib/whop_sdk/ads/types/update_ads_request.rb +4 -2
- data/lib/whop_sdk/ads/types/{update_ads_request_social_accounts_item.rb → update_ads_request_external_accounts_item.rb} +1 -1
- data/lib/whop_sdk/ads/types/update_ads_request_x_ads_platform.rb +15 -0
- data/lib/whop_sdk/api_keys/types/create_api_keys_request_api_version_date.rb +9 -0
- data/lib/whop_sdk/api_keys/types/update_api_keys_request_api_version_date.rb +9 -0
- data/lib/whop_sdk/app_builds/types/create_app_builds_request.rb +0 -2
- data/lib/whop_sdk/apps/types/create_apps_request.rb +2 -0
- data/lib/whop_sdk/apps/types/update_apps_request.rb +2 -0
- data/lib/whop_sdk/claim_links/client.rb +99 -0
- data/lib/whop_sdk/claim_links/types/claim_claim_links_request.rb +11 -0
- data/lib/whop_sdk/claim_links/types/claim_claim_links_response.rb +40 -0
- data/lib/whop_sdk/{trades/types/create_trades_request_instrument_type.rb → claim_links/types/claim_claim_links_response_object.rb} +3 -3
- data/lib/whop_sdk/claim_links/types/claim_claim_links_response_sender.rb +18 -0
- data/lib/whop_sdk/claim_links/types/claim_claim_links_response_sender_account.rb +17 -0
- data/lib/whop_sdk/claim_links/types/claim_claim_links_response_sender_user.rb +17 -0
- data/lib/whop_sdk/claim_links/types/claim_claim_links_response_source.rb +11 -0
- data/lib/whop_sdk/claim_links/types/claim_claim_links_response_status.rb +16 -0
- data/lib/whop_sdk/claim_links/types/retrieve_claim_links_request.rb +11 -0
- data/lib/whop_sdk/claim_links/types/retrieve_claim_links_response.rb +40 -0
- data/lib/whop_sdk/{trades/types/update_leverage_trades_request_provider.rb → claim_links/types/retrieve_claim_links_response_object.rb} +3 -3
- data/lib/whop_sdk/claim_links/types/retrieve_claim_links_response_sender.rb +18 -0
- data/lib/whop_sdk/claim_links/types/retrieve_claim_links_response_sender_account.rb +17 -0
- data/lib/whop_sdk/claim_links/types/retrieve_claim_links_response_sender_user.rb +17 -0
- data/lib/whop_sdk/claim_links/types/retrieve_claim_links_response_source.rb +11 -0
- data/lib/whop_sdk/claim_links/types/retrieve_claim_links_response_status.rb +16 -0
- data/lib/whop_sdk/client.rb +16 -1
- data/lib/whop_sdk/domains/client.rb +68 -15
- data/lib/whop_sdk/domains/types/check_domains_request.rb +11 -0
- data/lib/whop_sdk/domains/types/create_domains_request.rb +5 -3
- data/lib/whop_sdk/domains/types/create_domains_request_registration.rb +15 -0
- data/lib/whop_sdk/domains/types/create_domains_request_verification.rb +11 -0
- data/lib/whop_sdk/domains/types/create_domains_request_website.rb +12 -0
- data/lib/whop_sdk/domains/types/list_domains_request.rb +8 -0
- data/lib/whop_sdk/domains/types/list_domains_request_status.rb +4 -5
- data/lib/whop_sdk/domains/types/update_domains_request.rb +6 -2
- data/lib/whop_sdk/domains/types/update_domains_request_registration.rb +15 -0
- data/lib/whop_sdk/domains/types/update_domains_request_verification.rb +11 -0
- data/lib/whop_sdk/domains/types/update_domains_request_website.rb +12 -0
- data/lib/whop_sdk/economic_intelligence/client.rb +3 -1
- data/lib/whop_sdk/exports/types/create_exports_request_resource.rb +1 -1
- data/lib/whop_sdk/exports/types/list_exports_request_resource.rb +1 -1
- data/lib/whop_sdk/external_accounts/client.rb +271 -0
- data/lib/whop_sdk/external_accounts/lead_forms/client.rb +67 -0
- data/lib/whop_sdk/external_accounts/lead_forms/types/list_lead_forms_request.rb +15 -0
- data/lib/whop_sdk/external_accounts/lead_forms/types/list_lead_forms_response.rb +13 -0
- data/lib/whop_sdk/external_accounts/partners/client.rb +168 -0
- data/lib/whop_sdk/external_accounts/partners/types/create_partners_request.rb +17 -0
- data/lib/whop_sdk/external_accounts/partners/types/delete_partners_request.rb +17 -0
- data/lib/whop_sdk/external_accounts/partners/types/delete_partners_response.rb +15 -0
- data/lib/whop_sdk/external_accounts/partners/types/list_partners_request.rb +19 -0
- data/lib/whop_sdk/external_accounts/partners/types/list_partners_response.rb +15 -0
- data/lib/whop_sdk/external_accounts/partners/types/list_partners_response_page_info.rb +19 -0
- data/lib/whop_sdk/external_accounts/posts/client.rb +79 -0
- data/lib/whop_sdk/external_accounts/posts/types/list_posts_request.rb +21 -0
- data/lib/whop_sdk/external_accounts/posts/types/list_posts_response.rb +15 -0
- data/lib/whop_sdk/external_accounts/posts/types/list_posts_response_page_info.rb +15 -0
- data/lib/whop_sdk/external_accounts/types/connect_external_accounts_request.rb +17 -0
- data/lib/whop_sdk/external_accounts/types/connect_external_accounts_request_platform.rb +17 -0
- data/lib/whop_sdk/external_accounts/types/connect_external_accounts_request_scopes_item.rb +13 -0
- data/lib/whop_sdk/external_accounts/types/connect_external_accounts_response.rb +11 -0
- data/lib/whop_sdk/external_accounts/types/create_external_accounts_request.rb +13 -0
- data/lib/whop_sdk/external_accounts/types/create_external_accounts_request_platform.rb +14 -0
- data/lib/whop_sdk/external_accounts/types/delete_external_accounts_request.rb +15 -0
- data/lib/whop_sdk/external_accounts/types/delete_external_accounts_response.rb +13 -0
- data/lib/whop_sdk/external_accounts/types/list_external_accounts_request.rb +33 -0
- data/lib/whop_sdk/external_accounts/types/list_external_accounts_request_direction.rb +14 -0
- data/lib/whop_sdk/external_accounts/types/list_external_accounts_request_order.rb +14 -0
- data/lib/whop_sdk/external_accounts/types/list_external_accounts_request_platform.rb +21 -0
- data/lib/whop_sdk/external_accounts/types/list_external_accounts_request_scopes_item.rb +13 -0
- data/lib/whop_sdk/external_accounts/types/list_external_accounts_request_trust_level.rb +17 -0
- data/lib/whop_sdk/external_accounts/types/list_external_accounts_response.rb +13 -0
- data/lib/whop_sdk/external_accounts/types/list_external_accounts_response_page_info.rb +17 -0
- data/lib/whop_sdk/external_accounts/types/refresh_external_accounts_request.rb +13 -0
- data/lib/whop_sdk/feedback_submissions/client.rb +60 -0
- data/lib/whop_sdk/feedback_submissions/types/create_feedback_submissions_request.rb +15 -0
- data/lib/whop_sdk/feedback_submissions/types/create_feedback_submissions_request_source.rb +20 -0
- data/lib/whop_sdk/feedback_submissions/types/create_feedback_submissions_response.rb +13 -0
- data/lib/whop_sdk/financial_activity/types/list_financial_activity_request_line_types_item.rb +1 -0
- data/lib/whop_sdk/financial_reports/types/retrieve_financial_reports_request_line_types_item.rb +1 -0
- data/lib/whop_sdk/financial_reports/types/retrieve_financial_reports_response_rows_item_line_category.rb +2 -0
- data/lib/whop_sdk/internal/http/raw_client.rb +1 -1
- data/lib/whop_sdk/memberships/client.rb +54 -0
- data/lib/whop_sdk/memberships/types/assign_affiliate_memberships_request.rb +21 -0
- data/lib/whop_sdk/memberships/types/assign_affiliate_memberships_request_commission_type.rb +14 -0
- data/lib/whop_sdk/partner_referral_requests/client.rb +2 -1
- data/lib/whop_sdk/partner_referral_requests/types/create_partner_referral_requests_request_body_account_id.rb +2 -0
- data/lib/whop_sdk/partner_referral_requests/types/create_partner_referral_requests_request_body_account_url.rb +2 -0
- data/lib/whop_sdk/partner_referral_requests/types/create_partner_referral_requests_request_body_code.rb +5 -2
- data/lib/whop_sdk/partner_referral_requests/types/create_partner_referral_requests_request_body_target_email.rb +2 -0
- data/lib/whop_sdk/partner_referral_requests/types/create_partner_referral_requests_request_body_target_user_id.rb +2 -0
- data/lib/whop_sdk/partner_referral_requests/types/create_partner_referral_requests_request_body_target_username.rb +2 -0
- data/lib/whop_sdk/partners/businesses/client.rb +2 -0
- data/lib/whop_sdk/partners/businesses/earnings/types/list_earnings_request_income_source_item.rb +1 -0
- data/lib/whop_sdk/partners/businesses/earnings/types/list_earnings_response_data_item_income_source.rb +1 -0
- data/lib/whop_sdk/partners/businesses/earnings/types/list_earnings_response_data_item_resource.rb +6 -4
- data/lib/whop_sdk/partners/businesses/earnings/types/{list_earnings_response_data_item_resource_created_at.rb → list_earnings_response_data_item_resource_five.rb} +2 -2
- data/lib/whop_sdk/partners/businesses/earnings/types/{list_earnings_response_data_item_resource_created_at_object.rb → list_earnings_response_data_item_resource_five_object.rb} +1 -1
- data/lib/whop_sdk/partners/businesses/earnings/types/{list_earnings_response_data_item_resource_currency.rb → list_earnings_response_data_item_resource_merchant_name.rb} +2 -2
- data/lib/whop_sdk/partners/businesses/earnings/types/{list_earnings_response_data_item_resource_currency_object.rb → list_earnings_response_data_item_resource_merchant_name_object.rb} +1 -1
- data/lib/whop_sdk/partners/businesses/earnings/types/list_earnings_response_data_item_resource_two.rb +21 -0
- data/lib/whop_sdk/partners/businesses/earnings/types/list_earnings_response_data_item_resource_two_object.rb +17 -0
- data/lib/whop_sdk/partners/businesses/types/list_businesses_request.rb +2 -0
- data/lib/whop_sdk/partners/businesses/types/list_businesses_response_data_item_payout_percentages.rb +2 -0
- data/lib/whop_sdk/partners/businesses/types/retrieve_businesses_response_payout_percentages.rb +2 -0
- data/lib/whop_sdk/partners/client.rb +2 -0
- data/lib/whop_sdk/partners/types/referred_users_partners_request.rb +2 -0
- data/lib/whop_sdk/payment_quotes/types/create_payment_quotes_request_address.rb +5 -4
- data/lib/whop_sdk/payments/client.rb +3 -1
- data/lib/whop_sdk/payments/types/create_payments_request.rb +4 -0
- data/lib/whop_sdk/payouts/client.rb +4 -1
- data/lib/whop_sdk/payouts/methods/types/create_methods_request_recipient.rb +3 -3
- data/lib/whop_sdk/payouts/methods/types/create_methods_response_recipient.rb +2 -2
- data/lib/whop_sdk/payouts/methods/types/list_methods_response_data_item_recipient.rb +2 -2
- data/lib/whop_sdk/payouts/methods/types/list_methods_response_limits_standard_error_code.rb +0 -1
- data/lib/whop_sdk/payouts/methods/types/update_methods_response_recipient.rb +2 -2
- data/lib/whop_sdk/payouts/types/create_quote_payouts_response.rb +2 -0
- data/lib/whop_sdk/payouts/types/create_quote_payouts_response_recommended_method.rb +24 -0
- data/lib/whop_sdk/payouts/types/post_payout_method_created_payload_data_recipient.rb +2 -2
- data/lib/whop_sdk/payouts/types/retrieve_payouts_response.rb +11 -7
- data/lib/whop_sdk/payouts/types/retrieve_payouts_response_payout_method.rb +2 -1
- data/lib/whop_sdk/setup_intents/client.rb +4 -3
- data/lib/whop_sdk/social_accounts/client.rb +14 -19
- data/lib/whop_sdk/stats/client.rb +23 -8
- data/lib/whop_sdk/stats/reports/client.rb +128 -0
- data/lib/whop_sdk/stats/reports/types/list_reports_response.rb +13 -0
- data/lib/whop_sdk/stats/reports/types/list_reports_response_data_item.rb +25 -0
- data/lib/whop_sdk/stats/reports/types/list_reports_response_data_item_columns_item.rb +33 -0
- data/lib/whop_sdk/stats/reports/types/list_reports_response_data_item_columns_item_aggregate.rb +17 -0
- data/lib/whop_sdk/stats/reports/types/list_reports_response_data_item_columns_item_set.rb +16 -0
- data/lib/whop_sdk/stats/reports/types/list_reports_response_data_item_columns_item_type.rb +16 -0
- data/lib/whop_sdk/stats/reports/types/list_reports_response_data_item_columns_item_unit.rb +19 -0
- data/lib/whop_sdk/stats/reports/types/list_reports_response_data_item_window_kind.rb +16 -0
- data/lib/whop_sdk/stats/reports/types/platform_trends_reports_request.rb +37 -0
- data/lib/whop_sdk/stats/reports/types/platform_trends_reports_request_breakdown_by.rb +18 -0
- data/lib/whop_sdk/stats/reports/types/platform_trends_reports_request_direction.rb +16 -0
- data/lib/whop_sdk/stats/reports/types/platform_trends_reports_request_order.rb +25 -0
- data/lib/whop_sdk/stats/reports/types/platform_trends_reports_response.rb +15 -0
- data/lib/whop_sdk/stats/reports/types/platform_trends_reports_response_data.rb +21 -0
- data/lib/whop_sdk/stats/reports/types/platform_trends_reports_response_data_columns_item.rb +23 -0
- data/lib/whop_sdk/stats/reports/types/platform_trends_reports_response_data_columns_item_aggregate.rb +17 -0
- data/lib/whop_sdk/stats/reports/types/platform_trends_reports_response_data_columns_item_type.rb +16 -0
- data/lib/whop_sdk/stats/reports/types/platform_trends_reports_response_data_columns_item_unit.rb +19 -0
- data/lib/whop_sdk/stats/reports/types/platform_trends_reports_response_data_reports_item.rb +15 -0
- data/lib/whop_sdk/stats/reports/types/platform_trends_reports_response_data_reports_item_rows_item.rb +41 -0
- data/lib/whop_sdk/stats/reports/types/platform_trends_reports_response_data_reports_item_rows_item_account_country.rb +15 -0
- data/lib/whop_sdk/stats/reports/types/platform_trends_reports_response_data_reports_item_rows_item_business_type.rb +15 -0
- data/lib/whop_sdk/stats/reports/types/platform_trends_reports_response_data_reports_item_rows_item_customer_country.rb +15 -0
- data/lib/whop_sdk/stats/reports/types/platform_trends_reports_response_data_reports_item_rows_item_industry_type.rb +15 -0
- data/lib/whop_sdk/stats/reports/types/platform_trends_reports_response_data_reports_item_window.rb +23 -0
- data/lib/whop_sdk/stats/reports/types/platform_trends_reports_response_data_reports_item_window_kind.rb +15 -0
- data/lib/whop_sdk/stats/reports/types/platform_trends_reports_response_page_info.rb +19 -0
- data/lib/whop_sdk/stats/time_series/client.rb +250 -0
- data/lib/whop_sdk/stats/time_series/types/list_time_series_response.rb +13 -0
- data/lib/whop_sdk/stats/time_series/types/list_time_series_response_data_item.rb +25 -0
- data/lib/whop_sdk/stats/time_series/types/list_time_series_response_data_item_unit.rb +17 -0
- data/lib/whop_sdk/stats/time_series/types/retrieve_time_series_request.rb +153 -0
- data/lib/whop_sdk/stats/time_series/types/retrieve_time_series_request_event_type.rb +17 -0
- data/lib/whop_sdk/stats/time_series/types/retrieve_time_series_request_interval.rb +22 -0
- data/lib/whop_sdk/stats/time_series/types/retrieve_time_series_request_snapshot_window.rb +17 -0
- data/lib/whop_sdk/stats/time_series/types/retrieve_time_series_response.rb +13 -0
- data/lib/whop_sdk/stats/time_series/types/retrieve_time_series_response_data.rb +17 -0
- data/lib/whop_sdk/stats/time_series/types/retrieve_time_series_response_data_points_item.rb +19 -0
- data/lib/whop_sdk/stats/time_series/types/retrieve_time_series_response_data_points_item_breakdown_item.rb +17 -0
- data/lib/whop_sdk/stats/time_series/types/retrieve_time_series_response_data_totals_item.rb +21 -0
- data/lib/whop_sdk/stats/types/retrieve_stats_request.rb +8 -0
- data/lib/whop_sdk/team_members/client.rb +3 -2
- data/lib/whop_sdk/trades/client.rb +12 -106
- data/lib/whop_sdk/trades/types/create_trades_request.rb +4 -6
- data/lib/whop_sdk/trades/types/{create_trades_request_orders_item_side.rb → create_trades_request_type.rb} +2 -2
- data/lib/whop_sdk/trades/types/list_trades_request.rb +1 -1
- data/lib/whop_sdk/trades/types/list_trades_request_status.rb +2 -2
- data/lib/whop_sdk/trades/types/{create_trades_request_provider.rb → list_trades_request_type.rb} +3 -2
- data/lib/whop_sdk/transfers/types/create_transfers_response_claim_link.rb +13 -1
- data/lib/whop_sdk/transfers/types/create_transfers_response_claim_link_sender.rb +18 -0
- data/lib/whop_sdk/transfers/types/create_transfers_response_claim_link_sender_account.rb +17 -0
- data/lib/whop_sdk/transfers/types/create_transfers_response_claim_link_sender_user.rb +17 -0
- data/lib/whop_sdk/types/account_economic_intelligence_offer.rb +2 -0
- data/lib/whop_sdk/types/account_economic_intelligence_offer_key.rb +1 -0
- data/lib/whop_sdk/types/account_economic_intelligence_previous_period.rb +11 -0
- data/lib/whop_sdk/types/account_fee_region.rb +1 -0
- data/lib/whop_sdk/types/account_payment_controls_undated_pending_reason.rb +2 -0
- data/lib/whop_sdk/types/account_preferences.rb +11 -1
- data/lib/whop_sdk/types/account_preferences_preferred_settlement_currency.rb +15 -0
- data/lib/whop_sdk/types/account_required_action_action.rb +0 -1
- data/lib/whop_sdk/types/ad.rb +2 -2
- data/lib/whop_sdk/types/ad_campaign.rb +2 -0
- data/lib/whop_sdk/types/{trade_instrument_type.rb → ad_campaign_campaign_type.rb} +3 -2
- data/lib/whop_sdk/types/ad_group.rb +4 -0
- data/lib/whop_sdk/types/ad_group_keyword.rb +13 -0
- data/lib/whop_sdk/types/{trade_leverage_margin_mode.rb → ad_group_keyword_match_type.rb} +4 -3
- data/lib/whop_sdk/types/ad_group_learning_progress.rb +13 -0
- data/lib/whop_sdk/types/ad_platform_issue.rb +4 -0
- data/lib/whop_sdk/types/ad_platform_issue_category.rb +13 -0
- data/lib/whop_sdk/types/api_key_api_version_date.rb +9 -0
- data/lib/whop_sdk/types/app.rb +2 -0
- data/lib/whop_sdk/types/app_domain_status.rb +4 -5
- data/lib/whop_sdk/types/audience_engagement_facebook_page_rule.rb +2 -2
- data/lib/whop_sdk/types/audience_engagement_instagram_profile_rule.rb +2 -2
- data/lib/whop_sdk/types/audience_engagement_lead_form_rule.rb +2 -2
- data/lib/whop_sdk/types/audience_engagement_video_rule.rb +2 -2
- data/lib/whop_sdk/types/dispute.rb +2 -0
- data/lib/whop_sdk/types/dispute_alert.rb +2 -0
- data/lib/whop_sdk/types/domain.rb +6 -14
- data/lib/whop_sdk/types/{domain_registration_quote.rb → domain_availability.rb} +1 -3
- data/lib/whop_sdk/types/domain_issue.rb +5 -1
- data/lib/whop_sdk/types/domain_issue_capability.rb +13 -0
- data/lib/whop_sdk/types/domain_issue_code.rb +29 -0
- data/lib/whop_sdk/types/domain_list_item.rb +6 -14
- data/lib/whop_sdk/types/domain_list_item_status.rb +4 -5
- data/lib/whop_sdk/types/domain_owner.rb +15 -0
- data/lib/whop_sdk/types/domain_registration.rb +21 -0
- data/lib/whop_sdk/types/domain_registration_phase.rb +17 -0
- data/lib/whop_sdk/types/domain_registration_state.rb +14 -0
- data/lib/whop_sdk/types/domain_status.rb +4 -5
- data/lib/whop_sdk/types/domain_verification.rb +11 -0
- data/lib/whop_sdk/types/domain_verification_state.rb +14 -0
- data/lib/whop_sdk/types/domain_website.rb +11 -0
- data/lib/whop_sdk/types/domain_website_state.rb +14 -0
- data/lib/whop_sdk/types/export_resource.rb +1 -1
- data/lib/whop_sdk/types/external_account.rb +31 -0
- data/lib/whop_sdk/types/external_account_lead_form.rb +31 -0
- data/lib/whop_sdk/types/{trade_cancellation_result_status.rb → external_account_lead_form_form_type.rb} +3 -3
- data/lib/whop_sdk/types/external_account_parent.rb +21 -0
- data/lib/whop_sdk/types/external_account_parent_platform.rb +17 -0
- data/lib/whop_sdk/types/{domain_dns_status.rb → external_account_partnership_status.rb} +3 -4
- data/lib/whop_sdk/types/external_account_platform.rb +17 -0
- data/lib/whop_sdk/types/external_account_post.rb +25 -0
- data/lib/whop_sdk/types/external_account_post_call_to_action.rb +41 -0
- data/lib/whop_sdk/types/external_account_post_restrictions_item.rb +16 -0
- data/lib/whop_sdk/types/ledger_activity_line_type.rb +2 -0
- data/lib/whop_sdk/types/membership.rb +2 -0
- data/lib/whop_sdk/types/membership_affiliate.rb +21 -0
- data/lib/whop_sdk/types/membership_affiliate_applies_to_payments.rb +12 -0
- data/lib/whop_sdk/types/{trade_order_result_object.rb → membership_affiliate_commission_type.rb} +3 -2
- data/lib/whop_sdk/types/partner_payout_rate_income_source.rb +1 -0
- data/lib/whop_sdk/types/partner_referral_request.rb +2 -0
- data/lib/whop_sdk/types/payment.rb +2 -0
- data/lib/whop_sdk/types/payment_method_types.rb +1 -0
- data/lib/whop_sdk/types/permission_action.rb +2 -0
- data/lib/whop_sdk/types/retrieve_time_series_request_steps.rb +27 -0
- data/lib/whop_sdk/types/trade.rb +11 -15
- data/lib/whop_sdk/types/trade_failure_code.rb +13 -3
- data/lib/whop_sdk/types/{domain_list_item_dns_status.rb → trade_funds_location.rb} +3 -4
- data/lib/whop_sdk/types/trade_status.rb +2 -2
- data/lib/whop_sdk/types/trade_status_detail.rb +14 -0
- data/lib/whop_sdk/types/{trade_order_result_side.rb → trade_type.rb} +2 -2
- data/lib/whop_sdk/types/trading_account.rb +0 -4
- data/lib/whop_sdk/types/trading_hyperliquid_account.rb +0 -4
- data/lib/whop_sdk/types/user.rb +4 -2
- 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/oauth_grants/types/create_oauth_grants_request.rb +2 -0
- data/lib/whop_sdk/users/oauth_grants/types/create_oauth_grants_request_mcp_client.rb +20 -0
- data/lib/whop_sdk/variants/client.rb +19 -2
- data/lib/whop_sdk/variants/types/list_variants_request.rb +4 -0
- data/lib/whop_sdk/variants/types/retrieve_variants_request.rb +4 -0
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk/webhooks/client.rb +2 -2
- data/lib/whop_sdk/webhooks/types/create_webhooks_request_events_item.rb +1 -0
- data/lib/whop_sdk/webhooks/types/list_webhooks_request.rb +1 -1
- data/lib/whop_sdk/webhooks/types/update_webhooks_request_events_item.rb +1 -0
- data/lib/whop_sdk.rb +187 -53
- data/reference.md +5195 -2961
- metadata +174 -40
- data/lib/whop_sdk/trades/types/cancel_trades_request.rb +0 -13
- data/lib/whop_sdk/trades/types/create_trades_request_orders_item.rb +0 -31
- data/lib/whop_sdk/trades/types/create_trades_request_orders_item_order_type.rb +0 -16
- data/lib/whop_sdk/trades/types/create_trades_request_orders_item_stop_loss.rb +0 -13
- data/lib/whop_sdk/trades/types/create_trades_request_orders_item_take_profit.rb +0 -13
- data/lib/whop_sdk/trades/types/create_trades_request_orders_item_time_in_force.rb +0 -15
- data/lib/whop_sdk/trades/types/list_trades_request_operation_type.rb +0 -15
- data/lib/whop_sdk/trades/types/update_leverage_trades_request.rb +0 -21
- data/lib/whop_sdk/types/trade_cancellation_result.rb +0 -13
- data/lib/whop_sdk/types/trade_hyperliquid.rb +0 -9
- data/lib/whop_sdk/types/trade_leverage.rb +0 -13
- data/lib/whop_sdk/types/trade_operation_type.rb +0 -13
- data/lib/whop_sdk/types/trade_order_result.rb +0 -37
- data/lib/whop_sdk/types/trade_order_result_order_type.rb +0 -14
- data/lib/whop_sdk/types/trade_order_result_status.rb +0 -13
- data/lib/whop_sdk/types/trade_provider.rb +0 -11
- data/lib/whop_sdk/types/trade_requested_order.rb +0 -23
- data/lib/whop_sdk/types/trade_requested_order_order_type.rb +0 -14
- data/lib/whop_sdk/types/trade_requested_order_side.rb +0 -12
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Whop_sdk
|
|
4
|
+
module Stats
|
|
5
|
+
module TimeSeries
|
|
6
|
+
class Client
|
|
7
|
+
# @param client [Whop_sdk::Internal::Http::RawClient]
|
|
8
|
+
# @param base_url [String, nil]
|
|
9
|
+
# @param environment [Hash[Symbol, String], nil]
|
|
10
|
+
#
|
|
11
|
+
# @return [void]
|
|
12
|
+
def initialize(client:, base_url: nil, environment: nil)
|
|
13
|
+
@client = client
|
|
14
|
+
@base_url = base_url
|
|
15
|
+
@environment = environment
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# Lists the metrics you can chart over time, with the unit each reports and the properties you can filter or
|
|
19
|
+
# break it down by. Aggregates that are not bucketed over time are reports, listed at `GET /stats/reports`.
|
|
20
|
+
#
|
|
21
|
+
# @param request_options [Hash]
|
|
22
|
+
# @param _params [Hash]
|
|
23
|
+
# @option request_options [String] :base_url
|
|
24
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
25
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
26
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
27
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
28
|
+
#
|
|
29
|
+
# @example
|
|
30
|
+
# client.stats.time_series.list
|
|
31
|
+
#
|
|
32
|
+
# @return [Whop_sdk::Stats::TimeSeries::Types::ListTimeSeriesResponse]
|
|
33
|
+
def list(request_options: {}, **_params)
|
|
34
|
+
request = Whop_sdk::Internal::JSON::Request.new(
|
|
35
|
+
base_url: request_options[:base_url] || @base_url || @environment&.dig(:api),
|
|
36
|
+
method: "GET",
|
|
37
|
+
path: "stats/time_series",
|
|
38
|
+
request_options: request_options
|
|
39
|
+
)
|
|
40
|
+
begin
|
|
41
|
+
response = @client.send(request)
|
|
42
|
+
rescue Net::HTTPRequestTimeout
|
|
43
|
+
raise Whop_sdk::Errors::TimeoutError
|
|
44
|
+
end
|
|
45
|
+
code = response.code.to_i
|
|
46
|
+
if code.between?(200, 299)
|
|
47
|
+
(response.body.to_s.empty? ? nil : Whop_sdk::Stats::TimeSeries::Types::ListTimeSeriesResponse.load(response.body))
|
|
48
|
+
else
|
|
49
|
+
error_class = Whop_sdk::Errors::ResponseError.subclass_for_code(code)
|
|
50
|
+
raise error_class.new(response.body, code: code)
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Retrieves a metric as a time series of points for an account or user over a time range. For an aggregate that
|
|
55
|
+
# is not bucketed over time, use a report from `GET /stats/reports`. The `market_prices` metric is public and
|
|
56
|
+
# requires no authentication. The `funnel` metric measures 2 to 10 ordered events per person. Its first matching
|
|
57
|
+
# event inside from/to anchors the cohort, breakdown and conversion window; later entries do not restart it.
|
|
58
|
+
# Intervening events are allowed, and conversions may occur after to. Funnel values are final conversion
|
|
59
|
+
# percentages; steps include counts and cumulative conversion percentages. Experiment funnels use
|
|
60
|
+
# experiment.exposure as step 1 and breakdown_by=variant. Pass steps using bracket parameters such as
|
|
61
|
+
# steps[1][event]=pixel.page&steps[1][page]=/pricing*&steps[2][event]=payment.completed.
|
|
62
|
+
#
|
|
63
|
+
# @param request_options [Hash]
|
|
64
|
+
# @param params [Hash]
|
|
65
|
+
# @option request_options [String] :base_url
|
|
66
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
67
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
68
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
69
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
70
|
+
# @option params [String] :metric
|
|
71
|
+
# @option params [String, nil] :account_id
|
|
72
|
+
# @option params [String, nil] :user_id
|
|
73
|
+
# @option params [String] :from
|
|
74
|
+
# @option params [String] :to
|
|
75
|
+
# @option params [Whop_sdk::Stats::TimeSeries::Types::RetrieveTimeSeriesRequestInterval, nil] :interval
|
|
76
|
+
# @option params [String, nil] :breakdown_by
|
|
77
|
+
# @option params [String, nil] :convert_to
|
|
78
|
+
# @option params [String, nil] :currency
|
|
79
|
+
# @option params [String, nil] :time_zone
|
|
80
|
+
# @option params [String, nil] :payment_method
|
|
81
|
+
# @option params [String, nil] :card_network
|
|
82
|
+
# @option params [String, nil] :dispute_reason
|
|
83
|
+
# @option params [String, nil] :source
|
|
84
|
+
# @option params [String, nil] :hostname
|
|
85
|
+
# @option params [String, nil] :page
|
|
86
|
+
# @option params [String, nil] :device_type
|
|
87
|
+
# @option params [String, nil] :country_code
|
|
88
|
+
# @option params [String, nil] :event_name
|
|
89
|
+
# @option params [Whop_sdk::Stats::TimeSeries::Types::RetrieveTimeSeriesRequestEventType, nil] :event_type
|
|
90
|
+
# @option params [String, nil] :custom_name
|
|
91
|
+
# @option params [String, nil] :segment
|
|
92
|
+
# @option params [String, nil] :category
|
|
93
|
+
# @option params [String, nil] :merchant
|
|
94
|
+
# @option params [String, nil] :fee_type
|
|
95
|
+
# @option params [String, nil] :product
|
|
96
|
+
# @option params [String, nil] :status
|
|
97
|
+
# @option params [String, nil] :access_level
|
|
98
|
+
# @option params [String, nil] :most_recent_action
|
|
99
|
+
# @option params [String, nil] :referred_user_id
|
|
100
|
+
# @option params [String, nil] :ad_campaign_ids
|
|
101
|
+
# @option params [String, nil] :ad_group_ids
|
|
102
|
+
# @option params [String, nil] :ad_ids
|
|
103
|
+
# @option params [Whop_sdk::Stats::TimeSeries::Types::RetrieveTimeSeriesRequestSnapshotWindow, nil] :snapshot_window
|
|
104
|
+
# @option params [String, nil] :event
|
|
105
|
+
# @option params [String, nil] :business_type
|
|
106
|
+
# @option params [String, nil] :industry_type
|
|
107
|
+
# @option params [String, nil] :issuer
|
|
108
|
+
# @option params [String, nil] :conversion_window
|
|
109
|
+
# @option params [Boolean, nil] :mature_only
|
|
110
|
+
# @option params [Whop_sdk::Types::RetrieveTimeSeriesRequestSteps, nil] :steps
|
|
111
|
+
# @option params [String, nil] :compare_to
|
|
112
|
+
# @option params [Integer, nil] :confidence_level
|
|
113
|
+
# @option params [Boolean, nil] :contactable
|
|
114
|
+
# @option params [Boolean, nil] :has_purchased
|
|
115
|
+
# @option params [String, nil] :first_seen_after
|
|
116
|
+
# @option params [String, nil] :first_seen_before
|
|
117
|
+
# @option params [String, nil] :last_seen_after
|
|
118
|
+
# @option params [String, nil] :last_seen_before
|
|
119
|
+
# @option params [Integer, nil] :first_seen_within_days
|
|
120
|
+
# @option params [Integer, nil] :last_seen_within_days
|
|
121
|
+
# @option params [Boolean, nil] :known
|
|
122
|
+
# @option params [Boolean, nil] :has_email
|
|
123
|
+
# @option params [Boolean, nil] :has_phone
|
|
124
|
+
# @option params [Integer, nil] :ltv_gt
|
|
125
|
+
# @option params [Integer, nil] :ltv_gte
|
|
126
|
+
# @option params [Integer, nil] :ltv_lt
|
|
127
|
+
# @option params [Integer, nil] :ltv_lte
|
|
128
|
+
# @option params [Integer, nil] :aov_gt
|
|
129
|
+
# @option params [Integer, nil] :aov_gte
|
|
130
|
+
# @option params [Integer, nil] :aov_lt
|
|
131
|
+
# @option params [Integer, nil] :aov_lte
|
|
132
|
+
# @option params [Integer, nil] :purchase_count_gt
|
|
133
|
+
# @option params [Integer, nil] :purchase_count_gte
|
|
134
|
+
# @option params [Integer, nil] :purchase_count_lt
|
|
135
|
+
# @option params [Integer, nil] :purchase_count_lte
|
|
136
|
+
# @option params [Integer, nil] :event_count_gt
|
|
137
|
+
# @option params [Integer, nil] :event_count_gte
|
|
138
|
+
# @option params [Integer, nil] :event_count_lt
|
|
139
|
+
# @option params [Integer, nil] :event_count_lte
|
|
140
|
+
# @option params [String, nil] :referring_account_id
|
|
141
|
+
#
|
|
142
|
+
# @example
|
|
143
|
+
# client.stats.time_series.retrieve(
|
|
144
|
+
# metric: "metric",
|
|
145
|
+
# from: "from",
|
|
146
|
+
# to: "to",
|
|
147
|
+
# ad_campaign_ids: ["adcamp_xxxxxxxxxxxxxx"],
|
|
148
|
+
# ad_group_ids: ["adgrp_xxxxxxxxxxxxxx"],
|
|
149
|
+
# ad_ids: ["ad_xxxxxxxxxxxxxx"]
|
|
150
|
+
# )
|
|
151
|
+
#
|
|
152
|
+
# @return [Whop_sdk::Stats::TimeSeries::Types::RetrieveTimeSeriesResponse]
|
|
153
|
+
def retrieve(request_options: {}, **params)
|
|
154
|
+
params = Whop_sdk::Internal::Types::Utils.normalize_keys(params)
|
|
155
|
+
query_params = {}
|
|
156
|
+
query_params["account_id"] = params[:account_id] if params.key?(:account_id)
|
|
157
|
+
query_params["user_id"] = params[:user_id] if params.key?(:user_id)
|
|
158
|
+
query_params["from"] = params[:from] if params.key?(:from)
|
|
159
|
+
query_params["to"] = params[:to] if params.key?(:to)
|
|
160
|
+
query_params["interval"] = params[:interval] if params.key?(:interval)
|
|
161
|
+
query_params["breakdown_by"] = params[:breakdown_by] if params.key?(:breakdown_by)
|
|
162
|
+
query_params["convert_to"] = params[:convert_to] if params.key?(:convert_to)
|
|
163
|
+
query_params["currency"] = params[:currency] if params.key?(:currency)
|
|
164
|
+
query_params["time_zone"] = params[:time_zone] if params.key?(:time_zone)
|
|
165
|
+
query_params["payment_method"] = params[:payment_method] if params.key?(:payment_method)
|
|
166
|
+
query_params["card_network"] = params[:card_network] if params.key?(:card_network)
|
|
167
|
+
query_params["dispute_reason"] = params[:dispute_reason] if params.key?(:dispute_reason)
|
|
168
|
+
query_params["source"] = params[:source] if params.key?(:source)
|
|
169
|
+
query_params["hostname"] = params[:hostname] if params.key?(:hostname)
|
|
170
|
+
query_params["page"] = params[:page] if params.key?(:page)
|
|
171
|
+
query_params["device_type"] = params[:device_type] if params.key?(:device_type)
|
|
172
|
+
query_params["country_code"] = params[:country_code] if params.key?(:country_code)
|
|
173
|
+
query_params["event_name"] = params[:event_name] if params.key?(:event_name)
|
|
174
|
+
query_params["event_type"] = params[:event_type] if params.key?(:event_type)
|
|
175
|
+
query_params["custom_name"] = params[:custom_name] if params.key?(:custom_name)
|
|
176
|
+
query_params["segment"] = params[:segment] if params.key?(:segment)
|
|
177
|
+
query_params["category"] = params[:category] if params.key?(:category)
|
|
178
|
+
query_params["merchant"] = params[:merchant] if params.key?(:merchant)
|
|
179
|
+
query_params["fee_type"] = params[:fee_type] if params.key?(:fee_type)
|
|
180
|
+
query_params["product"] = params[:product] if params.key?(:product)
|
|
181
|
+
query_params["status"] = params[:status] if params.key?(:status)
|
|
182
|
+
query_params["access_level"] = params[:access_level] if params.key?(:access_level)
|
|
183
|
+
query_params["most_recent_action"] = params[:most_recent_action] if params.key?(:most_recent_action)
|
|
184
|
+
query_params["referred_user_id"] = params[:referred_user_id] if params.key?(:referred_user_id)
|
|
185
|
+
query_params["ad_campaign_ids"] = params[:ad_campaign_ids] if params.key?(:ad_campaign_ids)
|
|
186
|
+
query_params["ad_group_ids"] = params[:ad_group_ids] if params.key?(:ad_group_ids)
|
|
187
|
+
query_params["ad_ids"] = params[:ad_ids] if params.key?(:ad_ids)
|
|
188
|
+
query_params["snapshot_window"] = params[:snapshot_window] if params.key?(:snapshot_window)
|
|
189
|
+
query_params["event"] = params[:event] if params.key?(:event)
|
|
190
|
+
query_params["business_type"] = params[:business_type] if params.key?(:business_type)
|
|
191
|
+
query_params["industry_type"] = params[:industry_type] if params.key?(:industry_type)
|
|
192
|
+
query_params["issuer"] = params[:issuer] if params.key?(:issuer)
|
|
193
|
+
query_params["conversion_window"] = params[:conversion_window] if params.key?(:conversion_window)
|
|
194
|
+
query_params["mature_only"] = params[:mature_only] if params.key?(:mature_only)
|
|
195
|
+
query_params["steps"] = params[:steps] if params.key?(:steps)
|
|
196
|
+
query_params["compare_to"] = params[:compare_to] if params.key?(:compare_to)
|
|
197
|
+
query_params["confidence_level"] = params[:confidence_level] if params.key?(:confidence_level)
|
|
198
|
+
query_params["contactable"] = params[:contactable] if params.key?(:contactable)
|
|
199
|
+
query_params["has_purchased"] = params[:has_purchased] if params.key?(:has_purchased)
|
|
200
|
+
query_params["first_seen_after"] = params[:first_seen_after] if params.key?(:first_seen_after)
|
|
201
|
+
query_params["first_seen_before"] = params[:first_seen_before] if params.key?(:first_seen_before)
|
|
202
|
+
query_params["last_seen_after"] = params[:last_seen_after] if params.key?(:last_seen_after)
|
|
203
|
+
query_params["last_seen_before"] = params[:last_seen_before] if params.key?(:last_seen_before)
|
|
204
|
+
query_params["first_seen_within_days"] = params[:first_seen_within_days] if params.key?(:first_seen_within_days)
|
|
205
|
+
query_params["last_seen_within_days"] = params[:last_seen_within_days] if params.key?(:last_seen_within_days)
|
|
206
|
+
query_params["known"] = params[:known] if params.key?(:known)
|
|
207
|
+
query_params["has_email"] = params[:has_email] if params.key?(:has_email)
|
|
208
|
+
query_params["has_phone"] = params[:has_phone] if params.key?(:has_phone)
|
|
209
|
+
query_params["ltv_gt"] = params[:ltv_gt] if params.key?(:ltv_gt)
|
|
210
|
+
query_params["ltv_gte"] = params[:ltv_gte] if params.key?(:ltv_gte)
|
|
211
|
+
query_params["ltv_lt"] = params[:ltv_lt] if params.key?(:ltv_lt)
|
|
212
|
+
query_params["ltv_lte"] = params[:ltv_lte] if params.key?(:ltv_lte)
|
|
213
|
+
query_params["aov_gt"] = params[:aov_gt] if params.key?(:aov_gt)
|
|
214
|
+
query_params["aov_gte"] = params[:aov_gte] if params.key?(:aov_gte)
|
|
215
|
+
query_params["aov_lt"] = params[:aov_lt] if params.key?(:aov_lt)
|
|
216
|
+
query_params["aov_lte"] = params[:aov_lte] if params.key?(:aov_lte)
|
|
217
|
+
query_params["purchase_count_gt"] = params[:purchase_count_gt] if params.key?(:purchase_count_gt)
|
|
218
|
+
query_params["purchase_count_gte"] = params[:purchase_count_gte] if params.key?(:purchase_count_gte)
|
|
219
|
+
query_params["purchase_count_lt"] = params[:purchase_count_lt] if params.key?(:purchase_count_lt)
|
|
220
|
+
query_params["purchase_count_lte"] = params[:purchase_count_lte] if params.key?(:purchase_count_lte)
|
|
221
|
+
query_params["event_count_gt"] = params[:event_count_gt] if params.key?(:event_count_gt)
|
|
222
|
+
query_params["event_count_gte"] = params[:event_count_gte] if params.key?(:event_count_gte)
|
|
223
|
+
query_params["event_count_lt"] = params[:event_count_lt] if params.key?(:event_count_lt)
|
|
224
|
+
query_params["event_count_lte"] = params[:event_count_lte] if params.key?(:event_count_lte)
|
|
225
|
+
query_params["referring_account_id"] = params[:referring_account_id] if params.key?(:referring_account_id)
|
|
226
|
+
|
|
227
|
+
request = Whop_sdk::Internal::JSON::Request.new(
|
|
228
|
+
base_url: request_options[:base_url] || @base_url || @environment&.dig(:api),
|
|
229
|
+
method: "GET",
|
|
230
|
+
path: "stats/time_series/#{URI.encode_uri_component(params[:metric].to_s)}",
|
|
231
|
+
query: query_params,
|
|
232
|
+
request_options: request_options
|
|
233
|
+
)
|
|
234
|
+
begin
|
|
235
|
+
response = @client.send(request)
|
|
236
|
+
rescue Net::HTTPRequestTimeout
|
|
237
|
+
raise Whop_sdk::Errors::TimeoutError
|
|
238
|
+
end
|
|
239
|
+
code = response.code.to_i
|
|
240
|
+
if code.between?(200, 299)
|
|
241
|
+
(response.body.to_s.empty? ? nil : Whop_sdk::Stats::TimeSeries::Types::RetrieveTimeSeriesResponse.load(response.body))
|
|
242
|
+
else
|
|
243
|
+
error_class = Whop_sdk::Errors::ResponseError.subclass_for_code(code)
|
|
244
|
+
raise error_class.new(response.body, code: code)
|
|
245
|
+
end
|
|
246
|
+
end
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Whop_sdk
|
|
4
|
+
module Stats
|
|
5
|
+
module TimeSeries
|
|
6
|
+
module Types
|
|
7
|
+
class ListTimeSeriesResponse < Internal::Types::Model
|
|
8
|
+
field :data, -> { Internal::Types::Array[Whop_sdk::Stats::TimeSeries::Types::ListTimeSeriesResponseDataItem] }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Whop_sdk
|
|
4
|
+
module Stats
|
|
5
|
+
module TimeSeries
|
|
6
|
+
module Types
|
|
7
|
+
class ListTimeSeriesResponseDataItem < Internal::Types::Model
|
|
8
|
+
field :breakdowns, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
9
|
+
|
|
10
|
+
field :description, -> { String }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :key, -> { String }, optional: false, nullable: false
|
|
13
|
+
|
|
14
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
15
|
+
|
|
16
|
+
field :properties, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
17
|
+
|
|
18
|
+
field :unit, -> { Whop_sdk::Stats::TimeSeries::Types::ListTimeSeriesResponseDataItemUnit }, optional: false, nullable: false
|
|
19
|
+
|
|
20
|
+
field :windows, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Whop_sdk
|
|
4
|
+
module Stats
|
|
5
|
+
module TimeSeries
|
|
6
|
+
module Types
|
|
7
|
+
module ListTimeSeriesResponseDataItemUnit
|
|
8
|
+
extend Whop_sdk::Internal::Types::Enum
|
|
9
|
+
|
|
10
|
+
COUNT = "count"
|
|
11
|
+
CURRENCY = "currency"
|
|
12
|
+
PERCENT = "percent"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Whop_sdk
|
|
4
|
+
module Stats
|
|
5
|
+
module TimeSeries
|
|
6
|
+
module Types
|
|
7
|
+
class RetrieveTimeSeriesRequest < Internal::Types::Model
|
|
8
|
+
field :metric, -> { String }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :account_id, -> { String }, optional: true, nullable: false
|
|
11
|
+
|
|
12
|
+
field :user_id, -> { String }, optional: true, nullable: false
|
|
13
|
+
|
|
14
|
+
field :from, -> { String }, optional: false, nullable: false
|
|
15
|
+
|
|
16
|
+
field :to, -> { String }, optional: false, nullable: false
|
|
17
|
+
|
|
18
|
+
field :interval, -> { Whop_sdk::Stats::TimeSeries::Types::RetrieveTimeSeriesRequestInterval }, optional: true, nullable: false
|
|
19
|
+
|
|
20
|
+
field :breakdown_by, -> { String }, optional: true, nullable: false
|
|
21
|
+
|
|
22
|
+
field :convert_to, -> { String }, optional: true, nullable: false
|
|
23
|
+
|
|
24
|
+
field :currency, -> { String }, optional: true, nullable: false
|
|
25
|
+
|
|
26
|
+
field :time_zone, -> { String }, optional: true, nullable: false
|
|
27
|
+
|
|
28
|
+
field :payment_method, -> { String }, optional: true, nullable: false
|
|
29
|
+
|
|
30
|
+
field :card_network, -> { String }, optional: true, nullable: false
|
|
31
|
+
|
|
32
|
+
field :dispute_reason, -> { String }, optional: true, nullable: false
|
|
33
|
+
|
|
34
|
+
field :source, -> { String }, optional: true, nullable: false
|
|
35
|
+
|
|
36
|
+
field :hostname, -> { String }, optional: true, nullable: false
|
|
37
|
+
|
|
38
|
+
field :page, -> { String }, optional: true, nullable: false
|
|
39
|
+
|
|
40
|
+
field :device_type, -> { String }, optional: true, nullable: false
|
|
41
|
+
|
|
42
|
+
field :country_code, -> { String }, optional: true, nullable: false
|
|
43
|
+
|
|
44
|
+
field :event_name, -> { String }, optional: true, nullable: false
|
|
45
|
+
|
|
46
|
+
field :event_type, -> { Whop_sdk::Stats::TimeSeries::Types::RetrieveTimeSeriesRequestEventType }, optional: true, nullable: false
|
|
47
|
+
|
|
48
|
+
field :custom_name, -> { String }, optional: true, nullable: false
|
|
49
|
+
|
|
50
|
+
field :segment, -> { String }, optional: true, nullable: false
|
|
51
|
+
|
|
52
|
+
field :category, -> { String }, optional: true, nullable: false
|
|
53
|
+
|
|
54
|
+
field :merchant, -> { String }, optional: true, nullable: false
|
|
55
|
+
|
|
56
|
+
field :fee_type, -> { String }, optional: true, nullable: false
|
|
57
|
+
|
|
58
|
+
field :product, -> { String }, optional: true, nullable: false
|
|
59
|
+
|
|
60
|
+
field :status, -> { String }, optional: true, nullable: false
|
|
61
|
+
|
|
62
|
+
field :access_level, -> { String }, optional: true, nullable: false
|
|
63
|
+
|
|
64
|
+
field :most_recent_action, -> { String }, optional: true, nullable: false
|
|
65
|
+
|
|
66
|
+
field :referred_user_id, -> { String }, optional: true, nullable: false
|
|
67
|
+
|
|
68
|
+
field :ad_campaign_ids, -> { String }, optional: true, nullable: false
|
|
69
|
+
|
|
70
|
+
field :ad_group_ids, -> { String }, optional: true, nullable: false
|
|
71
|
+
|
|
72
|
+
field :ad_ids, -> { String }, optional: true, nullable: false
|
|
73
|
+
|
|
74
|
+
field :snapshot_window, -> { Whop_sdk::Stats::TimeSeries::Types::RetrieveTimeSeriesRequestSnapshotWindow }, optional: true, nullable: false
|
|
75
|
+
|
|
76
|
+
field :event, -> { String }, optional: true, nullable: false
|
|
77
|
+
|
|
78
|
+
field :business_type, -> { String }, optional: true, nullable: false
|
|
79
|
+
|
|
80
|
+
field :industry_type, -> { String }, optional: true, nullable: false
|
|
81
|
+
|
|
82
|
+
field :issuer, -> { String }, optional: true, nullable: false
|
|
83
|
+
|
|
84
|
+
field :conversion_window, -> { String }, optional: true, nullable: false
|
|
85
|
+
|
|
86
|
+
field :mature_only, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
87
|
+
|
|
88
|
+
field :steps, -> { Whop_sdk::Types::RetrieveTimeSeriesRequestSteps }, optional: true, nullable: false
|
|
89
|
+
|
|
90
|
+
field :compare_to, -> { String }, optional: true, nullable: false
|
|
91
|
+
|
|
92
|
+
field :confidence_level, -> { Integer }, optional: true, nullable: false
|
|
93
|
+
|
|
94
|
+
field :contactable, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
95
|
+
|
|
96
|
+
field :has_purchased, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
97
|
+
|
|
98
|
+
field :first_seen_after, -> { String }, optional: true, nullable: false
|
|
99
|
+
|
|
100
|
+
field :first_seen_before, -> { String }, optional: true, nullable: false
|
|
101
|
+
|
|
102
|
+
field :last_seen_after, -> { String }, optional: true, nullable: false
|
|
103
|
+
|
|
104
|
+
field :last_seen_before, -> { String }, optional: true, nullable: false
|
|
105
|
+
|
|
106
|
+
field :first_seen_within_days, -> { Integer }, optional: true, nullable: false
|
|
107
|
+
|
|
108
|
+
field :last_seen_within_days, -> { Integer }, optional: true, nullable: false
|
|
109
|
+
|
|
110
|
+
field :known, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
111
|
+
|
|
112
|
+
field :has_email, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
113
|
+
|
|
114
|
+
field :has_phone, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
115
|
+
|
|
116
|
+
field :ltv_gt, -> { Integer }, optional: true, nullable: false
|
|
117
|
+
|
|
118
|
+
field :ltv_gte, -> { Integer }, optional: true, nullable: false
|
|
119
|
+
|
|
120
|
+
field :ltv_lt, -> { Integer }, optional: true, nullable: false
|
|
121
|
+
|
|
122
|
+
field :ltv_lte, -> { Integer }, optional: true, nullable: false
|
|
123
|
+
|
|
124
|
+
field :aov_gt, -> { Integer }, optional: true, nullable: false
|
|
125
|
+
|
|
126
|
+
field :aov_gte, -> { Integer }, optional: true, nullable: false
|
|
127
|
+
|
|
128
|
+
field :aov_lt, -> { Integer }, optional: true, nullable: false
|
|
129
|
+
|
|
130
|
+
field :aov_lte, -> { Integer }, optional: true, nullable: false
|
|
131
|
+
|
|
132
|
+
field :purchase_count_gt, -> { Integer }, optional: true, nullable: false
|
|
133
|
+
|
|
134
|
+
field :purchase_count_gte, -> { Integer }, optional: true, nullable: false
|
|
135
|
+
|
|
136
|
+
field :purchase_count_lt, -> { Integer }, optional: true, nullable: false
|
|
137
|
+
|
|
138
|
+
field :purchase_count_lte, -> { Integer }, optional: true, nullable: false
|
|
139
|
+
|
|
140
|
+
field :event_count_gt, -> { Integer }, optional: true, nullable: false
|
|
141
|
+
|
|
142
|
+
field :event_count_gte, -> { Integer }, optional: true, nullable: false
|
|
143
|
+
|
|
144
|
+
field :event_count_lt, -> { Integer }, optional: true, nullable: false
|
|
145
|
+
|
|
146
|
+
field :event_count_lte, -> { Integer }, optional: true, nullable: false
|
|
147
|
+
|
|
148
|
+
field :referring_account_id, -> { String }, optional: true, nullable: false
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Whop_sdk
|
|
4
|
+
module Stats
|
|
5
|
+
module TimeSeries
|
|
6
|
+
module Types
|
|
7
|
+
module RetrieveTimeSeriesRequestEventType
|
|
8
|
+
extend Whop_sdk::Internal::Types::Enum
|
|
9
|
+
|
|
10
|
+
PAGE_VIEW = "page_view"
|
|
11
|
+
CHECKOUT_START = "checkout_start"
|
|
12
|
+
OTHER = "other"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Whop_sdk
|
|
4
|
+
module Stats
|
|
5
|
+
module TimeSeries
|
|
6
|
+
module Types
|
|
7
|
+
module RetrieveTimeSeriesRequestInterval
|
|
8
|
+
extend Whop_sdk::Internal::Types::Enum
|
|
9
|
+
|
|
10
|
+
MINUTE = "minute"
|
|
11
|
+
FIVE_MINUTES = "five_minutes"
|
|
12
|
+
THIRTY_MINUTES = "thirty_minutes"
|
|
13
|
+
HOUR = "hour"
|
|
14
|
+
DAY = "day"
|
|
15
|
+
WEEK = "week"
|
|
16
|
+
MONTH = "month"
|
|
17
|
+
YEAR = "year"
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Whop_sdk
|
|
4
|
+
module Stats
|
|
5
|
+
module TimeSeries
|
|
6
|
+
module Types
|
|
7
|
+
module RetrieveTimeSeriesRequestSnapshotWindow
|
|
8
|
+
extend Whop_sdk::Internal::Types::Enum
|
|
9
|
+
|
|
10
|
+
SEVEN_D = "7d"
|
|
11
|
+
TWENTY_EIGHT_D = "28d"
|
|
12
|
+
THIRTY_D = "30d"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Whop_sdk
|
|
4
|
+
module Stats
|
|
5
|
+
module TimeSeries
|
|
6
|
+
module Types
|
|
7
|
+
class RetrieveTimeSeriesResponse < Internal::Types::Model
|
|
8
|
+
field :data, -> { Whop_sdk::Stats::TimeSeries::Types::RetrieveTimeSeriesResponseData }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Whop_sdk
|
|
4
|
+
module Stats
|
|
5
|
+
module TimeSeries
|
|
6
|
+
module Types
|
|
7
|
+
class RetrieveTimeSeriesResponseData < Internal::Types::Model
|
|
8
|
+
field :currency, -> { String }, optional: true, nullable: false
|
|
9
|
+
|
|
10
|
+
field :points, -> { Internal::Types::Array[Whop_sdk::Stats::TimeSeries::Types::RetrieveTimeSeriesResponseDataPointsItem] }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :totals, -> { Internal::Types::Array[Whop_sdk::Stats::TimeSeries::Types::RetrieveTimeSeriesResponseDataTotalsItem] }, optional: true, nullable: false
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Whop_sdk
|
|
4
|
+
module Stats
|
|
5
|
+
module TimeSeries
|
|
6
|
+
module Types
|
|
7
|
+
class RetrieveTimeSeriesResponseDataPointsItem < Internal::Types::Model
|
|
8
|
+
field :breakdown, -> { Internal::Types::Array[Whop_sdk::Stats::TimeSeries::Types::RetrieveTimeSeriesResponseDataPointsItemBreakdownItem] }, optional: true, nullable: false
|
|
9
|
+
|
|
10
|
+
field :steps, -> { Internal::Types::Array[Whop_sdk::Types::FunnelStepResult] }, optional: true, nullable: false
|
|
11
|
+
|
|
12
|
+
field :timestamp, -> { Integer }, optional: false, nullable: false
|
|
13
|
+
|
|
14
|
+
field :value, -> { Integer }, optional: false, nullable: true
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Whop_sdk
|
|
4
|
+
module Stats
|
|
5
|
+
module TimeSeries
|
|
6
|
+
module Types
|
|
7
|
+
class RetrieveTimeSeriesResponseDataPointsItemBreakdownItem < Internal::Types::Model
|
|
8
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :steps, -> { Internal::Types::Array[Whop_sdk::Types::FunnelStepResult] }, optional: true, nullable: false
|
|
11
|
+
|
|
12
|
+
field :value, -> { Integer }, optional: false, nullable: true
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Whop_sdk
|
|
4
|
+
module Stats
|
|
5
|
+
module TimeSeries
|
|
6
|
+
module Types
|
|
7
|
+
class RetrieveTimeSeriesResponseDataTotalsItem < Internal::Types::Model
|
|
8
|
+
field :comparison, -> { Whop_sdk::Types::FunnelComparison }, optional: true, nullable: false
|
|
9
|
+
|
|
10
|
+
field :confidence_interval, -> { Whop_sdk::Types::FunnelConfidenceInterval }, optional: true, nullable: false
|
|
11
|
+
|
|
12
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
13
|
+
|
|
14
|
+
field :steps, -> { Internal::Types::Array[Whop_sdk::Types::FunnelStepResult] }, optional: true, nullable: false
|
|
15
|
+
|
|
16
|
+
field :value, -> { Integer }, optional: false, nullable: true
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -74,6 +74,12 @@ module Whop_sdk
|
|
|
74
74
|
|
|
75
75
|
field :event, -> { String }, optional: true, nullable: false
|
|
76
76
|
|
|
77
|
+
field :business_type, -> { String }, optional: true, nullable: false
|
|
78
|
+
|
|
79
|
+
field :industry_type, -> { String }, optional: true, nullable: false
|
|
80
|
+
|
|
81
|
+
field :issuer, -> { String }, optional: true, nullable: false
|
|
82
|
+
|
|
77
83
|
field :conversion_window, -> { String }, optional: true, nullable: false
|
|
78
84
|
|
|
79
85
|
field :mature_only, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
@@ -137,6 +143,8 @@ module Whop_sdk
|
|
|
137
143
|
field :event_count_lt, -> { Integer }, optional: true, nullable: false
|
|
138
144
|
|
|
139
145
|
field :event_count_lte, -> { Integer }, optional: true, nullable: false
|
|
146
|
+
|
|
147
|
+
field :referring_account_id, -> { String }, optional: true, nullable: false
|
|
140
148
|
end
|
|
141
149
|
end
|
|
142
150
|
end
|
|
@@ -16,8 +16,9 @@ module Whop_sdk
|
|
|
16
16
|
|
|
17
17
|
# Lists an account's team members, including pending invites (`status: "pending"`, `ausri_` ids; `user` is `null`
|
|
18
18
|
# for invites sent to an email with no Whop account yet). For accepted members, `email` requires the
|
|
19
|
-
# `company:authorized_user:email:read` scope and is `null` otherwise.
|
|
20
|
-
#
|
|
19
|
+
# `company:authorized_user:email:read` scope and is `null` otherwise. A user credential with `company:basic:read`
|
|
20
|
+
# may list only its own joined membership by passing its own `user_id` and `status=joined`. Listing
|
|
21
|
+
# `role=workforce` is also allowed with the `bounty:create` scope.
|
|
21
22
|
#
|
|
22
23
|
# @param request_options [Hash]
|
|
23
24
|
# @param params [Hash]
|