whop_sdk 0.0.8 → 0.0.10

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 (181) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/client.rb +12 -0
  5. data/lib/whop_sdk/models/account_link_create_params.rb +62 -0
  6. data/lib/whop_sdk/models/account_link_create_response.rb +28 -0
  7. data/lib/whop_sdk/models/app_build_create_params.rb +9 -1
  8. data/lib/whop_sdk/models/app_build_list_params.rb +17 -1
  9. data/lib/whop_sdk/models/app_list_params.rb +1 -0
  10. data/lib/whop_sdk/models/authorized_user_list_params.rb +17 -1
  11. data/lib/whop_sdk/models/checkout_configuration_list_params.rb +17 -1
  12. data/lib/whop_sdk/models/company_list_params.rb +17 -1
  13. data/lib/whop_sdk/models/dispute_list_params.rb +17 -1
  14. data/lib/whop_sdk/models/entry_list_params.rb +17 -1
  15. data/lib/whop_sdk/models/experience_list_params.rb +17 -1
  16. data/lib/whop_sdk/models/invoice_list_params.rb +17 -1
  17. data/lib/whop_sdk/models/payment.rb +90 -1
  18. data/lib/whop_sdk/models/payment_create_params.rb +307 -0
  19. data/lib/whop_sdk/models/payment_list_response.rb +90 -1
  20. data/lib/whop_sdk/models/payment_method_types.rb +1 -0
  21. data/lib/whop_sdk/models/payment_token_list_params.rb +78 -0
  22. data/lib/whop_sdk/models/payment_token_list_response.rb +86 -0
  23. data/lib/whop_sdk/models/payment_token_retrieve_params.rb +22 -0
  24. data/lib/whop_sdk/models/payment_token_retrieve_response.rb +86 -0
  25. data/lib/whop_sdk/models/plan_create_params.rb +3 -21
  26. data/lib/whop_sdk/models/plan_list_params.rb +17 -1
  27. data/lib/whop_sdk/models/product_list_params.rb +17 -1
  28. data/lib/whop_sdk/models/product_update_params.rb +1 -61
  29. data/lib/whop_sdk/models/promo_code_list_params.rb +17 -1
  30. data/lib/whop_sdk/models/refund_list_params.rb +17 -1
  31. data/lib/whop_sdk/models/review_list_params.rb +17 -1
  32. data/lib/whop_sdk/models/setup_intent.rb +253 -0
  33. data/lib/whop_sdk/models/setup_intent_canceled_webhook_event.rb +52 -0
  34. data/lib/whop_sdk/models/setup_intent_list_params.rb +78 -0
  35. data/lib/whop_sdk/models/setup_intent_list_response.rb +255 -0
  36. data/lib/whop_sdk/models/setup_intent_requires_action_webhook_event.rb +52 -0
  37. data/lib/whop_sdk/models/setup_intent_retrieve_params.rb +14 -0
  38. data/lib/whop_sdk/models/setup_intent_status.rb +18 -0
  39. data/lib/whop_sdk/models/setup_intent_succeeded_webhook_event.rb +52 -0
  40. data/lib/whop_sdk/models/transfer_list_params.rb +17 -1
  41. data/lib/whop_sdk/models/unwrap_webhook_event.rb +7 -1
  42. data/lib/whop_sdk/models.rb +22 -0
  43. data/lib/whop_sdk/resources/account_links.rb +47 -0
  44. data/lib/whop_sdk/resources/app_builds.rb +8 -2
  45. data/lib/whop_sdk/resources/authorized_users.rb +5 -1
  46. data/lib/whop_sdk/resources/checkout_configurations.rb +5 -1
  47. data/lib/whop_sdk/resources/companies.rb +5 -1
  48. data/lib/whop_sdk/resources/disputes.rb +5 -1
  49. data/lib/whop_sdk/resources/entries.rb +5 -1
  50. data/lib/whop_sdk/resources/experiences.rb +5 -1
  51. data/lib/whop_sdk/resources/invoices.rb +5 -1
  52. data/lib/whop_sdk/resources/payment_tokens.rb +83 -0
  53. data/lib/whop_sdk/resources/payments.rb +48 -0
  54. data/lib/whop_sdk/resources/plans.rb +7 -7
  55. data/lib/whop_sdk/resources/products.rb +6 -4
  56. data/lib/whop_sdk/resources/promo_codes.rb +5 -1
  57. data/lib/whop_sdk/resources/refunds.rb +5 -1
  58. data/lib/whop_sdk/resources/reviews.rb +5 -1
  59. data/lib/whop_sdk/resources/setup_intents.rb +83 -0
  60. data/lib/whop_sdk/resources/transfers.rb +5 -1
  61. data/lib/whop_sdk/resources/webhooks.rb +1 -1
  62. data/lib/whop_sdk/version.rb +1 -1
  63. data/lib/whop_sdk.rb +19 -0
  64. data/manifest.yaml +1 -0
  65. data/rbi/whop_sdk/client.rbi +9 -0
  66. data/rbi/whop_sdk/models/account_link_create_params.rbi +101 -0
  67. data/rbi/whop_sdk/models/account_link_create_response.rbi +38 -0
  68. data/rbi/whop_sdk/models/app_build_create_params.rbi +8 -0
  69. data/rbi/whop_sdk/models/app_build_list_params.rbi +16 -0
  70. data/rbi/whop_sdk/models/app_list_params.rbi +5 -0
  71. data/rbi/whop_sdk/models/authorized_user_list_params.rbi +16 -0
  72. data/rbi/whop_sdk/models/checkout_configuration_list_params.rbi +16 -0
  73. data/rbi/whop_sdk/models/company_list_params.rbi +16 -0
  74. data/rbi/whop_sdk/models/dispute_list_params.rbi +16 -0
  75. data/rbi/whop_sdk/models/entry_list_params.rbi +16 -0
  76. data/rbi/whop_sdk/models/experience_list_params.rbi +16 -0
  77. data/rbi/whop_sdk/models/invoice_list_params.rbi +16 -0
  78. data/rbi/whop_sdk/models/payment.rbi +142 -0
  79. data/rbi/whop_sdk/models/payment_create_params.rbi +384 -0
  80. data/rbi/whop_sdk/models/payment_list_response.rbi +167 -0
  81. data/rbi/whop_sdk/models/payment_method_types.rbi +1 -0
  82. data/rbi/whop_sdk/models/payment_token_list_params.rbi +99 -0
  83. data/rbi/whop_sdk/models/payment_token_list_response.rbi +139 -0
  84. data/rbi/whop_sdk/models/payment_token_retrieve_params.rbi +40 -0
  85. data/rbi/whop_sdk/models/payment_token_retrieve_response.rbi +144 -0
  86. data/rbi/whop_sdk/models/plan_create_params.rbi +2 -22
  87. data/rbi/whop_sdk/models/plan_list_params.rbi +16 -0
  88. data/rbi/whop_sdk/models/product_list_params.rbi +16 -0
  89. data/rbi/whop_sdk/models/product_update_params.rbi +0 -110
  90. data/rbi/whop_sdk/models/promo_code_list_params.rbi +16 -0
  91. data/rbi/whop_sdk/models/refund_list_params.rbi +16 -0
  92. data/rbi/whop_sdk/models/review_list_params.rbi +16 -0
  93. data/rbi/whop_sdk/models/setup_intent.rbi +412 -0
  94. data/rbi/whop_sdk/models/setup_intent_canceled_webhook_event.rbi +77 -0
  95. data/rbi/whop_sdk/models/setup_intent_list_params.rbi +99 -0
  96. data/rbi/whop_sdk/models/setup_intent_list_response.rbi +492 -0
  97. data/rbi/whop_sdk/models/setup_intent_requires_action_webhook_event.rbi +77 -0
  98. data/rbi/whop_sdk/models/setup_intent_retrieve_params.rbi +27 -0
  99. data/rbi/whop_sdk/models/setup_intent_status.rbi +25 -0
  100. data/rbi/whop_sdk/models/setup_intent_succeeded_webhook_event.rbi +77 -0
  101. data/rbi/whop_sdk/models/transfer_list_params.rbi +16 -0
  102. data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +3 -0
  103. data/rbi/whop_sdk/models.rbi +25 -0
  104. data/rbi/whop_sdk/resources/account_links.rbi +39 -0
  105. data/rbi/whop_sdk/resources/app_builds.rbi +9 -0
  106. data/rbi/whop_sdk/resources/authorized_users.rbi +6 -0
  107. data/rbi/whop_sdk/resources/checkout_configurations.rbi +6 -0
  108. data/rbi/whop_sdk/resources/companies.rbi +6 -0
  109. data/rbi/whop_sdk/resources/disputes.rbi +6 -0
  110. data/rbi/whop_sdk/resources/entries.rbi +6 -0
  111. data/rbi/whop_sdk/resources/experiences.rbi +6 -0
  112. data/rbi/whop_sdk/resources/invoices.rbi +6 -0
  113. data/rbi/whop_sdk/resources/payment_tokens.rbi +76 -0
  114. data/rbi/whop_sdk/resources/payments.rbi +42 -0
  115. data/rbi/whop_sdk/resources/plans.rbi +7 -9
  116. data/rbi/whop_sdk/resources/products.rbi +6 -9
  117. data/rbi/whop_sdk/resources/promo_codes.rbi +6 -0
  118. data/rbi/whop_sdk/resources/refunds.rbi +6 -0
  119. data/rbi/whop_sdk/resources/reviews.rbi +6 -0
  120. data/rbi/whop_sdk/resources/setup_intents.rbi +77 -0
  121. data/rbi/whop_sdk/resources/transfers.rbi +6 -0
  122. data/rbi/whop_sdk/resources/webhooks.rbi +3 -0
  123. data/sig/whop_sdk/client.rbs +6 -0
  124. data/sig/whop_sdk/models/account_link_create_params.rbs +52 -0
  125. data/sig/whop_sdk/models/account_link_create_response.rbs +15 -0
  126. data/sig/whop_sdk/models/app_build_create_params.rbs +5 -0
  127. data/sig/whop_sdk/models/app_build_list_params.rbs +10 -0
  128. data/sig/whop_sdk/models/app_list_params.rbs +2 -0
  129. data/sig/whop_sdk/models/authorized_user_list_params.rbs +10 -0
  130. data/sig/whop_sdk/models/checkout_configuration_list_params.rbs +10 -0
  131. data/sig/whop_sdk/models/company_list_params.rbs +10 -0
  132. data/sig/whop_sdk/models/dispute_list_params.rbs +10 -0
  133. data/sig/whop_sdk/models/entry_list_params.rbs +10 -0
  134. data/sig/whop_sdk/models/experience_list_params.rbs +10 -0
  135. data/sig/whop_sdk/models/invoice_list_params.rbs +10 -0
  136. data/sig/whop_sdk/models/payment.rbs +69 -0
  137. data/sig/whop_sdk/models/payment_create_params.rbs +210 -0
  138. data/sig/whop_sdk/models/payment_list_response.rbs +69 -0
  139. data/sig/whop_sdk/models/payment_method_types.rbs +2 -0
  140. data/sig/whop_sdk/models/payment_token_list_params.rbs +61 -0
  141. data/sig/whop_sdk/models/payment_token_list_response.rbs +67 -0
  142. data/sig/whop_sdk/models/payment_token_retrieve_params.rbs +23 -0
  143. data/sig/whop_sdk/models/payment_token_retrieve_response.rbs +67 -0
  144. data/sig/whop_sdk/models/plan_create_params.rbs +0 -10
  145. data/sig/whop_sdk/models/plan_list_params.rbs +10 -0
  146. data/sig/whop_sdk/models/product_list_params.rbs +10 -0
  147. data/sig/whop_sdk/models/product_update_params.rbs +0 -36
  148. data/sig/whop_sdk/models/promo_code_list_params.rbs +10 -0
  149. data/sig/whop_sdk/models/refund_list_params.rbs +10 -0
  150. data/sig/whop_sdk/models/review_list_params.rbs +10 -0
  151. data/sig/whop_sdk/models/setup_intent.rbs +189 -0
  152. data/sig/whop_sdk/models/setup_intent_canceled_webhook_event.rbs +40 -0
  153. data/sig/whop_sdk/models/setup_intent_list_params.rbs +61 -0
  154. data/sig/whop_sdk/models/setup_intent_list_response.rbs +193 -0
  155. data/sig/whop_sdk/models/setup_intent_requires_action_webhook_event.rbs +40 -0
  156. data/sig/whop_sdk/models/setup_intent_retrieve_params.rbs +15 -0
  157. data/sig/whop_sdk/models/setup_intent_status.rbs +17 -0
  158. data/sig/whop_sdk/models/setup_intent_succeeded_webhook_event.rbs +40 -0
  159. data/sig/whop_sdk/models/transfer_list_params.rbs +10 -0
  160. data/sig/whop_sdk/models/unwrap_webhook_event.rbs +3 -0
  161. data/sig/whop_sdk/models.rbs +22 -0
  162. data/sig/whop_sdk/resources/account_links.rbs +15 -0
  163. data/sig/whop_sdk/resources/app_builds.rbs +3 -0
  164. data/sig/whop_sdk/resources/authorized_users.rbs +2 -0
  165. data/sig/whop_sdk/resources/checkout_configurations.rbs +2 -0
  166. data/sig/whop_sdk/resources/companies.rbs +2 -0
  167. data/sig/whop_sdk/resources/disputes.rbs +2 -0
  168. data/sig/whop_sdk/resources/entries.rbs +2 -0
  169. data/sig/whop_sdk/resources/experiences.rbs +2 -0
  170. data/sig/whop_sdk/resources/invoices.rbs +2 -0
  171. data/sig/whop_sdk/resources/payment_tokens.rbs +25 -0
  172. data/sig/whop_sdk/resources/payments.rbs +9 -0
  173. data/sig/whop_sdk/resources/plans.rbs +2 -2
  174. data/sig/whop_sdk/resources/products.rbs +2 -1
  175. data/sig/whop_sdk/resources/promo_codes.rbs +2 -0
  176. data/sig/whop_sdk/resources/refunds.rbs +2 -0
  177. data/sig/whop_sdk/resources/reviews.rbs +2 -0
  178. data/sig/whop_sdk/resources/setup_intents.rbs +24 -0
  179. data/sig/whop_sdk/resources/transfers.rbs +2 -0
  180. data/sig/whop_sdk/resources/webhooks.rbs +3 -0
  181. metadata +56 -2
@@ -19,6 +19,14 @@ module WhopSDK
19
19
  sig { returns(T.nilable(String)) }
20
20
  attr_accessor :before
21
21
 
22
+ # The minimum creation date to filter by
23
+ sig { returns(T.nilable(Time)) }
24
+ attr_accessor :created_after
25
+
26
+ # The maximum creation date to filter by
27
+ sig { returns(T.nilable(Time)) }
28
+ attr_accessor :created_before
29
+
22
30
  # Filter transfers to only those that were sent to this destination account.
23
31
  # (user_xxx, biz_xxx, ldgr_xxx)
24
32
  sig { returns(T.nilable(String)) }
@@ -49,6 +57,8 @@ module WhopSDK
49
57
  params(
50
58
  after: T.nilable(String),
51
59
  before: T.nilable(String),
60
+ created_after: T.nilable(Time),
61
+ created_before: T.nilable(Time),
52
62
  destination_id: T.nilable(String),
53
63
  direction: T.nilable(WhopSDK::Direction::OrSymbol),
54
64
  first: T.nilable(Integer),
@@ -63,6 +73,10 @@ module WhopSDK
63
73
  after: nil,
64
74
  # Returns the elements in the list that come before the specified cursor.
65
75
  before: nil,
76
+ # The minimum creation date to filter by
77
+ created_after: nil,
78
+ # The maximum creation date to filter by
79
+ created_before: nil,
66
80
  # Filter transfers to only those that were sent to this destination account.
67
81
  # (user_xxx, biz_xxx, ldgr_xxx)
68
82
  destination_id: nil,
@@ -86,6 +100,8 @@ module WhopSDK
86
100
  {
87
101
  after: T.nilable(String),
88
102
  before: T.nilable(String),
103
+ created_after: T.nilable(Time),
104
+ created_before: T.nilable(Time),
89
105
  destination_id: T.nilable(String),
90
106
  direction: T.nilable(WhopSDK::Direction::OrSymbol),
91
107
  first: T.nilable(Integer),
@@ -18,6 +18,9 @@ module WhopSDK
18
18
  WhopSDK::EntryApprovedWebhookEvent,
19
19
  WhopSDK::EntryDeniedWebhookEvent,
20
20
  WhopSDK::EntryDeletedWebhookEvent,
21
+ WhopSDK::SetupIntentRequiresActionWebhookEvent,
22
+ WhopSDK::SetupIntentSucceededWebhookEvent,
23
+ WhopSDK::SetupIntentCanceledWebhookEvent,
21
24
  WhopSDK::CourseLessonInteractionCompletedWebhookEvent,
22
25
  WhopSDK::PaymentSucceededWebhookEvent,
23
26
  WhopSDK::PaymentFailedWebhookEvent,
@@ -7,6 +7,8 @@ module WhopSDK
7
7
 
8
8
  AccessTokenCreateParams = WhopSDK::Models::AccessTokenCreateParams
9
9
 
10
+ AccountLinkCreateParams = WhopSDK::Models::AccountLinkCreateParams
11
+
10
12
  App = WhopSDK::Models::App
11
13
 
12
14
  AppBuild = WhopSDK::Models::AppBuild
@@ -314,6 +316,8 @@ module WhopSDK
314
316
 
315
317
  Payment = WhopSDK::Models::Payment
316
318
 
319
+ PaymentCreateParams = WhopSDK::Models::PaymentCreateParams
320
+
317
321
  PaymentFailedWebhookEvent = WhopSDK::Models::PaymentFailedWebhookEvent
318
322
 
319
323
  PaymentListParams = WhopSDK::Models::PaymentListParams
@@ -332,6 +336,10 @@ module WhopSDK
332
336
 
333
337
  PaymentSucceededWebhookEvent = WhopSDK::Models::PaymentSucceededWebhookEvent
334
338
 
339
+ PaymentTokenListParams = WhopSDK::Models::PaymentTokenListParams
340
+
341
+ PaymentTokenRetrieveParams = WhopSDK::Models::PaymentTokenRetrieveParams
342
+
335
343
  PaymentVoidParams = WhopSDK::Models::PaymentVoidParams
336
344
 
337
345
  Plan = WhopSDK::Models::Plan
@@ -410,6 +418,23 @@ module WhopSDK
410
418
 
411
419
  ReviewStatus = WhopSDK::Models::ReviewStatus
412
420
 
421
+ SetupIntent = WhopSDK::Models::SetupIntent
422
+
423
+ SetupIntentCanceledWebhookEvent =
424
+ WhopSDK::Models::SetupIntentCanceledWebhookEvent
425
+
426
+ SetupIntentListParams = WhopSDK::Models::SetupIntentListParams
427
+
428
+ SetupIntentRequiresActionWebhookEvent =
429
+ WhopSDK::Models::SetupIntentRequiresActionWebhookEvent
430
+
431
+ SetupIntentRetrieveParams = WhopSDK::Models::SetupIntentRetrieveParams
432
+
433
+ SetupIntentStatus = WhopSDK::Models::SetupIntentStatus
434
+
435
+ SetupIntentSucceededWebhookEvent =
436
+ WhopSDK::Models::SetupIntentSucceededWebhookEvent
437
+
413
438
  Shipment = WhopSDK::Models::Shipment
414
439
 
415
440
  ShipmentCarrier = WhopSDK::Models::ShipmentCarrier
@@ -0,0 +1,39 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Resources
5
+ class AccountLinks
6
+ # Generates a url that a user can be directed to in order to access their
7
+ # sub-merchant account. For example, they can visit the hosted payouts portal or
8
+ # the hosted KYC onboarding flow.
9
+ sig do
10
+ params(
11
+ company_id: String,
12
+ refresh_url: String,
13
+ return_url: String,
14
+ use_case: WhopSDK::AccountLinkCreateParams::UseCase::OrSymbol,
15
+ request_options: WhopSDK::RequestOptions::OrHash
16
+ ).returns(WhopSDK::Models::AccountLinkCreateResponse)
17
+ end
18
+ def create(
19
+ # The ID of the Company to generate the url for. The company must be a
20
+ # sub-merchant of the API key's company.
21
+ company_id:,
22
+ # The URL to redirect to if the session expires and needs to be re-authenticated
23
+ # due to the token expiring.
24
+ refresh_url:,
25
+ # The URL to redirect to when the customer wants to return to your site.
26
+ return_url:,
27
+ # The use case for which the link will be used.
28
+ use_case:,
29
+ request_options: {}
30
+ )
31
+ end
32
+
33
+ # @api private
34
+ sig { params(client: WhopSDK::Client).returns(T.attached_class) }
35
+ def self.new(client:)
36
+ end
37
+ end
38
+ end
39
+ end
@@ -17,6 +17,7 @@ module WhopSDK
17
17
  ),
18
18
  checksum: String,
19
19
  platform: WhopSDK::AppBuildPlatforms::OrSymbol,
20
+ ai_prompt_id: T.nilable(String),
20
21
  app_id: T.nilable(String),
21
22
  supported_app_view_types:
22
23
  T.nilable(T::Array[WhopSDK::AppViewType::OrSymbol]),
@@ -34,6 +35,8 @@ module WhopSDK
34
35
  checksum:,
35
36
  # The platform of the app build (ios, android, web)
36
37
  platform:,
38
+ # The id of the ai prompt that created this build
39
+ ai_prompt_id: nil,
37
40
  # The ID of the app to create a build for. By default the current app from the api
38
41
  # key is used.
39
42
  app_id: nil,
@@ -72,6 +75,8 @@ module WhopSDK
72
75
  app_id: String,
73
76
  after: T.nilable(String),
74
77
  before: T.nilable(String),
78
+ created_after: T.nilable(Time),
79
+ created_before: T.nilable(Time),
75
80
  first: T.nilable(Integer),
76
81
  last: T.nilable(Integer),
77
82
  platform: T.nilable(WhopSDK::AppBuildPlatforms::OrSymbol),
@@ -88,6 +93,10 @@ module WhopSDK
88
93
  after: nil,
89
94
  # Returns the elements in the list that come before the specified cursor.
90
95
  before: nil,
96
+ # The minimum creation date to filter by
97
+ created_after: nil,
98
+ # The maximum creation date to filter by
99
+ created_before: nil,
91
100
  # Returns the first _n_ elements from the list.
92
101
  first: nil,
93
102
  # Returns the last _n_ elements from the list.
@@ -33,6 +33,8 @@ module WhopSDK
33
33
  company_id: String,
34
34
  after: T.nilable(String),
35
35
  before: T.nilable(String),
36
+ created_after: T.nilable(Time),
37
+ created_before: T.nilable(Time),
36
38
  first: T.nilable(Integer),
37
39
  last: T.nilable(Integer),
38
40
  role: T.nilable(WhopSDK::AuthorizedUserRoles::OrSymbol),
@@ -51,6 +53,10 @@ module WhopSDK
51
53
  after: nil,
52
54
  # Returns the elements in the list that come before the specified cursor.
53
55
  before: nil,
56
+ # The minimum creation date to filter by
57
+ created_after: nil,
58
+ # The maximum creation date to filter by
59
+ created_before: nil,
54
60
  # Returns the first _n_ elements from the list.
55
61
  first: nil,
56
62
  # Returns the last _n_ elements from the list.
@@ -79,6 +79,8 @@ module WhopSDK
79
79
  company_id: String,
80
80
  after: T.nilable(String),
81
81
  before: T.nilable(String),
82
+ created_after: T.nilable(Time),
83
+ created_before: T.nilable(Time),
82
84
  direction: T.nilable(WhopSDK::Direction::OrSymbol),
83
85
  first: T.nilable(Integer),
84
86
  last: T.nilable(Integer),
@@ -97,6 +99,10 @@ module WhopSDK
97
99
  after: nil,
98
100
  # Returns the elements in the list that come before the specified cursor.
99
101
  before: nil,
102
+ # The minimum creation date to filter by
103
+ created_after: nil,
104
+ # The maximum creation date to filter by
105
+ created_before: nil,
100
106
  # The direction of the sort.
101
107
  direction: nil,
102
108
  # Returns the first _n_ elements from the list.
@@ -59,6 +59,8 @@ module WhopSDK
59
59
  parent_company_id: String,
60
60
  after: T.nilable(String),
61
61
  before: T.nilable(String),
62
+ created_after: T.nilable(Time),
63
+ created_before: T.nilable(Time),
62
64
  direction: T.nilable(WhopSDK::Direction::OrSymbol),
63
65
  first: T.nilable(Integer),
64
66
  last: T.nilable(Integer),
@@ -74,6 +76,10 @@ module WhopSDK
74
76
  after: nil,
75
77
  # Returns the elements in the list that come before the specified cursor.
76
78
  before: nil,
79
+ # The minimum creation date to filter by
80
+ created_after: nil,
81
+ # The maximum creation date to filter by
82
+ created_before: nil,
77
83
  # The direction of the sort.
78
84
  direction: nil,
79
85
  # Returns the first _n_ elements from the list.
@@ -42,6 +42,8 @@ module WhopSDK
42
42
  company_id: String,
43
43
  after: T.nilable(String),
44
44
  before: T.nilable(String),
45
+ created_after: T.nilable(Time),
46
+ created_before: T.nilable(Time),
45
47
  direction: T.nilable(WhopSDK::Direction::OrSymbol),
46
48
  first: T.nilable(Integer),
47
49
  last: T.nilable(Integer),
@@ -57,6 +59,10 @@ module WhopSDK
57
59
  after: nil,
58
60
  # Returns the elements in the list that come before the specified cursor.
59
61
  before: nil,
62
+ # The minimum creation date to filter by
63
+ created_after: nil,
64
+ # The maximum creation date to filter by
65
+ created_before: nil,
60
66
  # The direction of the sort.
61
67
  direction: nil,
62
68
  # Returns the first _n_ elements from the list.
@@ -33,6 +33,8 @@ module WhopSDK
33
33
  company_id: String,
34
34
  after: T.nilable(String),
35
35
  before: T.nilable(String),
36
+ created_after: T.nilable(Time),
37
+ created_before: T.nilable(Time),
36
38
  direction: T.nilable(WhopSDK::Direction::OrSymbol),
37
39
  first: T.nilable(Integer),
38
40
  last: T.nilable(Integer),
@@ -52,6 +54,10 @@ module WhopSDK
52
54
  after: nil,
53
55
  # Returns the elements in the list that come before the specified cursor.
54
56
  before: nil,
57
+ # The minimum creation date to filter by
58
+ created_after: nil,
59
+ # The maximum creation date to filter by
60
+ created_before: nil,
55
61
  # The direction of the sort.
56
62
  direction: nil,
57
63
  # Returns the first _n_ elements from the list.
@@ -91,6 +91,8 @@ module WhopSDK
91
91
  after: T.nilable(String),
92
92
  app_id: T.nilable(String),
93
93
  before: T.nilable(String),
94
+ created_after: T.nilable(Time),
95
+ created_before: T.nilable(Time),
94
96
  first: T.nilable(Integer),
95
97
  last: T.nilable(Integer),
96
98
  product_id: T.nilable(String),
@@ -108,6 +110,10 @@ module WhopSDK
108
110
  app_id: nil,
109
111
  # Returns the elements in the list that come before the specified cursor.
110
112
  before: nil,
113
+ # The minimum creation date to filter by
114
+ created_after: nil,
115
+ # The maximum creation date to filter by
116
+ created_before: nil,
111
117
  # Returns the first _n_ elements from the list.
112
118
  first: nil,
113
119
  # Returns the last _n_ elements from the list.
@@ -93,6 +93,8 @@ module WhopSDK
93
93
  before: T.nilable(String),
94
94
  collection_methods:
95
95
  T.nilable(T::Array[WhopSDK::CollectionMethod::OrSymbol]),
96
+ created_after: T.nilable(Time),
97
+ created_before: T.nilable(Time),
96
98
  direction: T.nilable(WhopSDK::Direction::OrSymbol),
97
99
  first: T.nilable(Integer),
98
100
  last: T.nilable(Integer),
@@ -111,6 +113,10 @@ module WhopSDK
111
113
  before: nil,
112
114
  # Filter invoices by their collection method
113
115
  collection_methods: nil,
116
+ # The minimum creation date to filter by
117
+ created_after: nil,
118
+ # The maximum creation date to filter by
119
+ created_before: nil,
114
120
  # The direction of the sort.
115
121
  direction: nil,
116
122
  # Returns the first _n_ elements from the list.
@@ -0,0 +1,76 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Resources
5
+ class PaymentTokens
6
+ # Retrieves a PaymentToken by ID
7
+ #
8
+ # Required permissions:
9
+ #
10
+ # - `member:payment_methods:read`
11
+ sig do
12
+ params(
13
+ id: String,
14
+ member_id: String,
15
+ request_options: WhopSDK::RequestOptions::OrHash
16
+ ).returns(WhopSDK::Models::PaymentTokenRetrieveResponse)
17
+ end
18
+ def retrieve(
19
+ # The ID of the PaymentToken
20
+ id,
21
+ # The ID of the Member associated with the PaymentToken
22
+ member_id:,
23
+ request_options: {}
24
+ )
25
+ end
26
+
27
+ # Lists PaymentTokens
28
+ #
29
+ # Required permissions:
30
+ #
31
+ # - `member:payment_methods:read`
32
+ sig do
33
+ params(
34
+ member_id: String,
35
+ after: T.nilable(String),
36
+ before: T.nilable(String),
37
+ created_after: T.nilable(Time),
38
+ created_before: T.nilable(Time),
39
+ direction: T.nilable(WhopSDK::Direction::OrSymbol),
40
+ first: T.nilable(Integer),
41
+ last: T.nilable(Integer),
42
+ request_options: WhopSDK::RequestOptions::OrHash
43
+ ).returns(
44
+ WhopSDK::Internal::CursorPage[
45
+ WhopSDK::Models::PaymentTokenListResponse
46
+ ]
47
+ )
48
+ end
49
+ def list(
50
+ # The ID of the Member to list payment tokens for
51
+ member_id:,
52
+ # Returns the elements in the list that come after the specified cursor.
53
+ after: nil,
54
+ # Returns the elements in the list that come before the specified cursor.
55
+ before: nil,
56
+ # The minimum creation date to filter by
57
+ created_after: nil,
58
+ # The maximum creation date to filter by
59
+ created_before: nil,
60
+ # The direction of the sort.
61
+ direction: nil,
62
+ # Returns the first _n_ elements from the list.
63
+ first: nil,
64
+ # Returns the last _n_ elements from the list.
65
+ last: nil,
66
+ request_options: {}
67
+ )
68
+ end
69
+
70
+ # @api private
71
+ sig { params(client: WhopSDK::Client).returns(T.attached_class) }
72
+ def self.new(client:)
73
+ end
74
+ end
75
+ end
76
+ end
@@ -3,6 +3,48 @@
3
3
  module WhopSDK
4
4
  module Resources
5
5
  class Payments
6
+ # Creates a payment. This endpoint will respond with a payment object immediately,
7
+ # but the payment is processed asynchronously in the background. Use webhooks to
8
+ # be notified when the payment succeeds or fails.
9
+ #
10
+ # Required permissions:
11
+ #
12
+ # - `payment:charge`
13
+ # - `plan:create`
14
+ # - `access_pass:create`
15
+ # - `access_pass:update`
16
+ # - `plan:basic:read`
17
+ # - `access_pass:basic:read`
18
+ # - `member:email:read`
19
+ # - `member:basic:read`
20
+ # - `member:phone:read`
21
+ # - `promo_code:basic:read`
22
+ sig do
23
+ params(
24
+ company_id: String,
25
+ member_id: String,
26
+ payment_token_id: String,
27
+ plan: WhopSDK::PaymentCreateParams::Plan::OrHash,
28
+ plan_id: String,
29
+ request_options: WhopSDK::RequestOptions::OrHash
30
+ ).returns(WhopSDK::Payment)
31
+ end
32
+ def create(
33
+ # The ID of the company to create the payment for.
34
+ company_id:,
35
+ # The ID of the member to create the payment for.
36
+ member_id:,
37
+ # The ID of the payment token to use for the payment. It must be connected to the
38
+ # Member being charged.
39
+ payment_token_id:,
40
+ # Pass this object to create a new plan for this payment
41
+ plan:,
42
+ # An ID of an existing plan to use for the payment.
43
+ plan_id:,
44
+ request_options: {}
45
+ )
46
+ end
47
+
6
48
  # Retrieves a payment by ID
7
49
  #
8
50
  # Required permissions:
@@ -38,8 +38,6 @@ module WhopSDK
38
38
  release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
39
39
  renewal_price: T.nilable(Float),
40
40
  stock: T.nilable(Integer),
41
- strike_through_initial_price: T.nilable(Float),
42
- strike_through_renewal_price: T.nilable(Float),
43
41
  title: T.nilable(String),
44
42
  trial_period_days: T.nilable(Integer),
45
43
  unlimited_stock: T.nilable(T::Boolean),
@@ -60,7 +58,7 @@ module WhopSDK
60
58
  custom_fields: nil,
61
59
  # The description of the plan.
62
60
  description: nil,
63
- # The interval at which the plan charges (expiration plans).
61
+ # The interval at which the plan expires and revokes access (expiration plans).
64
62
  expiration_days: nil,
65
63
  # An image for the plan. This will be visible on the product page to customers.
66
64
  image: nil,
@@ -85,12 +83,6 @@ module WhopSDK
85
83
  renewal_price: nil,
86
84
  # The number of units available for purchase.
87
85
  stock: nil,
88
- # The price to display with a strikethrough for the initial price. Provided as a
89
- # number in dollars. Eg: 19.99 for $19.99
90
- strike_through_initial_price: nil,
91
- # The price to display with a strikethrough for the renewal price. Provided as a
92
- # number in dollars. Eg: 19.99 for $19.99
93
- strike_through_renewal_price: nil,
94
86
  # The title of the plan. This will be visible on the product page to customers.
95
87
  title: nil,
96
88
  # The number of free trial days added before a renewal plan.
@@ -222,6 +214,8 @@ module WhopSDK
222
214
  company_id: String,
223
215
  after: T.nilable(String),
224
216
  before: T.nilable(String),
217
+ created_after: T.nilable(Time),
218
+ created_before: T.nilable(Time),
225
219
  direction: T.nilable(WhopSDK::Direction::OrSymbol),
226
220
  first: T.nilable(Integer),
227
221
  last: T.nilable(Integer),
@@ -244,6 +238,10 @@ module WhopSDK
244
238
  after: nil,
245
239
  # Returns the elements in the list that come before the specified cursor.
246
240
  before: nil,
241
+ # The minimum creation date to filter by
242
+ created_after: nil,
243
+ # The maximum creation date to filter by
244
+ created_before: nil,
247
245
  # The direction of the sort.
248
246
  direction: nil,
249
247
  # Returns the first _n_ elements from the list.
@@ -117,13 +117,6 @@ module WhopSDK
117
117
  sig do
118
118
  params(
119
119
  id: String,
120
- banner_image:
121
- T.nilable(
122
- T.any(
123
- WhopSDK::ProductUpdateParams::BannerImage::AttachmentInputWithDirectUploadID::OrHash,
124
- WhopSDK::ProductUpdateParams::BannerImage::AttachmentInputWithID::OrHash
125
- )
126
- ),
127
120
  business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol),
128
121
  collect_shipping_address: T.nilable(T::Boolean),
129
122
  custom_cta: T.nilable(WhopSDK::CustomCta::OrSymbol),
@@ -151,8 +144,6 @@ module WhopSDK
151
144
  def update(
152
145
  # The ID (tag) of the product
153
146
  id,
154
- # A banner image for the product in png, jpeg format
155
- banner_image: nil,
156
147
  # The different business types a company can be.
157
148
  business_type: nil,
158
149
  # Whether or not to collect shipping information at checkout from the customer.
@@ -205,6 +196,8 @@ module WhopSDK
205
196
  company_id: String,
206
197
  after: T.nilable(String),
207
198
  before: T.nilable(String),
199
+ created_after: T.nilable(Time),
200
+ created_before: T.nilable(Time),
208
201
  direction: T.nilable(WhopSDK::Direction::OrSymbol),
209
202
  first: T.nilable(Integer),
210
203
  last: T.nilable(Integer),
@@ -222,6 +215,10 @@ module WhopSDK
222
215
  after: nil,
223
216
  # Returns the elements in the list that come before the specified cursor.
224
217
  before: nil,
218
+ # The minimum creation date to filter by
219
+ created_after: nil,
220
+ # The maximum creation date to filter by
221
+ created_before: nil,
225
222
  # The direction of the sort.
226
223
  direction: nil,
227
224
  # Returns the first _n_ elements from the list.
@@ -97,6 +97,8 @@ module WhopSDK
97
97
  company_id: String,
98
98
  after: T.nilable(String),
99
99
  before: T.nilable(String),
100
+ created_after: T.nilable(Time),
101
+ created_before: T.nilable(Time),
100
102
  first: T.nilable(Integer),
101
103
  last: T.nilable(Integer),
102
104
  plan_ids: T.nilable(T::Array[String]),
@@ -114,6 +116,10 @@ module WhopSDK
114
116
  after: nil,
115
117
  # Returns the elements in the list that come before the specified cursor.
116
118
  before: nil,
119
+ # The minimum creation date to filter by
120
+ created_after: nil,
121
+ # The maximum creation date to filter by
122
+ created_before: nil,
117
123
  # Returns the first _n_ elements from the list.
118
124
  first: nil,
119
125
  # Returns the last _n_ elements from the list.
@@ -34,6 +34,8 @@ module WhopSDK
34
34
  payment_id: String,
35
35
  after: T.nilable(String),
36
36
  before: T.nilable(String),
37
+ created_after: T.nilable(Time),
38
+ created_before: T.nilable(Time),
37
39
  direction: T.nilable(WhopSDK::Direction::OrSymbol),
38
40
  first: T.nilable(Integer),
39
41
  last: T.nilable(Integer),
@@ -49,6 +51,10 @@ module WhopSDK
49
51
  after: nil,
50
52
  # Returns the elements in the list that come before the specified cursor.
51
53
  before: nil,
54
+ # The minimum creation date to filter by
55
+ created_after: nil,
56
+ # The maximum creation date to filter by
57
+ created_before: nil,
52
58
  # The direction of the sort.
53
59
  direction: nil,
54
60
  # Returns the first _n_ elements from the list.
@@ -23,6 +23,8 @@ module WhopSDK
23
23
  product_id: String,
24
24
  after: T.nilable(String),
25
25
  before: T.nilable(String),
26
+ created_after: T.nilable(Time),
27
+ created_before: T.nilable(Time),
26
28
  first: T.nilable(Integer),
27
29
  last: T.nilable(Integer),
28
30
  max_stars: T.nilable(Integer),
@@ -39,6 +41,10 @@ module WhopSDK
39
41
  after: nil,
40
42
  # Returns the elements in the list that come before the specified cursor.
41
43
  before: nil,
44
+ # The minimum creation date to filter by
45
+ created_after: nil,
46
+ # The maximum creation date to filter by
47
+ created_before: nil,
42
48
  # Returns the first _n_ elements from the list.
43
49
  first: nil,
44
50
  # Returns the last _n_ elements from the list.
@@ -0,0 +1,77 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Resources
5
+ class SetupIntents
6
+ # Retrieves a Setup Intent by ID
7
+ #
8
+ # Required permissions:
9
+ #
10
+ # - `payment:setup_intent:read`
11
+ # - `member:basic:read`
12
+ # - `member:email:read`
13
+ sig do
14
+ params(
15
+ id: String,
16
+ request_options: WhopSDK::RequestOptions::OrHash
17
+ ).returns(WhopSDK::SetupIntent)
18
+ end
19
+ def retrieve(
20
+ # The ID of the Setup Intent
21
+ id,
22
+ request_options: {}
23
+ )
24
+ end
25
+
26
+ # Lists Setup Intents
27
+ #
28
+ # Required permissions:
29
+ #
30
+ # - `payment:setup_intent:read`
31
+ # - `member:basic:read`
32
+ # - `member:email:read`
33
+ sig do
34
+ params(
35
+ company_id: String,
36
+ after: T.nilable(String),
37
+ before: T.nilable(String),
38
+ created_after: T.nilable(Time),
39
+ created_before: T.nilable(Time),
40
+ direction: T.nilable(WhopSDK::Direction::OrSymbol),
41
+ first: T.nilable(Integer),
42
+ last: T.nilable(Integer),
43
+ request_options: WhopSDK::RequestOptions::OrHash
44
+ ).returns(
45
+ WhopSDK::Internal::CursorPage[
46
+ WhopSDK::Models::SetupIntentListResponse
47
+ ]
48
+ )
49
+ end
50
+ def list(
51
+ # The ID of the company to list setup intents for
52
+ company_id:,
53
+ # Returns the elements in the list that come after the specified cursor.
54
+ after: nil,
55
+ # Returns the elements in the list that come before the specified cursor.
56
+ before: nil,
57
+ # The minimum creation date to filter by
58
+ created_after: nil,
59
+ # The maximum creation date to filter by
60
+ created_before: nil,
61
+ # The direction of the sort.
62
+ direction: nil,
63
+ # Returns the first _n_ elements from the list.
64
+ first: nil,
65
+ # Returns the last _n_ elements from the list.
66
+ last: nil,
67
+ request_options: {}
68
+ )
69
+ end
70
+
71
+ # @api private
72
+ sig { params(client: WhopSDK::Client).returns(T.attached_class) }
73
+ def self.new(client:)
74
+ end
75
+ end
76
+ end
77
+ end