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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: afe05506f28ccca20981f2b307f501db7097679a24e1b8b07a2bcdf9d006b6bd
4
- data.tar.gz: 320397d496636b3615be4976b4f686140c2fc47aa11eda1b5244624ff839934e
3
+ metadata.gz: '05932912d0d2be76d5a65f9af21548bc43f4a554a6e81ca8f7c08fca0800e693'
4
+ data.tar.gz: e35ed5d328c6ff001f1bbbed5579c7bcd83acb1cecc90c6eedc17d5b55d9dbce
5
5
  SHA512:
6
- metadata.gz: 59fe556c0733922c11d76fdabf92519fc8e5b56e4a10d9c12dde958d5c27ac97358a13f2879e2e3ddd5d6ea6bc87f061ad0b9f9bfb7a00a42b7458a9828b541a
7
- data.tar.gz: 5e48dc2bbaebcd0830c4a16fc68c7d98f442c8fc48dd527a7f879e75dc1f6b69cc7547ffb810f6eadc35775f54fee67046a69c195eb3cd8b4886c0f2f46bd445
6
+ metadata.gz: f5ef2f4456f54d2c1a101a1977213c3e16934d2efe6f44f4de4fe8b4d9e5b781ed926ac29397a81e8a6d59eaab3bfdeef0a7ea098b2cd6f19fbae50f3e91f668
7
+ data.tar.gz: e86de3137a1823dcbea3872cf61003ccaf64e9569d7c22e7dcfc0a70c4eb475055be2575e306fde9250ac891e60b5b3e332b47379987fbe2099ae33b16427fc7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.0.4 (2025-11-02)
4
+
5
+ Full Changelog: [v0.0.3...v0.0.4](https://github.com/whopio/whopsdk-ruby/compare/v0.0.3...v0.0.4)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([7bda597](https://github.com/whopio/whopsdk-ruby/commit/7bda597b4367e327f0d598ded7f14cdb1b261734))
10
+ * **api:** api update ([e51b89a](https://github.com/whopio/whopsdk-ruby/commit/e51b89a9837e9a8816aa7bfda71cf9ebb3126838))
11
+ * **api:** api update ([6ec5d86](https://github.com/whopio/whopsdk-ruby/commit/6ec5d86a634b48bd126fe18b2b2d3d2cb23c33ad))
12
+ * **api:** api update ([4bfb4b2](https://github.com/whopio/whopsdk-ruby/commit/4bfb4b29cd3d592105162cf4dbcf0f5cebdef85f))
13
+ * **api:** api update ([7fd4af7](https://github.com/whopio/whopsdk-ruby/commit/7fd4af74f1eb2c46d13cd478d655158f17f7713c))
14
+ * **api:** api update ([2c2c708](https://github.com/whopio/whopsdk-ruby/commit/2c2c708b0e611823069d8f1ca6e789b3f8ec10d5))
15
+ * **api:** api update ([81c7d61](https://github.com/whopio/whopsdk-ruby/commit/81c7d61904cc8a2e39a1a379ded2da48e9291c74))
16
+ * **api:** api update ([9ed5110](https://github.com/whopio/whopsdk-ruby/commit/9ed51101d77458d21d49a79ce329ee68bde91c40))
17
+ * **api:** api update ([eaf3de5](https://github.com/whopio/whopsdk-ruby/commit/eaf3de5a6a5d7a84b64f466ebd07404feced80e5))
18
+ * **api:** api update ([4d39a35](https://github.com/whopio/whopsdk-ruby/commit/4d39a3563f0fdb38ce27ddd9a0f84b96d484435d))
19
+ * **api:** api update ([b16865b](https://github.com/whopio/whopsdk-ruby/commit/b16865bbabebaf176899131d98145fbd884a1d33))
20
+ * **api:** api update ([680a9e5](https://github.com/whopio/whopsdk-ruby/commit/680a9e50da1e5cfc5d3ce57c99600cde7316a4fe))
21
+ * **api:** api update ([f5b90f5](https://github.com/whopio/whopsdk-ruby/commit/f5b90f53ea8b1d1d3332bf8da37ec2e1c9e3cd69))
22
+ * **api:** manual updates ([2a8cc5d](https://github.com/whopio/whopsdk-ruby/commit/2a8cc5da2297d3dfa69a3209e7539a1597426410))
23
+ * **api:** manual updates ([5b56fe6](https://github.com/whopio/whopsdk-ruby/commit/5b56fe6ff1fe82e1dcc063824fcd036196801f2f))
24
+
3
25
  ## 0.0.3 (2025-10-28)
4
26
 
5
27
  Full Changelog: [v0.0.2...v0.0.3](https://github.com/whopio/whopsdk-ruby/compare/v0.0.2...v0.0.3)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "whop_sdk", "~> 0.0.3"
20
+ gem "whop_sdk", "~> 0.0.4"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -112,6 +112,9 @@ module WhopSDK
112
112
  # @return [WhopSDK::Resources::Reviews]
113
113
  attr_reader :reviews
114
114
 
115
+ # @return [WhopSDK::Resources::CourseStudents]
116
+ attr_reader :course_students
117
+
115
118
  # @api private
116
119
  #
117
120
  # @return [Hash{String=>String}]
@@ -201,6 +204,7 @@ module WhopSDK
201
204
  @course_chapters = WhopSDK::Resources::CourseChapters.new(client: self)
202
205
  @course_lessons = WhopSDK::Resources::CourseLessons.new(client: self)
203
206
  @reviews = WhopSDK::Resources::Reviews.new(client: self)
207
+ @course_students = WhopSDK::Resources::CourseStudents.new(client: self)
204
208
  end
205
209
 
206
210
  # Verifies a Whop user token
@@ -12,8 +12,8 @@ module WhopSDK
12
12
  # format. The zip should contain at least one main_js_bundle.hbc file and
13
13
  # optionally an assets folder next to it.
14
14
  #
15
- # @return [WhopSDK::Models::AppBuildCreateParams::Attachment]
16
- required :attachment, -> { WhopSDK::AppBuildCreateParams::Attachment }
15
+ # @return [WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithID]
16
+ required :attachment, union: -> { WhopSDK::AppBuildCreateParams::Attachment }
17
17
 
18
18
  # @!attribute checksum
19
19
  # Checksum of the app build file. This is generated by the client and used to
@@ -49,7 +49,7 @@ module WhopSDK
49
49
  # Some parameter documentations has been truncated, see
50
50
  # {WhopSDK::Models::AppBuildCreateParams} for more details.
51
51
  #
52
- # @param attachment [WhopSDK::Models::AppBuildCreateParams::Attachment] Attachment input for the app build file. This should be an upload in .zip format
52
+ # @param attachment [WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithID] Attachment input for the app build file. This should be an upload in .zip format
53
53
  #
54
54
  # @param checksum [String] Checksum of the app build file. This is generated by the client and used to veri
55
55
  #
@@ -61,34 +61,58 @@ module WhopSDK
61
61
  #
62
62
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
63
63
 
64
- class Attachment < WhopSDK::Internal::Type::BaseModel
65
- # @!attribute id
66
- # The ID of an existing attachment object. Use this when updating a resource and
67
- # keeping a subset of the attachments. Don't use this unless you know what you're
68
- # doing.
69
- #
70
- # @return [String, nil]
71
- optional :id, String, nil?: true
64
+ # Attachment input for the app build file. This should be an upload in .zip
65
+ # format. The zip should contain at least one main_js_bundle.hbc file and
66
+ # optionally an assets folder next to it.
67
+ module Attachment
68
+ extend WhopSDK::Internal::Type::Union
72
69
 
73
- # @!attribute direct_upload_id
74
- # This ID should be used the first time you upload an attachment. It is the ID of
75
- # the direct upload that was created when uploading the file to S3 via the
76
- # mediaDirectUpload mutation.
77
- #
78
- # @return [String, nil]
79
- optional :direct_upload_id, String, nil?: true
70
+ # Input for an attachment
71
+ variant -> { WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID }
80
72
 
81
- # @!method initialize(id: nil, direct_upload_id: nil)
82
- # Some parameter documentations has been truncated, see
83
- # {WhopSDK::Models::AppBuildCreateParams::Attachment} for more details.
84
- #
85
- # Attachment input for the app build file. This should be an upload in .zip
86
- # format. The zip should contain at least one main_js_bundle.hbc file and
87
- # optionally an assets folder next to it.
88
- #
89
- # @param id [String, nil] The ID of an existing attachment object. Use this when updating a resource and k
90
- #
91
- # @param direct_upload_id [String, nil] This ID should be used the first time you upload an attachment. It is the ID of
73
+ # Input for an attachment
74
+ variant -> { WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithID }
75
+
76
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
77
+ # @!attribute direct_upload_id
78
+ # This ID should be used the first time you upload an attachment. It is the ID of
79
+ # the direct upload that was created when uploading the file to S3 via the
80
+ # mediaDirectUpload mutation.
81
+ #
82
+ # @return [String]
83
+ required :direct_upload_id, String
84
+
85
+ # @!method initialize(direct_upload_id:)
86
+ # Some parameter documentations has been truncated, see
87
+ # {WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID}
88
+ # for more details.
89
+ #
90
+ # Input for an attachment
91
+ #
92
+ # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
93
+ end
94
+
95
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
96
+ # @!attribute id
97
+ # The ID of an existing attachment object. Use this when updating a resource and
98
+ # keeping a subset of the attachments. Don't use this unless you know what you're
99
+ # doing.
100
+ #
101
+ # @return [String]
102
+ required :id, String
103
+
104
+ # @!method initialize(id:)
105
+ # Some parameter documentations has been truncated, see
106
+ # {WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithID} for
107
+ # more details.
108
+ #
109
+ # Input for an attachment
110
+ #
111
+ # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
112
+ end
113
+
114
+ # @!method self.variants
115
+ # @return [Array(WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithID)]
92
116
  end
93
117
  end
94
118
  end
@@ -46,8 +46,8 @@ module WhopSDK
46
46
  # @!attribute icon
47
47
  # The icon for the app
48
48
  #
49
- # @return [WhopSDK::Models::AppUpdateParams::Icon, nil]
50
- optional :icon, -> { WhopSDK::AppUpdateParams::Icon }, nil?: true
49
+ # @return [WhopSDK::Models::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID, WhopSDK::Models::AppUpdateParams::Icon::AttachmentInputWithID, nil]
50
+ optional :icon, union: -> { WhopSDK::AppUpdateParams::Icon }, nil?: true
51
51
 
52
52
  # @!attribute name
53
53
  # The name of the app
@@ -82,7 +82,7 @@ module WhopSDK
82
82
  #
83
83
  # @param experience_path [String, nil] The path for the hub view of the app
84
84
  #
85
- # @param icon [WhopSDK::Models::AppUpdateParams::Icon, nil] The icon for the app
85
+ # @param icon [WhopSDK::Models::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID, WhopSDK::Models::AppUpdateParams::Icon::AttachmentInputWithID, nil] The icon for the app
86
86
  #
87
87
  # @param name [String, nil] The name of the app
88
88
  #
@@ -92,32 +92,56 @@ module WhopSDK
92
92
  #
93
93
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
94
94
 
95
- class Icon < WhopSDK::Internal::Type::BaseModel
96
- # @!attribute id
97
- # The ID of an existing attachment object. Use this when updating a resource and
98
- # keeping a subset of the attachments. Don't use this unless you know what you're
99
- # doing.
100
- #
101
- # @return [String, nil]
102
- optional :id, String, nil?: true
103
-
104
- # @!attribute direct_upload_id
105
- # This ID should be used the first time you upload an attachment. It is the ID of
106
- # the direct upload that was created when uploading the file to S3 via the
107
- # mediaDirectUpload mutation.
108
- #
109
- # @return [String, nil]
110
- optional :direct_upload_id, String, nil?: true
111
-
112
- # @!method initialize(id: nil, direct_upload_id: nil)
113
- # Some parameter documentations has been truncated, see
114
- # {WhopSDK::Models::AppUpdateParams::Icon} for more details.
115
- #
116
- # The icon for the app
117
- #
118
- # @param id [String, nil] The ID of an existing attachment object. Use this when updating a resource and k
119
- #
120
- # @param direct_upload_id [String, nil] This ID should be used the first time you upload an attachment. It is the ID of
95
+ # The icon for the app
96
+ module Icon
97
+ extend WhopSDK::Internal::Type::Union
98
+
99
+ # Input for an attachment
100
+ variant -> { WhopSDK::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID }
101
+
102
+ # Input for an attachment
103
+ variant -> { WhopSDK::AppUpdateParams::Icon::AttachmentInputWithID }
104
+
105
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
106
+ # @!attribute direct_upload_id
107
+ # This ID should be used the first time you upload an attachment. It is the ID of
108
+ # the direct upload that was created when uploading the file to S3 via the
109
+ # mediaDirectUpload mutation.
110
+ #
111
+ # @return [String]
112
+ required :direct_upload_id, String
113
+
114
+ # @!method initialize(direct_upload_id:)
115
+ # Some parameter documentations has been truncated, see
116
+ # {WhopSDK::Models::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID} for
117
+ # more details.
118
+ #
119
+ # Input for an attachment
120
+ #
121
+ # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
122
+ end
123
+
124
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
125
+ # @!attribute id
126
+ # The ID of an existing attachment object. Use this when updating a resource and
127
+ # keeping a subset of the attachments. Don't use this unless you know what you're
128
+ # doing.
129
+ #
130
+ # @return [String]
131
+ required :id, String
132
+
133
+ # @!method initialize(id:)
134
+ # Some parameter documentations has been truncated, see
135
+ # {WhopSDK::Models::AppUpdateParams::Icon::AttachmentInputWithID} for more
136
+ # details.
137
+ #
138
+ # Input for an attachment
139
+ #
140
+ # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
141
+ end
142
+
143
+ # @!method self.variants
144
+ # @return [Array(WhopSDK::Models::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID, WhopSDK::Models::AppUpdateParams::Icon::AttachmentInputWithID)]
121
145
  end
122
146
 
123
147
  # These are the scopes an app can request on behalf of a user
@@ -7,6 +7,12 @@ module WhopSDK
7
7
  extend WhopSDK::Internal::Type::RequestParameters::Converter
8
8
  include WhopSDK::Internal::Type::RequestParameters
9
9
 
10
+ # @!attribute plan
11
+ # Pass this object to create a new plan for this checkout configuration
12
+ #
13
+ # @return [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan]
14
+ required :plan, -> { WhopSDK::CheckoutConfigurationCreateParams::Plan }
15
+
10
16
  # @!attribute affiliate_code
11
17
  # The affiliate code to use for the checkout configuration
12
18
  #
@@ -19,33 +25,27 @@ module WhopSDK
19
25
  # @return [Hash{Symbol=>Object}, nil]
20
26
  optional :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
21
27
 
22
- # @!attribute plan
23
- # Pass this object to create a new plan for this checkout configuration
28
+ # @!attribute redirect_url
29
+ # The URL to redirect the user to after the checkout configuration is created
24
30
  #
25
- # @return [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan, nil]
26
- optional :plan, -> { WhopSDK::CheckoutConfigurationCreateParams::Plan }, nil?: true
31
+ # @return [String, nil]
32
+ optional :redirect_url, String, nil?: true
27
33
 
28
34
  # @!attribute plan_id
29
35
  # The ID of the plan to use for the checkout configuration
30
36
  #
31
- # @return [String, nil]
32
- optional :plan_id, String, nil?: true
37
+ # @return [String]
38
+ required :plan_id, String
33
39
 
34
- # @!attribute redirect_url
35
- # The URL to redirect the user to after the checkout configuration is created
40
+ # @!method initialize(plan:, plan_id:, affiliate_code: nil, metadata: nil, redirect_url: nil, request_options: {})
41
+ # @param plan [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan] Pass this object to create a new plan for this checkout configuration
42
+ #
43
+ # @param plan_id [String] The ID of the plan to use for the checkout configuration
36
44
  #
37
- # @return [String, nil]
38
- optional :redirect_url, String, nil?: true
39
-
40
- # @!method initialize(affiliate_code: nil, metadata: nil, plan: nil, plan_id: nil, redirect_url: nil, request_options: {})
41
45
  # @param affiliate_code [String, nil] The affiliate code to use for the checkout configuration
42
46
  #
43
47
  # @param metadata [Hash{Symbol=>Object}, nil] The metadata to use for the checkout configuration
44
48
  #
45
- # @param plan [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan, nil] Pass this object to create a new plan for this checkout configuration
46
- #
47
- # @param plan_id [String, nil] The ID of the plan to use for the checkout configuration
48
- #
49
49
  # @param redirect_url [String, nil] The URL to redirect the user to after the checkout configuration is created
50
50
  #
51
51
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
@@ -101,8 +101,8 @@ module WhopSDK
101
101
  # @!attribute image
102
102
  # An image for the plan. This will be visible on the product page to customers.
103
103
  #
104
- # @return [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image, nil]
105
- optional :image, -> { WhopSDK::CheckoutConfigurationCreateParams::Plan::Image }, nil?: true
104
+ # @return [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID, nil]
105
+ optional :image, union: -> { WhopSDK::CheckoutConfigurationCreateParams::Plan::Image }, nil?: true
106
106
 
107
107
  # @!attribute initial_price
108
108
  # An additional amount charged upon first purchase.
@@ -123,6 +123,15 @@ module WhopSDK
123
123
  # @return [Symbol, WhopSDK::Models::TaxType, nil]
124
124
  optional :override_tax_type, enum: -> { WhopSDK::TaxType }, nil?: true
125
125
 
126
+ # @!attribute payment_method_configuration
127
+ # The explicit payment method configuration for the plan. If not provided, the
128
+ # platform or company's defaults will apply.
129
+ #
130
+ # @return [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::PaymentMethodConfiguration, nil]
131
+ optional :payment_method_configuration,
132
+ -> { WhopSDK::CheckoutConfigurationCreateParams::Plan::PaymentMethodConfiguration },
133
+ nil?: true
134
+
126
135
  # @!attribute plan_type
127
136
  # The type of plan that can be attached to an access pass
128
137
  #
@@ -172,7 +181,7 @@ module WhopSDK
172
181
  # @return [Symbol, WhopSDK::Models::Visibility, nil]
173
182
  optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true
174
183
 
175
- # @!method initialize(company_id:, billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, plan_type: nil, product: nil, product_id: nil, release_method: nil, renewal_price: nil, title: nil, trial_period_days: nil, visibility: nil)
184
+ # @!method initialize(company_id:, billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, product: nil, product_id: nil, release_method: nil, renewal_price: nil, title: nil, trial_period_days: nil, visibility: nil)
176
185
  # Some parameter documentations has been truncated, see
177
186
  # {WhopSDK::Models::CheckoutConfigurationCreateParams::Plan} for more details.
178
187
  #
@@ -192,7 +201,7 @@ module WhopSDK
192
201
  #
193
202
  # @param force_create_new_plan [Boolean, nil] Whether to force the creation of a new plan even if one with the same attributes
194
203
  #
195
- # @param image [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image, nil] An image for the plan. This will be visible on the product page to customers.
204
+ # @param image [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID, nil] An image for the plan. This will be visible on the product page to customers.
196
205
  #
197
206
  # @param initial_price [Float, nil] An additional amount charged upon first purchase.
198
207
  #
@@ -200,6 +209,8 @@ module WhopSDK
200
209
  #
201
210
  # @param override_tax_type [Symbol, WhopSDK::Models::TaxType, nil] Whether or not the tax is included in a plan's price (or if it hasn't been set u
202
211
  #
212
+ # @param payment_method_configuration [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::PaymentMethodConfiguration, nil] The explicit payment method configuration for the plan. If not provided, the pla
213
+ #
203
214
  # @param plan_type [Symbol, WhopSDK::Models::PlanType, nil] The type of plan that can be attached to an access pass
204
215
  #
205
216
  # @param product [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Product, nil] Pass this object to create a new product for this plan. We will use the product
@@ -267,34 +278,99 @@ module WhopSDK
267
278
  # @param field_type [Symbol, :text] The type of the custom field.
268
279
  end
269
280
 
281
+ # An image for the plan. This will be visible on the product page to customers.
282
+ #
270
283
  # @see WhopSDK::Models::CheckoutConfigurationCreateParams::Plan#image
271
- class Image < WhopSDK::Internal::Type::BaseModel
272
- # @!attribute id
273
- # The ID of an existing attachment object. Use this when updating a resource and
274
- # keeping a subset of the attachments. Don't use this unless you know what you're
275
- # doing.
284
+ module Image
285
+ extend WhopSDK::Internal::Type::Union
286
+
287
+ # Input for an attachment
288
+ variant -> { WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID }
289
+
290
+ # Input for an attachment
291
+ variant -> { WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID }
292
+
293
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
294
+ # @!attribute direct_upload_id
295
+ # This ID should be used the first time you upload an attachment. It is the ID of
296
+ # the direct upload that was created when uploading the file to S3 via the
297
+ # mediaDirectUpload mutation.
298
+ #
299
+ # @return [String]
300
+ required :direct_upload_id, String
301
+
302
+ # @!method initialize(direct_upload_id:)
303
+ # Some parameter documentations has been truncated, see
304
+ # {WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID}
305
+ # for more details.
306
+ #
307
+ # Input for an attachment
308
+ #
309
+ # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
310
+ end
311
+
312
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
313
+ # @!attribute id
314
+ # The ID of an existing attachment object. Use this when updating a resource and
315
+ # keeping a subset of the attachments. Don't use this unless you know what you're
316
+ # doing.
317
+ #
318
+ # @return [String]
319
+ required :id, String
320
+
321
+ # @!method initialize(id:)
322
+ # Some parameter documentations has been truncated, see
323
+ # {WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID}
324
+ # for more details.
325
+ #
326
+ # Input for an attachment
327
+ #
328
+ # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
329
+ end
330
+
331
+ # @!method self.variants
332
+ # @return [Array(WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID)]
333
+ end
334
+
335
+ # @see WhopSDK::Models::CheckoutConfigurationCreateParams::Plan#payment_method_configuration
336
+ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel
337
+ # @!attribute disabled
338
+ # An array of payment method identifiers that are explicitly disabled. Only
339
+ # applies if the include_platform_defaults is true.
276
340
  #
277
- # @return [String, nil]
278
- optional :id, String, nil?: true
341
+ # @return [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>]
342
+ required :disabled, -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::PaymentMethodTypes] }
279
343
 
280
- # @!attribute direct_upload_id
281
- # This ID should be used the first time you upload an attachment. It is the ID of
282
- # the direct upload that was created when uploading the file to S3 via the
283
- # mediaDirectUpload mutation.
344
+ # @!attribute enabled
345
+ # An array of payment method identifiers that are explicitly enabled. This means
346
+ # these payment methods will be shown on checkout. Example use case is to only
347
+ # enable a specific payment method like cashapp, or extending the platform
348
+ # defaults with additional methods.
284
349
  #
285
- # @return [String, nil]
286
- optional :direct_upload_id, String, nil?: true
350
+ # @return [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>]
351
+ required :enabled, -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::PaymentMethodTypes] }
287
352
 
288
- # @!method initialize(id: nil, direct_upload_id: nil)
353
+ # @!attribute include_platform_defaults
354
+ # Whether Whop's platform default payment method enablement settings are included
355
+ # in this configuration. The full list of default payment methods can be found in
356
+ # the documentation at docs.whop.com/payments.
357
+ #
358
+ # @return [Boolean]
359
+ required :include_platform_defaults, WhopSDK::Internal::Type::Boolean
360
+
361
+ # @!method initialize(disabled:, enabled:, include_platform_defaults:)
289
362
  # Some parameter documentations has been truncated, see
290
- # {WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image} for more
291
- # details.
363
+ # {WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::PaymentMethodConfiguration}
364
+ # for more details.
365
+ #
366
+ # The explicit payment method configuration for the plan. If not provided, the
367
+ # platform or company's defaults will apply.
292
368
  #
293
- # An image for the plan. This will be visible on the product page to customers.
369
+ # @param disabled [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>] An array of payment method identifiers that are explicitly disabled. Only applie
294
370
  #
295
- # @param id [String, nil] The ID of an existing attachment object. Use this when updating a resource and k
371
+ # @param enabled [Array<Symbol, WhopSDK::Models::PaymentMethodTypes>] An array of payment method identifiers that are explicitly enabled. This means t
296
372
  #
297
- # @param direct_upload_id [String, nil] This ID should be used the first time you upload an attachment. It is the ID of
373
+ # @param include_platform_defaults [Boolean] Whether Whop's platform default payment method enablement settings are included
298
374
  end
299
375
 
300
376
  # @see WhopSDK::Models::CheckoutConfigurationCreateParams::Plan#product
@@ -45,6 +45,13 @@ module WhopSDK
45
45
  # @return [Integer]
46
46
  required :member_count, Integer
47
47
 
48
+ # @!attribute metadata
49
+ # A key-value store of data for the account, created/updated by the platform that
50
+ # made the account.
51
+ #
52
+ # @return [Hash{Symbol=>Object}, nil]
53
+ required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
54
+
48
55
  # @!attribute owner_user
49
56
  # The user who owns this company
50
57
  #
@@ -87,7 +94,10 @@ module WhopSDK
87
94
  # @return [Boolean]
88
95
  required :verified, WhopSDK::Internal::Type::Boolean
89
96
 
90
- # @!method initialize(id:, business_type:, created_at:, description:, industry_type:, logo:, member_count:, owner_user:, published_reviews_count:, route:, social_links:, title:, updated_at:, verified:)
97
+ # @!method initialize(id:, business_type:, created_at:, description:, industry_type:, logo:, member_count:, metadata:, owner_user:, published_reviews_count:, route:, social_links:, title:, updated_at:, verified:)
98
+ # Some parameter documentations has been truncated, see {WhopSDK::Models::Company}
99
+ # for more details.
100
+ #
91
101
  # An object representing a (sanitized) company.
92
102
  #
93
103
  # @param id [String] The ID (tag) of the company.
@@ -104,6 +114,8 @@ module WhopSDK
104
114
  #
105
115
  # @param member_count [Integer] The number of members in the company.
106
116
  #
117
+ # @param metadata [Hash{Symbol=>Object}, nil] A key-value store of data for the account, created/updated by the platform that
118
+ #
107
119
  # @param owner_user [WhopSDK::Models::Company::OwnerUser] The user who owns this company
108
120
  #
109
121
  # @param published_reviews_count [Integer] The number of reviews that have been published for the company.
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::Companies#create
6
+ class CompanyCreateParams < WhopSDK::Internal::Type::BaseModel
7
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
8
+ include WhopSDK::Internal::Type::RequestParameters
9
+
10
+ # @!attribute email
11
+ # The email of the user who the company will belong to.
12
+ #
13
+ # @return [String]
14
+ required :email, String
15
+
16
+ # @!attribute parent_company_id
17
+ # The company ID of the platform creating this company.
18
+ #
19
+ # @return [String]
20
+ required :parent_company_id, String
21
+
22
+ # @!attribute title
23
+ # The name of the company being created.
24
+ #
25
+ # @return [String]
26
+ required :title, String
27
+
28
+ # @!attribute metadata
29
+ # Additional metadata for the account
30
+ #
31
+ # @return [Hash{Symbol=>Object}, nil]
32
+ optional :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
33
+
34
+ # @!method initialize(email:, parent_company_id:, title:, metadata: nil, request_options: {})
35
+ # @param email [String] The email of the user who the company will belong to.
36
+ #
37
+ # @param parent_company_id [String] The company ID of the platform creating this company.
38
+ #
39
+ # @param title [String] The name of the company being created.
40
+ #
41
+ # @param metadata [Hash{Symbol=>Object}, nil] Additional metadata for the account
42
+ #
43
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
44
+ end
45
+ end
46
+ end