whop_sdk 0.0.3 → 0.0.4

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 (155) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/client.rb +4 -0
  5. data/lib/whop_sdk/models/app_build_create_params.rb +53 -29
  6. data/lib/whop_sdk/models/app_update_params.rb +53 -29
  7. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +115 -39
  8. data/lib/whop_sdk/models/company.rb +13 -1
  9. data/lib/whop_sdk/models/company_create_params.rb +46 -0
  10. data/lib/whop_sdk/models/company_list_params.rb +62 -0
  11. data/lib/whop_sdk/models/company_list_response.rb +175 -0
  12. data/lib/whop_sdk/models/course_create_params.rb +75 -30
  13. data/lib/whop_sdk/models/course_lesson_update_params.rb +204 -83
  14. data/lib/whop_sdk/models/course_student_list_params.rb +62 -0
  15. data/lib/whop_sdk/models/course_student_list_response.rb +97 -0
  16. data/lib/whop_sdk/models/course_student_retrieve_params.rb +14 -0
  17. data/lib/whop_sdk/models/course_student_retrieve_response.rb +149 -0
  18. data/lib/whop_sdk/models/course_update_params.rb +51 -27
  19. data/lib/whop_sdk/models/experience_update_params.rb +53 -29
  20. data/lib/whop_sdk/models/forum_post_create_params.rb +51 -27
  21. data/lib/whop_sdk/models/forum_post_update_params.rb +51 -27
  22. data/lib/whop_sdk/models/invoice_create_params.rb +48 -32
  23. data/lib/whop_sdk/models/lesson.rb +16 -8
  24. data/lib/whop_sdk/models/message_create_params.rb +51 -27
  25. data/lib/whop_sdk/models/message_update_params.rb +51 -27
  26. data/lib/whop_sdk/models/payment.rb +10 -1
  27. data/lib/whop_sdk/models/payment_list_response.rb +10 -1
  28. data/lib/whop_sdk/models/payment_method_types.rb +2 -1
  29. data/lib/whop_sdk/models/plan.rb +48 -1
  30. data/lib/whop_sdk/models/plan_create_params.rb +97 -22
  31. data/lib/whop_sdk/models/plan_list_response.rb +51 -1
  32. data/lib/whop_sdk/models/plan_update_params.rb +97 -22
  33. data/lib/whop_sdk/models/product_update_params.rb +53 -29
  34. data/lib/whop_sdk/models/transfer.rb +9 -1
  35. data/lib/whop_sdk/models/transfer_create_params.rb +9 -1
  36. data/lib/whop_sdk/models/transfer_list_response.rb +9 -1
  37. data/lib/whop_sdk/models.rb +8 -0
  38. data/lib/whop_sdk/resources/app_builds.rb +1 -1
  39. data/lib/whop_sdk/resources/apps.rb +1 -1
  40. data/lib/whop_sdk/resources/checkout_configurations.rb +6 -6
  41. data/lib/whop_sdk/resources/companies.rb +70 -0
  42. data/lib/whop_sdk/resources/course_lesson_interactions.rb +2 -2
  43. data/lib/whop_sdk/resources/course_lessons.rb +7 -3
  44. data/lib/whop_sdk/resources/course_students.rb +76 -0
  45. data/lib/whop_sdk/resources/courses.rb +10 -3
  46. data/lib/whop_sdk/resources/experiences.rb +1 -1
  47. data/lib/whop_sdk/resources/forum_posts.rb +2 -2
  48. data/lib/whop_sdk/resources/invoices.rb +11 -11
  49. data/lib/whop_sdk/resources/messages.rb +2 -2
  50. data/lib/whop_sdk/resources/plans.rb +8 -4
  51. data/lib/whop_sdk/resources/products.rb +1 -1
  52. data/lib/whop_sdk/resources/transfers.rb +3 -1
  53. data/lib/whop_sdk/version.rb +1 -1
  54. data/lib/whop_sdk.rb +8 -1
  55. data/rbi/whop_sdk/client.rbi +3 -0
  56. data/rbi/whop_sdk/models/app_build_create_params.rbi +80 -40
  57. data/rbi/whop_sdk/models/app_update_params.rbi +86 -37
  58. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +192 -64
  59. data/rbi/whop_sdk/models/company.rbi +10 -0
  60. data/rbi/whop_sdk/models/company_create_params.rbi +67 -0
  61. data/rbi/whop_sdk/models/company_list_params.rbi +83 -0
  62. data/rbi/whop_sdk/models/company_list_response.rbi +235 -0
  63. data/rbi/whop_sdk/models/course_create_params.rbi +104 -38
  64. data/rbi/whop_sdk/models/course_lesson_update_params.rbi +326 -114
  65. data/rbi/whop_sdk/models/course_student_list_params.rbi +83 -0
  66. data/rbi/whop_sdk/models/course_student_list_response.rbi +142 -0
  67. data/rbi/whop_sdk/models/course_student_retrieve_params.rbi +30 -0
  68. data/rbi/whop_sdk/models/course_student_retrieve_response.rbi +250 -0
  69. data/rbi/whop_sdk/models/course_update_params.rbi +84 -38
  70. data/rbi/whop_sdk/models/experience_update_params.rbi +84 -38
  71. data/rbi/whop_sdk/models/forum_post_create_params.rbi +85 -32
  72. data/rbi/whop_sdk/models/forum_post_update_params.rbi +85 -32
  73. data/rbi/whop_sdk/models/invoice_create_params.rbi +58 -44
  74. data/rbi/whop_sdk/models/lesson.rbi +14 -10
  75. data/rbi/whop_sdk/models/message_create_params.rbi +85 -32
  76. data/rbi/whop_sdk/models/message_update_params.rbi +85 -32
  77. data/rbi/whop_sdk/models/payment.rbi +10 -0
  78. data/rbi/whop_sdk/models/payment_list_response.rbi +10 -0
  79. data/rbi/whop_sdk/models/payment_method_types.rbi +3 -1
  80. data/rbi/whop_sdk/models/plan.rbi +82 -0
  81. data/rbi/whop_sdk/models/plan_create_params.rbi +174 -32
  82. data/rbi/whop_sdk/models/plan_list_response.rbi +94 -0
  83. data/rbi/whop_sdk/models/plan_update_params.rbi +174 -32
  84. data/rbi/whop_sdk/models/product_update_params.rbi +83 -39
  85. data/rbi/whop_sdk/models/transfer.rbi +8 -0
  86. data/rbi/whop_sdk/models/transfer_create_params.rbi +8 -0
  87. data/rbi/whop_sdk/models/transfer_list_response.rbi +8 -0
  88. data/rbi/whop_sdk/models.rbi +8 -0
  89. data/rbi/whop_sdk/resources/app_builds.rbi +5 -1
  90. data/rbi/whop_sdk/resources/apps.rbi +7 -1
  91. data/rbi/whop_sdk/resources/checkout_configurations.rbi +6 -7
  92. data/rbi/whop_sdk/resources/companies.rbi +63 -0
  93. data/rbi/whop_sdk/resources/course_lesson_interactions.rbi +2 -2
  94. data/rbi/whop_sdk/resources/course_lessons.rbi +21 -2
  95. data/rbi/whop_sdk/resources/course_students.rbi +65 -0
  96. data/rbi/whop_sdk/resources/courses.rbi +22 -2
  97. data/rbi/whop_sdk/resources/experiences.rbi +7 -1
  98. data/rbi/whop_sdk/resources/forum_posts.rbi +12 -2
  99. data/rbi/whop_sdk/resources/invoices.rbi +18 -18
  100. data/rbi/whop_sdk/resources/messages.rbi +12 -2
  101. data/rbi/whop_sdk/resources/plans.rbi +28 -2
  102. data/rbi/whop_sdk/resources/products.rbi +6 -1
  103. data/rbi/whop_sdk/resources/transfers.rbi +3 -0
  104. data/sig/whop_sdk/client.rbs +2 -0
  105. data/sig/whop_sdk/models/app_build_create_params.rbs +29 -10
  106. data/sig/whop_sdk/models/app_update_params.rbs +29 -10
  107. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +72 -21
  108. data/sig/whop_sdk/models/company.rbs +5 -0
  109. data/sig/whop_sdk/models/company_create_params.rbs +41 -0
  110. data/sig/whop_sdk/models/company_list_params.rbs +51 -0
  111. data/sig/whop_sdk/models/company_list_response.rbs +109 -0
  112. data/sig/whop_sdk/models/course_create_params.rbs +39 -10
  113. data/sig/whop_sdk/models/course_lesson_update_params.rbs +116 -30
  114. data/sig/whop_sdk/models/course_student_list_params.rbs +51 -0
  115. data/sig/whop_sdk/models/course_student_list_response.rbs +64 -0
  116. data/sig/whop_sdk/models/course_student_retrieve_params.rbs +15 -0
  117. data/sig/whop_sdk/models/course_student_retrieve_response.rbs +106 -0
  118. data/sig/whop_sdk/models/course_update_params.rbs +29 -10
  119. data/sig/whop_sdk/models/experience_update_params.rbs +29 -10
  120. data/sig/whop_sdk/models/forum_post_create_params.rbs +29 -10
  121. data/sig/whop_sdk/models/forum_post_update_params.rbs +29 -10
  122. data/sig/whop_sdk/models/invoice_create_params.rbs +28 -18
  123. data/sig/whop_sdk/models/lesson.rbs +8 -8
  124. data/sig/whop_sdk/models/message_create_params.rbs +29 -10
  125. data/sig/whop_sdk/models/message_update_params.rbs +29 -10
  126. data/sig/whop_sdk/models/payment.rbs +5 -0
  127. data/sig/whop_sdk/models/payment_list_response.rbs +5 -0
  128. data/sig/whop_sdk/models/payment_method_types.rbs +4 -2
  129. data/sig/whop_sdk/models/plan.rbs +32 -0
  130. data/sig/whop_sdk/models/plan_create_params.rbs +61 -10
  131. data/sig/whop_sdk/models/plan_list_response.rbs +32 -0
  132. data/sig/whop_sdk/models/plan_update_params.rbs +61 -10
  133. data/sig/whop_sdk/models/product_update_params.rbs +29 -10
  134. data/sig/whop_sdk/models/transfer.rbs +5 -0
  135. data/sig/whop_sdk/models/transfer_create_params.rbs +5 -0
  136. data/sig/whop_sdk/models/transfer_list_response.rbs +5 -0
  137. data/sig/whop_sdk/models.rbs +8 -0
  138. data/sig/whop_sdk/resources/app_builds.rbs +1 -1
  139. data/sig/whop_sdk/resources/apps.rbs +1 -1
  140. data/sig/whop_sdk/resources/checkout_configurations.rbs +2 -2
  141. data/sig/whop_sdk/resources/companies.rbs +18 -0
  142. data/sig/whop_sdk/resources/course_lessons.rbs +4 -2
  143. data/sig/whop_sdk/resources/course_students.rbs +22 -0
  144. data/sig/whop_sdk/resources/courses.rbs +4 -2
  145. data/sig/whop_sdk/resources/experiences.rbs +1 -1
  146. data/sig/whop_sdk/resources/forum_posts.rbs +2 -2
  147. data/sig/whop_sdk/resources/invoices.rbs +5 -5
  148. data/sig/whop_sdk/resources/messages.rbs +2 -2
  149. data/sig/whop_sdk/resources/plans.rbs +4 -2
  150. data/sig/whop_sdk/resources/products.rbs +1 -1
  151. data/sig/whop_sdk/resources/transfers.rbs +1 -0
  152. metadata +26 -5
  153. data/lib/whop_sdk/models/invoice_create_response.rb +0 -27
  154. data/rbi/whop_sdk/models/invoice_create_response.rbi +0 -49
  155. data/sig/whop_sdk/models/invoice_create_response.rbs +0 -19
@@ -9,10 +9,11 @@ module WhopSDK
9
9
  custom_fields: ::Array[WhopSDK::PlanCreateParams::CustomField]?,
10
10
  description: String?,
11
11
  expiration_days: Integer?,
12
- image: WhopSDK::PlanCreateParams::Image?,
12
+ image: WhopSDK::Models::PlanCreateParams::image?,
13
13
  initial_price: Float?,
14
14
  internal_notes: String?,
15
15
  override_tax_type: WhopSDK::Models::tax_type?,
16
+ payment_method_configuration: WhopSDK::PlanCreateParams::PaymentMethodConfiguration?,
16
17
  plan_type: WhopSDK::Models::plan_type?,
17
18
  release_method: WhopSDK::Models::release_method?,
18
19
  renewal_price: Float?,
@@ -44,7 +45,7 @@ module WhopSDK
44
45
 
45
46
  attr_accessor expiration_days: Integer?
46
47
 
47
- attr_accessor image: WhopSDK::PlanCreateParams::Image?
48
+ attr_accessor image: WhopSDK::Models::PlanCreateParams::image?
48
49
 
49
50
  attr_accessor initial_price: Float?
50
51
 
@@ -52,6 +53,8 @@ module WhopSDK
52
53
 
53
54
  attr_accessor override_tax_type: WhopSDK::Models::tax_type?
54
55
 
56
+ attr_accessor payment_method_configuration: WhopSDK::PlanCreateParams::PaymentMethodConfiguration?
57
+
55
58
  attr_accessor plan_type: WhopSDK::Models::plan_type?
56
59
 
57
60
  attr_accessor release_method: WhopSDK::Models::release_method?
@@ -80,10 +83,11 @@ module WhopSDK
80
83
  ?custom_fields: ::Array[WhopSDK::PlanCreateParams::CustomField]?,
81
84
  ?description: String?,
82
85
  ?expiration_days: Integer?,
83
- ?image: WhopSDK::PlanCreateParams::Image?,
86
+ ?image: WhopSDK::Models::PlanCreateParams::image?,
84
87
  ?initial_price: Float?,
85
88
  ?internal_notes: String?,
86
89
  ?override_tax_type: WhopSDK::Models::tax_type?,
90
+ ?payment_method_configuration: WhopSDK::PlanCreateParams::PaymentMethodConfiguration?,
87
91
  ?plan_type: WhopSDK::Models::plan_type?,
88
92
  ?release_method: WhopSDK::Models::release_method?,
89
93
  ?renewal_price: Float?,
@@ -105,10 +109,11 @@ module WhopSDK
105
109
  custom_fields: ::Array[WhopSDK::PlanCreateParams::CustomField]?,
106
110
  description: String?,
107
111
  expiration_days: Integer?,
108
- image: WhopSDK::PlanCreateParams::Image?,
112
+ image: WhopSDK::Models::PlanCreateParams::image?,
109
113
  initial_price: Float?,
110
114
  internal_notes: String?,
111
115
  override_tax_type: WhopSDK::Models::tax_type?,
116
+ payment_method_configuration: WhopSDK::PlanCreateParams::PaymentMethodConfiguration?,
112
117
  plan_type: WhopSDK::Models::plan_type?,
113
118
  release_method: WhopSDK::Models::release_method?,
114
119
  renewal_price: Float?,
@@ -164,16 +169,62 @@ module WhopSDK
164
169
  }
165
170
  end
166
171
 
167
- type image = { id: String?, direct_upload_id: String? }
172
+ type image =
173
+ WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID
174
+ | WhopSDK::PlanCreateParams::Image::AttachmentInputWithID
168
175
 
169
- class Image < WhopSDK::Internal::Type::BaseModel
170
- attr_accessor id: String?
176
+ module Image
177
+ extend WhopSDK::Internal::Type::Union
178
+
179
+ type attachment_input_with_direct_upload_id =
180
+ { direct_upload_id: String }
181
+
182
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
183
+ attr_accessor direct_upload_id: String
184
+
185
+ def initialize: (direct_upload_id: String) -> void
186
+
187
+ def to_hash: -> { direct_upload_id: String }
188
+ end
171
189
 
172
- attr_accessor direct_upload_id: String?
190
+ type attachment_input_with_id = { id: String }
173
191
 
174
- def initialize: (?id: String?, ?direct_upload_id: String?) -> void
192
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
193
+ attr_accessor id: String
175
194
 
176
- def to_hash: -> { id: String?, direct_upload_id: String? }
195
+ def initialize: (id: String) -> void
196
+
197
+ def to_hash: -> { id: String }
198
+ end
199
+
200
+ def self?.variants: -> ::Array[WhopSDK::Models::PlanCreateParams::image]
201
+ end
202
+
203
+ type payment_method_configuration =
204
+ {
205
+ disabled: ::Array[WhopSDK::Models::payment_method_types],
206
+ enabled: ::Array[WhopSDK::Models::payment_method_types],
207
+ include_platform_defaults: bool
208
+ }
209
+
210
+ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel
211
+ attr_accessor disabled: ::Array[WhopSDK::Models::payment_method_types]
212
+
213
+ attr_accessor enabled: ::Array[WhopSDK::Models::payment_method_types]
214
+
215
+ attr_accessor include_platform_defaults: bool
216
+
217
+ def initialize: (
218
+ disabled: ::Array[WhopSDK::Models::payment_method_types],
219
+ enabled: ::Array[WhopSDK::Models::payment_method_types],
220
+ include_platform_defaults: bool
221
+ ) -> void
222
+
223
+ def to_hash: -> {
224
+ disabled: ::Array[WhopSDK::Models::payment_method_types],
225
+ enabled: ::Array[WhopSDK::Models::payment_method_types],
226
+ include_platform_defaults: bool
227
+ }
177
228
  end
178
229
  end
179
230
  end
@@ -13,6 +13,7 @@ module WhopSDK
13
13
  internal_notes: String?,
14
14
  invoice: WhopSDK::Models::PlanListResponse::Invoice?,
15
15
  member_count: Integer?,
16
+ payment_method_configuration: WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration?,
16
17
  plan_type: WhopSDK::Models::plan_type,
17
18
  product: WhopSDK::Models::PlanListResponse::Product?,
18
19
  purchase_url: String,
@@ -49,6 +50,8 @@ module WhopSDK
49
50
 
50
51
  attr_accessor member_count: Integer?
51
52
 
53
+ attr_accessor payment_method_configuration: WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration?
54
+
52
55
  attr_accessor plan_type: WhopSDK::Models::plan_type
53
56
 
54
57
  attr_accessor product: WhopSDK::Models::PlanListResponse::Product?
@@ -83,6 +86,7 @@ module WhopSDK
83
86
  internal_notes: String?,
84
87
  invoice: WhopSDK::Models::PlanListResponse::Invoice?,
85
88
  member_count: Integer?,
89
+ payment_method_configuration: WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration?,
86
90
  plan_type: WhopSDK::Models::plan_type,
87
91
  product: WhopSDK::Models::PlanListResponse::Product?,
88
92
  purchase_url: String,
@@ -108,6 +112,7 @@ module WhopSDK
108
112
  internal_notes: String?,
109
113
  invoice: WhopSDK::Models::PlanListResponse::Invoice?,
110
114
  member_count: Integer?,
115
+ payment_method_configuration: WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration?,
111
116
  plan_type: WhopSDK::Models::plan_type,
112
117
  product: WhopSDK::Models::PlanListResponse::Product?,
113
118
  purchase_url: String,
@@ -143,6 +148,33 @@ module WhopSDK
143
148
  def to_hash: -> { id: String }
144
149
  end
145
150
 
151
+ type payment_method_configuration =
152
+ {
153
+ disabled: ::Array[WhopSDK::Models::payment_method_types],
154
+ enabled: ::Array[WhopSDK::Models::payment_method_types],
155
+ include_platform_defaults: bool
156
+ }
157
+
158
+ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel
159
+ attr_accessor disabled: ::Array[WhopSDK::Models::payment_method_types]
160
+
161
+ attr_accessor enabled: ::Array[WhopSDK::Models::payment_method_types]
162
+
163
+ attr_accessor include_platform_defaults: bool
164
+
165
+ def initialize: (
166
+ disabled: ::Array[WhopSDK::Models::payment_method_types],
167
+ enabled: ::Array[WhopSDK::Models::payment_method_types],
168
+ include_platform_defaults: bool
169
+ ) -> void
170
+
171
+ def to_hash: -> {
172
+ disabled: ::Array[WhopSDK::Models::payment_method_types],
173
+ enabled: ::Array[WhopSDK::Models::payment_method_types],
174
+ include_platform_defaults: bool
175
+ }
176
+ end
177
+
146
178
  type product = { id: String, title: String }
147
179
 
148
180
  class Product < WhopSDK::Internal::Type::BaseModel
@@ -7,11 +7,12 @@ module WhopSDK
7
7
  custom_fields: ::Array[WhopSDK::PlanUpdateParams::CustomField]?,
8
8
  description: String?,
9
9
  expiration_days: Integer?,
10
- image: WhopSDK::PlanUpdateParams::Image?,
10
+ image: WhopSDK::Models::PlanUpdateParams::image?,
11
11
  initial_price: Float?,
12
12
  internal_notes: String?,
13
13
  offer_cancel_discount: bool?,
14
14
  override_tax_type: WhopSDK::Models::tax_type?,
15
+ payment_method_configuration: WhopSDK::PlanUpdateParams::PaymentMethodConfiguration?,
15
16
  renewal_price: Float?,
16
17
  stock: Integer?,
17
18
  strike_through_initial_price: Float?,
@@ -37,7 +38,7 @@ module WhopSDK
37
38
 
38
39
  attr_accessor expiration_days: Integer?
39
40
 
40
- attr_accessor image: WhopSDK::PlanUpdateParams::Image?
41
+ attr_accessor image: WhopSDK::Models::PlanUpdateParams::image?
41
42
 
42
43
  attr_accessor initial_price: Float?
43
44
 
@@ -47,6 +48,8 @@ module WhopSDK
47
48
 
48
49
  attr_accessor override_tax_type: WhopSDK::Models::tax_type?
49
50
 
51
+ attr_accessor payment_method_configuration: WhopSDK::PlanUpdateParams::PaymentMethodConfiguration?
52
+
50
53
  attr_accessor renewal_price: Float?
51
54
 
52
55
  attr_accessor stock: Integer?
@@ -69,11 +72,12 @@ module WhopSDK
69
72
  ?custom_fields: ::Array[WhopSDK::PlanUpdateParams::CustomField]?,
70
73
  ?description: String?,
71
74
  ?expiration_days: Integer?,
72
- ?image: WhopSDK::PlanUpdateParams::Image?,
75
+ ?image: WhopSDK::Models::PlanUpdateParams::image?,
73
76
  ?initial_price: Float?,
74
77
  ?internal_notes: String?,
75
78
  ?offer_cancel_discount: bool?,
76
79
  ?override_tax_type: WhopSDK::Models::tax_type?,
80
+ ?payment_method_configuration: WhopSDK::PlanUpdateParams::PaymentMethodConfiguration?,
77
81
  ?renewal_price: Float?,
78
82
  ?stock: Integer?,
79
83
  ?strike_through_initial_price: Float?,
@@ -91,11 +95,12 @@ module WhopSDK
91
95
  custom_fields: ::Array[WhopSDK::PlanUpdateParams::CustomField]?,
92
96
  description: String?,
93
97
  expiration_days: Integer?,
94
- image: WhopSDK::PlanUpdateParams::Image?,
98
+ image: WhopSDK::Models::PlanUpdateParams::image?,
95
99
  initial_price: Float?,
96
100
  internal_notes: String?,
97
101
  offer_cancel_discount: bool?,
98
102
  override_tax_type: WhopSDK::Models::tax_type?,
103
+ payment_method_configuration: WhopSDK::PlanUpdateParams::PaymentMethodConfiguration?,
99
104
  renewal_price: Float?,
100
105
  stock: Integer?,
101
106
  strike_through_initial_price: Float?,
@@ -149,16 +154,62 @@ module WhopSDK
149
154
  }
150
155
  end
151
156
 
152
- type image = { id: String?, direct_upload_id: String? }
157
+ type image =
158
+ WhopSDK::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID
159
+ | WhopSDK::PlanUpdateParams::Image::AttachmentInputWithID
153
160
 
154
- class Image < WhopSDK::Internal::Type::BaseModel
155
- attr_accessor id: String?
161
+ module Image
162
+ extend WhopSDK::Internal::Type::Union
163
+
164
+ type attachment_input_with_direct_upload_id =
165
+ { direct_upload_id: String }
166
+
167
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
168
+ attr_accessor direct_upload_id: String
169
+
170
+ def initialize: (direct_upload_id: String) -> void
171
+
172
+ def to_hash: -> { direct_upload_id: String }
173
+ end
156
174
 
157
- attr_accessor direct_upload_id: String?
175
+ type attachment_input_with_id = { id: String }
158
176
 
159
- def initialize: (?id: String?, ?direct_upload_id: String?) -> void
177
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
178
+ attr_accessor id: String
160
179
 
161
- def to_hash: -> { id: String?, direct_upload_id: String? }
180
+ def initialize: (id: String) -> void
181
+
182
+ def to_hash: -> { id: String }
183
+ end
184
+
185
+ def self?.variants: -> ::Array[WhopSDK::Models::PlanUpdateParams::image]
186
+ end
187
+
188
+ type payment_method_configuration =
189
+ {
190
+ disabled: ::Array[WhopSDK::Models::payment_method_types],
191
+ enabled: ::Array[WhopSDK::Models::payment_method_types],
192
+ include_platform_defaults: bool
193
+ }
194
+
195
+ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel
196
+ attr_accessor disabled: ::Array[WhopSDK::Models::payment_method_types]
197
+
198
+ attr_accessor enabled: ::Array[WhopSDK::Models::payment_method_types]
199
+
200
+ attr_accessor include_platform_defaults: bool
201
+
202
+ def initialize: (
203
+ disabled: ::Array[WhopSDK::Models::payment_method_types],
204
+ enabled: ::Array[WhopSDK::Models::payment_method_types],
205
+ include_platform_defaults: bool
206
+ ) -> void
207
+
208
+ def to_hash: -> {
209
+ disabled: ::Array[WhopSDK::Models::payment_method_types],
210
+ enabled: ::Array[WhopSDK::Models::payment_method_types],
211
+ include_platform_defaults: bool
212
+ }
162
213
  end
163
214
  end
164
215
  end
@@ -2,7 +2,7 @@ module WhopSDK
2
2
  module Models
3
3
  type product_update_params =
4
4
  {
5
- banner_image: WhopSDK::ProductUpdateParams::BannerImage?,
5
+ banner_image: WhopSDK::Models::ProductUpdateParams::banner_image?,
6
6
  business_type: WhopSDK::Models::business_types?,
7
7
  collect_shipping_address: bool?,
8
8
  custom_cta: WhopSDK::Models::custom_cta?,
@@ -28,7 +28,7 @@ module WhopSDK
28
28
  extend WhopSDK::Internal::Type::RequestParameters::Converter
29
29
  include WhopSDK::Internal::Type::RequestParameters
30
30
 
31
- attr_accessor banner_image: WhopSDK::ProductUpdateParams::BannerImage?
31
+ attr_accessor banner_image: WhopSDK::Models::ProductUpdateParams::banner_image?
32
32
 
33
33
  attr_accessor business_type: WhopSDK::Models::business_types?
34
34
 
@@ -67,7 +67,7 @@ module WhopSDK
67
67
  attr_accessor visibility: WhopSDK::Models::visibility?
68
68
 
69
69
  def initialize: (
70
- ?banner_image: WhopSDK::ProductUpdateParams::BannerImage?,
70
+ ?banner_image: WhopSDK::Models::ProductUpdateParams::banner_image?,
71
71
  ?business_type: WhopSDK::Models::business_types?,
72
72
  ?collect_shipping_address: bool?,
73
73
  ?custom_cta: WhopSDK::Models::custom_cta?,
@@ -90,7 +90,7 @@ module WhopSDK
90
90
  ) -> void
91
91
 
92
92
  def to_hash: -> {
93
- banner_image: WhopSDK::ProductUpdateParams::BannerImage?,
93
+ banner_image: WhopSDK::Models::ProductUpdateParams::banner_image?,
94
94
  business_type: WhopSDK::Models::business_types?,
95
95
  collect_shipping_address: bool?,
96
96
  custom_cta: WhopSDK::Models::custom_cta?,
@@ -112,16 +112,35 @@ module WhopSDK
112
112
  request_options: WhopSDK::RequestOptions
113
113
  }
114
114
 
115
- type banner_image = { id: String?, direct_upload_id: String? }
115
+ type banner_image =
116
+ WhopSDK::ProductUpdateParams::BannerImage::AttachmentInputWithDirectUploadID
117
+ | WhopSDK::ProductUpdateParams::BannerImage::AttachmentInputWithID
116
118
 
117
- class BannerImage < WhopSDK::Internal::Type::BaseModel
118
- attr_accessor id: String?
119
+ module BannerImage
120
+ extend WhopSDK::Internal::Type::Union
119
121
 
120
- attr_accessor direct_upload_id: String?
122
+ type attachment_input_with_direct_upload_id =
123
+ { direct_upload_id: String }
121
124
 
122
- def initialize: (?id: String?, ?direct_upload_id: String?) -> void
125
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
126
+ attr_accessor direct_upload_id: String
123
127
 
124
- def to_hash: -> { id: String?, direct_upload_id: String? }
128
+ def initialize: (direct_upload_id: String) -> void
129
+
130
+ def to_hash: -> { direct_upload_id: String }
131
+ end
132
+
133
+ type attachment_input_with_id = { id: String }
134
+
135
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
136
+ attr_accessor id: String
137
+
138
+ def initialize: (id: String) -> void
139
+
140
+ def to_hash: -> { id: String }
141
+ end
142
+
143
+ def self?.variants: -> ::Array[WhopSDK::Models::ProductUpdateParams::banner_image]
125
144
  end
126
145
 
127
146
  type store_page_config = { custom_cta: String?, show_price: bool? }
@@ -9,6 +9,7 @@ module WhopSDK
9
9
  destination: WhopSDK::Models::Transfer::destination?,
10
10
  destination_ledger_account_id: String,
11
11
  fee_amount: Float?,
12
+ metadata: ::Hash[Symbol, top]?,
12
13
  notes: String?,
13
14
  origin: WhopSDK::Models::Transfer::origin?,
14
15
  origin_ledger_account_id: String
@@ -29,6 +30,8 @@ module WhopSDK
29
30
 
30
31
  attr_accessor fee_amount: Float?
31
32
 
33
+ attr_accessor metadata: ::Hash[Symbol, top]?
34
+
32
35
  attr_accessor notes: String?
33
36
 
34
37
  attr_accessor origin: WhopSDK::Models::Transfer::origin?
@@ -43,6 +46,7 @@ module WhopSDK
43
46
  destination: WhopSDK::Models::Transfer::destination?,
44
47
  destination_ledger_account_id: String,
45
48
  fee_amount: Float?,
49
+ metadata: ::Hash[Symbol, top]?,
46
50
  notes: String?,
47
51
  origin: WhopSDK::Models::Transfer::origin?,
48
52
  origin_ledger_account_id: String
@@ -56,6 +60,7 @@ module WhopSDK
56
60
  destination: WhopSDK::Models::Transfer::destination?,
57
61
  destination_ledger_account_id: String,
58
62
  fee_amount: Float?,
63
+ metadata: ::Hash[Symbol, top]?,
59
64
  notes: String?,
60
65
  origin: WhopSDK::Models::Transfer::origin?,
61
66
  origin_ledger_account_id: String
@@ -7,6 +7,7 @@ module WhopSDK
7
7
  destination_id: String,
8
8
  origin_id: String,
9
9
  idempotence_key: String?,
10
+ metadata: ::Hash[Symbol, top]?,
10
11
  notes: String?
11
12
  }
12
13
  & WhopSDK::Internal::Type::request_parameters
@@ -25,6 +26,8 @@ module WhopSDK
25
26
 
26
27
  attr_accessor idempotence_key: String?
27
28
 
29
+ attr_accessor metadata: ::Hash[Symbol, top]?
30
+
28
31
  attr_accessor notes: String?
29
32
 
30
33
  def initialize: (
@@ -33,6 +36,7 @@ module WhopSDK
33
36
  destination_id: String,
34
37
  origin_id: String,
35
38
  ?idempotence_key: String?,
39
+ ?metadata: ::Hash[Symbol, top]?,
36
40
  ?notes: String?,
37
41
  ?request_options: WhopSDK::request_opts
38
42
  ) -> void
@@ -43,6 +47,7 @@ module WhopSDK
43
47
  destination_id: String,
44
48
  origin_id: String,
45
49
  idempotence_key: String?,
50
+ metadata: ::Hash[Symbol, top]?,
46
51
  notes: String?,
47
52
  request_options: WhopSDK::RequestOptions
48
53
  }
@@ -8,6 +8,7 @@ module WhopSDK
8
8
  currency: WhopSDK::Models::currency,
9
9
  destination_ledger_account_id: String,
10
10
  fee_amount: Float?,
11
+ metadata: ::Hash[Symbol, top]?,
11
12
  notes: String?,
12
13
  origin_ledger_account_id: String
13
14
  }
@@ -25,6 +26,8 @@ module WhopSDK
25
26
 
26
27
  attr_accessor fee_amount: Float?
27
28
 
29
+ attr_accessor metadata: ::Hash[Symbol, top]?
30
+
28
31
  attr_accessor notes: String?
29
32
 
30
33
  attr_accessor origin_ledger_account_id: String
@@ -36,6 +39,7 @@ module WhopSDK
36
39
  currency: WhopSDK::Models::currency,
37
40
  destination_ledger_account_id: String,
38
41
  fee_amount: Float?,
42
+ metadata: ::Hash[Symbol, top]?,
39
43
  notes: String?,
40
44
  origin_ledger_account_id: String
41
45
  ) -> void
@@ -47,6 +51,7 @@ module WhopSDK
47
51
  currency: WhopSDK::Models::currency,
48
52
  destination_ledger_account_id: String,
49
53
  fee_amount: Float?,
54
+ metadata: ::Hash[Symbol, top]?,
50
55
  notes: String?,
51
56
  origin_ledger_account_id: String
52
57
  }
@@ -65,6 +65,10 @@ module WhopSDK
65
65
 
66
66
  class Company = WhopSDK::Models::Company
67
67
 
68
+ class CompanyCreateParams = WhopSDK::Models::CompanyCreateParams
69
+
70
+ class CompanyListParams = WhopSDK::Models::CompanyListParams
71
+
68
72
  class CompanyRetrieveParams = WhopSDK::Models::CompanyRetrieveParams
69
73
 
70
74
  class Course = WhopSDK::Models::Course
@@ -109,6 +113,10 @@ module WhopSDK
109
113
 
110
114
  class CourseRetrieveParams = WhopSDK::Models::CourseRetrieveParams
111
115
 
116
+ class CourseStudentListParams = WhopSDK::Models::CourseStudentListParams
117
+
118
+ class CourseStudentRetrieveParams = WhopSDK::Models::CourseStudentRetrieveParams
119
+
112
120
  class CourseUpdateParams = WhopSDK::Models::CourseUpdateParams
113
121
 
114
122
  module Currency = WhopSDK::Models::Currency
@@ -2,7 +2,7 @@ module WhopSDK
2
2
  module Resources
3
3
  class AppBuilds
4
4
  def create: (
5
- attachment: WhopSDK::AppBuildCreateParams::Attachment,
5
+ attachment: WhopSDK::Models::AppBuildCreateParams::attachment,
6
6
  checksum: String,
7
7
  platform: WhopSDK::Models::app_build_platforms,
8
8
  ?app_id: String?,
@@ -21,7 +21,7 @@ module WhopSDK
21
21
  ?description: String?,
22
22
  ?discover_path: String?,
23
23
  ?experience_path: String?,
24
- ?icon: WhopSDK::AppUpdateParams::Icon?,
24
+ ?icon: WhopSDK::Models::AppUpdateParams::icon?,
25
25
  ?name: String?,
26
26
  ?required_scopes: ::Array[WhopSDK::Models::AppUpdateParams::required_scope]?,
27
27
  ?status: WhopSDK::Models::app_statuses?,
@@ -2,10 +2,10 @@ module WhopSDK
2
2
  module Resources
3
3
  class CheckoutConfigurations
4
4
  def create: (
5
+ plan: WhopSDK::CheckoutConfigurationCreateParams::Plan,
6
+ plan_id: String,
5
7
  ?affiliate_code: String?,
6
8
  ?metadata: ::Hash[Symbol, top]?,
7
- ?plan: WhopSDK::CheckoutConfigurationCreateParams::Plan?,
8
- ?plan_id: String?,
9
9
  ?redirect_url: String?,
10
10
  ?request_options: WhopSDK::request_opts
11
11
  ) -> WhopSDK::CheckoutConfiguration
@@ -1,11 +1,29 @@
1
1
  module WhopSDK
2
2
  module Resources
3
3
  class Companies
4
+ def create: (
5
+ email: String,
6
+ parent_company_id: String,
7
+ title: String,
8
+ ?metadata: ::Hash[Symbol, top]?,
9
+ ?request_options: WhopSDK::request_opts
10
+ ) -> WhopSDK::Company
11
+
4
12
  def retrieve: (
5
13
  String id,
6
14
  ?request_options: WhopSDK::request_opts
7
15
  ) -> WhopSDK::Company
8
16
 
17
+ def list: (
18
+ parent_company_id: String,
19
+ ?after: String?,
20
+ ?before: String?,
21
+ ?direction: WhopSDK::Models::direction?,
22
+ ?first: Integer?,
23
+ ?last: Integer?,
24
+ ?request_options: WhopSDK::request_opts
25
+ ) -> WhopSDK::Internal::CursorPage[WhopSDK::Models::CompanyListResponse]
26
+
9
27
  def initialize: (client: WhopSDK::Client) -> void
10
28
  end
11
29
  end
@@ -17,12 +17,14 @@ module WhopSDK
17
17
 
18
18
  def update: (
19
19
  String id,
20
+ ?assessment_completion_requirement: WhopSDK::CourseLessonUpdateParams::AssessmentCompletionRequirement?,
20
21
  ?assessment_questions: ::Array[WhopSDK::CourseLessonUpdateParams::AssessmentQuestion]?,
21
- ?attachments: ::Array[WhopSDK::CourseLessonUpdateParams::Attachment]?,
22
+ ?attachments: ::Array[WhopSDK::Models::CourseLessonUpdateParams::attachment]?,
22
23
  ?content: String?,
23
24
  ?days_from_course_start_until_unlock: Integer?,
24
25
  ?lesson_type: WhopSDK::Models::lesson_types?,
25
- ?main_pdf: WhopSDK::CourseLessonUpdateParams::MainPdf?,
26
+ ?main_pdf: WhopSDK::Models::CourseLessonUpdateParams::main_pdf?,
27
+ ?max_attempts: Integer?,
26
28
  ?mux_asset_id: String?,
27
29
  ?title: String?,
28
30
  ?visibility: WhopSDK::Models::lesson_visibilities?,
@@ -0,0 +1,22 @@
1
+ module WhopSDK
2
+ module Resources
3
+ class CourseStudents
4
+ def retrieve: (
5
+ String id,
6
+ ?request_options: WhopSDK::request_opts
7
+ ) -> WhopSDK::Models::CourseStudentRetrieveResponse
8
+
9
+ def list: (
10
+ course_id: String,
11
+ ?after: String?,
12
+ ?before: String?,
13
+ ?first: Integer?,
14
+ ?keyword: String?,
15
+ ?last: Integer?,
16
+ ?request_options: WhopSDK::request_opts
17
+ ) -> WhopSDK::Internal::CursorPage[WhopSDK::Models::CourseStudentListResponse]
18
+
19
+ def initialize: (client: WhopSDK::Client) -> void
20
+ end
21
+ end
22
+ end
@@ -4,9 +4,11 @@ module WhopSDK
4
4
  def create: (
5
5
  experience_id: String,
6
6
  title: String,
7
+ ?certificate_after_completion_enabled: bool?,
7
8
  ?cover_image: String?,
9
+ ?require_completing_lessons_in_order: bool?,
8
10
  ?tagline: String?,
9
- ?thumbnail: WhopSDK::CourseCreateParams::Thumbnail?,
11
+ ?thumbnail: WhopSDK::Models::CourseCreateParams::thumbnail?,
10
12
  ?request_options: WhopSDK::request_opts
11
13
  ) -> WhopSDK::Course
12
14
 
@@ -24,7 +26,7 @@ module WhopSDK
24
26
  ?language: WhopSDK::Models::languages?,
25
27
  ?require_completing_lessons_in_order: bool?,
26
28
  ?tagline: String?,
27
- ?thumbnail: WhopSDK::CourseUpdateParams::Thumbnail?,
29
+ ?thumbnail: WhopSDK::Models::CourseUpdateParams::thumbnail?,
28
30
  ?title: String?,
29
31
  ?request_options: WhopSDK::request_opts
30
32
  ) -> WhopSDK::Course
@@ -17,7 +17,7 @@ module WhopSDK
17
17
  def update: (
18
18
  String id,
19
19
  ?access_level: WhopSDK::Models::ExperienceUpdateParams::access_level?,
20
- ?logo: WhopSDK::ExperienceUpdateParams::Logo?,
20
+ ?logo: WhopSDK::Models::ExperienceUpdateParams::logo?,
21
21
  ?name: String?,
22
22
  ?order: String?,
23
23
  ?section_id: String?,
@@ -3,7 +3,7 @@ module WhopSDK
3
3
  class ForumPosts
4
4
  def create: (
5
5
  experience_id: String,
6
- ?attachments: ::Array[WhopSDK::ForumPostCreateParams::Attachment]?,
6
+ ?attachments: ::Array[WhopSDK::Models::ForumPostCreateParams::attachment]?,
7
7
  ?content: String?,
8
8
  ?is_mention: bool?,
9
9
  ?parent_id: String?,
@@ -22,7 +22,7 @@ module WhopSDK
22
22
 
23
23
  def update: (
24
24
  String id,
25
- ?attachments: ::Array[WhopSDK::ForumPostUpdateParams::Attachment]?,
25
+ ?attachments: ::Array[WhopSDK::Models::ForumPostUpdateParams::attachment]?,
26
26
  ?content: String?,
27
27
  ?is_pinned: bool?,
28
28
  ?title: String?,