whop_sdk 0.0.23 → 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.
Files changed (176) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/models/app_build_create_params.rb +16 -55
  5. data/lib/whop_sdk/models/app_create_params.rb +22 -1
  6. data/lib/whop_sdk/models/app_list_params.rb +5 -0
  7. data/lib/whop_sdk/models/app_update_params.rb +14 -53
  8. data/lib/whop_sdk/models/card_brands.rb +16 -0
  9. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +32 -56
  10. data/lib/whop_sdk/models/company_create_params.rb +22 -1
  11. data/lib/whop_sdk/models/company_update_params.rb +28 -106
  12. data/lib/whop_sdk/models/course_create_params.rb +15 -62
  13. data/lib/whop_sdk/models/course_lesson_create_params.rb +14 -53
  14. data/lib/whop_sdk/models/course_lesson_update_params.rb +53 -214
  15. data/lib/whop_sdk/models/course_update_params.rb +14 -61
  16. data/lib/whop_sdk/models/dispute_update_evidence_params.rb +56 -212
  17. data/lib/whop_sdk/models/experience_create_params.rb +22 -1
  18. data/lib/whop_sdk/models/experience_update_params.rb +14 -53
  19. data/lib/whop_sdk/models/forum_post_create_params.rb +13 -52
  20. data/lib/whop_sdk/models/forum_post_update_params.rb +13 -52
  21. data/lib/whop_sdk/models/friendly_receipt_status.rb +23 -11
  22. data/lib/whop_sdk/models/ledger_account_retrieve_response.rb +1 -34
  23. data/lib/whop_sdk/models/member_list_response.rb +9 -1
  24. data/lib/whop_sdk/models/member_retrieve_response.rb +9 -1
  25. data/lib/whop_sdk/models/membership.rb +76 -2
  26. data/lib/whop_sdk/models/membership_list_response.rb +38 -2
  27. data/lib/whop_sdk/models/membership_uncancel_params.rb +14 -0
  28. data/lib/whop_sdk/models/message_create_params.rb +13 -52
  29. data/lib/whop_sdk/models/message_update_params.rb +14 -53
  30. data/lib/whop_sdk/models/payment.rb +17 -1
  31. data/lib/whop_sdk/models/payment_list_response.rb +17 -1
  32. data/lib/whop_sdk/models/payment_method_types.rb +58 -57
  33. data/lib/whop_sdk/models/payment_provider.rb +1 -0
  34. data/lib/whop_sdk/models/payout_method_created_webhook_event.rb +26 -1
  35. data/lib/whop_sdk/models/payout_method_list_response.rb +26 -1
  36. data/lib/whop_sdk/models/payout_method_retrieve_response.rb +26 -1
  37. data/lib/whop_sdk/models/plan_create_params.rb +14 -53
  38. data/lib/whop_sdk/models/plan_update_params.rb +14 -53
  39. data/lib/whop_sdk/models/withdrawal_create_params.rb +21 -1
  40. data/lib/whop_sdk/models/withdrawal_create_response.rb +2 -9
  41. data/lib/whop_sdk/models/withdrawal_created_webhook_event.rb +2 -9
  42. data/lib/whop_sdk/models/withdrawal_list_response.rb +1 -9
  43. data/lib/whop_sdk/models/withdrawal_retrieve_response.rb +2 -9
  44. data/lib/whop_sdk/models/withdrawal_updated_webhook_event.rb +2 -9
  45. data/lib/whop_sdk/models.rb +2 -2
  46. data/lib/whop_sdk/resources/app_builds.rb +1 -1
  47. data/lib/whop_sdk/resources/apps.rb +4 -2
  48. data/lib/whop_sdk/resources/checkout_configurations.rb +3 -1
  49. data/lib/whop_sdk/resources/companies.rb +5 -3
  50. data/lib/whop_sdk/resources/course_lessons.rb +4 -4
  51. data/lib/whop_sdk/resources/courses.rb +4 -8
  52. data/lib/whop_sdk/resources/disputes.rb +4 -4
  53. data/lib/whop_sdk/resources/experiences.rb +4 -2
  54. data/lib/whop_sdk/resources/forum_posts.rb +2 -2
  55. data/lib/whop_sdk/resources/memberships.rb +32 -0
  56. data/lib/whop_sdk/resources/messages.rb +2 -2
  57. data/lib/whop_sdk/resources/notifications.rb +4 -0
  58. data/lib/whop_sdk/resources/plans.rb +2 -2
  59. data/lib/whop_sdk/resources/withdrawals.rb +8 -1
  60. data/lib/whop_sdk/version.rb +1 -1
  61. data/lib/whop_sdk.rb +1 -1
  62. data/rbi/whop_sdk/models/app_build_create_params.rbi +26 -89
  63. data/rbi/whop_sdk/models/app_create_params.rbi +36 -0
  64. data/rbi/whop_sdk/models/app_list_params.rbi +10 -0
  65. data/rbi/whop_sdk/models/app_update_params.rbi +21 -93
  66. data/rbi/whop_sdk/models/card_brands.rbi +17 -0
  67. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +45 -87
  68. data/rbi/whop_sdk/models/company_create_params.rbi +39 -0
  69. data/rbi/whop_sdk/models/company_update_params.rbi +47 -185
  70. data/rbi/whop_sdk/models/course_create_params.rbi +24 -101
  71. data/rbi/whop_sdk/models/course_lesson_create_params.rbi +25 -92
  72. data/rbi/whop_sdk/models/course_lesson_update_params.rbi +97 -359
  73. data/rbi/whop_sdk/models/course_update_params.rbi +24 -101
  74. data/rbi/whop_sdk/models/dispute_update_evidence_params.rbi +116 -340
  75. data/rbi/whop_sdk/models/experience_create_params.rbi +41 -0
  76. data/rbi/whop_sdk/models/experience_update_params.rbi +24 -93
  77. data/rbi/whop_sdk/models/forum_post_create_params.rbi +18 -94
  78. data/rbi/whop_sdk/models/forum_post_update_params.rbi +18 -94
  79. data/rbi/whop_sdk/models/friendly_receipt_status.rbi +62 -17
  80. data/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +0 -105
  81. data/rbi/whop_sdk/models/member_list_response.rbi +8 -0
  82. data/rbi/whop_sdk/models/member_retrieve_response.rbi +8 -0
  83. data/rbi/whop_sdk/models/membership.rbi +126 -4
  84. data/rbi/whop_sdk/models/membership_list_response.rbi +98 -4
  85. data/rbi/whop_sdk/models/membership_uncancel_params.rbi +27 -0
  86. data/rbi/whop_sdk/models/message_create_params.rbi +18 -94
  87. data/rbi/whop_sdk/models/message_update_params.rbi +18 -94
  88. data/rbi/whop_sdk/models/payment.rbi +16 -0
  89. data/rbi/whop_sdk/models/payment_list_response.rbi +16 -0
  90. data/rbi/whop_sdk/models/payment_method_types.rbi +66 -64
  91. data/rbi/whop_sdk/models/payment_provider.rbi +1 -0
  92. data/rbi/whop_sdk/models/payout_method_created_webhook_event.rbi +26 -0
  93. data/rbi/whop_sdk/models/payout_method_list_response.rbi +26 -0
  94. data/rbi/whop_sdk/models/payout_method_retrieve_response.rbi +26 -0
  95. data/rbi/whop_sdk/models/plan_create_params.rbi +21 -93
  96. data/rbi/whop_sdk/models/plan_update_params.rbi +21 -93
  97. data/rbi/whop_sdk/models/withdrawal_create_params.rbi +18 -0
  98. data/rbi/whop_sdk/models/withdrawal_create_response.rbi +8 -11
  99. data/rbi/whop_sdk/models/withdrawal_created_webhook_event.rbi +8 -11
  100. data/rbi/whop_sdk/models/withdrawal_list_response.rbi +3 -11
  101. data/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi +8 -11
  102. data/rbi/whop_sdk/models/withdrawal_updated_webhook_event.rbi +8 -11
  103. data/rbi/whop_sdk/models.rbi +2 -2
  104. data/rbi/whop_sdk/resources/app_builds.rbi +1 -5
  105. data/rbi/whop_sdk/resources/apps.rbi +4 -7
  106. data/rbi/whop_sdk/resources/checkout_configurations.rbi +3 -0
  107. data/rbi/whop_sdk/resources/companies.rbi +5 -13
  108. data/rbi/whop_sdk/resources/course_lessons.rbi +4 -24
  109. data/rbi/whop_sdk/resources/courses.rbi +2 -20
  110. data/rbi/whop_sdk/resources/disputes.rbi +4 -16
  111. data/rbi/whop_sdk/resources/experiences.rbi +4 -7
  112. data/rbi/whop_sdk/resources/forum_posts.rbi +2 -12
  113. data/rbi/whop_sdk/resources/memberships.rbi +26 -0
  114. data/rbi/whop_sdk/resources/messages.rbi +2 -12
  115. data/rbi/whop_sdk/resources/notifications.rbi +4 -0
  116. data/rbi/whop_sdk/resources/plans.rbi +2 -14
  117. data/rbi/whop_sdk/resources/withdrawals.rbi +7 -0
  118. data/sig/whop_sdk/models/app_build_create_params.rbs +9 -30
  119. data/sig/whop_sdk/models/app_create_params.rbs +20 -1
  120. data/sig/whop_sdk/models/app_list_params.rbs +10 -0
  121. data/sig/whop_sdk/models/app_update_params.rbs +9 -30
  122. data/sig/whop_sdk/models/card_brands.rbs +32 -0
  123. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +19 -30
  124. data/sig/whop_sdk/models/company_create_params.rbs +15 -0
  125. data/sig/whop_sdk/models/company_update_params.rbs +18 -60
  126. data/sig/whop_sdk/models/course_create_params.rbs +9 -35
  127. data/sig/whop_sdk/models/course_lesson_create_params.rbs +9 -30
  128. data/sig/whop_sdk/models/course_lesson_update_params.rbs +36 -120
  129. data/sig/whop_sdk/models/course_update_params.rbs +9 -35
  130. data/sig/whop_sdk/models/dispute_update_evidence_params.rbs +36 -120
  131. data/sig/whop_sdk/models/experience_create_params.rbs +15 -0
  132. data/sig/whop_sdk/models/experience_update_params.rbs +9 -30
  133. data/sig/whop_sdk/models/forum_post_create_params.rbs +9 -30
  134. data/sig/whop_sdk/models/forum_post_update_params.rbs +9 -30
  135. data/sig/whop_sdk/models/friendly_receipt_status.rbs +46 -22
  136. data/sig/whop_sdk/models/ledger_account_retrieve_response.rbs +0 -38
  137. data/sig/whop_sdk/models/member_list_response.rbs +5 -0
  138. data/sig/whop_sdk/models/member_retrieve_response.rbs +5 -0
  139. data/sig/whop_sdk/models/membership.rbs +65 -4
  140. data/sig/whop_sdk/models/membership_list_response.rbs +45 -4
  141. data/sig/whop_sdk/models/membership_uncancel_params.rbs +15 -0
  142. data/sig/whop_sdk/models/message_create_params.rbs +9 -30
  143. data/sig/whop_sdk/models/message_update_params.rbs +9 -30
  144. data/sig/whop_sdk/models/payment.rbs +10 -0
  145. data/sig/whop_sdk/models/payment_list_response.rbs +10 -0
  146. data/sig/whop_sdk/models/payment_method_types.rbs +117 -115
  147. data/sig/whop_sdk/models/payment_provider.rbs +2 -0
  148. data/sig/whop_sdk/models/payout_method_created_webhook_event.rbs +15 -0
  149. data/sig/whop_sdk/models/payout_method_list_response.rbs +15 -0
  150. data/sig/whop_sdk/models/payout_method_retrieve_response.rbs +15 -0
  151. data/sig/whop_sdk/models/plan_create_params.rbs +9 -30
  152. data/sig/whop_sdk/models/plan_update_params.rbs +9 -30
  153. data/sig/whop_sdk/models/withdrawal_create_params.rbs +11 -1
  154. data/sig/whop_sdk/models/withdrawal_create_response.rbs +5 -8
  155. data/sig/whop_sdk/models/withdrawal_created_webhook_event.rbs +5 -8
  156. data/sig/whop_sdk/models/withdrawal_list_response.rbs +3 -8
  157. data/sig/whop_sdk/models/withdrawal_retrieve_response.rbs +5 -8
  158. data/sig/whop_sdk/models/withdrawal_updated_webhook_event.rbs +5 -8
  159. data/sig/whop_sdk/models.rbs +2 -2
  160. data/sig/whop_sdk/resources/app_builds.rbs +1 -1
  161. data/sig/whop_sdk/resources/apps.rbs +2 -1
  162. data/sig/whop_sdk/resources/checkout_configurations.rbs +1 -0
  163. data/sig/whop_sdk/resources/companies.rbs +3 -2
  164. data/sig/whop_sdk/resources/course_lessons.rbs +4 -4
  165. data/sig/whop_sdk/resources/courses.rbs +2 -4
  166. data/sig/whop_sdk/resources/disputes.rbs +4 -4
  167. data/sig/whop_sdk/resources/experiences.rbs +2 -1
  168. data/sig/whop_sdk/resources/forum_posts.rbs +2 -2
  169. data/sig/whop_sdk/resources/memberships.rbs +5 -0
  170. data/sig/whop_sdk/resources/messages.rbs +2 -2
  171. data/sig/whop_sdk/resources/plans.rbs +2 -2
  172. data/sig/whop_sdk/resources/withdrawals.rbs +2 -0
  173. metadata +19 -5
  174. data/lib/whop_sdk/models/withdrawal_types.rb +0 -16
  175. data/rbi/whop_sdk/models/withdrawal_types.rbi +0 -20
  176. data/sig/whop_sdk/models/withdrawal_types.rbs +0 -14
@@ -6,22 +6,34 @@ module WhopSDK
6
6
  module FriendlyReceiptStatus
7
7
  extend WhopSDK::Internal::Type::Enum
8
8
 
9
- AUTO_REFUNDED = :auto_refunded
9
+ SUCCEEDED = :succeeded
10
+ PENDING = :pending
11
+ FAILED = :failed
12
+ PAST_DUE = :past_due
13
+ CANCELED = :canceled
14
+ PRICE_TOO_LOW = :price_too_low
15
+ UNCOLLECTIBLE = :uncollectible
10
16
  REFUNDED = :refunded
17
+ AUTO_REFUNDED = :auto_refunded
11
18
  PARTIALLY_REFUNDED = :partially_refunded
12
19
  DISPUTE_WARNING = :dispute_warning
13
- OPEN_RESOLUTION = :open_resolution
14
- OPEN_DISPUTE = :open_dispute
15
- FAILED = :failed
16
- PRICE_TOO_LOW = :price_too_low
17
- SUCCEEDED = :succeeded
20
+ DISPUTE_NEEDS_RESPONSE = :dispute_needs_response
21
+ DISPUTE_WARNING_NEEDS_RESPONSE = :dispute_warning_needs_response
22
+ RESOLUTION_NEEDS_RESPONSE = :resolution_needs_response
23
+ DISPUTE_UNDER_REVIEW = :dispute_under_review
24
+ DISPUTE_WARNING_UNDER_REVIEW = :dispute_warning_under_review
25
+ RESOLUTION_UNDER_REVIEW = :resolution_under_review
26
+ DISPUTE_WON = :dispute_won
27
+ DISPUTE_WARNING_CLOSED = :dispute_warning_closed
28
+ RESOLUTION_WON = :resolution_won
29
+ DISPUTE_LOST = :dispute_lost
30
+ DISPUTE_CLOSED = :dispute_closed
31
+ RESOLUTION_LOST = :resolution_lost
18
32
  DRAFTED = :drafted
19
- UNCOLLECTIBLE = :uncollectible
20
- UNRESOLVED = :unresolved
21
- PAST_DUE = :past_due
22
- PENDING = :pending
23
33
  INCOMPLETE = :incomplete
24
- CANCELED = :canceled
34
+ UNRESOLVED = :unresolved
35
+ OPEN_DISPUTE = :open_dispute
36
+ OPEN_RESOLUTION = :open_resolution
25
37
 
26
38
  # @!method self.values
27
39
  # @return [Array<Symbol>]
@@ -17,14 +17,6 @@ module WhopSDK
17
17
  required :balances,
18
18
  -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::LedgerAccountRetrieveResponse::Balance] }
19
19
 
20
- # @!attribute ledger_account_audit_status
21
- # The different statuses a LedgerAccountAudit can be
22
- #
23
- # @return [Symbol, WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus, nil]
24
- required :ledger_account_audit_status,
25
- enum: -> { WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus },
26
- nil?: true
27
-
28
20
  # @!attribute ledger_type
29
21
  # The type of ledger account.
30
22
  #
@@ -59,15 +51,13 @@ module WhopSDK
59
51
  # @return [Float, nil]
60
52
  required :transfer_fee, Float, nil?: true
61
53
 
62
- # @!method initialize(id:, balances:, ledger_account_audit_status:, ledger_type:, owner:, payments_approval_status:, payout_account_details:, transfer_fee:)
54
+ # @!method initialize(id:, balances:, ledger_type:, owner:, payments_approval_status:, payout_account_details:, transfer_fee:)
63
55
  # Represents a LedgerAccount.
64
56
  #
65
57
  # @param id [String] The ID of the LedgerAccount.
66
58
  #
67
59
  # @param balances [Array<WhopSDK::Models::LedgerAccountRetrieveResponse::Balance>] The balances associated with the account.
68
60
  #
69
- # @param ledger_account_audit_status [Symbol, WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus, nil] The different statuses a LedgerAccountAudit can be
70
- #
71
61
  # @param ledger_type [Symbol, WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerType] The type of ledger account.
72
62
  #
73
63
  # @param owner [WhopSDK::Models::LedgerAccountRetrieveResponse::Owner::User, WhopSDK::Models::LedgerAccountRetrieveResponse::Owner::Company, nil] The owner of the ledger account.
@@ -115,29 +105,6 @@ module WhopSDK
115
105
  # @param reserve_balance [Float] The amount of the balance that is reserved.
116
106
  end
117
107
 
118
- # The different statuses a LedgerAccountAudit can be
119
- #
120
- # @see WhopSDK::Models::LedgerAccountRetrieveResponse#ledger_account_audit_status
121
- module LedgerAccountAuditStatus
122
- extend WhopSDK::Internal::Type::Enum
123
-
124
- PENDING = :pending
125
- PENDING_AI_REVIEW = :pending_ai_review
126
- APPROVED = :approved
127
- RESERVES_IMPOSED = :reserves_imposed
128
- SUSPENDED = :suspended
129
- IGNORED = :ignored
130
- REJECTED = :rejected
131
- REQUESTED_MORE_INFORMATION = :requested_more_information
132
- INFORMATION_SUBMITTED = :information_submitted
133
- REQUESTED_TOS_VIOLATION_CORRECTION = :requested_tos_violation_correction
134
- CLAWBACK_ATTEMPTED = :clawback_attempted
135
- AWAITING_SALES_REVIEW = :awaiting_sales_review
136
-
137
- # @!method self.values
138
- # @return [Array<Symbol>]
139
- end
140
-
141
108
  # The type of ledger account.
142
109
  #
143
110
  # @see WhopSDK::Models::LedgerAccountRetrieveResponse#ledger_type
@@ -19,6 +19,12 @@ module WhopSDK
19
19
  # @return [Symbol, WhopSDK::Models::AccessLevel]
20
20
  required :access_level, enum: -> { WhopSDK::AccessLevel }
21
21
 
22
+ # @!attribute company_token_balance
23
+ # The member's token balance for this company
24
+ #
25
+ # @return [Float]
26
+ required :company_token_balance, Float
27
+
22
28
  # @!attribute created_at
23
29
  # When the member was created
24
30
  #
@@ -73,7 +79,7 @@ module WhopSDK
73
79
  # @return [WhopSDK::Models::MemberListResponse::User, nil]
74
80
  required :user, -> { WhopSDK::Models::MemberListResponse::User }, nil?: true
75
81
 
76
- # @!method initialize(id:, access_level:, created_at:, joined_at:, most_recent_action:, most_recent_action_at:, phone:, status:, updated_at:, usd_total_spent:, user:)
82
+ # @!method initialize(id:, access_level:, company_token_balance:, created_at:, joined_at:, most_recent_action:, most_recent_action_at:, phone:, status:, updated_at:, usd_total_spent:, user:)
77
83
  # Some parameter documentations has been truncated, see
78
84
  # {WhopSDK::Models::MemberListResponse} for more details.
79
85
  #
@@ -85,6 +91,8 @@ module WhopSDK
85
91
  #
86
92
  # @param access_level [Symbol, WhopSDK::Models::AccessLevel] The access level of the product member. If its admin, the member is an authorize
87
93
  #
94
+ # @param company_token_balance [Float] The member's token balance for this company
95
+ #
88
96
  # @param created_at [Time] When the member was created
89
97
  #
90
98
  # @param joined_at [Time] When the member joined the company
@@ -25,6 +25,12 @@ module WhopSDK
25
25
  # @return [WhopSDK::Models::MemberRetrieveResponse::Company]
26
26
  required :company, -> { WhopSDK::Models::MemberRetrieveResponse::Company }
27
27
 
28
+ # @!attribute company_token_balance
29
+ # The member's token balance for this company
30
+ #
31
+ # @return [Float]
32
+ required :company_token_balance, Float
33
+
28
34
  # @!attribute created_at
29
35
  # When the member was created
30
36
  #
@@ -79,7 +85,7 @@ module WhopSDK
79
85
  # @return [WhopSDK::Models::MemberRetrieveResponse::User, nil]
80
86
  required :user, -> { WhopSDK::Models::MemberRetrieveResponse::User }, nil?: true
81
87
 
82
- # @!method initialize(id:, access_level:, company:, created_at:, joined_at:, most_recent_action:, most_recent_action_at:, phone:, status:, updated_at:, usd_total_spent:, user:)
88
+ # @!method initialize(id:, access_level:, company:, company_token_balance:, created_at:, joined_at:, most_recent_action:, most_recent_action_at:, phone:, status:, updated_at:, usd_total_spent:, user:)
83
89
  # Some parameter documentations has been truncated, see
84
90
  # {WhopSDK::Models::MemberRetrieveResponse} for more details.
85
91
  #
@@ -93,6 +99,8 @@ module WhopSDK
93
99
  #
94
100
  # @param company [WhopSDK::Models::MemberRetrieveResponse::Company] The company for the member.
95
101
  #
102
+ # @param company_token_balance [Float] The member's token balance for this company
103
+ #
96
104
  # @param created_at [Time] When the member was created
97
105
  #
98
106
  # @param joined_at [Time] When the member joined the company
@@ -16,6 +16,13 @@ module WhopSDK
16
16
  # @return [Boolean]
17
17
  required :cancel_at_period_end, WhopSDK::Internal::Type::Boolean
18
18
 
19
+ # @!attribute cancel_option
20
+ # The different reasons a user can choose for why they are canceling their
21
+ # membership.
22
+ #
23
+ # @return [Symbol, WhopSDK::Models::Membership::CancelOption, nil]
24
+ required :cancel_option, enum: -> { WhopSDK::Membership::CancelOption }, nil?: true
25
+
19
26
  # @!attribute canceled_at
20
27
  # The epoch timestamp of when the customer initiated a cancellation.
21
28
  #
@@ -46,6 +53,13 @@ module WhopSDK
46
53
  # @return [Symbol, WhopSDK::Models::Currency, nil]
47
54
  required :currency, enum: -> { WhopSDK::Currency }, nil?: true
48
55
 
56
+ # @!attribute custom_field_responses
57
+ # The responses to custom checkout questions for this membership.
58
+ #
59
+ # @return [Array<WhopSDK::Models::Membership::CustomFieldResponse>]
60
+ required :custom_field_responses,
61
+ -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Membership::CustomFieldResponse] }
62
+
49
63
  # @!attribute license_key
50
64
  # The license key for this Membership. This is only present if the membership
51
65
  # grants access to an instance of the Whop Software app.
@@ -127,7 +141,7 @@ module WhopSDK
127
141
  # @return [WhopSDK::Models::Membership::User, nil]
128
142
  required :user, -> { WhopSDK::Membership::User }, nil?: true
129
143
 
130
- # @!method initialize(id:, cancel_at_period_end:, canceled_at:, cancellation_reason:, company:, created_at:, currency:, license_key:, manage_url:, member:, metadata:, payment_collection_paused:, plan:, product:, promo_code:, renewal_period_end:, renewal_period_start:, status:, updated_at:, user:)
144
+ # @!method initialize(id:, cancel_at_period_end:, cancel_option:, canceled_at:, cancellation_reason:, company:, created_at:, currency:, custom_field_responses:, license_key:, manage_url:, member:, metadata:, payment_collection_paused:, plan:, product:, promo_code:, renewal_period_end:, renewal_period_start:, status:, updated_at:, user:)
131
145
  # Some parameter documentations has been truncated, see
132
146
  # {WhopSDK::Models::Membership} for more details.
133
147
  #
@@ -138,6 +152,8 @@ module WhopSDK
138
152
  #
139
153
  # @param cancel_at_period_end [Boolean] Whether this Membership is set to cancel at the end of the current billing cycle
140
154
  #
155
+ # @param cancel_option [Symbol, WhopSDK::Models::Membership::CancelOption, nil] The different reasons a user can choose for why they are canceling their members
156
+ #
141
157
  # @param canceled_at [Time, nil] The epoch timestamp of when the customer initiated a cancellation.
142
158
  #
143
159
  # @param cancellation_reason [String, nil] The reason that the member canceled the membership (filled out by the member).
@@ -148,6 +164,8 @@ module WhopSDK
148
164
  #
149
165
  # @param currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform
150
166
  #
167
+ # @param custom_field_responses [Array<WhopSDK::Models::Membership::CustomFieldResponse>] The responses to custom checkout questions for this membership.
168
+ #
151
169
  # @param license_key [String, nil] The license key for this Membership. This is only present if the membership gran
152
170
  #
153
171
  # @param manage_url [String, nil] The URL for the customer to manage their membership.
@@ -174,6 +192,25 @@ module WhopSDK
174
192
  #
175
193
  # @param user [WhopSDK::Models::Membership::User, nil] The user this membership belongs to
176
194
 
195
+ # The different reasons a user can choose for why they are canceling their
196
+ # membership.
197
+ #
198
+ # @see WhopSDK::Models::Membership#cancel_option
199
+ module CancelOption
200
+ extend WhopSDK::Internal::Type::Enum
201
+
202
+ TOO_EXPENSIVE = :too_expensive
203
+ SWITCHING = :switching
204
+ MISSING_FEATURES = :missing_features
205
+ TECHNICAL_ISSUES = :technical_issues
206
+ BAD_EXPERIENCE = :bad_experience
207
+ OTHER = :other
208
+ TESTING = :testing
209
+
210
+ # @!method self.values
211
+ # @return [Array<Symbol>]
212
+ end
213
+
177
214
  # @see WhopSDK::Models::Membership#company
178
215
  class Company < WhopSDK::Internal::Type::BaseModel
179
216
  # @!attribute id
@@ -196,6 +233,35 @@ module WhopSDK
196
233
  # @param title [String] The title of the company.
197
234
  end
198
235
 
236
+ class CustomFieldResponse < WhopSDK::Internal::Type::BaseModel
237
+ # @!attribute id
238
+ # The ID of the custom field item
239
+ #
240
+ # @return [String]
241
+ required :id, String
242
+
243
+ # @!attribute answer
244
+ # The response a user gave to the specific question or field.
245
+ #
246
+ # @return [String]
247
+ required :answer, String
248
+
249
+ # @!attribute question
250
+ # The question asked by the custom field
251
+ #
252
+ # @return [String]
253
+ required :question, String
254
+
255
+ # @!method initialize(id:, answer:, question:)
256
+ # The response from a custom field on checkout
257
+ #
258
+ # @param id [String] The ID of the custom field item
259
+ #
260
+ # @param answer [String] The response a user gave to the specific question or field.
261
+ #
262
+ # @param question [String] The question asked by the custom field
263
+ end
264
+
199
265
  # @see WhopSDK::Models::Membership#member
200
266
  class Member < WhopSDK::Internal::Type::BaseModel
201
267
  # @!attribute id
@@ -268,6 +334,12 @@ module WhopSDK
268
334
  # @return [String]
269
335
  required :id, String
270
336
 
337
+ # @!attribute email
338
+ # The email of the user
339
+ #
340
+ # @return [String, nil]
341
+ required :email, String, nil?: true
342
+
271
343
  # @!attribute name
272
344
  # The name of the user from their Whop account.
273
345
  #
@@ -280,11 +352,13 @@ module WhopSDK
280
352
  # @return [String]
281
353
  required :username, String
282
354
 
283
- # @!method initialize(id:, name:, username:)
355
+ # @!method initialize(id:, email:, name:, username:)
284
356
  # The user this membership belongs to
285
357
  #
286
358
  # @param id [String] The internal ID of the user.
287
359
  #
360
+ # @param email [String, nil] The email of the user
361
+ #
288
362
  # @param name [String, nil] The name of the user from their Whop account.
289
363
  #
290
364
  # @param username [String] The username of the user from their Whop account.
@@ -17,6 +17,13 @@ module WhopSDK
17
17
  # @return [Boolean]
18
18
  required :cancel_at_period_end, WhopSDK::Internal::Type::Boolean
19
19
 
20
+ # @!attribute cancel_option
21
+ # The different reasons a user can choose for why they are canceling their
22
+ # membership.
23
+ #
24
+ # @return [Symbol, WhopSDK::Models::MembershipListResponse::CancelOption, nil]
25
+ required :cancel_option, enum: -> { WhopSDK::Models::MembershipListResponse::CancelOption }, nil?: true
26
+
20
27
  # @!attribute canceled_at
21
28
  # The epoch timestamp of when the customer initiated a cancellation.
22
29
  #
@@ -128,7 +135,7 @@ module WhopSDK
128
135
  # @return [WhopSDK::Models::MembershipListResponse::User, nil]
129
136
  required :user, -> { WhopSDK::Models::MembershipListResponse::User }, nil?: true
130
137
 
131
- # @!method initialize(id:, cancel_at_period_end:, canceled_at:, cancellation_reason:, company:, created_at:, currency:, license_key:, manage_url:, member:, metadata:, payment_collection_paused:, plan:, product:, promo_code:, renewal_period_end:, renewal_period_start:, status:, updated_at:, user:)
138
+ # @!method initialize(id:, cancel_at_period_end:, cancel_option:, canceled_at:, cancellation_reason:, company:, created_at:, currency:, license_key:, manage_url:, member:, metadata:, payment_collection_paused:, plan:, product:, promo_code:, renewal_period_end:, renewal_period_start:, status:, updated_at:, user:)
132
139
  # Some parameter documentations has been truncated, see
133
140
  # {WhopSDK::Models::MembershipListResponse} for more details.
134
141
  #
@@ -139,6 +146,8 @@ module WhopSDK
139
146
  #
140
147
  # @param cancel_at_period_end [Boolean] Whether this Membership is set to cancel at the end of the current billing cycle
141
148
  #
149
+ # @param cancel_option [Symbol, WhopSDK::Models::MembershipListResponse::CancelOption, nil] The different reasons a user can choose for why they are canceling their members
150
+ #
142
151
  # @param canceled_at [Time, nil] The epoch timestamp of when the customer initiated a cancellation.
143
152
  #
144
153
  # @param cancellation_reason [String, nil] The reason that the member canceled the membership (filled out by the member).
@@ -175,6 +184,25 @@ module WhopSDK
175
184
  #
176
185
  # @param user [WhopSDK::Models::MembershipListResponse::User, nil] The user this membership belongs to
177
186
 
187
+ # The different reasons a user can choose for why they are canceling their
188
+ # membership.
189
+ #
190
+ # @see WhopSDK::Models::MembershipListResponse#cancel_option
191
+ module CancelOption
192
+ extend WhopSDK::Internal::Type::Enum
193
+
194
+ TOO_EXPENSIVE = :too_expensive
195
+ SWITCHING = :switching
196
+ MISSING_FEATURES = :missing_features
197
+ TECHNICAL_ISSUES = :technical_issues
198
+ BAD_EXPERIENCE = :bad_experience
199
+ OTHER = :other
200
+ TESTING = :testing
201
+
202
+ # @!method self.values
203
+ # @return [Array<Symbol>]
204
+ end
205
+
178
206
  # @see WhopSDK::Models::MembershipListResponse#company
179
207
  class Company < WhopSDK::Internal::Type::BaseModel
180
208
  # @!attribute id
@@ -269,6 +297,12 @@ module WhopSDK
269
297
  # @return [String]
270
298
  required :id, String
271
299
 
300
+ # @!attribute email
301
+ # The email of the user
302
+ #
303
+ # @return [String, nil]
304
+ required :email, String, nil?: true
305
+
272
306
  # @!attribute name
273
307
  # The name of the user from their Whop account.
274
308
  #
@@ -281,11 +315,13 @@ module WhopSDK
281
315
  # @return [String]
282
316
  required :username, String
283
317
 
284
- # @!method initialize(id:, name:, username:)
318
+ # @!method initialize(id:, email:, name:, username:)
285
319
  # The user this membership belongs to
286
320
  #
287
321
  # @param id [String] The internal ID of the user.
288
322
  #
323
+ # @param email [String, nil] The email of the user
324
+ #
289
325
  # @param name [String, nil] The name of the user from their Whop account.
290
326
  #
291
327
  # @param username [String] The username of the user from their Whop account.
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::Memberships#uncancel
6
+ class MembershipUncancelParams < 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
@@ -22,9 +22,9 @@ module WhopSDK
22
22
  # @!attribute attachments
23
23
  # The attachments for this message, such as videos or images.
24
24
  #
25
- # @return [Array<WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithID>, nil]
25
+ # @return [Array<WhopSDK::Models::MessageCreateParams::Attachment>, nil]
26
26
  optional :attachments,
27
- -> { WhopSDK::Internal::Type::ArrayOf[union: WhopSDK::MessageCreateParams::Attachment] },
27
+ -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::MessageCreateParams::Attachment] },
28
28
  nil?: true
29
29
 
30
30
  # @!attribute poll
@@ -38,62 +38,23 @@ module WhopSDK
38
38
  #
39
39
  # @param content [String] The content of the message in Markdown format.
40
40
  #
41
- # @param attachments [Array<WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithID>, nil] The attachments for this message, such as videos or images.
41
+ # @param attachments [Array<WhopSDK::Models::MessageCreateParams::Attachment>, nil] The attachments for this message, such as videos or images.
42
42
  #
43
43
  # @param poll [WhopSDK::Models::MessageCreateParams::Poll, nil] The poll for this message
44
44
  #
45
45
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
46
46
 
47
- # Input for an attachment
48
- module Attachment
49
- extend WhopSDK::Internal::Type::Union
50
-
51
- # Input for an attachment
52
- variant -> { WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID }
53
-
54
- # Input for an attachment
55
- variant -> { WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID }
56
-
57
- class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
58
- # @!attribute direct_upload_id
59
- # This ID should be used the first time you upload an attachment. It is the ID of
60
- # the direct upload that was created when uploading the file to S3 via the
61
- # mediaDirectUpload mutation.
62
- #
63
- # @return [String]
64
- required :direct_upload_id, String
65
-
66
- # @!method initialize(direct_upload_id:)
67
- # Some parameter documentations has been truncated, see
68
- # {WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID}
69
- # for more details.
70
- #
71
- # Input for an attachment
72
- #
73
- # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
74
- end
75
-
76
- class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
77
- # @!attribute id
78
- # The ID of an existing attachment object. Use this when updating a resource and
79
- # keeping a subset of the attachments. Don't use this unless you know what you're
80
- # doing.
81
- #
82
- # @return [String]
83
- required :id, String
84
-
85
- # @!method initialize(id:)
86
- # Some parameter documentations has been truncated, see
87
- # {WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithID} for
88
- # more details.
89
- #
90
- # Input for an attachment
91
- #
92
- # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
93
- end
47
+ class Attachment < WhopSDK::Internal::Type::BaseModel
48
+ # @!attribute id
49
+ # The ID of an existing file object.
50
+ #
51
+ # @return [String]
52
+ required :id, String
94
53
 
95
- # @!method self.variants
96
- # @return [Array(WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithID)]
54
+ # @!method initialize(id:)
55
+ # Input for an attachment
56
+ #
57
+ # @param id [String] The ID of an existing file object.
97
58
  end
98
59
 
99
60
  class Poll < WhopSDK::Internal::Type::BaseModel
@@ -10,9 +10,9 @@ module WhopSDK
10
10
  # @!attribute attachments
11
11
  # The attachments for this message
12
12
  #
13
- # @return [Array<WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithID>, nil]
13
+ # @return [Array<WhopSDK::Models::MessageUpdateParams::Attachment>, nil]
14
14
  optional :attachments,
15
- -> { WhopSDK::Internal::Type::ArrayOf[union: WhopSDK::MessageUpdateParams::Attachment] },
15
+ -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::MessageUpdateParams::Attachment] },
16
16
  nil?: true
17
17
 
18
18
  # @!attribute content
@@ -28,7 +28,7 @@ module WhopSDK
28
28
  optional :is_pinned, WhopSDK::Internal::Type::Boolean, nil?: true
29
29
 
30
30
  # @!method initialize(attachments: nil, content: nil, is_pinned: nil, request_options: {})
31
- # @param attachments [Array<WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithID>, nil] The attachments for this message
31
+ # @param attachments [Array<WhopSDK::Models::MessageUpdateParams::Attachment>, nil] The attachments for this message
32
32
  #
33
33
  # @param content [String, nil] The content of the message in Markdown format
34
34
  #
@@ -36,56 +36,17 @@ module WhopSDK
36
36
  #
37
37
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
38
38
 
39
- # Input for an attachment
40
- module Attachment
41
- extend WhopSDK::Internal::Type::Union
42
-
43
- # Input for an attachment
44
- variant -> { WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID }
45
-
46
- # Input for an attachment
47
- variant -> { WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID }
48
-
49
- class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
50
- # @!attribute direct_upload_id
51
- # This ID should be used the first time you upload an attachment. It is the ID of
52
- # the direct upload that was created when uploading the file to S3 via the
53
- # mediaDirectUpload mutation.
54
- #
55
- # @return [String]
56
- required :direct_upload_id, String
57
-
58
- # @!method initialize(direct_upload_id:)
59
- # Some parameter documentations has been truncated, see
60
- # {WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID}
61
- # for more details.
62
- #
63
- # Input for an attachment
64
- #
65
- # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
66
- end
67
-
68
- class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
69
- # @!attribute id
70
- # The ID of an existing attachment object. Use this when updating a resource and
71
- # keeping a subset of the attachments. Don't use this unless you know what you're
72
- # doing.
73
- #
74
- # @return [String]
75
- required :id, String
76
-
77
- # @!method initialize(id:)
78
- # Some parameter documentations has been truncated, see
79
- # {WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithID} for
80
- # more details.
81
- #
82
- # Input for an attachment
83
- #
84
- # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
85
- end
86
-
87
- # @!method self.variants
88
- # @return [Array(WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithID)]
39
+ class Attachment < WhopSDK::Internal::Type::BaseModel
40
+ # @!attribute id
41
+ # The ID of an existing file object.
42
+ #
43
+ # @return [String]
44
+ required :id, String
45
+
46
+ # @!method initialize(id:)
47
+ # Input for an attachment
48
+ #
49
+ # @param id [String] The ID of an existing file object.
89
50
  end
90
51
  end
91
52
  end
@@ -100,6 +100,12 @@ module WhopSDK
100
100
  # @return [Hash{Symbol=>Object}, nil]
101
101
  required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
102
102
 
103
+ # @!attribute next_payment_attempt
104
+ # The time of the next schedule payment retry.
105
+ #
106
+ # @return [Time, nil]
107
+ required :next_payment_attempt, Time, nil?: true
108
+
103
109
  # @!attribute paid_at
104
110
  # The datetime the payment was paid
105
111
  #
@@ -118,6 +124,12 @@ module WhopSDK
118
124
  # @return [Symbol, WhopSDK::Models::PaymentMethodTypes, nil]
119
125
  required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }, nil?: true
120
126
 
127
+ # @!attribute payments_failed
128
+ # The number of failed payment attempts for the payment.
129
+ #
130
+ # @return [Integer, nil]
131
+ required :payments_failed, Integer, nil?: true
132
+
121
133
  # @!attribute plan
122
134
  # The plan attached to this payment.
123
135
  #
@@ -206,7 +218,7 @@ module WhopSDK
206
218
  # @return [Boolean]
207
219
  required :voidable, WhopSDK::Internal::Type::Boolean
208
220
 
209
- # @!method initialize(id:, amount_after_fees:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, metadata:, paid_at:, payment_method:, payment_method_type:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, status:, substatus:, subtotal:, total:, usd_total:, user:, voidable:)
221
+ # @!method initialize(id:, amount_after_fees:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, metadata:, next_payment_attempt:, paid_at:, payment_method:, payment_method_type:, payments_failed:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, status:, substatus:, subtotal:, total:, usd_total:, user:, voidable:)
210
222
  # Some parameter documentations has been truncated, see {WhopSDK::Models::Payment}
211
223
  # for more details.
212
224
  #
@@ -244,12 +256,16 @@ module WhopSDK
244
256
  #
245
257
  # @param metadata [Hash{Symbol=>Object}, nil] The custom metadata stored on this payment. This will be copied over to the chec
246
258
  #
259
+ # @param next_payment_attempt [Time, nil] The time of the next schedule payment retry.
260
+ #
247
261
  # @param paid_at [Time, nil] The datetime the payment was paid
248
262
  #
249
263
  # @param payment_method [WhopSDK::Models::Payment::PaymentMethod, nil] The payment method used for the payment, if available.
250
264
  #
251
265
  # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes, nil] The different types of payment methods that can be used.
252
266
  #
267
+ # @param payments_failed [Integer, nil] The number of failed payment attempts for the payment.
268
+ #
253
269
  # @param plan [WhopSDK::Models::Payment::Plan, nil] The plan attached to this payment.
254
270
  #
255
271
  # @param product [WhopSDK::Models::Payment::Product, nil] The product this payment was made for