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
@@ -14,15 +14,15 @@ module WhopSDK
14
14
  # Attachment input for the app build file. This should be an upload in .zip
15
15
  # format. The zip should contain at least one main_js_bundle.hbc file and
16
16
  # optionally an assets folder next to it.
17
+ sig { returns(WhopSDK::AppBuildCreateParams::Attachment) }
18
+ attr_reader :attachment
19
+
17
20
  sig do
18
- returns(
19
- T.any(
20
- WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID,
21
- WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithID
22
- )
23
- )
21
+ params(
22
+ attachment: WhopSDK::AppBuildCreateParams::Attachment::OrHash
23
+ ).void
24
24
  end
25
- attr_accessor :attachment
25
+ attr_writer :attachment
26
26
 
27
27
  # Checksum of the app build file. This is generated by the client and used to
28
28
  # verify the integrity of the file that is submitted when un-packaged later on a
@@ -50,11 +50,7 @@ module WhopSDK
50
50
 
51
51
  sig do
52
52
  params(
53
- attachment:
54
- T.any(
55
- WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash,
56
- WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithID::OrHash
57
- ),
53
+ attachment: WhopSDK::AppBuildCreateParams::Attachment::OrHash,
58
54
  checksum: String,
59
55
  platform: WhopSDK::AppBuildPlatforms::OrSymbol,
60
56
  ai_prompt_id: T.nilable(String),
@@ -90,11 +86,7 @@ module WhopSDK
90
86
  sig do
91
87
  override.returns(
92
88
  {
93
- attachment:
94
- T.any(
95
- WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID,
96
- WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithID
97
- ),
89
+ attachment: WhopSDK::AppBuildCreateParams::Attachment,
98
90
  checksum: String,
99
91
  platform: WhopSDK::AppBuildPlatforms::OrSymbol,
100
92
  ai_prompt_id: T.nilable(String),
@@ -108,86 +100,31 @@ module WhopSDK
108
100
  def to_hash
109
101
  end
110
102
 
111
- # Attachment input for the app build file. This should be an upload in .zip
112
- # format. The zip should contain at least one main_js_bundle.hbc file and
113
- # optionally an assets folder next to it.
114
- module Attachment
115
- extend WhopSDK::Internal::Type::Union
116
-
117
- Variants =
103
+ class Attachment < WhopSDK::Internal::Type::BaseModel
104
+ OrHash =
118
105
  T.type_alias do
119
106
  T.any(
120
- WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID,
121
- WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithID
107
+ WhopSDK::AppBuildCreateParams::Attachment,
108
+ WhopSDK::Internal::AnyHash
122
109
  )
123
110
  end
124
111
 
125
- class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
126
- OrHash =
127
- T.type_alias do
128
- T.any(
129
- WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID,
130
- WhopSDK::Internal::AnyHash
131
- )
132
- end
133
-
134
- # This ID should be used the first time you upload an attachment. It is the ID of
135
- # the direct upload that was created when uploading the file to S3 via the
136
- # mediaDirectUpload mutation.
137
- sig { returns(String) }
138
- attr_accessor :direct_upload_id
139
-
140
- # Input for an attachment
141
- sig { params(direct_upload_id: String).returns(T.attached_class) }
142
- def self.new(
143
- # This ID should be used the first time you upload an attachment. It is the ID of
144
- # the direct upload that was created when uploading the file to S3 via the
145
- # mediaDirectUpload mutation.
146
- direct_upload_id:
147
- )
148
- end
149
-
150
- sig { override.returns({ direct_upload_id: String }) }
151
- def to_hash
152
- end
153
- end
154
-
155
- class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
156
- OrHash =
157
- T.type_alias do
158
- T.any(
159
- WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithID,
160
- WhopSDK::Internal::AnyHash
161
- )
162
- end
163
-
164
- # The ID of an existing attachment object. Use this when updating a resource and
165
- # keeping a subset of the attachments. Don't use this unless you know what you're
166
- # doing.
167
- sig { returns(String) }
168
- attr_accessor :id
169
-
170
- # Input for an attachment
171
- sig { params(id: String).returns(T.attached_class) }
172
- def self.new(
173
- # The ID of an existing attachment object. Use this when updating a resource and
174
- # keeping a subset of the attachments. Don't use this unless you know what you're
175
- # doing.
176
- id:
177
- )
178
- end
112
+ # The ID of an existing file object.
113
+ sig { returns(String) }
114
+ attr_accessor :id
179
115
 
180
- sig { override.returns({ id: String }) }
181
- def to_hash
182
- end
116
+ # Attachment input for the app build file. This should be an upload in .zip
117
+ # format. The zip should contain at least one main_js_bundle.hbc file and
118
+ # optionally an assets folder next to it.
119
+ sig { params(id: String).returns(T.attached_class) }
120
+ def self.new(
121
+ # The ID of an existing file object.
122
+ id:
123
+ )
183
124
  end
184
125
 
185
- sig do
186
- override.returns(
187
- T::Array[WhopSDK::AppBuildCreateParams::Attachment::Variants]
188
- )
189
- end
190
- def self.variants
126
+ sig { override.returns({ id: String }) }
127
+ def to_hash
191
128
  end
192
129
  end
193
130
  end
@@ -23,11 +23,21 @@ module WhopSDK
23
23
  sig { returns(T.nilable(String)) }
24
24
  attr_accessor :base_url
25
25
 
26
+ # The icon for the app in png, jpeg, or gif format
27
+ sig { returns(T.nilable(WhopSDK::AppCreateParams::Icon)) }
28
+ attr_reader :icon
29
+
30
+ sig do
31
+ params(icon: T.nilable(WhopSDK::AppCreateParams::Icon::OrHash)).void
32
+ end
33
+ attr_writer :icon
34
+
26
35
  sig do
27
36
  params(
28
37
  company_id: String,
29
38
  name: String,
30
39
  base_url: T.nilable(String),
40
+ icon: T.nilable(WhopSDK::AppCreateParams::Icon::OrHash),
31
41
  request_options: WhopSDK::RequestOptions::OrHash
32
42
  ).returns(T.attached_class)
33
43
  end
@@ -38,6 +48,8 @@ module WhopSDK
38
48
  name:,
39
49
  # The base URL of the app to be created
40
50
  base_url: nil,
51
+ # The icon for the app in png, jpeg, or gif format
52
+ icon: nil,
41
53
  request_options: {}
42
54
  )
43
55
  end
@@ -48,12 +60,36 @@ module WhopSDK
48
60
  company_id: String,
49
61
  name: String,
50
62
  base_url: T.nilable(String),
63
+ icon: T.nilable(WhopSDK::AppCreateParams::Icon),
51
64
  request_options: WhopSDK::RequestOptions
52
65
  }
53
66
  )
54
67
  end
55
68
  def to_hash
56
69
  end
70
+
71
+ class Icon < WhopSDK::Internal::Type::BaseModel
72
+ OrHash =
73
+ T.type_alias do
74
+ T.any(WhopSDK::AppCreateParams::Icon, WhopSDK::Internal::AnyHash)
75
+ end
76
+
77
+ # The ID of an existing file object.
78
+ sig { returns(String) }
79
+ attr_accessor :id
80
+
81
+ # The icon for the app in png, jpeg, or gif format
82
+ sig { params(id: String).returns(T.attached_class) }
83
+ def self.new(
84
+ # The ID of an existing file object.
85
+ id:
86
+ )
87
+ end
88
+
89
+ sig { override.returns({ id: String }) }
90
+ def to_hash
91
+ end
92
+ end
57
93
  end
58
94
  end
59
95
  end
@@ -153,6 +153,16 @@ module WhopSDK
153
153
  :daily_active_users,
154
154
  WhopSDK::AppListParams::Order::TaggedSymbol
155
155
  )
156
+ AI_PROMPT_COUNT =
157
+ T.let(:ai_prompt_count, WhopSDK::AppListParams::Order::TaggedSymbol)
158
+ TOTAL_AI_COST_USD =
159
+ T.let(:total_ai_cost_usd, WhopSDK::AppListParams::Order::TaggedSymbol)
160
+ TOTAL_AI_TOKENS =
161
+ T.let(:total_ai_tokens, WhopSDK::AppListParams::Order::TaggedSymbol)
162
+ LAST_AI_PROMPT_AT =
163
+ T.let(:last_ai_prompt_at, WhopSDK::AppListParams::Order::TaggedSymbol)
164
+ AI_AVERAGE_RATING =
165
+ T.let(:ai_average_rating, WhopSDK::AppListParams::Order::TaggedSymbol)
156
166
 
157
167
  sig do
158
168
  override.returns(
@@ -40,17 +40,13 @@ module WhopSDK
40
40
  attr_accessor :experience_path
41
41
 
42
42
  # The icon for the app
43
+ sig { returns(T.nilable(WhopSDK::AppUpdateParams::Icon)) }
44
+ attr_reader :icon
45
+
43
46
  sig do
44
- returns(
45
- T.nilable(
46
- T.any(
47
- WhopSDK::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID,
48
- WhopSDK::AppUpdateParams::Icon::AttachmentInputWithID
49
- )
50
- )
51
- )
47
+ params(icon: T.nilable(WhopSDK::AppUpdateParams::Icon::OrHash)).void
52
48
  end
53
- attr_accessor :icon
49
+ attr_writer :icon
54
50
 
55
51
  # The name of the app
56
52
  sig { returns(T.nilable(String)) }
@@ -77,13 +73,7 @@ module WhopSDK
77
73
  description: T.nilable(String),
78
74
  discover_path: T.nilable(String),
79
75
  experience_path: T.nilable(String),
80
- icon:
81
- T.nilable(
82
- T.any(
83
- WhopSDK::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID::OrHash,
84
- WhopSDK::AppUpdateParams::Icon::AttachmentInputWithID::OrHash
85
- )
86
- ),
76
+ icon: T.nilable(WhopSDK::AppUpdateParams::Icon::OrHash),
87
77
  name: T.nilable(String),
88
78
  required_scopes:
89
79
  T.nilable(
@@ -130,13 +120,7 @@ module WhopSDK
130
120
  description: T.nilable(String),
131
121
  discover_path: T.nilable(String),
132
122
  experience_path: T.nilable(String),
133
- icon:
134
- T.nilable(
135
- T.any(
136
- WhopSDK::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID,
137
- WhopSDK::AppUpdateParams::Icon::AttachmentInputWithID
138
- )
139
- ),
123
+ icon: T.nilable(WhopSDK::AppUpdateParams::Icon),
140
124
  name: T.nilable(String),
141
125
  required_scopes:
142
126
  T.nilable(
@@ -150,82 +134,26 @@ module WhopSDK
150
134
  def to_hash
151
135
  end
152
136
 
153
- # The icon for the app
154
- module Icon
155
- extend WhopSDK::Internal::Type::Union
156
-
157
- Variants =
137
+ class Icon < WhopSDK::Internal::Type::BaseModel
138
+ OrHash =
158
139
  T.type_alias do
159
- T.any(
160
- WhopSDK::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID,
161
- WhopSDK::AppUpdateParams::Icon::AttachmentInputWithID
162
- )
140
+ T.any(WhopSDK::AppUpdateParams::Icon, WhopSDK::Internal::AnyHash)
163
141
  end
164
142
 
165
- class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
166
- OrHash =
167
- T.type_alias do
168
- T.any(
169
- WhopSDK::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID,
170
- WhopSDK::Internal::AnyHash
171
- )
172
- end
173
-
174
- # This ID should be used the first time you upload an attachment. It is the ID of
175
- # the direct upload that was created when uploading the file to S3 via the
176
- # mediaDirectUpload mutation.
177
- sig { returns(String) }
178
- attr_accessor :direct_upload_id
179
-
180
- # Input for an attachment
181
- sig { params(direct_upload_id: String).returns(T.attached_class) }
182
- def self.new(
183
- # This ID should be used the first time you upload an attachment. It is the ID of
184
- # the direct upload that was created when uploading the file to S3 via the
185
- # mediaDirectUpload mutation.
186
- direct_upload_id:
187
- )
188
- end
143
+ # The ID of an existing file object.
144
+ sig { returns(String) }
145
+ attr_accessor :id
189
146
 
190
- sig { override.returns({ direct_upload_id: String }) }
191
- def to_hash
192
- end
193
- end
194
-
195
- class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
196
- OrHash =
197
- T.type_alias do
198
- T.any(
199
- WhopSDK::AppUpdateParams::Icon::AttachmentInputWithID,
200
- WhopSDK::Internal::AnyHash
201
- )
202
- end
203
-
204
- # The ID of an existing attachment object. Use this when updating a resource and
205
- # keeping a subset of the attachments. Don't use this unless you know what you're
206
- # doing.
207
- sig { returns(String) }
208
- attr_accessor :id
209
-
210
- # Input for an attachment
211
- sig { params(id: String).returns(T.attached_class) }
212
- def self.new(
213
- # The ID of an existing attachment object. Use this when updating a resource and
214
- # keeping a subset of the attachments. Don't use this unless you know what you're
215
- # doing.
216
- id:
217
- )
218
- end
219
-
220
- sig { override.returns({ id: String }) }
221
- def to_hash
222
- end
147
+ # The icon for the app
148
+ sig { params(id: String).returns(T.attached_class) }
149
+ def self.new(
150
+ # The ID of an existing file object.
151
+ id:
152
+ )
223
153
  end
224
154
 
225
- sig do
226
- override.returns(T::Array[WhopSDK::AppUpdateParams::Icon::Variants])
227
- end
228
- def self.variants
155
+ sig { override.returns({ id: String }) }
156
+ def to_hash
229
157
  end
230
158
  end
231
159
 
@@ -26,6 +26,23 @@ module WhopSDK
26
26
  JCBRUPAY = T.let(:jcbrupay, WhopSDK::CardBrands::TaggedSymbol)
27
27
  ELO = T.let(:elo, WhopSDK::CardBrands::TaggedSymbol)
28
28
  MAESTRO = T.let(:maestro, WhopSDK::CardBrands::TaggedSymbol)
29
+ TARJETA_NARANJA =
30
+ T.let(:tarjeta_naranja, WhopSDK::CardBrands::TaggedSymbol)
31
+ CIRRUS = T.let(:cirrus, WhopSDK::CardBrands::TaggedSymbol)
32
+ NSPK_MIR = T.let(:nspk_mir, WhopSDK::CardBrands::TaggedSymbol)
33
+ VERVE = T.let(:verve, WhopSDK::CardBrands::TaggedSymbol)
34
+ EBT = T.let(:ebt, WhopSDK::CardBrands::TaggedSymbol)
35
+ PRIVATE_LABEL = T.let(:private_label, WhopSDK::CardBrands::TaggedSymbol)
36
+ LOCAL_BRAND = T.let(:local_brand, WhopSDK::CardBrands::TaggedSymbol)
37
+ UATP = T.let(:uatp, WhopSDK::CardBrands::TaggedSymbol)
38
+ WEXCARD = T.let(:wexcard, WhopSDK::CardBrands::TaggedSymbol)
39
+ UZCARD = T.let(:uzcard, WhopSDK::CardBrands::TaggedSymbol)
40
+ MEEZA = T.let(:meeza, WhopSDK::CardBrands::TaggedSymbol)
41
+ HRG_STORE_CARD = T.let(:hrg_store_card, WhopSDK::CardBrands::TaggedSymbol)
42
+ GIROCARD = T.let(:girocard, WhopSDK::CardBrands::TaggedSymbol)
43
+ FUEL_CARD = T.let(:fuel_card, WhopSDK::CardBrands::TaggedSymbol)
44
+ DANKORT = T.let(:dankort, WhopSDK::CardBrands::TaggedSymbol)
45
+ CARNET = T.let(:carnet, WhopSDK::CardBrands::TaggedSymbol)
29
46
  UNKNOWN = T.let(:unknown, WhopSDK::CardBrands::TaggedSymbol)
30
47
 
31
48
  sig { override.returns(T::Array[WhopSDK::CardBrands::TaggedSymbol]) }
@@ -66,6 +66,10 @@ module WhopSDK
66
66
  sig { returns(T.nilable(String)) }
67
67
  attr_accessor :redirect_url
68
68
 
69
+ # The URL of the page where the checkout is being initiated from.
70
+ sig { returns(T.nilable(String)) }
71
+ attr_accessor :source_url
72
+
69
73
  # The ID of the plan to use for the checkout configuration
70
74
  sig { returns(String) }
71
75
  attr_accessor :plan_id
@@ -88,6 +92,7 @@ module WhopSDK
88
92
  WhopSDK::CheckoutConfigurationCreateParams::PaymentMethodConfiguration::OrHash
89
93
  ),
90
94
  redirect_url: T.nilable(String),
95
+ source_url: T.nilable(String),
91
96
  mode: Symbol,
92
97
  request_options: WhopSDK::RequestOptions::OrHash
93
98
  ).returns(T.attached_class)
@@ -112,6 +117,8 @@ module WhopSDK
112
117
  payment_method_configuration: nil,
113
118
  # The URL to redirect the user to after the checkout configuration is created
114
119
  redirect_url: nil,
120
+ # The URL of the page where the checkout is being initiated from.
121
+ source_url: nil,
115
122
  mode: :setup,
116
123
  request_options: {}
117
124
  )
@@ -130,6 +137,7 @@ module WhopSDK
130
137
  WhopSDK::CheckoutConfigurationCreateParams::PaymentMethodConfiguration
131
138
  ),
132
139
  redirect_url: T.nilable(String),
140
+ source_url: T.nilable(String),
133
141
  plan_id: String,
134
142
  company_id: String,
135
143
  request_options: WhopSDK::RequestOptions
@@ -194,15 +202,20 @@ module WhopSDK
194
202
  # An image for the plan. This will be visible on the product page to customers.
195
203
  sig do
196
204
  returns(
197
- T.nilable(
198
- T.any(
199
- WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID,
200
- WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID
201
- )
202
- )
205
+ T.nilable(WhopSDK::CheckoutConfigurationCreateParams::Plan::Image)
203
206
  )
204
207
  end
205
- attr_accessor :image
208
+ attr_reader :image
209
+
210
+ sig do
211
+ params(
212
+ image:
213
+ T.nilable(
214
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::OrHash
215
+ )
216
+ ).void
217
+ end
218
+ attr_writer :image
206
219
 
207
220
  # An additional amount charged upon first purchase.
208
221
  sig { returns(T.nilable(Float)) }
@@ -277,6 +290,10 @@ module WhopSDK
277
290
  sig { returns(T.nilable(Integer)) }
278
291
  attr_accessor :split_pay_required_payments
279
292
 
293
+ # The number of units available for purchase. If not provided, stock is unlimited.
294
+ sig { returns(T.nilable(Integer)) }
295
+ attr_accessor :stock
296
+
280
297
  # The title of the plan. This will be visible on the product page to customers.
281
298
  sig { returns(T.nilable(String)) }
282
299
  attr_accessor :title
@@ -307,10 +324,7 @@ module WhopSDK
307
324
  force_create_new_plan: T.nilable(T::Boolean),
308
325
  image:
309
326
  T.nilable(
310
- T.any(
311
- WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID::OrHash,
312
- WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID::OrHash
313
- )
327
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::OrHash
314
328
  ),
315
329
  initial_price: T.nilable(Float),
316
330
  internal_notes: T.nilable(String),
@@ -328,6 +342,7 @@ module WhopSDK
328
342
  release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
329
343
  renewal_price: T.nilable(Float),
330
344
  split_pay_required_payments: T.nilable(Integer),
345
+ stock: T.nilable(Integer),
331
346
  title: T.nilable(String),
332
347
  trial_period_days: T.nilable(Integer),
333
348
  visibility: T.nilable(WhopSDK::Visibility::OrSymbol)
@@ -378,6 +393,8 @@ module WhopSDK
378
393
  renewal_price: nil,
379
394
  # The number of payments required before pausing the subscription.
380
395
  split_pay_required_payments: nil,
396
+ # The number of units available for purchase. If not provided, stock is unlimited.
397
+ stock: nil,
381
398
  # The title of the plan. This will be visible on the product page to customers.
382
399
  title: nil,
383
400
  # The number of free trial days added before a renewal plan.
@@ -405,10 +422,7 @@ module WhopSDK
405
422
  force_create_new_plan: T.nilable(T::Boolean),
406
423
  image:
407
424
  T.nilable(
408
- T.any(
409
- WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID,
410
- WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID
411
- )
425
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image
412
426
  ),
413
427
  initial_price: T.nilable(Float),
414
428
  internal_notes: T.nilable(String),
@@ -426,6 +440,7 @@ module WhopSDK
426
440
  release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
427
441
  renewal_price: T.nilable(Float),
428
442
  split_pay_required_payments: T.nilable(Integer),
443
+ stock: T.nilable(Integer),
429
444
  title: T.nilable(String),
430
445
  trial_period_days: T.nilable(Integer),
431
446
  visibility: T.nilable(WhopSDK::Visibility::OrSymbol)
@@ -510,86 +525,29 @@ module WhopSDK
510
525
  end
511
526
  end
512
527
 
513
- # An image for the plan. This will be visible on the product page to customers.
514
- module Image
515
- extend WhopSDK::Internal::Type::Union
516
-
517
- Variants =
528
+ class Image < WhopSDK::Internal::Type::BaseModel
529
+ OrHash =
518
530
  T.type_alias do
519
531
  T.any(
520
- WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID,
521
- WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID
532
+ WhopSDK::CheckoutConfigurationCreateParams::Plan::Image,
533
+ WhopSDK::Internal::AnyHash
522
534
  )
523
535
  end
524
536
 
525
- class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
526
- OrHash =
527
- T.type_alias do
528
- T.any(
529
- WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID,
530
- WhopSDK::Internal::AnyHash
531
- )
532
- end
533
-
534
- # This ID should be used the first time you upload an attachment. It is the ID of
535
- # the direct upload that was created when uploading the file to S3 via the
536
- # mediaDirectUpload mutation.
537
- sig { returns(String) }
538
- attr_accessor :direct_upload_id
539
-
540
- # Input for an attachment
541
- sig { params(direct_upload_id: String).returns(T.attached_class) }
542
- def self.new(
543
- # This ID should be used the first time you upload an attachment. It is the ID of
544
- # the direct upload that was created when uploading the file to S3 via the
545
- # mediaDirectUpload mutation.
546
- direct_upload_id:
547
- )
548
- end
549
-
550
- sig { override.returns({ direct_upload_id: String }) }
551
- def to_hash
552
- end
553
- end
554
-
555
- class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
556
- OrHash =
557
- T.type_alias do
558
- T.any(
559
- WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID,
560
- WhopSDK::Internal::AnyHash
561
- )
562
- end
563
-
564
- # The ID of an existing attachment object. Use this when updating a resource and
565
- # keeping a subset of the attachments. Don't use this unless you know what you're
566
- # doing.
567
- sig { returns(String) }
568
- attr_accessor :id
569
-
570
- # Input for an attachment
571
- sig { params(id: String).returns(T.attached_class) }
572
- def self.new(
573
- # The ID of an existing attachment object. Use this when updating a resource and
574
- # keeping a subset of the attachments. Don't use this unless you know what you're
575
- # doing.
576
- id:
577
- )
578
- end
537
+ # The ID of an existing file object.
538
+ sig { returns(String) }
539
+ attr_accessor :id
579
540
 
580
- sig { override.returns({ id: String }) }
581
- def to_hash
582
- end
541
+ # An image for the plan. This will be visible on the product page to customers.
542
+ sig { params(id: String).returns(T.attached_class) }
543
+ def self.new(
544
+ # The ID of an existing file object.
545
+ id:
546
+ )
583
547
  end
584
548
 
585
- sig do
586
- override.returns(
587
- T::Array[
588
- WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::Variants
589
- ]
590
- )
591
- end
592
- def self.variants
549
+ sig { override.returns({ id: String }) }
550
+ def to_hash
593
551
  end
594
552
  end
595
553