whop_sdk 0.0.22 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +45 -0
- data/README.md +1 -1
- data/lib/whop_sdk/client.rb +4 -0
- data/lib/whop_sdk/models/app_build_create_params.rb +16 -55
- data/lib/whop_sdk/models/app_create_params.rb +22 -1
- data/lib/whop_sdk/models/app_list_params.rb +5 -0
- data/lib/whop_sdk/models/app_update_params.rb +14 -53
- data/lib/whop_sdk/models/card_brands.rb +16 -0
- data/lib/whop_sdk/models/checkout_configuration_create_params.rb +32 -56
- data/lib/whop_sdk/models/company_create_params.rb +22 -1
- data/lib/whop_sdk/models/company_update_params.rb +28 -106
- data/lib/whop_sdk/models/course_create_params.rb +15 -62
- data/lib/whop_sdk/models/course_lesson_create_params.rb +14 -53
- data/lib/whop_sdk/models/course_lesson_interaction_completed_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/course_lesson_update_params.rb +53 -214
- data/lib/whop_sdk/models/course_update_params.rb +14 -61
- data/lib/whop_sdk/models/dispute_created_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/dispute_update_evidence_params.rb +56 -212
- data/lib/whop_sdk/models/dispute_updated_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/entry_approved_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/entry_created_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/entry_deleted_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/entry_denied_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/experience_create_params.rb +22 -1
- data/lib/whop_sdk/models/experience_update_params.rb +14 -53
- data/lib/whop_sdk/models/file_create_params.rb +22 -0
- data/lib/whop_sdk/models/file_create_response.rb +90 -0
- data/lib/whop_sdk/models/file_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/file_retrieve_response.rb +74 -0
- data/lib/whop_sdk/models/forum_post_create_params.rb +13 -52
- data/lib/whop_sdk/models/forum_post_update_params.rb +13 -52
- data/lib/whop_sdk/models/friendly_receipt_status.rb +23 -11
- data/lib/whop_sdk/models/invoice_created_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/invoice_paid_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/invoice_past_due_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/invoice_voided_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/ledger_account_retrieve_response.rb +1 -34
- data/lib/whop_sdk/models/member_list_response.rb +9 -1
- data/lib/whop_sdk/models/member_retrieve_response.rb +9 -1
- data/lib/whop_sdk/models/membership.rb +76 -2
- data/lib/whop_sdk/models/membership_activated_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/membership_cancel_at_period_end_changed_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/membership_deactivated_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/membership_list_response.rb +38 -2
- data/lib/whop_sdk/models/membership_uncancel_params.rb +14 -0
- data/lib/whop_sdk/models/message_create_params.rb +13 -52
- data/lib/whop_sdk/models/message_update_params.rb +14 -53
- data/lib/whop_sdk/models/payment.rb +17 -1
- data/lib/whop_sdk/models/payment_created_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/payment_failed_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/payment_list_response.rb +17 -1
- data/lib/whop_sdk/models/payment_method_types.rb +38 -37
- data/lib/whop_sdk/models/payment_pending_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/payment_provider.rb +1 -0
- data/lib/whop_sdk/models/payment_succeeded_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/payout_method_created_webhook_event.rb +35 -2
- data/lib/whop_sdk/models/payout_method_list_response.rb +26 -1
- data/lib/whop_sdk/models/payout_method_retrieve_response.rb +26 -1
- data/lib/whop_sdk/models/plan_create_params.rb +23 -54
- data/lib/whop_sdk/models/plan_update_params.rb +23 -54
- data/lib/whop_sdk/models/refund_created_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/refund_updated_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/setup_intent_canceled_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/setup_intent_requires_action_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/setup_intent_succeeded_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/verification_succeeded_webhook_event.rb +9 -1
- data/lib/whop_sdk/models/webhook_create_params.rb +117 -0
- data/lib/whop_sdk/models/webhook_create_response.rb +184 -0
- data/lib/whop_sdk/models/webhook_delete_params.rb +14 -0
- data/lib/whop_sdk/models/webhook_delete_response.rb +8 -0
- data/lib/whop_sdk/models/webhook_list_params.rb +54 -0
- data/lib/whop_sdk/models/webhook_list_response.rb +123 -0
- data/lib/whop_sdk/models/webhook_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/webhook_retrieve_response.rb +176 -0
- data/lib/whop_sdk/models/webhook_update_params.rb +104 -0
- data/lib/whop_sdk/models/webhook_update_response.rb +176 -0
- data/lib/whop_sdk/models/withdrawal_create_params.rb +21 -1
- data/lib/whop_sdk/models/withdrawal_create_response.rb +2 -9
- data/lib/whop_sdk/models/withdrawal_created_webhook_event.rb +11 -10
- data/lib/whop_sdk/models/withdrawal_list_response.rb +1 -9
- data/lib/whop_sdk/models/withdrawal_retrieve_response.rb +2 -9
- data/lib/whop_sdk/models/withdrawal_updated_webhook_event.rb +11 -10
- data/lib/whop_sdk/models.rb +16 -2
- data/lib/whop_sdk/resources/app_builds.rb +1 -1
- data/lib/whop_sdk/resources/apps.rb +4 -2
- data/lib/whop_sdk/resources/checkout_configurations.rb +3 -1
- data/lib/whop_sdk/resources/companies.rb +5 -3
- data/lib/whop_sdk/resources/course_lessons.rb +4 -4
- data/lib/whop_sdk/resources/courses.rb +4 -8
- data/lib/whop_sdk/resources/disputes.rb +4 -4
- data/lib/whop_sdk/resources/experiences.rb +4 -2
- data/lib/whop_sdk/resources/files.rb +56 -0
- data/lib/whop_sdk/resources/forum_posts.rb +2 -2
- data/lib/whop_sdk/resources/memberships.rb +32 -0
- data/lib/whop_sdk/resources/messages.rb +2 -2
- data/lib/whop_sdk/resources/notifications.rb +4 -0
- data/lib/whop_sdk/resources/plans.rb +8 -4
- data/lib/whop_sdk/resources/webhooks.rb +158 -0
- data/lib/whop_sdk/resources/withdrawals.rb +8 -1
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +16 -1
- data/rbi/whop_sdk/client.rbi +3 -0
- data/rbi/whop_sdk/models/app_build_create_params.rbi +26 -89
- data/rbi/whop_sdk/models/app_create_params.rbi +36 -0
- data/rbi/whop_sdk/models/app_list_params.rbi +10 -0
- data/rbi/whop_sdk/models/app_update_params.rbi +21 -93
- data/rbi/whop_sdk/models/card_brands.rbi +17 -0
- data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +45 -87
- data/rbi/whop_sdk/models/company_create_params.rbi +39 -0
- data/rbi/whop_sdk/models/company_update_params.rbi +47 -185
- data/rbi/whop_sdk/models/course_create_params.rbi +24 -101
- data/rbi/whop_sdk/models/course_lesson_create_params.rbi +25 -92
- data/rbi/whop_sdk/models/course_lesson_interaction_completed_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/course_lesson_update_params.rbi +97 -359
- data/rbi/whop_sdk/models/course_update_params.rbi +24 -101
- data/rbi/whop_sdk/models/dispute_created_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/dispute_update_evidence_params.rbi +116 -340
- data/rbi/whop_sdk/models/dispute_updated_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/entry_approved_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/entry_created_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/entry_deleted_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/entry_denied_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/experience_create_params.rbi +41 -0
- data/rbi/whop_sdk/models/experience_update_params.rbi +24 -93
- data/rbi/whop_sdk/models/file_create_params.rbi +40 -0
- data/rbi/whop_sdk/models/file_create_response.rbi +140 -0
- data/rbi/whop_sdk/models/file_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/file_retrieve_response.rbi +129 -0
- data/rbi/whop_sdk/models/forum_post_create_params.rbi +18 -94
- data/rbi/whop_sdk/models/forum_post_update_params.rbi +18 -94
- data/rbi/whop_sdk/models/friendly_receipt_status.rbi +62 -17
- data/rbi/whop_sdk/models/invoice_created_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/invoice_paid_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/invoice_past_due_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/invoice_voided_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +0 -105
- data/rbi/whop_sdk/models/member_list_response.rbi +8 -0
- data/rbi/whop_sdk/models/member_retrieve_response.rbi +8 -0
- data/rbi/whop_sdk/models/membership.rbi +126 -4
- data/rbi/whop_sdk/models/membership_activated_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/membership_cancel_at_period_end_changed_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/membership_deactivated_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/membership_list_response.rbi +98 -4
- data/rbi/whop_sdk/models/membership_uncancel_params.rbi +27 -0
- data/rbi/whop_sdk/models/message_create_params.rbi +18 -94
- data/rbi/whop_sdk/models/message_update_params.rbi +18 -94
- data/rbi/whop_sdk/models/payment.rbi +16 -0
- data/rbi/whop_sdk/models/payment_created_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/payment_failed_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/payment_list_response.rbi +16 -0
- data/rbi/whop_sdk/models/payment_method_types.rbi +45 -43
- data/rbi/whop_sdk/models/payment_pending_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/payment_provider.rbi +1 -0
- data/rbi/whop_sdk/models/payment_succeeded_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/payout_method_created_webhook_event.rbi +35 -1
- data/rbi/whop_sdk/models/payout_method_list_response.rbi +26 -0
- data/rbi/whop_sdk/models/payout_method_retrieve_response.rbi +26 -0
- data/rbi/whop_sdk/models/plan_create_params.rbi +29 -93
- data/rbi/whop_sdk/models/plan_update_params.rbi +29 -93
- data/rbi/whop_sdk/models/refund_created_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/refund_updated_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/setup_intent_canceled_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/setup_intent_requires_action_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/setup_intent_succeeded_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/verification_succeeded_webhook_event.rbi +9 -1
- data/rbi/whop_sdk/models/webhook_create_params.rbi +275 -0
- data/rbi/whop_sdk/models/webhook_create_response.rbi +494 -0
- data/rbi/whop_sdk/models/webhook_delete_params.rbi +27 -0
- data/rbi/whop_sdk/models/webhook_delete_response.rbi +8 -0
- data/rbi/whop_sdk/models/webhook_list_params.rbi +75 -0
- data/rbi/whop_sdk/models/webhook_list_response.rbi +297 -0
- data/rbi/whop_sdk/models/webhook_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/webhook_retrieve_response.rbi +491 -0
- data/rbi/whop_sdk/models/webhook_update_params.rbi +263 -0
- data/rbi/whop_sdk/models/webhook_update_response.rbi +486 -0
- data/rbi/whop_sdk/models/withdrawal_create_params.rbi +18 -0
- data/rbi/whop_sdk/models/withdrawal_create_response.rbi +8 -11
- data/rbi/whop_sdk/models/withdrawal_created_webhook_event.rbi +17 -12
- data/rbi/whop_sdk/models/withdrawal_list_response.rbi +3 -11
- data/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi +8 -11
- data/rbi/whop_sdk/models/withdrawal_updated_webhook_event.rbi +17 -12
- data/rbi/whop_sdk/models.rbi +16 -2
- data/rbi/whop_sdk/resources/app_builds.rbi +1 -5
- data/rbi/whop_sdk/resources/apps.rbi +4 -7
- data/rbi/whop_sdk/resources/checkout_configurations.rbi +3 -0
- data/rbi/whop_sdk/resources/companies.rbi +5 -13
- data/rbi/whop_sdk/resources/course_lessons.rbi +4 -24
- data/rbi/whop_sdk/resources/courses.rbi +2 -20
- data/rbi/whop_sdk/resources/disputes.rbi +4 -16
- data/rbi/whop_sdk/resources/experiences.rbi +4 -7
- data/rbi/whop_sdk/resources/files.rbi +40 -0
- data/rbi/whop_sdk/resources/forum_posts.rbi +2 -12
- data/rbi/whop_sdk/resources/memberships.rbi +26 -0
- data/rbi/whop_sdk/resources/messages.rbi +2 -12
- data/rbi/whop_sdk/resources/notifications.rbi +4 -0
- data/rbi/whop_sdk/resources/plans.rbi +8 -14
- data/rbi/whop_sdk/resources/webhooks.rbi +140 -0
- data/rbi/whop_sdk/resources/withdrawals.rbi +7 -0
- data/sig/whop_sdk/client.rbs +2 -0
- data/sig/whop_sdk/models/app_build_create_params.rbs +9 -30
- data/sig/whop_sdk/models/app_create_params.rbs +20 -1
- data/sig/whop_sdk/models/app_list_params.rbs +10 -0
- data/sig/whop_sdk/models/app_update_params.rbs +9 -30
- data/sig/whop_sdk/models/card_brands.rbs +32 -0
- data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +19 -30
- data/sig/whop_sdk/models/company_create_params.rbs +15 -0
- data/sig/whop_sdk/models/company_update_params.rbs +18 -60
- data/sig/whop_sdk/models/course_create_params.rbs +9 -35
- data/sig/whop_sdk/models/course_lesson_create_params.rbs +9 -30
- data/sig/whop_sdk/models/course_lesson_interaction_completed_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/course_lesson_update_params.rbs +36 -120
- data/sig/whop_sdk/models/course_update_params.rbs +9 -35
- data/sig/whop_sdk/models/dispute_created_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/dispute_update_evidence_params.rbs +36 -120
- data/sig/whop_sdk/models/dispute_updated_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/entry_approved_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/entry_created_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/entry_deleted_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/entry_denied_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/experience_create_params.rbs +15 -0
- data/sig/whop_sdk/models/experience_update_params.rbs +9 -30
- data/sig/whop_sdk/models/file_create_params.rbs +23 -0
- data/sig/whop_sdk/models/file_create_response.rbs +68 -0
- data/sig/whop_sdk/models/file_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/file_retrieve_response.rbs +58 -0
- data/sig/whop_sdk/models/forum_post_create_params.rbs +9 -30
- data/sig/whop_sdk/models/forum_post_update_params.rbs +9 -30
- data/sig/whop_sdk/models/friendly_receipt_status.rbs +46 -22
- data/sig/whop_sdk/models/invoice_created_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/invoice_paid_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/invoice_past_due_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/invoice_voided_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/ledger_account_retrieve_response.rbs +0 -38
- data/sig/whop_sdk/models/member_list_response.rbs +5 -0
- data/sig/whop_sdk/models/member_retrieve_response.rbs +5 -0
- data/sig/whop_sdk/models/membership.rbs +65 -4
- data/sig/whop_sdk/models/membership_activated_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/membership_cancel_at_period_end_changed_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/membership_deactivated_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/membership_list_response.rbs +45 -4
- data/sig/whop_sdk/models/membership_uncancel_params.rbs +15 -0
- data/sig/whop_sdk/models/message_create_params.rbs +9 -30
- data/sig/whop_sdk/models/message_update_params.rbs +9 -30
- data/sig/whop_sdk/models/payment.rbs +10 -0
- data/sig/whop_sdk/models/payment_created_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/payment_failed_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/payment_list_response.rbs +10 -0
- data/sig/whop_sdk/models/payment_method_types.rbs +76 -74
- data/sig/whop_sdk/models/payment_pending_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/payment_provider.rbs +2 -0
- data/sig/whop_sdk/models/payment_succeeded_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/payout_method_created_webhook_event.rbs +22 -2
- data/sig/whop_sdk/models/payout_method_list_response.rbs +15 -0
- data/sig/whop_sdk/models/payout_method_retrieve_response.rbs +15 -0
- data/sig/whop_sdk/models/plan_create_params.rbs +14 -30
- data/sig/whop_sdk/models/plan_update_params.rbs +14 -30
- data/sig/whop_sdk/models/refund_created_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/refund_updated_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/setup_intent_canceled_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/setup_intent_requires_action_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/setup_intent_succeeded_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/verification_succeeded_webhook_event.rbs +7 -2
- data/sig/whop_sdk/models/webhook_create_params.rbs +126 -0
- data/sig/whop_sdk/models/webhook_create_response.rbs +203 -0
- data/sig/whop_sdk/models/webhook_delete_params.rbs +15 -0
- data/sig/whop_sdk/models/webhook_delete_response.rbs +5 -0
- data/sig/whop_sdk/models/webhook_list_params.rbs +46 -0
- data/sig/whop_sdk/models/webhook_list_response.rbs +125 -0
- data/sig/whop_sdk/models/webhook_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/webhook_retrieve_response.rbs +198 -0
- data/sig/whop_sdk/models/webhook_update_params.rbs +121 -0
- data/sig/whop_sdk/models/webhook_update_response.rbs +198 -0
- data/sig/whop_sdk/models/withdrawal_create_params.rbs +11 -1
- data/sig/whop_sdk/models/withdrawal_create_response.rbs +5 -8
- data/sig/whop_sdk/models/withdrawal_created_webhook_event.rbs +12 -10
- data/sig/whop_sdk/models/withdrawal_list_response.rbs +3 -8
- data/sig/whop_sdk/models/withdrawal_retrieve_response.rbs +5 -8
- data/sig/whop_sdk/models/withdrawal_updated_webhook_event.rbs +12 -10
- data/sig/whop_sdk/models.rbs +16 -2
- data/sig/whop_sdk/resources/app_builds.rbs +1 -1
- data/sig/whop_sdk/resources/apps.rbs +2 -1
- data/sig/whop_sdk/resources/checkout_configurations.rbs +1 -0
- data/sig/whop_sdk/resources/companies.rbs +3 -2
- data/sig/whop_sdk/resources/course_lessons.rbs +4 -4
- data/sig/whop_sdk/resources/courses.rbs +2 -4
- data/sig/whop_sdk/resources/disputes.rbs +4 -4
- data/sig/whop_sdk/resources/experiences.rbs +2 -1
- data/sig/whop_sdk/resources/files.rbs +17 -0
- data/sig/whop_sdk/resources/forum_posts.rbs +2 -2
- data/sig/whop_sdk/resources/memberships.rbs +5 -0
- data/sig/whop_sdk/resources/messages.rbs +2 -2
- data/sig/whop_sdk/resources/plans.rbs +4 -2
- data/sig/whop_sdk/resources/webhooks.rbs +36 -0
- data/sig/whop_sdk/resources/withdrawals.rbs +2 -0
- metadata +64 -5
- data/lib/whop_sdk/models/withdrawal_types.rb +0 -16
- data/rbi/whop_sdk/models/withdrawal_types.rbi +0 -20
- data/sig/whop_sdk/models/withdrawal_types.rbs +0 -14
|
@@ -33,13 +33,21 @@ module WhopSDK
|
|
|
33
33
|
# @return [Symbol, :"refund.updated"]
|
|
34
34
|
required :type, const: :"refund.updated"
|
|
35
35
|
|
|
36
|
-
# @!
|
|
36
|
+
# @!attribute company_id
|
|
37
|
+
# The company ID that this webhook event is associated with
|
|
38
|
+
#
|
|
39
|
+
# @return [String, nil]
|
|
40
|
+
optional :company_id, String, nil?: true
|
|
41
|
+
|
|
42
|
+
# @!method initialize(id:, data:, timestamp:, company_id: nil, api_version: :v1, type: :"refund.updated")
|
|
37
43
|
# @param id [String] A unique ID for every single webhook request
|
|
38
44
|
#
|
|
39
45
|
# @param data [WhopSDK::Models::RefundUpdatedWebhookEvent::Data] An object representing a refund made on a payment.
|
|
40
46
|
#
|
|
41
47
|
# @param timestamp [Time] The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
42
48
|
#
|
|
49
|
+
# @param company_id [String, nil] The company ID that this webhook event is associated with
|
|
50
|
+
#
|
|
43
51
|
# @param api_version [Symbol, :v1] The API version for this webhook
|
|
44
52
|
#
|
|
45
53
|
# @param type [Symbol, :"refund.updated"] The webhook event type
|
|
@@ -34,7 +34,13 @@ module WhopSDK
|
|
|
34
34
|
# @return [Symbol, :"setup_intent.canceled"]
|
|
35
35
|
required :type, const: :"setup_intent.canceled"
|
|
36
36
|
|
|
37
|
-
# @!
|
|
37
|
+
# @!attribute company_id
|
|
38
|
+
# The company ID that this webhook event is associated with
|
|
39
|
+
#
|
|
40
|
+
# @return [String, nil]
|
|
41
|
+
optional :company_id, String, nil?: true
|
|
42
|
+
|
|
43
|
+
# @!method initialize(id:, data:, timestamp:, company_id: nil, api_version: :v1, type: :"setup_intent.canceled")
|
|
38
44
|
# Some parameter documentations has been truncated, see
|
|
39
45
|
# {WhopSDK::Models::SetupIntentCanceledWebhookEvent} for more details.
|
|
40
46
|
#
|
|
@@ -44,6 +50,8 @@ module WhopSDK
|
|
|
44
50
|
#
|
|
45
51
|
# @param timestamp [Time] The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
46
52
|
#
|
|
53
|
+
# @param company_id [String, nil] The company ID that this webhook event is associated with
|
|
54
|
+
#
|
|
47
55
|
# @param api_version [Symbol, :v1] The API version for this webhook
|
|
48
56
|
#
|
|
49
57
|
# @param type [Symbol, :"setup_intent.canceled"] The webhook event type
|
|
@@ -34,7 +34,13 @@ module WhopSDK
|
|
|
34
34
|
# @return [Symbol, :"setup_intent.requires_action"]
|
|
35
35
|
required :type, const: :"setup_intent.requires_action"
|
|
36
36
|
|
|
37
|
-
# @!
|
|
37
|
+
# @!attribute company_id
|
|
38
|
+
# The company ID that this webhook event is associated with
|
|
39
|
+
#
|
|
40
|
+
# @return [String, nil]
|
|
41
|
+
optional :company_id, String, nil?: true
|
|
42
|
+
|
|
43
|
+
# @!method initialize(id:, data:, timestamp:, company_id: nil, api_version: :v1, type: :"setup_intent.requires_action")
|
|
38
44
|
# Some parameter documentations has been truncated, see
|
|
39
45
|
# {WhopSDK::Models::SetupIntentRequiresActionWebhookEvent} for more details.
|
|
40
46
|
#
|
|
@@ -44,6 +50,8 @@ module WhopSDK
|
|
|
44
50
|
#
|
|
45
51
|
# @param timestamp [Time] The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
46
52
|
#
|
|
53
|
+
# @param company_id [String, nil] The company ID that this webhook event is associated with
|
|
54
|
+
#
|
|
47
55
|
# @param api_version [Symbol, :v1] The API version for this webhook
|
|
48
56
|
#
|
|
49
57
|
# @param type [Symbol, :"setup_intent.requires_action"] The webhook event type
|
|
@@ -34,7 +34,13 @@ module WhopSDK
|
|
|
34
34
|
# @return [Symbol, :"setup_intent.succeeded"]
|
|
35
35
|
required :type, const: :"setup_intent.succeeded"
|
|
36
36
|
|
|
37
|
-
# @!
|
|
37
|
+
# @!attribute company_id
|
|
38
|
+
# The company ID that this webhook event is associated with
|
|
39
|
+
#
|
|
40
|
+
# @return [String, nil]
|
|
41
|
+
optional :company_id, String, nil?: true
|
|
42
|
+
|
|
43
|
+
# @!method initialize(id:, data:, timestamp:, company_id: nil, api_version: :v1, type: :"setup_intent.succeeded")
|
|
38
44
|
# Some parameter documentations has been truncated, see
|
|
39
45
|
# {WhopSDK::Models::SetupIntentSucceededWebhookEvent} for more details.
|
|
40
46
|
#
|
|
@@ -44,6 +50,8 @@ module WhopSDK
|
|
|
44
50
|
#
|
|
45
51
|
# @param timestamp [Time] The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
46
52
|
#
|
|
53
|
+
# @param company_id [String, nil] The company ID that this webhook event is associated with
|
|
54
|
+
#
|
|
47
55
|
# @param api_version [Symbol, :v1] The API version for this webhook
|
|
48
56
|
#
|
|
49
57
|
# @param type [Symbol, :"setup_intent.succeeded"] The webhook event type
|
|
@@ -33,13 +33,21 @@ module WhopSDK
|
|
|
33
33
|
# @return [Symbol, :"verification.succeeded"]
|
|
34
34
|
required :type, const: :"verification.succeeded"
|
|
35
35
|
|
|
36
|
-
# @!
|
|
36
|
+
# @!attribute company_id
|
|
37
|
+
# The company ID that this webhook event is associated with
|
|
38
|
+
#
|
|
39
|
+
# @return [String, nil]
|
|
40
|
+
optional :company_id, String, nil?: true
|
|
41
|
+
|
|
42
|
+
# @!method initialize(id:, data:, timestamp:, company_id: nil, api_version: :v1, type: :"verification.succeeded")
|
|
37
43
|
# @param id [String] A unique ID for every single webhook request
|
|
38
44
|
#
|
|
39
45
|
# @param data [WhopSDK::Models::VerificationSucceededWebhookEvent::Data] An object representing an identity verification session
|
|
40
46
|
#
|
|
41
47
|
# @param timestamp [Time] The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
42
48
|
#
|
|
49
|
+
# @param company_id [String, nil] The company ID that this webhook event is associated with
|
|
50
|
+
#
|
|
43
51
|
# @param api_version [Symbol, :v1] The API version for this webhook
|
|
44
52
|
#
|
|
45
53
|
# @param type [Symbol, :"verification.succeeded"] The webhook event type
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::Webhooks#create
|
|
6
|
+
class WebhookCreateParams < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute url
|
|
11
|
+
# The URL to send the webhook to.
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :url, String
|
|
15
|
+
|
|
16
|
+
# @!attribute api_version
|
|
17
|
+
# The different API versions
|
|
18
|
+
#
|
|
19
|
+
# @return [Symbol, WhopSDK::Models::WebhookCreateParams::APIVersion, nil]
|
|
20
|
+
optional :api_version, enum: -> { WhopSDK::WebhookCreateParams::APIVersion }, nil?: true
|
|
21
|
+
|
|
22
|
+
# @!attribute child_resource_events
|
|
23
|
+
# Whether or not to send events for child resources. For example, if the webhook
|
|
24
|
+
# is created for a Company, enabling this will only send events from the Company's
|
|
25
|
+
# sub-merchants (child companies).
|
|
26
|
+
#
|
|
27
|
+
# @return [Boolean, nil]
|
|
28
|
+
optional :child_resource_events, WhopSDK::Internal::Type::Boolean, nil?: true
|
|
29
|
+
|
|
30
|
+
# @!attribute enabled
|
|
31
|
+
# Whether or not the webhook is enabled.
|
|
32
|
+
#
|
|
33
|
+
# @return [Boolean, nil]
|
|
34
|
+
optional :enabled, WhopSDK::Internal::Type::Boolean, nil?: true
|
|
35
|
+
|
|
36
|
+
# @!attribute events
|
|
37
|
+
# The events to send the webhook for.
|
|
38
|
+
#
|
|
39
|
+
# @return [Array<Symbol, WhopSDK::Models::WebhookCreateParams::Event>, nil]
|
|
40
|
+
optional :events,
|
|
41
|
+
-> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::WebhookCreateParams::Event] },
|
|
42
|
+
nil?: true
|
|
43
|
+
|
|
44
|
+
# @!attribute resource_id
|
|
45
|
+
# The resource to create the webhook for. By default this will use current company
|
|
46
|
+
#
|
|
47
|
+
# @return [String, nil]
|
|
48
|
+
optional :resource_id, String, nil?: true
|
|
49
|
+
|
|
50
|
+
# @!method initialize(url:, api_version: nil, child_resource_events: nil, enabled: nil, events: nil, resource_id: nil, request_options: {})
|
|
51
|
+
# Some parameter documentations has been truncated, see
|
|
52
|
+
# {WhopSDK::Models::WebhookCreateParams} for more details.
|
|
53
|
+
#
|
|
54
|
+
# @param url [String] The URL to send the webhook to.
|
|
55
|
+
#
|
|
56
|
+
# @param api_version [Symbol, WhopSDK::Models::WebhookCreateParams::APIVersion, nil] The different API versions
|
|
57
|
+
#
|
|
58
|
+
# @param child_resource_events [Boolean, nil] Whether or not to send events for child resources. For example, if the webhook i
|
|
59
|
+
#
|
|
60
|
+
# @param enabled [Boolean, nil] Whether or not the webhook is enabled.
|
|
61
|
+
#
|
|
62
|
+
# @param events [Array<Symbol, WhopSDK::Models::WebhookCreateParams::Event>, nil] The events to send the webhook for.
|
|
63
|
+
#
|
|
64
|
+
# @param resource_id [String, nil] The resource to create the webhook for. By default this will use current company
|
|
65
|
+
#
|
|
66
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
67
|
+
|
|
68
|
+
# The different API versions
|
|
69
|
+
module APIVersion
|
|
70
|
+
extend WhopSDK::Internal::Type::Enum
|
|
71
|
+
|
|
72
|
+
V1 = :v1
|
|
73
|
+
V2 = :v2
|
|
74
|
+
V5 = :v5
|
|
75
|
+
|
|
76
|
+
# @!method self.values
|
|
77
|
+
# @return [Array<Symbol>]
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# The different event types available
|
|
81
|
+
module Event
|
|
82
|
+
extend WhopSDK::Internal::Type::Enum
|
|
83
|
+
|
|
84
|
+
INVOICE_CREATED = :"invoice.created"
|
|
85
|
+
INVOICE_PAID = :"invoice.paid"
|
|
86
|
+
INVOICE_PAST_DUE = :"invoice.past_due"
|
|
87
|
+
INVOICE_VOIDED = :"invoice.voided"
|
|
88
|
+
MEMBERSHIP_ACTIVATED = :"membership.activated"
|
|
89
|
+
MEMBERSHIP_DEACTIVATED = :"membership.deactivated"
|
|
90
|
+
ENTRY_CREATED = :"entry.created"
|
|
91
|
+
ENTRY_APPROVED = :"entry.approved"
|
|
92
|
+
ENTRY_DENIED = :"entry.denied"
|
|
93
|
+
ENTRY_DELETED = :"entry.deleted"
|
|
94
|
+
SETUP_INTENT_REQUIRES_ACTION = :"setup_intent.requires_action"
|
|
95
|
+
SETUP_INTENT_SUCCEEDED = :"setup_intent.succeeded"
|
|
96
|
+
SETUP_INTENT_CANCELED = :"setup_intent.canceled"
|
|
97
|
+
WITHDRAWAL_CREATED = :"withdrawal.created"
|
|
98
|
+
WITHDRAWAL_UPDATED = :"withdrawal.updated"
|
|
99
|
+
COURSE_LESSON_INTERACTION_COMPLETED = :"course_lesson_interaction.completed"
|
|
100
|
+
PAYOUT_METHOD_CREATED = :"payout_method.created"
|
|
101
|
+
VERIFICATION_SUCCEEDED = :"verification.succeeded"
|
|
102
|
+
PAYMENT_CREATED = :"payment.created"
|
|
103
|
+
PAYMENT_SUCCEEDED = :"payment.succeeded"
|
|
104
|
+
PAYMENT_FAILED = :"payment.failed"
|
|
105
|
+
PAYMENT_PENDING = :"payment.pending"
|
|
106
|
+
DISPUTE_CREATED = :"dispute.created"
|
|
107
|
+
DISPUTE_UPDATED = :"dispute.updated"
|
|
108
|
+
REFUND_CREATED = :"refund.created"
|
|
109
|
+
REFUND_UPDATED = :"refund.updated"
|
|
110
|
+
MEMBERSHIP_CANCEL_AT_PERIOD_END_CHANGED = :"membership.cancel_at_period_end_changed"
|
|
111
|
+
|
|
112
|
+
# @!method self.values
|
|
113
|
+
# @return [Array<Symbol>]
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
end
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::Webhooks#create
|
|
6
|
+
class WebhookCreateResponse < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The ID of the webhook
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute api_version
|
|
14
|
+
# The API version for this webhook
|
|
15
|
+
#
|
|
16
|
+
# @return [Symbol, WhopSDK::Models::WebhookCreateResponse::APIVersion]
|
|
17
|
+
required :api_version, enum: -> { WhopSDK::Models::WebhookCreateResponse::APIVersion }
|
|
18
|
+
|
|
19
|
+
# @!attribute child_resource_events
|
|
20
|
+
# Whether or not to send events for child resources. For example, if the webhook
|
|
21
|
+
# is created for a Company, enabling this will only send events from the Company's
|
|
22
|
+
# sub-merchants (child companies).
|
|
23
|
+
#
|
|
24
|
+
# @return [Boolean]
|
|
25
|
+
required :child_resource_events, WhopSDK::Internal::Type::Boolean
|
|
26
|
+
|
|
27
|
+
# @!attribute created_at
|
|
28
|
+
# The timestamp of when the webhook was created
|
|
29
|
+
#
|
|
30
|
+
# @return [Time]
|
|
31
|
+
required :created_at, Time
|
|
32
|
+
|
|
33
|
+
# @!attribute enabled
|
|
34
|
+
# Whether or not this webhook is turned on or not
|
|
35
|
+
#
|
|
36
|
+
# @return [Boolean]
|
|
37
|
+
required :enabled, WhopSDK::Internal::Type::Boolean
|
|
38
|
+
|
|
39
|
+
# @!attribute events
|
|
40
|
+
# The number of events this webhooks is configured to receive
|
|
41
|
+
#
|
|
42
|
+
# @return [Array<Symbol, WhopSDK::Models::WebhookCreateResponse::Event>]
|
|
43
|
+
required :events,
|
|
44
|
+
-> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::Models::WebhookCreateResponse::Event] }
|
|
45
|
+
|
|
46
|
+
# @!attribute resource_id
|
|
47
|
+
# The resource ID
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
required :resource_id, String
|
|
51
|
+
|
|
52
|
+
# @!attribute testable_events
|
|
53
|
+
# The list of events that can be tested with this webhook
|
|
54
|
+
#
|
|
55
|
+
# @return [Array<Symbol, WhopSDK::Models::WebhookCreateResponse::TestableEvent>]
|
|
56
|
+
required :testable_events,
|
|
57
|
+
-> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::Models::WebhookCreateResponse::TestableEvent] }
|
|
58
|
+
|
|
59
|
+
# @!attribute url
|
|
60
|
+
# The URL the webhook events will be sent to
|
|
61
|
+
#
|
|
62
|
+
# @return [String]
|
|
63
|
+
required :url, String
|
|
64
|
+
|
|
65
|
+
# @!attribute webhook_secret
|
|
66
|
+
# A unique secret key that will be sent with each webhook event
|
|
67
|
+
#
|
|
68
|
+
# @return [String]
|
|
69
|
+
required :webhook_secret, String
|
|
70
|
+
|
|
71
|
+
# @!method initialize(id:, api_version:, child_resource_events:, created_at:, enabled:, events:, resource_id:, testable_events:, url:, webhook_secret:)
|
|
72
|
+
# Some parameter documentations has been truncated, see
|
|
73
|
+
# {WhopSDK::Models::WebhookCreateResponse} for more details.
|
|
74
|
+
#
|
|
75
|
+
# A webhook object, which can be configured to be sent updates about a company
|
|
76
|
+
#
|
|
77
|
+
# @param id [String] The ID of the webhook
|
|
78
|
+
#
|
|
79
|
+
# @param api_version [Symbol, WhopSDK::Models::WebhookCreateResponse::APIVersion] The API version for this webhook
|
|
80
|
+
#
|
|
81
|
+
# @param child_resource_events [Boolean] Whether or not to send events for child resources. For example, if the webhook i
|
|
82
|
+
#
|
|
83
|
+
# @param created_at [Time] The timestamp of when the webhook was created
|
|
84
|
+
#
|
|
85
|
+
# @param enabled [Boolean] Whether or not this webhook is turned on or not
|
|
86
|
+
#
|
|
87
|
+
# @param events [Array<Symbol, WhopSDK::Models::WebhookCreateResponse::Event>] The number of events this webhooks is configured to receive
|
|
88
|
+
#
|
|
89
|
+
# @param resource_id [String] The resource ID
|
|
90
|
+
#
|
|
91
|
+
# @param testable_events [Array<Symbol, WhopSDK::Models::WebhookCreateResponse::TestableEvent>] The list of events that can be tested with this webhook
|
|
92
|
+
#
|
|
93
|
+
# @param url [String] The URL the webhook events will be sent to
|
|
94
|
+
#
|
|
95
|
+
# @param webhook_secret [String] A unique secret key that will be sent with each webhook event
|
|
96
|
+
|
|
97
|
+
# The API version for this webhook
|
|
98
|
+
#
|
|
99
|
+
# @see WhopSDK::Models::WebhookCreateResponse#api_version
|
|
100
|
+
module APIVersion
|
|
101
|
+
extend WhopSDK::Internal::Type::Enum
|
|
102
|
+
|
|
103
|
+
V1 = :v1
|
|
104
|
+
V2 = :v2
|
|
105
|
+
V5 = :v5
|
|
106
|
+
|
|
107
|
+
# @!method self.values
|
|
108
|
+
# @return [Array<Symbol>]
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# The different event types available
|
|
112
|
+
module Event
|
|
113
|
+
extend WhopSDK::Internal::Type::Enum
|
|
114
|
+
|
|
115
|
+
INVOICE_CREATED = :"invoice.created"
|
|
116
|
+
INVOICE_PAID = :"invoice.paid"
|
|
117
|
+
INVOICE_PAST_DUE = :"invoice.past_due"
|
|
118
|
+
INVOICE_VOIDED = :"invoice.voided"
|
|
119
|
+
MEMBERSHIP_ACTIVATED = :"membership.activated"
|
|
120
|
+
MEMBERSHIP_DEACTIVATED = :"membership.deactivated"
|
|
121
|
+
ENTRY_CREATED = :"entry.created"
|
|
122
|
+
ENTRY_APPROVED = :"entry.approved"
|
|
123
|
+
ENTRY_DENIED = :"entry.denied"
|
|
124
|
+
ENTRY_DELETED = :"entry.deleted"
|
|
125
|
+
SETUP_INTENT_REQUIRES_ACTION = :"setup_intent.requires_action"
|
|
126
|
+
SETUP_INTENT_SUCCEEDED = :"setup_intent.succeeded"
|
|
127
|
+
SETUP_INTENT_CANCELED = :"setup_intent.canceled"
|
|
128
|
+
WITHDRAWAL_CREATED = :"withdrawal.created"
|
|
129
|
+
WITHDRAWAL_UPDATED = :"withdrawal.updated"
|
|
130
|
+
COURSE_LESSON_INTERACTION_COMPLETED = :"course_lesson_interaction.completed"
|
|
131
|
+
PAYOUT_METHOD_CREATED = :"payout_method.created"
|
|
132
|
+
VERIFICATION_SUCCEEDED = :"verification.succeeded"
|
|
133
|
+
PAYMENT_CREATED = :"payment.created"
|
|
134
|
+
PAYMENT_SUCCEEDED = :"payment.succeeded"
|
|
135
|
+
PAYMENT_FAILED = :"payment.failed"
|
|
136
|
+
PAYMENT_PENDING = :"payment.pending"
|
|
137
|
+
DISPUTE_CREATED = :"dispute.created"
|
|
138
|
+
DISPUTE_UPDATED = :"dispute.updated"
|
|
139
|
+
REFUND_CREATED = :"refund.created"
|
|
140
|
+
REFUND_UPDATED = :"refund.updated"
|
|
141
|
+
MEMBERSHIP_CANCEL_AT_PERIOD_END_CHANGED = :"membership.cancel_at_period_end_changed"
|
|
142
|
+
|
|
143
|
+
# @!method self.values
|
|
144
|
+
# @return [Array<Symbol>]
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# The different event types available
|
|
148
|
+
module TestableEvent
|
|
149
|
+
extend WhopSDK::Internal::Type::Enum
|
|
150
|
+
|
|
151
|
+
INVOICE_CREATED = :"invoice.created"
|
|
152
|
+
INVOICE_PAID = :"invoice.paid"
|
|
153
|
+
INVOICE_PAST_DUE = :"invoice.past_due"
|
|
154
|
+
INVOICE_VOIDED = :"invoice.voided"
|
|
155
|
+
MEMBERSHIP_ACTIVATED = :"membership.activated"
|
|
156
|
+
MEMBERSHIP_DEACTIVATED = :"membership.deactivated"
|
|
157
|
+
ENTRY_CREATED = :"entry.created"
|
|
158
|
+
ENTRY_APPROVED = :"entry.approved"
|
|
159
|
+
ENTRY_DENIED = :"entry.denied"
|
|
160
|
+
ENTRY_DELETED = :"entry.deleted"
|
|
161
|
+
SETUP_INTENT_REQUIRES_ACTION = :"setup_intent.requires_action"
|
|
162
|
+
SETUP_INTENT_SUCCEEDED = :"setup_intent.succeeded"
|
|
163
|
+
SETUP_INTENT_CANCELED = :"setup_intent.canceled"
|
|
164
|
+
WITHDRAWAL_CREATED = :"withdrawal.created"
|
|
165
|
+
WITHDRAWAL_UPDATED = :"withdrawal.updated"
|
|
166
|
+
COURSE_LESSON_INTERACTION_COMPLETED = :"course_lesson_interaction.completed"
|
|
167
|
+
PAYOUT_METHOD_CREATED = :"payout_method.created"
|
|
168
|
+
VERIFICATION_SUCCEEDED = :"verification.succeeded"
|
|
169
|
+
PAYMENT_CREATED = :"payment.created"
|
|
170
|
+
PAYMENT_SUCCEEDED = :"payment.succeeded"
|
|
171
|
+
PAYMENT_FAILED = :"payment.failed"
|
|
172
|
+
PAYMENT_PENDING = :"payment.pending"
|
|
173
|
+
DISPUTE_CREATED = :"dispute.created"
|
|
174
|
+
DISPUTE_UPDATED = :"dispute.updated"
|
|
175
|
+
REFUND_CREATED = :"refund.created"
|
|
176
|
+
REFUND_UPDATED = :"refund.updated"
|
|
177
|
+
MEMBERSHIP_CANCEL_AT_PERIOD_END_CHANGED = :"membership.cancel_at_period_end_changed"
|
|
178
|
+
|
|
179
|
+
# @!method self.values
|
|
180
|
+
# @return [Array<Symbol>]
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::Webhooks#delete
|
|
6
|
+
class WebhookDeleteParams < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::Webhooks#list
|
|
6
|
+
class WebhookListParams < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute company_id
|
|
11
|
+
# The ID of the company to list webhooks for
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :company_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute after
|
|
17
|
+
# Returns the elements in the list that come after the specified cursor.
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :after, String, nil?: true
|
|
21
|
+
|
|
22
|
+
# @!attribute before
|
|
23
|
+
# Returns the elements in the list that come before the specified cursor.
|
|
24
|
+
#
|
|
25
|
+
# @return [String, nil]
|
|
26
|
+
optional :before, String, nil?: true
|
|
27
|
+
|
|
28
|
+
# @!attribute first
|
|
29
|
+
# Returns the first _n_ elements from the list.
|
|
30
|
+
#
|
|
31
|
+
# @return [Integer, nil]
|
|
32
|
+
optional :first, Integer, nil?: true
|
|
33
|
+
|
|
34
|
+
# @!attribute last
|
|
35
|
+
# Returns the last _n_ elements from the list.
|
|
36
|
+
#
|
|
37
|
+
# @return [Integer, nil]
|
|
38
|
+
optional :last, Integer, nil?: true
|
|
39
|
+
|
|
40
|
+
# @!method initialize(company_id:, after: nil, before: nil, first: nil, last: nil, request_options: {})
|
|
41
|
+
# @param company_id [String] The ID of the company to list webhooks for
|
|
42
|
+
#
|
|
43
|
+
# @param after [String, nil] Returns the elements in the list that come after the specified cursor.
|
|
44
|
+
#
|
|
45
|
+
# @param before [String, nil] Returns the elements in the list that come before the specified cursor.
|
|
46
|
+
#
|
|
47
|
+
# @param first [Integer, nil] Returns the first _n_ elements from the list.
|
|
48
|
+
#
|
|
49
|
+
# @param last [Integer, nil] Returns the last _n_ elements from the list.
|
|
50
|
+
#
|
|
51
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::Webhooks#list
|
|
6
|
+
class WebhookListResponse < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The ID of the webhook
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute api_version
|
|
14
|
+
# The API version for this webhook
|
|
15
|
+
#
|
|
16
|
+
# @return [Symbol, WhopSDK::Models::WebhookListResponse::APIVersion]
|
|
17
|
+
required :api_version, enum: -> { WhopSDK::Models::WebhookListResponse::APIVersion }
|
|
18
|
+
|
|
19
|
+
# @!attribute child_resource_events
|
|
20
|
+
# Whether or not to send events for child resources. For example, if the webhook
|
|
21
|
+
# is created for a Company, enabling this will only send events from the Company's
|
|
22
|
+
# sub-merchants (child companies).
|
|
23
|
+
#
|
|
24
|
+
# @return [Boolean]
|
|
25
|
+
required :child_resource_events, WhopSDK::Internal::Type::Boolean
|
|
26
|
+
|
|
27
|
+
# @!attribute created_at
|
|
28
|
+
# The timestamp of when the webhook was created
|
|
29
|
+
#
|
|
30
|
+
# @return [Time]
|
|
31
|
+
required :created_at, Time
|
|
32
|
+
|
|
33
|
+
# @!attribute enabled
|
|
34
|
+
# Whether or not this webhook is turned on or not
|
|
35
|
+
#
|
|
36
|
+
# @return [Boolean]
|
|
37
|
+
required :enabled, WhopSDK::Internal::Type::Boolean
|
|
38
|
+
|
|
39
|
+
# @!attribute events
|
|
40
|
+
# The number of events this webhooks is configured to receive
|
|
41
|
+
#
|
|
42
|
+
# @return [Array<Symbol, WhopSDK::Models::WebhookListResponse::Event>]
|
|
43
|
+
required :events,
|
|
44
|
+
-> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::Models::WebhookListResponse::Event] }
|
|
45
|
+
|
|
46
|
+
# @!attribute url
|
|
47
|
+
# The URL the webhook events will be sent to
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
required :url, String
|
|
51
|
+
|
|
52
|
+
# @!method initialize(id:, api_version:, child_resource_events:, created_at:, enabled:, events:, url:)
|
|
53
|
+
# Some parameter documentations has been truncated, see
|
|
54
|
+
# {WhopSDK::Models::WebhookListResponse} for more details.
|
|
55
|
+
#
|
|
56
|
+
# A webhook object, which can be configured to be sent updates about a company
|
|
57
|
+
#
|
|
58
|
+
# @param id [String] The ID of the webhook
|
|
59
|
+
#
|
|
60
|
+
# @param api_version [Symbol, WhopSDK::Models::WebhookListResponse::APIVersion] The API version for this webhook
|
|
61
|
+
#
|
|
62
|
+
# @param child_resource_events [Boolean] Whether or not to send events for child resources. For example, if the webhook i
|
|
63
|
+
#
|
|
64
|
+
# @param created_at [Time] The timestamp of when the webhook was created
|
|
65
|
+
#
|
|
66
|
+
# @param enabled [Boolean] Whether or not this webhook is turned on or not
|
|
67
|
+
#
|
|
68
|
+
# @param events [Array<Symbol, WhopSDK::Models::WebhookListResponse::Event>] The number of events this webhooks is configured to receive
|
|
69
|
+
#
|
|
70
|
+
# @param url [String] The URL the webhook events will be sent to
|
|
71
|
+
|
|
72
|
+
# The API version for this webhook
|
|
73
|
+
#
|
|
74
|
+
# @see WhopSDK::Models::WebhookListResponse#api_version
|
|
75
|
+
module APIVersion
|
|
76
|
+
extend WhopSDK::Internal::Type::Enum
|
|
77
|
+
|
|
78
|
+
V1 = :v1
|
|
79
|
+
V2 = :v2
|
|
80
|
+
V5 = :v5
|
|
81
|
+
|
|
82
|
+
# @!method self.values
|
|
83
|
+
# @return [Array<Symbol>]
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# The different event types available
|
|
87
|
+
module Event
|
|
88
|
+
extend WhopSDK::Internal::Type::Enum
|
|
89
|
+
|
|
90
|
+
INVOICE_CREATED = :"invoice.created"
|
|
91
|
+
INVOICE_PAID = :"invoice.paid"
|
|
92
|
+
INVOICE_PAST_DUE = :"invoice.past_due"
|
|
93
|
+
INVOICE_VOIDED = :"invoice.voided"
|
|
94
|
+
MEMBERSHIP_ACTIVATED = :"membership.activated"
|
|
95
|
+
MEMBERSHIP_DEACTIVATED = :"membership.deactivated"
|
|
96
|
+
ENTRY_CREATED = :"entry.created"
|
|
97
|
+
ENTRY_APPROVED = :"entry.approved"
|
|
98
|
+
ENTRY_DENIED = :"entry.denied"
|
|
99
|
+
ENTRY_DELETED = :"entry.deleted"
|
|
100
|
+
SETUP_INTENT_REQUIRES_ACTION = :"setup_intent.requires_action"
|
|
101
|
+
SETUP_INTENT_SUCCEEDED = :"setup_intent.succeeded"
|
|
102
|
+
SETUP_INTENT_CANCELED = :"setup_intent.canceled"
|
|
103
|
+
WITHDRAWAL_CREATED = :"withdrawal.created"
|
|
104
|
+
WITHDRAWAL_UPDATED = :"withdrawal.updated"
|
|
105
|
+
COURSE_LESSON_INTERACTION_COMPLETED = :"course_lesson_interaction.completed"
|
|
106
|
+
PAYOUT_METHOD_CREATED = :"payout_method.created"
|
|
107
|
+
VERIFICATION_SUCCEEDED = :"verification.succeeded"
|
|
108
|
+
PAYMENT_CREATED = :"payment.created"
|
|
109
|
+
PAYMENT_SUCCEEDED = :"payment.succeeded"
|
|
110
|
+
PAYMENT_FAILED = :"payment.failed"
|
|
111
|
+
PAYMENT_PENDING = :"payment.pending"
|
|
112
|
+
DISPUTE_CREATED = :"dispute.created"
|
|
113
|
+
DISPUTE_UPDATED = :"dispute.updated"
|
|
114
|
+
REFUND_CREATED = :"refund.created"
|
|
115
|
+
REFUND_UPDATED = :"refund.updated"
|
|
116
|
+
MEMBERSHIP_CANCEL_AT_PERIOD_END_CHANGED = :"membership.cancel_at_period_end_changed"
|
|
117
|
+
|
|
118
|
+
# @!method self.values
|
|
119
|
+
# @return [Array<Symbol>]
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::Webhooks#retrieve
|
|
6
|
+
class WebhookRetrieveParams < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|