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
@@ -12,7 +12,7 @@ module WhopSDK
12
12
  #
13
13
  # - `developer:manage_builds`
14
14
  #
15
- # @overload create(attachment:, checksum:, platform:, app_id: nil, supported_app_view_types: nil, request_options: {})
15
+ # @overload create(attachment:, checksum:, platform:, ai_prompt_id: nil, app_id: nil, supported_app_view_types: nil, request_options: {})
16
16
  #
17
17
  # @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
18
18
  #
@@ -20,6 +20,8 @@ module WhopSDK
20
20
  #
21
21
  # @param platform [Symbol, WhopSDK::Models::AppBuildPlatforms] The platform of the app build (ios, android, web)
22
22
  #
23
+ # @param ai_prompt_id [String, nil] The id of the ai prompt that created this build
24
+ #
23
25
  # @param app_id [String, nil] The ID of the app to create a build for. By default the current app from the api
24
26
  #
25
27
  # @param supported_app_view_types [Array<Symbol, WhopSDK::Models::AppViewType>, nil] Supported app view types for the app build. A build can specify multiple view ty
@@ -70,7 +72,7 @@ module WhopSDK
70
72
  #
71
73
  # - `developer:manage_builds`
72
74
  #
73
- # @overload list(app_id:, after: nil, before: nil, first: nil, last: nil, platform: nil, status: nil, request_options: {})
75
+ # @overload list(app_id:, after: nil, before: nil, created_after: nil, created_before: nil, first: nil, last: nil, platform: nil, status: nil, request_options: {})
74
76
  #
75
77
  # @param app_id [String] The ID of the app to filter app builds by
76
78
  #
@@ -78,6 +80,10 @@ module WhopSDK
78
80
  #
79
81
  # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
80
82
  #
83
+ # @param created_after [Time, nil] The minimum creation date to filter by
84
+ #
85
+ # @param created_before [Time, nil] The maximum creation date to filter by
86
+ #
81
87
  # @param first [Integer, nil] Returns the first _n_ elements from the list.
82
88
  #
83
89
  # @param last [Integer, nil] Returns the last _n_ elements from the list.
@@ -35,7 +35,7 @@ module WhopSDK
35
35
  # - `company:authorized_user:read`
36
36
  # - `member:email:read`
37
37
  #
38
- # @overload list(company_id:, after: nil, before: nil, first: nil, last: nil, role: nil, user_id: nil, request_options: {})
38
+ # @overload list(company_id:, after: nil, before: nil, created_after: nil, created_before: nil, first: nil, last: nil, role: nil, user_id: nil, request_options: {})
39
39
  #
40
40
  # @param company_id [String] The ID of the company to list authorized users for
41
41
  #
@@ -43,6 +43,10 @@ module WhopSDK
43
43
  #
44
44
  # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
45
45
  #
46
+ # @param created_after [Time, nil] The minimum creation date to filter by
47
+ #
48
+ # @param created_before [Time, nil] The maximum creation date to filter by
49
+ #
46
50
  # @param first [Integer, nil] Returns the first _n_ elements from the list.
47
51
  #
48
52
  # @param last [Integer, nil] Returns the last _n_ elements from the list.
@@ -80,7 +80,7 @@ module WhopSDK
80
80
  #
81
81
  # - `checkout_configuration:basic:read`
82
82
  #
83
- # @overload list(company_id:, after: nil, before: nil, direction: nil, first: nil, last: nil, plan_id: nil, request_options: {})
83
+ # @overload list(company_id:, after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, plan_id: nil, request_options: {})
84
84
  #
85
85
  # @param company_id [String] The ID of the company to list checkout configurations for
86
86
  #
@@ -88,6 +88,10 @@ module WhopSDK
88
88
  #
89
89
  # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
90
90
  #
91
+ # @param created_after [Time, nil] The minimum creation date to filter by
92
+ #
93
+ # @param created_before [Time, nil] The maximum creation date to filter by
94
+ #
91
95
  # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort.
92
96
  #
93
97
  # @param first [Integer, nil] Returns the first _n_ elements from the list.
@@ -66,7 +66,7 @@ module WhopSDK
66
66
  #
67
67
  # - `company:basic:read`
68
68
  #
69
- # @overload list(parent_company_id:, after: nil, before: nil, direction: nil, first: nil, last: nil, request_options: {})
69
+ # @overload list(parent_company_id:, after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, request_options: {})
70
70
  #
71
71
  # @param parent_company_id [String] The ID of the parent company to list sub companies for
72
72
  #
@@ -74,6 +74,10 @@ module WhopSDK
74
74
  #
75
75
  # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
76
76
  #
77
+ # @param created_after [Time, nil] The minimum creation date to filter by
78
+ #
79
+ # @param created_before [Time, nil] The maximum creation date to filter by
80
+ #
77
81
  # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort.
78
82
  #
79
83
  # @param first [Integer, nil] Returns the first _n_ elements from the list.
@@ -44,7 +44,7 @@ module WhopSDK
44
44
  # - `company:basic:read`
45
45
  # - `payment:basic:read`
46
46
  #
47
- # @overload list(company_id:, after: nil, before: nil, direction: nil, first: nil, last: nil, request_options: {})
47
+ # @overload list(company_id:, after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, request_options: {})
48
48
  #
49
49
  # @param company_id [String] The ID of the company to list disputes for
50
50
  #
@@ -52,6 +52,10 @@ module WhopSDK
52
52
  #
53
53
  # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
54
54
  #
55
+ # @param created_after [Time, nil] The minimum creation date to filter by
56
+ #
57
+ # @param created_before [Time, nil] The maximum creation date to filter by
58
+ #
55
59
  # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort.
56
60
  #
57
61
  # @param first [Integer, nil] Returns the first _n_ elements from the list.
@@ -35,7 +35,7 @@ module WhopSDK
35
35
  # - `plan:waitlist:read`
36
36
  # - `member:email:read`
37
37
  #
38
- # @overload list(company_id:, after: nil, before: nil, direction: nil, first: nil, last: nil, order: nil, plan_ids: nil, product_ids: nil, statuses: nil, request_options: {})
38
+ # @overload list(company_id:, after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, order: nil, plan_ids: nil, product_ids: nil, statuses: nil, request_options: {})
39
39
  #
40
40
  # @param company_id [String] The ID of the company
41
41
  #
@@ -43,6 +43,10 @@ module WhopSDK
43
43
  #
44
44
  # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
45
45
  #
46
+ # @param created_after [Time, nil] The minimum creation date to filter by
47
+ #
48
+ # @param created_before [Time, nil] The maximum creation date to filter by
49
+ #
46
50
  # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort.
47
51
  #
48
52
  # @param first [Integer, nil] Returns the first _n_ elements from the list.
@@ -93,7 +93,7 @@ module WhopSDK
93
93
  #
94
94
  # - `experience:hidden_experience:read`
95
95
  #
96
- # @overload list(company_id:, after: nil, app_id: nil, before: nil, first: nil, last: nil, product_id: nil, request_options: {})
96
+ # @overload list(company_id:, after: nil, app_id: nil, before: nil, created_after: nil, created_before: nil, first: nil, last: nil, product_id: nil, request_options: {})
97
97
  #
98
98
  # @param company_id [String] The ID of the company to filter experiences by
99
99
  #
@@ -103,6 +103,10 @@ module WhopSDK
103
103
  #
104
104
  # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
105
105
  #
106
+ # @param created_after [Time, nil] The minimum creation date to filter by
107
+ #
108
+ # @param created_before [Time, nil] The maximum creation date to filter by
109
+ #
106
110
  # @param first [Integer, nil] Returns the first _n_ elements from the list.
107
111
  #
108
112
  # @param last [Integer, nil] Returns the last _n_ elements from the list.
@@ -85,7 +85,7 @@ module WhopSDK
85
85
  # - `invoice:basic:read`
86
86
  # - `plan:basic:read`
87
87
  #
88
- # @overload list(company_id:, after: nil, before: nil, collection_methods: nil, direction: nil, first: nil, last: nil, order: nil, product_ids: nil, statuses: nil, request_options: {})
88
+ # @overload list(company_id:, after: nil, before: nil, collection_methods: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, order: nil, product_ids: nil, statuses: nil, request_options: {})
89
89
  #
90
90
  # @param company_id [String] The ID of the company to list invoices for
91
91
  #
@@ -95,6 +95,10 @@ module WhopSDK
95
95
  #
96
96
  # @param collection_methods [Array<Symbol, WhopSDK::Models::CollectionMethod>, nil] Filter invoices by their collection method
97
97
  #
98
+ # @param created_after [Time, nil] The minimum creation date to filter by
99
+ #
100
+ # @param created_before [Time, nil] The maximum creation date to filter by
101
+ #
98
102
  # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort.
99
103
  #
100
104
  # @param first [Integer, nil] Returns the first _n_ elements from the list.
@@ -0,0 +1,83 @@
1
+ # frozen_string_literal: true
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
+ #
12
+ # @overload retrieve(id, member_id:, request_options: {})
13
+ #
14
+ # @param id [String] The ID of the PaymentToken
15
+ #
16
+ # @param member_id [String] The ID of the Member associated with the PaymentToken
17
+ #
18
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
19
+ #
20
+ # @return [WhopSDK::Models::PaymentTokenRetrieveResponse]
21
+ #
22
+ # @see WhopSDK::Models::PaymentTokenRetrieveParams
23
+ def retrieve(id, params)
24
+ parsed, options = WhopSDK::PaymentTokenRetrieveParams.dump_request(params)
25
+ @client.request(
26
+ method: :get,
27
+ path: ["payment_tokens/%1$s", id],
28
+ query: parsed,
29
+ model: WhopSDK::Models::PaymentTokenRetrieveResponse,
30
+ options: options
31
+ )
32
+ end
33
+
34
+ # Lists PaymentTokens
35
+ #
36
+ # Required permissions:
37
+ #
38
+ # - `member:payment_methods:read`
39
+ #
40
+ # @overload list(member_id:, after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, request_options: {})
41
+ #
42
+ # @param member_id [String] The ID of the Member to list payment tokens for
43
+ #
44
+ # @param after [String, nil] Returns the elements in the list that come after the specified cursor.
45
+ #
46
+ # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
47
+ #
48
+ # @param created_after [Time, nil] The minimum creation date to filter by
49
+ #
50
+ # @param created_before [Time, nil] The maximum creation date to filter by
51
+ #
52
+ # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort.
53
+ #
54
+ # @param first [Integer, nil] Returns the first _n_ elements from the list.
55
+ #
56
+ # @param last [Integer, nil] Returns the last _n_ elements from the list.
57
+ #
58
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
59
+ #
60
+ # @return [WhopSDK::Internal::CursorPage<WhopSDK::Models::PaymentTokenListResponse>]
61
+ #
62
+ # @see WhopSDK::Models::PaymentTokenListParams
63
+ def list(params)
64
+ parsed, options = WhopSDK::PaymentTokenListParams.dump_request(params)
65
+ @client.request(
66
+ method: :get,
67
+ path: "payment_tokens",
68
+ query: parsed,
69
+ page: WhopSDK::Internal::CursorPage,
70
+ model: WhopSDK::Models::PaymentTokenListResponse,
71
+ options: options
72
+ )
73
+ end
74
+
75
+ # @api private
76
+ #
77
+ # @param client [WhopSDK::Client]
78
+ def initialize(client:)
79
+ @client = client
80
+ end
81
+ end
82
+ end
83
+ end
@@ -3,6 +3,54 @@
3
3
  module WhopSDK
4
4
  module Resources
5
5
  class Payments
6
+ # Some parameter documentations has been truncated, see
7
+ # {WhopSDK::Models::PaymentCreateParams} for more details.
8
+ #
9
+ # Creates a payment. This endpoint will respond with a payment object immediately,
10
+ # but the payment is processed asynchronously in the background. Use webhooks to
11
+ # be notified when the payment succeeds or fails.
12
+ #
13
+ # Required permissions:
14
+ #
15
+ # - `payment:charge`
16
+ # - `plan:create`
17
+ # - `access_pass:create`
18
+ # - `access_pass:update`
19
+ # - `plan:basic:read`
20
+ # - `access_pass:basic:read`
21
+ # - `member:email:read`
22
+ # - `member:basic:read`
23
+ # - `member:phone:read`
24
+ # - `promo_code:basic:read`
25
+ #
26
+ # @overload create(company_id:, member_id:, payment_token_id:, plan:, plan_id:, request_options: {})
27
+ #
28
+ # @param company_id [String] The ID of the company to create the payment for.
29
+ #
30
+ # @param member_id [String] The ID of the member to create the payment for.
31
+ #
32
+ # @param payment_token_id [String] The ID of the payment token to use for the payment. It must be connected to the
33
+ #
34
+ # @param plan [WhopSDK::Models::PaymentCreateParams::Plan] Pass this object to create a new plan for this payment
35
+ #
36
+ # @param plan_id [String] An ID of an existing plan to use for the payment.
37
+ #
38
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
39
+ #
40
+ # @return [WhopSDK::Models::Payment]
41
+ #
42
+ # @see WhopSDK::Models::PaymentCreateParams
43
+ def create(params)
44
+ parsed, options = WhopSDK::PaymentCreateParams.dump_request(params)
45
+ @client.request(
46
+ method: :post,
47
+ path: "payments",
48
+ body: parsed,
49
+ model: WhopSDK::Payment,
50
+ options: options
51
+ )
52
+ end
53
+
6
54
  # Retrieves a payment by ID
7
55
  #
8
56
  # Required permissions:
@@ -14,7 +14,7 @@ module WhopSDK
14
14
  # - `access_pass:basic:read`
15
15
  # - `plan:basic:read`
16
16
  #
17
- # @overload create(company_id:, product_id:, billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, release_method: nil, renewal_price: nil, stock: nil, strike_through_initial_price: nil, strike_through_renewal_price: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {})
17
+ # @overload create(company_id:, product_id:, billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, release_method: nil, renewal_price: nil, stock: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {})
18
18
  #
19
19
  # @param company_id [String] The company the plan should be created for.
20
20
  #
@@ -28,7 +28,7 @@ module WhopSDK
28
28
  #
29
29
  # @param description [String, nil] The description of the plan.
30
30
  #
31
- # @param expiration_days [Integer, nil] The interval at which the plan charges (expiration plans).
31
+ # @param expiration_days [Integer, nil] The interval at which the plan expires and revokes access (expiration plans).
32
32
  #
33
33
  # @param image [WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithID, nil] An image for the plan. This will be visible on the product page to customers.
34
34
  #
@@ -48,10 +48,6 @@ module WhopSDK
48
48
  #
49
49
  # @param stock [Integer, nil] The number of units available for purchase.
50
50
  #
51
- # @param strike_through_initial_price [Float, nil] The price to display with a strikethrough for the initial price. Provided as a n
52
- #
53
- # @param strike_through_renewal_price [Float, nil] The price to display with a strikethrough for the renewal price. Provided as a n
54
- #
55
51
  # @param title [String, nil] The title of the plan. This will be visible on the product page to customers.
56
52
  #
57
53
  # @param trial_period_days [Integer, nil] The number of free trial days added before a renewal plan.
@@ -169,7 +165,7 @@ module WhopSDK
169
165
  #
170
166
  # - `plan:basic:read`
171
167
  #
172
- # @overload list(company_id:, after: nil, before: nil, direction: nil, first: nil, last: nil, order: nil, plan_types: nil, product_ids: nil, release_methods: nil, visibilities: nil, request_options: {})
168
+ # @overload list(company_id:, after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, order: nil, plan_types: nil, product_ids: nil, release_methods: nil, visibilities: nil, request_options: {})
173
169
  #
174
170
  # @param company_id [String] The ID of the company
175
171
  #
@@ -177,6 +173,10 @@ module WhopSDK
177
173
  #
178
174
  # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
179
175
  #
176
+ # @param created_after [Time, nil] The minimum creation date to filter by
177
+ #
178
+ # @param created_before [Time, nil] The maximum creation date to filter by
179
+ #
180
180
  # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort.
181
181
  #
182
182
  # @param first [Integer, nil] Returns the first _n_ elements from the list.
@@ -108,12 +108,10 @@ module WhopSDK
108
108
  # - `access_pass:update`
109
109
  # - `access_pass:basic:read`
110
110
  #
111
- # @overload update(id, banner_image: nil, business_type: nil, collect_shipping_address: nil, custom_cta: nil, custom_cta_url: nil, custom_statement_descriptor: nil, description: nil, global_affiliate_percentage: nil, global_affiliate_status: nil, headline: nil, industry_type: nil, member_affiliate_percentage: nil, member_affiliate_status: nil, product_tax_code_id: nil, redirect_purchase_url: nil, route: nil, store_page_config: nil, title: nil, visibility: nil, request_options: {})
111
+ # @overload update(id, business_type: nil, collect_shipping_address: nil, custom_cta: nil, custom_cta_url: nil, custom_statement_descriptor: nil, description: nil, global_affiliate_percentage: nil, global_affiliate_status: nil, headline: nil, industry_type: nil, member_affiliate_percentage: nil, member_affiliate_status: nil, product_tax_code_id: nil, redirect_purchase_url: nil, route: nil, store_page_config: nil, title: nil, visibility: nil, request_options: {})
112
112
  #
113
113
  # @param id [String] The ID (tag) of the product
114
114
  #
115
- # @param banner_image [WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithDirectUploadID, WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithID, nil] A banner image for the product in png, jpeg format
116
- #
117
115
  # @param business_type [Symbol, WhopSDK::Models::BusinessTypes, nil] The different business types a company can be.
118
116
  #
119
117
  # @param collect_shipping_address [Boolean, nil] Whether or not to collect shipping information at checkout from the customer.
@@ -173,7 +171,7 @@ module WhopSDK
173
171
  #
174
172
  # - `access_pass:basic:read`
175
173
  #
176
- # @overload list(company_id:, after: nil, before: nil, direction: nil, first: nil, last: nil, order: nil, product_types: nil, visibilities: nil, request_options: {})
174
+ # @overload list(company_id:, after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, order: nil, product_types: nil, visibilities: nil, request_options: {})
177
175
  #
178
176
  # @param company_id [String] The ID of the company to filter products by
179
177
  #
@@ -181,6 +179,10 @@ module WhopSDK
181
179
  #
182
180
  # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
183
181
  #
182
+ # @param created_after [Time, nil] The minimum creation date to filter by
183
+ #
184
+ # @param created_before [Time, nil] The maximum creation date to filter by
185
+ #
184
186
  # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort.
185
187
  #
186
188
  # @param first [Integer, nil] Returns the first _n_ elements from the list.
@@ -93,7 +93,7 @@ module WhopSDK
93
93
  # - `promo_code:basic:read`
94
94
  # - `access_pass:basic:read`
95
95
  #
96
- # @overload list(company_id:, after: nil, before: nil, first: nil, last: nil, plan_ids: nil, product_ids: nil, status: nil, request_options: {})
96
+ # @overload list(company_id:, after: nil, before: nil, created_after: nil, created_before: nil, first: nil, last: nil, plan_ids: nil, product_ids: nil, status: nil, request_options: {})
97
97
  #
98
98
  # @param company_id [String] The ID of the company to list promo codes for
99
99
  #
@@ -101,6 +101,10 @@ module WhopSDK
101
101
  #
102
102
  # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
103
103
  #
104
+ # @param created_after [Time, nil] The minimum creation date to filter by
105
+ #
106
+ # @param created_before [Time, nil] The maximum creation date to filter by
107
+ #
104
108
  # @param first [Integer, nil] Returns the first _n_ elements from the list.
105
109
  #
106
110
  # @param last [Integer, nil] Returns the last _n_ elements from the list.
@@ -36,7 +36,7 @@ module WhopSDK
36
36
  #
37
37
  # - `payment:basic:read`
38
38
  #
39
- # @overload list(payment_id:, after: nil, before: nil, direction: nil, first: nil, last: nil, request_options: {})
39
+ # @overload list(payment_id:, after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, request_options: {})
40
40
  #
41
41
  # @param payment_id [String] The ID of the payment to list refunds for
42
42
  #
@@ -44,6 +44,10 @@ module WhopSDK
44
44
  #
45
45
  # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
46
46
  #
47
+ # @param created_after [Time, nil] The minimum creation date to filter by
48
+ #
49
+ # @param created_before [Time, nil] The maximum creation date to filter by
50
+ #
47
51
  # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort.
48
52
  #
49
53
  # @param first [Integer, nil] Returns the first _n_ elements from the list.
@@ -25,7 +25,7 @@ module WhopSDK
25
25
 
26
26
  # List all reviews
27
27
  #
28
- # @overload list(product_id:, after: nil, before: nil, first: nil, last: nil, max_stars: nil, min_stars: nil, request_options: {})
28
+ # @overload list(product_id:, after: nil, before: nil, created_after: nil, created_before: nil, first: nil, last: nil, max_stars: nil, min_stars: nil, request_options: {})
29
29
  #
30
30
  # @param product_id [String] The ID of the product
31
31
  #
@@ -33,6 +33,10 @@ module WhopSDK
33
33
  #
34
34
  # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
35
35
  #
36
+ # @param created_after [Time, nil] The minimum creation date to filter by
37
+ #
38
+ # @param created_before [Time, nil] The maximum creation date to filter by
39
+ #
36
40
  # @param first [Integer, nil] Returns the first _n_ elements from the list.
37
41
  #
38
42
  # @param last [Integer, nil] Returns the last _n_ elements from the list.
@@ -0,0 +1,83 @@
1
+ # frozen_string_literal: true
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
+ #
14
+ # @overload retrieve(id, request_options: {})
15
+ #
16
+ # @param id [String] The ID of the Setup Intent
17
+ #
18
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
19
+ #
20
+ # @return [WhopSDK::Models::SetupIntent]
21
+ #
22
+ # @see WhopSDK::Models::SetupIntentRetrieveParams
23
+ def retrieve(id, params = {})
24
+ @client.request(
25
+ method: :get,
26
+ path: ["setup_intents/%1$s", id],
27
+ model: WhopSDK::SetupIntent,
28
+ options: params[:request_options]
29
+ )
30
+ end
31
+
32
+ # Lists Setup Intents
33
+ #
34
+ # Required permissions:
35
+ #
36
+ # - `payment:setup_intent:read`
37
+ # - `member:basic:read`
38
+ # - `member:email:read`
39
+ #
40
+ # @overload list(company_id:, after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, request_options: {})
41
+ #
42
+ # @param company_id [String] The ID of the company to list setup intents for
43
+ #
44
+ # @param after [String, nil] Returns the elements in the list that come after the specified cursor.
45
+ #
46
+ # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
47
+ #
48
+ # @param created_after [Time, nil] The minimum creation date to filter by
49
+ #
50
+ # @param created_before [Time, nil] The maximum creation date to filter by
51
+ #
52
+ # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort.
53
+ #
54
+ # @param first [Integer, nil] Returns the first _n_ elements from the list.
55
+ #
56
+ # @param last [Integer, nil] Returns the last _n_ elements from the list.
57
+ #
58
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
59
+ #
60
+ # @return [WhopSDK::Internal::CursorPage<WhopSDK::Models::SetupIntentListResponse>]
61
+ #
62
+ # @see WhopSDK::Models::SetupIntentListParams
63
+ def list(params)
64
+ parsed, options = WhopSDK::SetupIntentListParams.dump_request(params)
65
+ @client.request(
66
+ method: :get,
67
+ path: "setup_intents",
68
+ query: parsed,
69
+ page: WhopSDK::Internal::CursorPage,
70
+ model: WhopSDK::Models::SetupIntentListResponse,
71
+ options: options
72
+ )
73
+ end
74
+
75
+ # @api private
76
+ #
77
+ # @param client [WhopSDK::Client]
78
+ def initialize(client:)
79
+ @client = client
80
+ end
81
+ end
82
+ end
83
+ end
@@ -77,12 +77,16 @@ module WhopSDK
77
77
  #
78
78
  # - `payout:transfer:read`
79
79
  #
80
- # @overload list(after: nil, before: nil, destination_id: nil, direction: nil, first: nil, last: nil, order: nil, origin_id: nil, request_options: {})
80
+ # @overload list(after: nil, before: nil, created_after: nil, created_before: nil, destination_id: nil, direction: nil, first: nil, last: nil, order: nil, origin_id: nil, request_options: {})
81
81
  #
82
82
  # @param after [String, nil] Returns the elements in the list that come after the specified cursor.
83
83
  #
84
84
  # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
85
85
  #
86
+ # @param created_after [Time, nil] The minimum creation date to filter by
87
+ #
88
+ # @param created_before [Time, nil] The maximum creation date to filter by
89
+ #
86
90
  # @param destination_id [String, nil] Filter transfers to only those that were sent to this destination account. (user
87
91
  #
88
92
  # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort.
@@ -5,7 +5,7 @@ module WhopSDK
5
5
  class Webhooks
6
6
  # @param payload [String] The raw webhook payload as a string
7
7
  #
8
- # @return [WhopSDK::Models::InvoiceCreatedWebhookEvent, WhopSDK::Models::InvoicePaidWebhookEvent, WhopSDK::Models::InvoicePastDueWebhookEvent, WhopSDK::Models::InvoiceVoidedWebhookEvent, WhopSDK::Models::MembershipActivatedWebhookEvent, WhopSDK::Models::MembershipDeactivatedWebhookEvent, WhopSDK::Models::EntryCreatedWebhookEvent, WhopSDK::Models::EntryApprovedWebhookEvent, WhopSDK::Models::EntryDeniedWebhookEvent, WhopSDK::Models::EntryDeletedWebhookEvent, WhopSDK::Models::CourseLessonInteractionCompletedWebhookEvent, WhopSDK::Models::PaymentSucceededWebhookEvent, WhopSDK::Models::PaymentFailedWebhookEvent, WhopSDK::Models::PaymentPendingWebhookEvent, WhopSDK::Models::DisputeCreatedWebhookEvent, WhopSDK::Models::DisputeUpdatedWebhookEvent, WhopSDK::Models::RefundCreatedWebhookEvent, WhopSDK::Models::RefundUpdatedWebhookEvent]
8
+ # @return [WhopSDK::Models::InvoiceCreatedWebhookEvent, WhopSDK::Models::InvoicePaidWebhookEvent, WhopSDK::Models::InvoicePastDueWebhookEvent, WhopSDK::Models::InvoiceVoidedWebhookEvent, WhopSDK::Models::MembershipActivatedWebhookEvent, WhopSDK::Models::MembershipDeactivatedWebhookEvent, WhopSDK::Models::EntryCreatedWebhookEvent, WhopSDK::Models::EntryApprovedWebhookEvent, WhopSDK::Models::EntryDeniedWebhookEvent, WhopSDK::Models::EntryDeletedWebhookEvent, WhopSDK::Models::SetupIntentRequiresActionWebhookEvent, WhopSDK::Models::SetupIntentSucceededWebhookEvent, WhopSDK::Models::SetupIntentCanceledWebhookEvent, WhopSDK::Models::CourseLessonInteractionCompletedWebhookEvent, WhopSDK::Models::PaymentSucceededWebhookEvent, WhopSDK::Models::PaymentFailedWebhookEvent, WhopSDK::Models::PaymentPendingWebhookEvent, WhopSDK::Models::DisputeCreatedWebhookEvent, WhopSDK::Models::DisputeUpdatedWebhookEvent, WhopSDK::Models::RefundCreatedWebhookEvent, WhopSDK::Models::RefundUpdatedWebhookEvent]
9
9
  def unwrap(payload)
10
10
  parsed = JSON.parse(payload, symbolize_names: true)
11
11
  WhopSDK::Internal::Type::Converter.coerce(WhopSDK::Models::UnwrapWebhookEvent, parsed)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WhopSDK
4
- VERSION = "0.0.8"
4
+ VERSION = "0.0.10"
5
5
  end