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
@@ -0,0 +1,86 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::PaymentTokens#retrieve
6
+ class PaymentTokenRetrieveResponse < WhopSDK::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The ID of the payment token
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute card
14
+ # The card data associated with the payment token, if its a debit or credit card
15
+ # token.
16
+ #
17
+ # @return [WhopSDK::Models::PaymentTokenRetrieveResponse::Card, nil]
18
+ required :card, -> { WhopSDK::Models::PaymentTokenRetrieveResponse::Card }, nil?: true
19
+
20
+ # @!attribute created_at
21
+ # The date and time the payment token was created
22
+ #
23
+ # @return [Time]
24
+ required :created_at, Time
25
+
26
+ # @!attribute payment_method_type
27
+ # The payment method type of the payment token
28
+ #
29
+ # @return [Symbol, WhopSDK::Models::PaymentMethodTypes]
30
+ required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }
31
+
32
+ # @!method initialize(id:, card:, created_at:, payment_method_type:)
33
+ # Some parameter documentations has been truncated, see
34
+ # {WhopSDK::Models::PaymentTokenRetrieveResponse} for more details.
35
+ #
36
+ # A payment token used to process payments.
37
+ #
38
+ # @param id [String] The ID of the payment token
39
+ #
40
+ # @param card [WhopSDK::Models::PaymentTokenRetrieveResponse::Card, nil] The card data associated with the payment token, if its a debit or credit card t
41
+ #
42
+ # @param created_at [Time] The date and time the payment token was created
43
+ #
44
+ # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment token
45
+
46
+ # @see WhopSDK::Models::PaymentTokenRetrieveResponse#card
47
+ class Card < WhopSDK::Internal::Type::BaseModel
48
+ # @!attribute brand
49
+ # Possible card brands that a payment token can have
50
+ #
51
+ # @return [Symbol, WhopSDK::Models::CardBrands, nil]
52
+ required :brand, enum: -> { WhopSDK::CardBrands }, nil?: true
53
+
54
+ # @!attribute exp_month
55
+ # Card expiration month, like 03 for March.
56
+ #
57
+ # @return [Integer, nil]
58
+ required :exp_month, Integer, nil?: true
59
+
60
+ # @!attribute exp_year
61
+ # Card expiration year, like 27 for 2027.
62
+ #
63
+ # @return [Integer, nil]
64
+ required :exp_year, Integer, nil?: true
65
+
66
+ # @!attribute last4
67
+ # Last four digits of the card.
68
+ #
69
+ # @return [String, nil]
70
+ required :last4, String, nil?: true
71
+
72
+ # @!method initialize(brand:, exp_month:, exp_year:, last4:)
73
+ # The card data associated with the payment token, if its a debit or credit card
74
+ # token.
75
+ #
76
+ # @param brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
77
+ #
78
+ # @param exp_month [Integer, nil] Card expiration month, like 03 for March.
79
+ #
80
+ # @param exp_year [Integer, nil] Card expiration year, like 27 for 2027.
81
+ #
82
+ # @param last4 [String, nil] Last four digits of the card.
83
+ end
84
+ end
85
+ end
86
+ end
@@ -46,7 +46,7 @@ module WhopSDK
46
46
  optional :description, String, nil?: true
47
47
 
48
48
  # @!attribute expiration_days
49
- # The interval at which the plan charges (expiration plans).
49
+ # The interval at which the plan expires and revokes access (expiration plans).
50
50
  #
51
51
  # @return [Integer, nil]
52
52
  optional :expiration_days, Integer, nil?: true
@@ -112,20 +112,6 @@ module WhopSDK
112
112
  # @return [Integer, nil]
113
113
  optional :stock, Integer, nil?: true
114
114
 
115
- # @!attribute strike_through_initial_price
116
- # The price to display with a strikethrough for the initial price. Provided as a
117
- # number in dollars. Eg: 19.99 for $19.99
118
- #
119
- # @return [Float, nil]
120
- optional :strike_through_initial_price, Float, nil?: true
121
-
122
- # @!attribute strike_through_renewal_price
123
- # The price to display with a strikethrough for the renewal price. Provided as a
124
- # number in dollars. Eg: 19.99 for $19.99
125
- #
126
- # @return [Float, nil]
127
- optional :strike_through_renewal_price, Float, nil?: true
128
-
129
115
  # @!attribute title
130
116
  # The title of the plan. This will be visible on the product page to customers.
131
117
  #
@@ -150,7 +136,7 @@ module WhopSDK
150
136
  # @return [Symbol, WhopSDK::Models::Visibility, nil]
151
137
  optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true
152
138
 
153
- # @!method initialize(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: {})
139
+ # @!method initialize(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: {})
154
140
  # Some parameter documentations has been truncated, see
155
141
  # {WhopSDK::Models::PlanCreateParams} for more details.
156
142
  #
@@ -166,7 +152,7 @@ module WhopSDK
166
152
  #
167
153
  # @param description [String, nil] The description of the plan.
168
154
  #
169
- # @param expiration_days [Integer, nil] The interval at which the plan charges (expiration plans).
155
+ # @param expiration_days [Integer, nil] The interval at which the plan expires and revokes access (expiration plans).
170
156
  #
171
157
  # @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.
172
158
  #
@@ -186,10 +172,6 @@ module WhopSDK
186
172
  #
187
173
  # @param stock [Integer, nil] The number of units available for purchase.
188
174
  #
189
- # @param strike_through_initial_price [Float, nil] The price to display with a strikethrough for the initial price. Provided as a n
190
- #
191
- # @param strike_through_renewal_price [Float, nil] The price to display with a strikethrough for the renewal price. Provided as a n
192
- #
193
175
  # @param title [String, nil] The title of the plan. This will be visible on the product page to customers.
194
176
  #
195
177
  # @param trial_period_days [Integer, nil] The number of free trial days added before a renewal plan.
@@ -25,6 +25,18 @@ module WhopSDK
25
25
  # @return [String, nil]
26
26
  optional :before, String, nil?: true
27
27
 
28
+ # @!attribute created_after
29
+ # The minimum creation date to filter by
30
+ #
31
+ # @return [Time, nil]
32
+ optional :created_after, Time, nil?: true
33
+
34
+ # @!attribute created_before
35
+ # The maximum creation date to filter by
36
+ #
37
+ # @return [Time, nil]
38
+ optional :created_before, Time, nil?: true
39
+
28
40
  # @!attribute direction
29
41
  # The direction of the sort.
30
42
  #
@@ -77,13 +89,17 @@ module WhopSDK
77
89
  -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::VisibilityFilter] },
78
90
  nil?: true
79
91
 
80
- # @!method initialize(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: {})
92
+ # @!method initialize(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: {})
81
93
  # @param company_id [String] The ID of the company
82
94
  #
83
95
  # @param after [String, nil] Returns the elements in the list that come after the specified cursor.
84
96
  #
85
97
  # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
86
98
  #
99
+ # @param created_after [Time, nil] The minimum creation date to filter by
100
+ #
101
+ # @param created_before [Time, nil] The maximum creation date to filter by
102
+ #
87
103
  # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort.
88
104
  #
89
105
  # @param first [Integer, nil] Returns the first _n_ elements from the list.
@@ -25,6 +25,18 @@ module WhopSDK
25
25
  # @return [String, nil]
26
26
  optional :before, String, nil?: true
27
27
 
28
+ # @!attribute created_after
29
+ # The minimum creation date to filter by
30
+ #
31
+ # @return [Time, nil]
32
+ optional :created_after, Time, nil?: true
33
+
34
+ # @!attribute created_before
35
+ # The maximum creation date to filter by
36
+ #
37
+ # @return [Time, nil]
38
+ optional :created_before, Time, nil?: true
39
+
28
40
  # @!attribute direction
29
41
  # The direction of the sort.
30
42
  #
@@ -65,13 +77,17 @@ module WhopSDK
65
77
  -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::VisibilityFilter] },
66
78
  nil?: true
67
79
 
68
- # @!method initialize(company_id:, after: nil, before: nil, direction: nil, first: nil, last: nil, order: nil, product_types: nil, visibilities: nil, request_options: {})
80
+ # @!method initialize(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: {})
69
81
  # @param company_id [String] The ID of the company to filter products by
70
82
  #
71
83
  # @param after [String, nil] Returns the elements in the list that come after the specified cursor.
72
84
  #
73
85
  # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
74
86
  #
87
+ # @param created_after [Time, nil] The minimum creation date to filter by
88
+ #
89
+ # @param created_before [Time, nil] The maximum creation date to filter by
90
+ #
75
91
  # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort.
76
92
  #
77
93
  # @param first [Integer, nil] Returns the first _n_ elements from the list.
@@ -7,12 +7,6 @@ module WhopSDK
7
7
  extend WhopSDK::Internal::Type::RequestParameters::Converter
8
8
  include WhopSDK::Internal::Type::RequestParameters
9
9
 
10
- # @!attribute banner_image
11
- # A banner image for the product in png, jpeg format
12
- #
13
- # @return [WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithDirectUploadID, WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithID, nil]
14
- optional :banner_image, union: -> { WhopSDK::ProductUpdateParams::BannerImage }, nil?: true
15
-
16
10
  # @!attribute business_type
17
11
  # The different business types a company can be.
18
12
  #
@@ -123,12 +117,10 @@ module WhopSDK
123
117
  # @return [Symbol, WhopSDK::Models::Visibility, nil]
124
118
  optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true
125
119
 
126
- # @!method initialize(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: {})
120
+ # @!method initialize(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: {})
127
121
  # Some parameter documentations has been truncated, see
128
122
  # {WhopSDK::Models::ProductUpdateParams} for more details.
129
123
  #
130
- # @param banner_image [WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithDirectUploadID, WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithID, nil] A banner image for the product in png, jpeg format
131
- #
132
124
  # @param business_type [Symbol, WhopSDK::Models::BusinessTypes, nil] The different business types a company can be.
133
125
  #
134
126
  # @param collect_shipping_address [Boolean, nil] Whether or not to collect shipping information at checkout from the customer.
@@ -168,58 +160,6 @@ module WhopSDK
168
160
  #
169
161
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
170
162
 
171
- # A banner image for the product in png, jpeg format
172
- module BannerImage
173
- extend WhopSDK::Internal::Type::Union
174
-
175
- # Input for an attachment
176
- variant -> { WhopSDK::ProductUpdateParams::BannerImage::AttachmentInputWithDirectUploadID }
177
-
178
- # Input for an attachment
179
- variant -> { WhopSDK::ProductUpdateParams::BannerImage::AttachmentInputWithID }
180
-
181
- class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
182
- # @!attribute direct_upload_id
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
- #
187
- # @return [String]
188
- required :direct_upload_id, String
189
-
190
- # @!method initialize(direct_upload_id:)
191
- # Some parameter documentations has been truncated, see
192
- # {WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithDirectUploadID}
193
- # for more details.
194
- #
195
- # Input for an attachment
196
- #
197
- # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
198
- end
199
-
200
- class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
201
- # @!attribute id
202
- # The ID of an existing attachment object. Use this when updating a resource and
203
- # keeping a subset of the attachments. Don't use this unless you know what you're
204
- # doing.
205
- #
206
- # @return [String]
207
- required :id, String
208
-
209
- # @!method initialize(id:)
210
- # Some parameter documentations has been truncated, see
211
- # {WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithID} for
212
- # more details.
213
- #
214
- # Input for an attachment
215
- #
216
- # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
217
- end
218
-
219
- # @!method self.variants
220
- # @return [Array(WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithDirectUploadID, WhopSDK::Models::ProductUpdateParams::BannerImage::AttachmentInputWithID)]
221
- end
222
-
223
163
  class StorePageConfig < WhopSDK::Internal::Type::BaseModel
224
164
  # @!attribute custom_cta
225
165
  # Custom call-to-action text for the product's store page.
@@ -25,6 +25,18 @@ module WhopSDK
25
25
  # @return [String, nil]
26
26
  optional :before, String, nil?: true
27
27
 
28
+ # @!attribute created_after
29
+ # The minimum creation date to filter by
30
+ #
31
+ # @return [Time, nil]
32
+ optional :created_after, Time, nil?: true
33
+
34
+ # @!attribute created_before
35
+ # The maximum creation date to filter by
36
+ #
37
+ # @return [Time, nil]
38
+ optional :created_before, Time, nil?: true
39
+
28
40
  # @!attribute first
29
41
  # Returns the first _n_ elements from the list.
30
42
  #
@@ -55,13 +67,17 @@ module WhopSDK
55
67
  # @return [Symbol, WhopSDK::Models::PromoCodeStatus, nil]
56
68
  optional :status, enum: -> { WhopSDK::PromoCodeStatus }, nil?: true
57
69
 
58
- # @!method initialize(company_id:, after: nil, before: nil, first: nil, last: nil, plan_ids: nil, product_ids: nil, status: nil, request_options: {})
70
+ # @!method initialize(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: {})
59
71
  # @param company_id [String] The ID of the company to list promo codes for
60
72
  #
61
73
  # @param after [String, nil] Returns the elements in the list that come after the specified cursor.
62
74
  #
63
75
  # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
64
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
+ #
65
81
  # @param first [Integer, nil] Returns the first _n_ elements from the list.
66
82
  #
67
83
  # @param last [Integer, nil] Returns the last _n_ elements from the list.
@@ -25,6 +25,18 @@ module WhopSDK
25
25
  # @return [String, nil]
26
26
  optional :before, String, nil?: true
27
27
 
28
+ # @!attribute created_after
29
+ # The minimum creation date to filter by
30
+ #
31
+ # @return [Time, nil]
32
+ optional :created_after, Time, nil?: true
33
+
34
+ # @!attribute created_before
35
+ # The maximum creation date to filter by
36
+ #
37
+ # @return [Time, nil]
38
+ optional :created_before, Time, nil?: true
39
+
28
40
  # @!attribute direction
29
41
  # The direction of the sort.
30
42
  #
@@ -43,13 +55,17 @@ module WhopSDK
43
55
  # @return [Integer, nil]
44
56
  optional :last, Integer, nil?: true
45
57
 
46
- # @!method initialize(payment_id:, after: nil, before: nil, direction: nil, first: nil, last: nil, request_options: {})
58
+ # @!method initialize(payment_id:, after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, request_options: {})
47
59
  # @param payment_id [String] The ID of the payment to list refunds for
48
60
  #
49
61
  # @param after [String, nil] Returns the elements in the list that come after the specified cursor.
50
62
  #
51
63
  # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
52
64
  #
65
+ # @param created_after [Time, nil] The minimum creation date to filter by
66
+ #
67
+ # @param created_before [Time, nil] The maximum creation date to filter by
68
+ #
53
69
  # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort.
54
70
  #
55
71
  # @param first [Integer, nil] Returns the first _n_ elements from the list.
@@ -25,6 +25,18 @@ module WhopSDK
25
25
  # @return [String, nil]
26
26
  optional :before, String, nil?: true
27
27
 
28
+ # @!attribute created_after
29
+ # The minimum creation date to filter by
30
+ #
31
+ # @return [Time, nil]
32
+ optional :created_after, Time, nil?: true
33
+
34
+ # @!attribute created_before
35
+ # The maximum creation date to filter by
36
+ #
37
+ # @return [Time, nil]
38
+ optional :created_before, Time, nil?: true
39
+
28
40
  # @!attribute first
29
41
  # Returns the first _n_ elements from the list.
30
42
  #
@@ -49,13 +61,17 @@ module WhopSDK
49
61
  # @return [Integer, nil]
50
62
  optional :min_stars, Integer, nil?: true
51
63
 
52
- # @!method initialize(product_id:, after: nil, before: nil, first: nil, last: nil, max_stars: nil, min_stars: nil, request_options: {})
64
+ # @!method initialize(product_id:, after: nil, before: nil, created_after: nil, created_before: nil, first: nil, last: nil, max_stars: nil, min_stars: nil, request_options: {})
53
65
  # @param product_id [String] The ID of the product
54
66
  #
55
67
  # @param after [String, nil] Returns the elements in the list that come after the specified cursor.
56
68
  #
57
69
  # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
58
70
  #
71
+ # @param created_after [Time, nil] The minimum creation date to filter by
72
+ #
73
+ # @param created_before [Time, nil] The maximum creation date to filter by
74
+ #
59
75
  # @param first [Integer, nil] Returns the first _n_ elements from the list.
60
76
  #
61
77
  # @param last [Integer, nil] Returns the last _n_ elements from the list.
@@ -0,0 +1,253 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::SetupIntents#retrieve
6
+ class SetupIntent < WhopSDK::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The setup intent ID
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute checkout_configuration
14
+ # The checkout configuration associated with the setup intent
15
+ #
16
+ # @return [WhopSDK::Models::SetupIntent::CheckoutConfiguration, nil]
17
+ required :checkout_configuration, -> { WhopSDK::SetupIntent::CheckoutConfiguration }, nil?: true
18
+
19
+ # @!attribute company
20
+ # The company of the setup intent
21
+ #
22
+ # @return [WhopSDK::Models::SetupIntent::Company, nil]
23
+ required :company, -> { WhopSDK::SetupIntent::Company }, nil?: true
24
+
25
+ # @!attribute created_at
26
+ # The datetime the payment was created
27
+ #
28
+ # @return [Time]
29
+ required :created_at, Time
30
+
31
+ # @!attribute error_message
32
+ # The error message, if any.
33
+ #
34
+ # @return [String, nil]
35
+ required :error_message, String, nil?: true
36
+
37
+ # @!attribute member
38
+ # The member connected to the setup intent
39
+ #
40
+ # @return [WhopSDK::Models::SetupIntent::Member, nil]
41
+ required :member, -> { WhopSDK::SetupIntent::Member }, nil?: true
42
+
43
+ # @!attribute metadata
44
+ # The metadata associated with the setup intent
45
+ #
46
+ # @return [Hash{Symbol=>Object}, nil]
47
+ required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
48
+
49
+ # @!attribute payment_token
50
+ # The payment token created during the setup, if available.
51
+ #
52
+ # @return [WhopSDK::Models::SetupIntent::PaymentToken, nil]
53
+ required :payment_token, -> { WhopSDK::SetupIntent::PaymentToken }, nil?: true
54
+
55
+ # @!attribute status
56
+ # The status of the setup intent
57
+ #
58
+ # @return [Symbol, WhopSDK::Models::SetupIntentStatus]
59
+ required :status, enum: -> { WhopSDK::SetupIntentStatus }
60
+
61
+ # @!method initialize(id:, checkout_configuration:, company:, created_at:, error_message:, member:, metadata:, payment_token:, status:)
62
+ # An object representing a setup intent, which is a flow for allowing a customer
63
+ # to add a payment method to their account without making a purchase.
64
+ #
65
+ # @param id [String] The setup intent ID
66
+ #
67
+ # @param checkout_configuration [WhopSDK::Models::SetupIntent::CheckoutConfiguration, nil] The checkout configuration associated with the setup intent
68
+ #
69
+ # @param company [WhopSDK::Models::SetupIntent::Company, nil] The company of the setup intent
70
+ #
71
+ # @param created_at [Time] The datetime the payment was created
72
+ #
73
+ # @param error_message [String, nil] The error message, if any.
74
+ #
75
+ # @param member [WhopSDK::Models::SetupIntent::Member, nil] The member connected to the setup intent
76
+ #
77
+ # @param metadata [Hash{Symbol=>Object}, nil] The metadata associated with the setup intent
78
+ #
79
+ # @param payment_token [WhopSDK::Models::SetupIntent::PaymentToken, nil] The payment token created during the setup, if available.
80
+ #
81
+ # @param status [Symbol, WhopSDK::Models::SetupIntentStatus] The status of the setup intent
82
+
83
+ # @see WhopSDK::Models::SetupIntent#checkout_configuration
84
+ class CheckoutConfiguration < WhopSDK::Internal::Type::BaseModel
85
+ # @!attribute id
86
+ # The ID of the checkout configuration
87
+ #
88
+ # @return [String]
89
+ required :id, String
90
+
91
+ # @!method initialize(id:)
92
+ # The checkout configuration associated with the setup intent
93
+ #
94
+ # @param id [String] The ID of the checkout configuration
95
+ end
96
+
97
+ # @see WhopSDK::Models::SetupIntent#company
98
+ class Company < WhopSDK::Internal::Type::BaseModel
99
+ # @!attribute id
100
+ # The ID (tag) of the company.
101
+ #
102
+ # @return [String]
103
+ required :id, String
104
+
105
+ # @!method initialize(id:)
106
+ # The company of the setup intent
107
+ #
108
+ # @param id [String] The ID (tag) of the company.
109
+ end
110
+
111
+ # @see WhopSDK::Models::SetupIntent#member
112
+ class Member < WhopSDK::Internal::Type::BaseModel
113
+ # @!attribute id
114
+ # The ID of the member
115
+ #
116
+ # @return [String]
117
+ required :id, String
118
+
119
+ # @!attribute user
120
+ # The user for this member, if any.
121
+ #
122
+ # @return [WhopSDK::Models::SetupIntent::Member::User, nil]
123
+ required :user, -> { WhopSDK::SetupIntent::Member::User }, nil?: true
124
+
125
+ # @!method initialize(id:, user:)
126
+ # The member connected to the setup intent
127
+ #
128
+ # @param id [String] The ID of the member
129
+ #
130
+ # @param user [WhopSDK::Models::SetupIntent::Member::User, nil] The user for this member, if any.
131
+
132
+ # @see WhopSDK::Models::SetupIntent::Member#user
133
+ class User < WhopSDK::Internal::Type::BaseModel
134
+ # @!attribute id
135
+ # The internal ID of the user account.
136
+ #
137
+ # @return [String]
138
+ required :id, String
139
+
140
+ # @!attribute email
141
+ # The digital mailing address of the user.
142
+ #
143
+ # @return [String, nil]
144
+ required :email, String, nil?: true
145
+
146
+ # @!attribute name
147
+ # The user's full name.
148
+ #
149
+ # @return [String, nil]
150
+ required :name, String, nil?: true
151
+
152
+ # @!attribute username
153
+ # The whop username.
154
+ #
155
+ # @return [String]
156
+ required :username, String
157
+
158
+ # @!method initialize(id:, email:, name:, username:)
159
+ # The user for this member, if any.
160
+ #
161
+ # @param id [String] The internal ID of the user account.
162
+ #
163
+ # @param email [String, nil] The digital mailing address of the user.
164
+ #
165
+ # @param name [String, nil] The user's full name.
166
+ #
167
+ # @param username [String] The whop username.
168
+ end
169
+ end
170
+
171
+ # @see WhopSDK::Models::SetupIntent#payment_token
172
+ class PaymentToken < WhopSDK::Internal::Type::BaseModel
173
+ # @!attribute id
174
+ # The ID of the payment token
175
+ #
176
+ # @return [String]
177
+ required :id, String
178
+
179
+ # @!attribute card
180
+ # The card data associated with the payment token, if its a debit or credit card
181
+ # token.
182
+ #
183
+ # @return [WhopSDK::Models::SetupIntent::PaymentToken::Card, nil]
184
+ required :card, -> { WhopSDK::SetupIntent::PaymentToken::Card }, nil?: true
185
+
186
+ # @!attribute created_at
187
+ # The date and time the payment token was created
188
+ #
189
+ # @return [Time]
190
+ required :created_at, Time
191
+
192
+ # @!attribute payment_method_type
193
+ # The payment method type of the payment token
194
+ #
195
+ # @return [Symbol, WhopSDK::Models::PaymentMethodTypes]
196
+ required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }
197
+
198
+ # @!method initialize(id:, card:, created_at:, payment_method_type:)
199
+ # Some parameter documentations has been truncated, see
200
+ # {WhopSDK::Models::SetupIntent::PaymentToken} for more details.
201
+ #
202
+ # The payment token created during the setup, if available.
203
+ #
204
+ # @param id [String] The ID of the payment token
205
+ #
206
+ # @param card [WhopSDK::Models::SetupIntent::PaymentToken::Card, nil] The card data associated with the payment token, if its a debit or credit card t
207
+ #
208
+ # @param created_at [Time] The date and time the payment token was created
209
+ #
210
+ # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment token
211
+
212
+ # @see WhopSDK::Models::SetupIntent::PaymentToken#card
213
+ class Card < WhopSDK::Internal::Type::BaseModel
214
+ # @!attribute brand
215
+ # Possible card brands that a payment token can have
216
+ #
217
+ # @return [Symbol, WhopSDK::Models::CardBrands, nil]
218
+ required :brand, enum: -> { WhopSDK::CardBrands }, nil?: true
219
+
220
+ # @!attribute exp_month
221
+ # Card expiration month, like 03 for March.
222
+ #
223
+ # @return [Integer, nil]
224
+ required :exp_month, Integer, nil?: true
225
+
226
+ # @!attribute exp_year
227
+ # Card expiration year, like 27 for 2027.
228
+ #
229
+ # @return [Integer, nil]
230
+ required :exp_year, Integer, nil?: true
231
+
232
+ # @!attribute last4
233
+ # Last four digits of the card.
234
+ #
235
+ # @return [String, nil]
236
+ required :last4, String, nil?: true
237
+
238
+ # @!method initialize(brand:, exp_month:, exp_year:, last4:)
239
+ # The card data associated with the payment token, if its a debit or credit card
240
+ # token.
241
+ #
242
+ # @param brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
243
+ #
244
+ # @param exp_month [Integer, nil] Card expiration month, like 03 for March.
245
+ #
246
+ # @param exp_year [Integer, nil] Card expiration year, like 27 for 2027.
247
+ #
248
+ # @param last4 [String, nil] Last four digits of the card.
249
+ end
250
+ end
251
+ end
252
+ end
253
+ end