whop_sdk 0.0.35 → 0.0.36

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 (109) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +37 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/internal/type/union.rb +4 -4
  5. data/lib/whop_sdk/internal/util.rb +19 -6
  6. data/lib/whop_sdk/models/affiliate.rb +18 -11
  7. data/lib/whop_sdk/models/affiliate_list_response.rb +18 -11
  8. data/lib/whop_sdk/models/affiliates/override_create_response.rb +5 -3
  9. data/lib/whop_sdk/models/affiliates/override_list_response.rb +5 -3
  10. data/lib/whop_sdk/models/affiliates/override_retrieve_response.rb +5 -3
  11. data/lib/whop_sdk/models/affiliates/override_update_response.rb +5 -3
  12. data/lib/whop_sdk/models/app.rb +30 -1
  13. data/lib/whop_sdk/models/app_list_response.rb +30 -1
  14. data/lib/whop_sdk/models/app_update_params.rb +18 -1
  15. data/lib/whop_sdk/models/app_view_type.rb +2 -0
  16. data/lib/whop_sdk/models/card_brands.rb +1 -0
  17. data/lib/whop_sdk/models/company.rb +50 -1
  18. data/lib/whop_sdk/models/company_list_response.rb +9 -1
  19. data/lib/whop_sdk/models/company_update_params.rb +28 -1
  20. data/lib/whop_sdk/models/invoice_create_params.rb +1136 -4
  21. data/lib/whop_sdk/models/invoice_marked_uncollectible_webhook_event.rb +61 -0
  22. data/lib/whop_sdk/models/invoice_status.rb +1 -0
  23. data/lib/whop_sdk/models/payment.rb +11 -2
  24. data/lib/whop_sdk/models/payment_create_params.rb +12 -1
  25. data/lib/whop_sdk/models/payment_list_params.rb +17 -1
  26. data/lib/whop_sdk/models/payment_list_response.rb +9 -1
  27. data/lib/whop_sdk/models/payment_method_types.rb +1 -1
  28. data/lib/whop_sdk/models/payment_provider.rb +1 -0
  29. data/lib/whop_sdk/models/product_create_params.rb +2 -2
  30. data/lib/whop_sdk/models/product_update_params.rb +2 -2
  31. data/lib/whop_sdk/models/resolution_center_case_created_webhook_event.rb +428 -0
  32. data/lib/whop_sdk/models/resolution_center_case_decided_webhook_event.rb +428 -0
  33. data/lib/whop_sdk/models/resolution_center_case_updated_webhook_event.rb +428 -0
  34. data/lib/whop_sdk/models/unwrap_webhook_event.rb +9 -1
  35. data/lib/whop_sdk/models/webhook_event.rb +4 -0
  36. data/lib/whop_sdk/models.rb +8 -0
  37. data/lib/whop_sdk/resources/apps.rb +5 -1
  38. data/lib/whop_sdk/resources/companies.rb +7 -1
  39. data/lib/whop_sdk/resources/payments.rb +5 -1
  40. data/lib/whop_sdk/resources/products.rb +2 -2
  41. data/lib/whop_sdk/resources/webhooks.rb +1 -1
  42. data/lib/whop_sdk/version.rb +1 -1
  43. data/lib/whop_sdk.rb +4 -0
  44. data/rbi/whop_sdk/internal/util.rbi +8 -0
  45. data/rbi/whop_sdk/models/affiliate.rbi +18 -11
  46. data/rbi/whop_sdk/models/affiliate_list_response.rbi +18 -11
  47. data/rbi/whop_sdk/models/affiliates/override_create_response.rbi +6 -3
  48. data/rbi/whop_sdk/models/affiliates/override_list_response.rbi +6 -3
  49. data/rbi/whop_sdk/models/affiliates/override_retrieve_response.rbi +6 -3
  50. data/rbi/whop_sdk/models/affiliates/override_update_response.rbi +6 -3
  51. data/rbi/whop_sdk/models/app.rbi +34 -0
  52. data/rbi/whop_sdk/models/app_list_response.rbi +34 -0
  53. data/rbi/whop_sdk/models/app_update_params.rbi +18 -0
  54. data/rbi/whop_sdk/models/app_view_type.rbi +2 -0
  55. data/rbi/whop_sdk/models/card_brands.rbi +1 -0
  56. data/rbi/whop_sdk/models/company.rbi +71 -0
  57. data/rbi/whop_sdk/models/company_list_response.rbi +8 -0
  58. data/rbi/whop_sdk/models/company_update_params.rbi +30 -0
  59. data/rbi/whop_sdk/models/invoice_create_params.rbi +3293 -5
  60. data/rbi/whop_sdk/models/invoice_marked_uncollectible_webhook_event.rbi +87 -0
  61. data/rbi/whop_sdk/models/invoice_status.rbi +2 -0
  62. data/rbi/whop_sdk/models/payment.rbi +15 -2
  63. data/rbi/whop_sdk/models/payment_create_params.rbi +14 -0
  64. data/rbi/whop_sdk/models/payment_list_params.rbi +16 -0
  65. data/rbi/whop_sdk/models/payment_list_response.rbi +8 -0
  66. data/rbi/whop_sdk/models/payment_method_types.rbi +1 -1
  67. data/rbi/whop_sdk/models/payment_provider.rbi +1 -0
  68. data/rbi/whop_sdk/models/product_create_params.rbi +2 -2
  69. data/rbi/whop_sdk/models/product_update_params.rbi +2 -2
  70. data/rbi/whop_sdk/models/resolution_center_case_created_webhook_event.rbi +767 -0
  71. data/rbi/whop_sdk/models/resolution_center_case_decided_webhook_event.rbi +767 -0
  72. data/rbi/whop_sdk/models/resolution_center_case_updated_webhook_event.rbi +767 -0
  73. data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +4 -0
  74. data/rbi/whop_sdk/models/webhook_event.rbi +20 -0
  75. data/rbi/whop_sdk/models.rbi +12 -0
  76. data/rbi/whop_sdk/resources/apps.rbi +7 -0
  77. data/rbi/whop_sdk/resources/companies.rbi +12 -0
  78. data/rbi/whop_sdk/resources/payments.rbi +6 -0
  79. data/rbi/whop_sdk/resources/products.rbi +2 -2
  80. data/rbi/whop_sdk/resources/webhooks.rbi +4 -0
  81. data/sig/whop_sdk/internal/util.rbs +4 -0
  82. data/sig/whop_sdk/models/app.rbs +15 -0
  83. data/sig/whop_sdk/models/app_list_response.rbs +15 -0
  84. data/sig/whop_sdk/models/app_update_params.rbs +10 -0
  85. data/sig/whop_sdk/models/app_view_type.rbs +4 -1
  86. data/sig/whop_sdk/models/card_brands.rbs +2 -0
  87. data/sig/whop_sdk/models/company.rbs +27 -0
  88. data/sig/whop_sdk/models/company_list_response.rbs +5 -0
  89. data/sig/whop_sdk/models/company_update_params.rbs +15 -0
  90. data/sig/whop_sdk/models/invoice_create_params.rbs +1324 -0
  91. data/sig/whop_sdk/models/invoice_marked_uncollectible_webhook_event.rbs +45 -0
  92. data/sig/whop_sdk/models/invoice_status.rbs +3 -1
  93. data/sig/whop_sdk/models/payment.rbs +9 -2
  94. data/sig/whop_sdk/models/payment_create_params.rbs +5 -0
  95. data/sig/whop_sdk/models/payment_list_params.rbs +11 -1
  96. data/sig/whop_sdk/models/payment_list_response.rbs +5 -0
  97. data/sig/whop_sdk/models/payment_method_types.rbs +2 -2
  98. data/sig/whop_sdk/models/payment_provider.rbs +2 -0
  99. data/sig/whop_sdk/models/resolution_center_case_created_webhook_event.rbs +296 -0
  100. data/sig/whop_sdk/models/resolution_center_case_decided_webhook_event.rbs +296 -0
  101. data/sig/whop_sdk/models/resolution_center_case_updated_webhook_event.rbs +296 -0
  102. data/sig/whop_sdk/models/unwrap_webhook_event.rbs +4 -0
  103. data/sig/whop_sdk/models/webhook_event.rbs +8 -0
  104. data/sig/whop_sdk/models.rbs +8 -0
  105. data/sig/whop_sdk/resources/apps.rbs +2 -0
  106. data/sig/whop_sdk/resources/companies.rbs +3 -0
  107. data/sig/whop_sdk/resources/payments.rbs +2 -0
  108. data/sig/whop_sdk/resources/webhooks.rbs +4 -0
  109. metadata +14 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fddb394e971ab399942415bc62f4bcadf4ee8bbf2428fd11d26e321e05df35fd
4
- data.tar.gz: ca5954656215f367af5cd21d03206848291ae486087e1c0398806a21c8b42c6e
3
+ metadata.gz: 420957333a3afbd52b09179d17ba1f54876addc3408a8e4609e467ad44a2adee
4
+ data.tar.gz: f04a470ceea3d6788174ad1e317c8c15344f30d10bd2b26575137bb18cf41928
5
5
  SHA512:
6
- metadata.gz: 4e12b295d17a57b34f78b364befffb0b2fafc1ec462f7161ec3a34341f3848057db1a063e65141082129aa7c87760733f196ebf113005005d651bbc9e6481e47
7
- data.tar.gz: 120ffc673f55a2ab0483ec22eb8deafd87a343d5b46593694b0e937b857ed88ab708408af9c231db9a1a2afc9d42a5c321ce95d6043fc73779dfcbe64e0a8330
6
+ metadata.gz: a934c03728cd9c270a711599752c77c58018cb2fc1e88adb71dcde1b6d574d0ff4866dc37b828bfd77302a1ef9f7644f56781ca5452c1f103077e4e6aac3379b
7
+ data.tar.gz: 0574eee685eae9673ef0ad28665b615fedc014b9ff9eaf271101770545caf9bc1acf9c92562d2cebcb023d7cede7cfa4ccbfad684c2f50d9b3aeb23d28faa22b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.0.36 (2026-04-01)
4
+
5
+ Full Changelog: [v0.0.35...v0.0.36](https://github.com/whopio/whopsdk-ruby/compare/v0.0.35...v0.0.36)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([ff045f2](https://github.com/whopio/whopsdk-ruby/commit/ff045f241a4b159b3e2701a260666f968fc218a9))
10
+ * **api:** api update ([82f671a](https://github.com/whopio/whopsdk-ruby/commit/82f671a64f6290642af4ef888a696eeeb414cc39))
11
+ * **api:** api update ([0904666](https://github.com/whopio/whopsdk-ruby/commit/0904666825216c11a018402de7ea7b6fde55ebcd))
12
+ * **api:** api update ([bd6996b](https://github.com/whopio/whopsdk-ruby/commit/bd6996b215315a72bce3b457a84b2127990a9a48))
13
+ * **api:** api update ([77b3977](https://github.com/whopio/whopsdk-ruby/commit/77b397710fca468ccb60b0977fea756ffe72af8d))
14
+ * **api:** api update ([9d9d279](https://github.com/whopio/whopsdk-ruby/commit/9d9d279cd5461a69d40513a7140cd935655a3e7f))
15
+ * **api:** api update ([861ff42](https://github.com/whopio/whopsdk-ruby/commit/861ff42ed47f7e8e9f13ae9d93655dcc004cf1b2))
16
+ * **api:** api update ([041bebb](https://github.com/whopio/whopsdk-ruby/commit/041bebb9ad2dcb4dc09feec04f22c79e1e26b376))
17
+ * **api:** api update ([c6da015](https://github.com/whopio/whopsdk-ruby/commit/c6da0152cd1dde833a05724f76a0e80ecd999203))
18
+ * **api:** api update ([fd1f6e4](https://github.com/whopio/whopsdk-ruby/commit/fd1f6e45955543fd67d086ff7e6c946afde283ee))
19
+ * **api:** api update ([7e4abda](https://github.com/whopio/whopsdk-ruby/commit/7e4abdab5a1764be25995aa622b871754de6a985))
20
+ * **api:** api update ([070576e](https://github.com/whopio/whopsdk-ruby/commit/070576e3e8a321f85a1c8546bd0f3e5355a7e452))
21
+ * **api:** api update ([9be2f31](https://github.com/whopio/whopsdk-ruby/commit/9be2f31407db03106bea259ac4da78e8c1407962))
22
+ * **api:** api update ([eaacc3d](https://github.com/whopio/whopsdk-ruby/commit/eaacc3d5f6a85e8fa2a13d4b9cb57eb390801b90))
23
+ * **api:** api update ([c1ce4e0](https://github.com/whopio/whopsdk-ruby/commit/c1ce4e08b7a1c33b6e43da9c81d00a4cba547067))
24
+ * **api:** api update ([bc8226e](https://github.com/whopio/whopsdk-ruby/commit/bc8226e36a365d09cd1503725ca24106f45633a6))
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * align path encoding with RFC 3986 section 3.3 ([c355b7f](https://github.com/whopio/whopsdk-ruby/commit/c355b7ff9dc90431096753bb761f0d705f9c43d4))
30
+ * **internal:** correct multipart form field name encoding ([ffcbbd3](https://github.com/whopio/whopsdk-ruby/commit/ffcbbd34b2068a3b2fed37a80422bb1023a9df5d))
31
+ * variable name typo ([2c4b26c](https://github.com/whopio/whopsdk-ruby/commit/2c4b26c0ffda6d22c4fcc450b9fb351ce91e9af1))
32
+
33
+
34
+ ### Chores
35
+
36
+ * **ci:** skip lint on metadata-only changes ([772c7bb](https://github.com/whopio/whopsdk-ruby/commit/772c7bb1c831c69ddb68b779c053276189ddf287))
37
+ * **ci:** support opting out of skipping builds on metadata-only commits ([1910434](https://github.com/whopio/whopsdk-ruby/commit/1910434440c5a7d2841770cc2a1e7352dbfa545a))
38
+ * **internal:** update gitignore ([70a6981](https://github.com/whopio/whopsdk-ruby/commit/70a69813a7a9afdeebf401362aa020f851cc4ac8))
39
+
3
40
  ## 0.0.35 (2026-03-18)
4
41
 
5
42
  Full Changelog: [v0.0.34...v0.0.35](https://github.com/whopio/whopsdk-ruby/compare/v0.0.34...v0.0.35)
data/README.md CHANGED
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
26
26
  <!-- x-release-please-start-version -->
27
27
 
28
28
  ```ruby
29
- gem "whop_sdk", "~> 0.0.35"
29
+ gem "whop_sdk", "~> 0.0.36"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -10,9 +10,9 @@ module WhopSDK
10
10
  # case unwrap_webhook_event
11
11
  # when WhopSDK::InvoiceCreatedWebhookEvent
12
12
  # puts(unwrap_webhook_event.id)
13
- # when WhopSDK::InvoicePaidWebhookEvent
13
+ # when WhopSDK::InvoiceMarkedUncollectibleWebhookEvent
14
14
  # puts(unwrap_webhook_event.api_version)
15
- # when WhopSDK::InvoicePastDueWebhookEvent
15
+ # when WhopSDK::InvoicePaidWebhookEvent
16
16
  # puts(unwrap_webhook_event.data)
17
17
  # else
18
18
  # puts(unwrap_webhook_event)
@@ -22,9 +22,9 @@ module WhopSDK
22
22
  # case unwrap_webhook_event
23
23
  # in {type: :"invoice.created", id: id, api_version: api_version, data: data}
24
24
  # puts(id)
25
- # in {type: :"invoice.paid", id: id, api_version: api_version, data: data}
25
+ # in {type: :"invoice.marked_uncollectible", id: id, api_version: api_version, data: data}
26
26
  # puts(api_version)
27
- # in {type: :"invoice.past_due", id: id, api_version: api_version, data: data}
27
+ # in {type: :"invoice.paid", id: id, api_version: api_version, data: data}
28
28
  # puts(data)
29
29
  # else
30
30
  # puts(unwrap_webhook_event)
@@ -157,7 +157,7 @@ module WhopSDK
157
157
  in Hash | nil => coerced
158
158
  coerced
159
159
  else
160
- message = "Expected a #{Hash} or #{WhopSDK::Internal::Type::BaseModel}, got #{data.inspect}"
160
+ message = "Expected a #{Hash} or #{WhopSDK::Internal::Type::BaseModel}, got #{input.inspect}"
161
161
  raise ArgumentError.new(message)
162
162
  end
163
163
  end
@@ -237,6 +237,11 @@ module WhopSDK
237
237
  end
238
238
  end
239
239
 
240
+ # @type [Regexp]
241
+ #
242
+ # https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3
243
+ RFC_3986_NOT_PCHARS = /[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/
244
+
240
245
  class << self
241
246
  # @api private
242
247
  #
@@ -247,6 +252,15 @@ module WhopSDK
247
252
  "#{uri.scheme}://#{uri.host}#{":#{uri.port}" unless uri.port == uri.default_port}"
248
253
  end
249
254
 
255
+ # @api private
256
+ #
257
+ # @param path [String, Integer]
258
+ #
259
+ # @return [String]
260
+ def encode_path(path)
261
+ path.to_s.gsub(WhopSDK::Internal::Util::RFC_3986_NOT_PCHARS) { ERB::Util.url_encode(_1) }
262
+ end
263
+
250
264
  # @api private
251
265
  #
252
266
  # @param path [String, Array<String>]
@@ -259,7 +273,7 @@ module WhopSDK
259
273
  in []
260
274
  ""
261
275
  in [String => p, *interpolations]
262
- encoded = interpolations.map { ERB::Util.url_encode(_1) }
276
+ encoded = interpolations.map { encode_path(_1) }
263
277
  format(p, *encoded)
264
278
  end
265
279
  end
@@ -571,16 +585,15 @@ module WhopSDK
571
585
  y << "Content-Disposition: form-data"
572
586
 
573
587
  unless key.nil?
574
- name = ERB::Util.url_encode(key.to_s)
575
- y << "; name=\"#{name}\""
588
+ y << "; name=\"#{key}\""
576
589
  end
577
590
 
578
591
  case val
579
592
  in WhopSDK::FilePart unless val.filename.nil?
580
- filename = ERB::Util.url_encode(val.filename)
593
+ filename = encode_path(val.filename)
581
594
  y << "; filename=\"#{filename}\""
582
595
  in Pathname | IO
583
- filename = ERB::Util.url_encode(::File.basename(val.to_path))
596
+ filename = encode_path(::File.basename(val.to_path))
584
597
  y << "; filename=\"#{filename}\""
585
598
  else
586
599
  end
@@ -29,19 +29,20 @@ module WhopSDK
29
29
  required :created_at, Time
30
30
 
31
31
  # @!attribute customer_retention_rate
32
- # How many referrals have remained since they joined as members
32
+ # The percentage of referred customers who are still active members
33
33
  #
34
34
  # @return [String]
35
35
  required :customer_retention_rate, String
36
36
 
37
37
  # @!attribute customer_retention_rate_ninety_days
38
- # A rolling 90-day retention rate for this affiliate
38
+ # The percentage of referred customers who remained active over the last 90 days
39
39
  #
40
40
  # @return [String]
41
41
  required :customer_retention_rate_ninety_days, String
42
42
 
43
43
  # @!attribute monthly_recurring_revenue_usd
44
- # The total MRR of the affiliate
44
+ # The monthly recurring revenue generated by this affiliate's referrals, formatted
45
+ # as a USD currency string
45
46
  #
46
47
  # @return [String]
47
48
  required :monthly_recurring_revenue_usd, String
@@ -59,7 +60,8 @@ module WhopSDK
59
60
  required :total_overrides_count, Integer
60
61
 
61
62
  # @!attribute total_referral_earnings_usd
62
- # The total earnings of the affiliate from the users they referred
63
+ # The total commission earnings paid to this affiliate, formatted as a USD
64
+ # currency string
63
65
  #
64
66
  # @return [String]
65
67
  required :total_referral_earnings_usd, String
@@ -71,7 +73,8 @@ module WhopSDK
71
73
  required :total_referrals_count, Integer
72
74
 
73
75
  # @!attribute total_revenue_usd
74
- # The total revenue of the affiliate from their referrals
76
+ # The total revenue generated from this affiliate's referrals, formatted as a USD
77
+ # currency string
75
78
  #
76
79
  # @return [String]
77
80
  required :total_revenue_usd, String
@@ -89,7 +92,11 @@ module WhopSDK
89
92
  required :user, -> { WhopSDK::Affiliate::User }
90
93
 
91
94
  # @!method initialize(id:, active_members_count:, company:, created_at:, customer_retention_rate:, customer_retention_rate_ninety_days:, monthly_recurring_revenue_usd:, status:, total_overrides_count:, total_referral_earnings_usd:, total_referrals_count:, total_revenue_usd:, updated_at:, user:)
92
- # An affiliate of a company or a global affiliate
95
+ # Some parameter documentations has been truncated, see
96
+ # {WhopSDK::Models::Affiliate} for more details.
97
+ #
98
+ # An affiliate tracks a user's referral performance and commission earnings for a
99
+ # company, including retention rates, revenue metrics, and payout configurations.
93
100
  #
94
101
  # @param id [String] The unique identifier for the affiliate.
95
102
  #
@@ -99,21 +106,21 @@ module WhopSDK
99
106
  #
100
107
  # @param created_at [Time] The datetime the affiliate was created.
101
108
  #
102
- # @param customer_retention_rate [String] How many referrals have remained since they joined as members
109
+ # @param customer_retention_rate [String] The percentage of referred customers who are still active members
103
110
  #
104
- # @param customer_retention_rate_ninety_days [String] A rolling 90-day retention rate for this affiliate
111
+ # @param customer_retention_rate_ninety_days [String] The percentage of referred customers who remained active over the last 90 days
105
112
  #
106
- # @param monthly_recurring_revenue_usd [String] The total MRR of the affiliate
113
+ # @param monthly_recurring_revenue_usd [String] The monthly recurring revenue generated by this affiliate's referrals, formatted
107
114
  #
108
115
  # @param status [Symbol, WhopSDK::Models::Status, nil] Statuses for resources
109
116
  #
110
117
  # @param total_overrides_count [Integer] The total count of all overrides for this affiliate
111
118
  #
112
- # @param total_referral_earnings_usd [String] The total earnings of the affiliate from the users they referred
119
+ # @param total_referral_earnings_usd [String] The total commission earnings paid to this affiliate, formatted as a USD currenc
113
120
  #
114
121
  # @param total_referrals_count [Integer] The total referrals of the affiliate
115
122
  #
116
- # @param total_revenue_usd [String] The total revenue of the affiliate from their referrals
123
+ # @param total_revenue_usd [String] The total revenue generated from this affiliate's referrals, formatted as a USD
117
124
  #
118
125
  # @param updated_at [Time] The datetime the affiliate was last updated.
119
126
  #
@@ -29,19 +29,20 @@ module WhopSDK
29
29
  required :created_at, Time
30
30
 
31
31
  # @!attribute customer_retention_rate
32
- # How many referrals have remained since they joined as members
32
+ # The percentage of referred customers who are still active members
33
33
  #
34
34
  # @return [String]
35
35
  required :customer_retention_rate, String
36
36
 
37
37
  # @!attribute customer_retention_rate_ninety_days
38
- # A rolling 90-day retention rate for this affiliate
38
+ # The percentage of referred customers who remained active over the last 90 days
39
39
  #
40
40
  # @return [String]
41
41
  required :customer_retention_rate_ninety_days, String
42
42
 
43
43
  # @!attribute monthly_recurring_revenue_usd
44
- # The total MRR of the affiliate
44
+ # The monthly recurring revenue generated by this affiliate's referrals, formatted
45
+ # as a USD currency string
45
46
  #
46
47
  # @return [String]
47
48
  required :monthly_recurring_revenue_usd, String
@@ -59,7 +60,8 @@ module WhopSDK
59
60
  required :total_overrides_count, Integer
60
61
 
61
62
  # @!attribute total_referral_earnings_usd
62
- # The total earnings of the affiliate from the users they referred
63
+ # The total commission earnings paid to this affiliate, formatted as a USD
64
+ # currency string
63
65
  #
64
66
  # @return [String]
65
67
  required :total_referral_earnings_usd, String
@@ -71,7 +73,8 @@ module WhopSDK
71
73
  required :total_referrals_count, Integer
72
74
 
73
75
  # @!attribute total_revenue_usd
74
- # The total revenue of the affiliate from their referrals
76
+ # The total revenue generated from this affiliate's referrals, formatted as a USD
77
+ # currency string
75
78
  #
76
79
  # @return [String]
77
80
  required :total_revenue_usd, String
@@ -89,7 +92,11 @@ module WhopSDK
89
92
  required :user, -> { WhopSDK::Models::AffiliateListResponse::User }
90
93
 
91
94
  # @!method initialize(id:, active_members_count:, company:, created_at:, customer_retention_rate:, customer_retention_rate_ninety_days:, monthly_recurring_revenue_usd:, status:, total_overrides_count:, total_referral_earnings_usd:, total_referrals_count:, total_revenue_usd:, updated_at:, user:)
92
- # An affiliate of a company or a global affiliate
95
+ # Some parameter documentations has been truncated, see
96
+ # {WhopSDK::Models::AffiliateListResponse} for more details.
97
+ #
98
+ # An affiliate tracks a user's referral performance and commission earnings for a
99
+ # company, including retention rates, revenue metrics, and payout configurations.
93
100
  #
94
101
  # @param id [String] The unique identifier for the affiliate.
95
102
  #
@@ -99,21 +106,21 @@ module WhopSDK
99
106
  #
100
107
  # @param created_at [Time] The datetime the affiliate was created.
101
108
  #
102
- # @param customer_retention_rate [String] How many referrals have remained since they joined as members
109
+ # @param customer_retention_rate [String] The percentage of referred customers who are still active members
103
110
  #
104
- # @param customer_retention_rate_ninety_days [String] A rolling 90-day retention rate for this affiliate
111
+ # @param customer_retention_rate_ninety_days [String] The percentage of referred customers who remained active over the last 90 days
105
112
  #
106
- # @param monthly_recurring_revenue_usd [String] The total MRR of the affiliate
113
+ # @param monthly_recurring_revenue_usd [String] The monthly recurring revenue generated by this affiliate's referrals, formatted
107
114
  #
108
115
  # @param status [Symbol, WhopSDK::Models::Status, nil] Statuses for resources
109
116
  #
110
117
  # @param total_overrides_count [Integer] The total count of all overrides for this affiliate
111
118
  #
112
- # @param total_referral_earnings_usd [String] The total earnings of the affiliate from the users they referred
119
+ # @param total_referral_earnings_usd [String] The total commission earnings paid to this affiliate, formatted as a USD currenc
113
120
  #
114
121
  # @param total_referrals_count [Integer] The total referrals of the affiliate
115
122
  #
116
- # @param total_revenue_usd [String] The total revenue of the affiliate from their referrals
123
+ # @param total_revenue_usd [String] The total revenue generated from this affiliate's referrals, formatted as a USD
117
124
  #
118
125
  # @param updated_at [Time] The datetime the affiliate was last updated.
119
126
  #
@@ -44,7 +44,8 @@ module WhopSDK
44
44
  required :commission_type, enum: -> { WhopSDK::Affiliates::AffiliatePayoutTypes }
45
45
 
46
46
  # @!attribute commission_value
47
- # The commission value (percentage 1-100 or flat fee in dollars).
47
+ # The commission amount. A percentage (1-100) when commission_type is percentage,
48
+ # or a dollar amount when flat_fee.
48
49
  #
49
50
  # @return [Float]
50
51
  required :commission_value, Float
@@ -90,7 +91,8 @@ module WhopSDK
90
91
  # Some parameter documentations has been truncated, see
91
92
  # {WhopSDK::Models::Affiliates::OverrideCreateResponse} for more details.
92
93
  #
93
- # An object storing information about the affiliate
94
+ # A commission configuration for an affiliate, defining payout terms for a
95
+ # specific plan or revenue share
94
96
  #
95
97
  # @param id [String] The unique identifier for the affiliate override.
96
98
  #
@@ -102,7 +104,7 @@ module WhopSDK
102
104
  #
103
105
  # @param commission_type [Symbol, WhopSDK::Models::Affiliates::AffiliatePayoutTypes] The type of commission (percentage or flat_fee).
104
106
  #
105
- # @param commission_value [Float] The commission value (percentage 1-100 or flat fee in dollars).
107
+ # @param commission_value [Float] The commission amount. A percentage (1-100) when commission_type is percentage,
106
108
  #
107
109
  # @param override_type [Symbol, WhopSDK::Models::Affiliates::AffiliateOverrideRoles] The type of override (standard or rev_share).
108
110
  #
@@ -44,7 +44,8 @@ module WhopSDK
44
44
  required :commission_type, enum: -> { WhopSDK::Affiliates::AffiliatePayoutTypes }
45
45
 
46
46
  # @!attribute commission_value
47
- # The commission value (percentage 1-100 or flat fee in dollars).
47
+ # The commission amount. A percentage (1-100) when commission_type is percentage,
48
+ # or a dollar amount when flat_fee.
48
49
  #
49
50
  # @return [Float]
50
51
  required :commission_value, Float
@@ -90,7 +91,8 @@ module WhopSDK
90
91
  # Some parameter documentations has been truncated, see
91
92
  # {WhopSDK::Models::Affiliates::OverrideListResponse} for more details.
92
93
  #
93
- # An object storing information about the affiliate
94
+ # A commission configuration for an affiliate, defining payout terms for a
95
+ # specific plan or revenue share
94
96
  #
95
97
  # @param id [String] The unique identifier for the affiliate override.
96
98
  #
@@ -102,7 +104,7 @@ module WhopSDK
102
104
  #
103
105
  # @param commission_type [Symbol, WhopSDK::Models::Affiliates::AffiliatePayoutTypes] The type of commission (percentage or flat_fee).
104
106
  #
105
- # @param commission_value [Float] The commission value (percentage 1-100 or flat fee in dollars).
107
+ # @param commission_value [Float] The commission amount. A percentage (1-100) when commission_type is percentage,
106
108
  #
107
109
  # @param override_type [Symbol, WhopSDK::Models::Affiliates::AffiliateOverrideRoles] The type of override (standard or rev_share).
108
110
  #
@@ -44,7 +44,8 @@ module WhopSDK
44
44
  required :commission_type, enum: -> { WhopSDK::Affiliates::AffiliatePayoutTypes }
45
45
 
46
46
  # @!attribute commission_value
47
- # The commission value (percentage 1-100 or flat fee in dollars).
47
+ # The commission amount. A percentage (1-100) when commission_type is percentage,
48
+ # or a dollar amount when flat_fee.
48
49
  #
49
50
  # @return [Float]
50
51
  required :commission_value, Float
@@ -90,7 +91,8 @@ module WhopSDK
90
91
  # Some parameter documentations has been truncated, see
91
92
  # {WhopSDK::Models::Affiliates::OverrideRetrieveResponse} for more details.
92
93
  #
93
- # An object storing information about the affiliate
94
+ # A commission configuration for an affiliate, defining payout terms for a
95
+ # specific plan or revenue share
94
96
  #
95
97
  # @param id [String] The unique identifier for the affiliate override.
96
98
  #
@@ -102,7 +104,7 @@ module WhopSDK
102
104
  #
103
105
  # @param commission_type [Symbol, WhopSDK::Models::Affiliates::AffiliatePayoutTypes] The type of commission (percentage or flat_fee).
104
106
  #
105
- # @param commission_value [Float] The commission value (percentage 1-100 or flat fee in dollars).
107
+ # @param commission_value [Float] The commission amount. A percentage (1-100) when commission_type is percentage,
106
108
  #
107
109
  # @param override_type [Symbol, WhopSDK::Models::Affiliates::AffiliateOverrideRoles] The type of override (standard or rev_share).
108
110
  #
@@ -44,7 +44,8 @@ module WhopSDK
44
44
  required :commission_type, enum: -> { WhopSDK::Affiliates::AffiliatePayoutTypes }
45
45
 
46
46
  # @!attribute commission_value
47
- # The commission value (percentage 1-100 or flat fee in dollars).
47
+ # The commission amount. A percentage (1-100) when commission_type is percentage,
48
+ # or a dollar amount when flat_fee.
48
49
  #
49
50
  # @return [Float]
50
51
  required :commission_value, Float
@@ -90,7 +91,8 @@ module WhopSDK
90
91
  # Some parameter documentations has been truncated, see
91
92
  # {WhopSDK::Models::Affiliates::OverrideUpdateResponse} for more details.
92
93
  #
93
- # An object storing information about the affiliate
94
+ # A commission configuration for an affiliate, defining payout terms for a
95
+ # specific plan or revenue share
94
96
  #
95
97
  # @param id [String] The unique identifier for the affiliate override.
96
98
  #
@@ -102,7 +104,7 @@ module WhopSDK
102
104
  #
103
105
  # @param commission_type [Symbol, WhopSDK::Models::Affiliates::AffiliatePayoutTypes] The type of commission (percentage or flat_fee).
104
106
  #
105
- # @param commission_value [Float] The commission value (percentage 1-100 or flat fee in dollars).
107
+ # @param commission_value [Float] The commission amount. A percentage (1-100) when commission_type is percentage,
106
108
  #
107
109
  # @param override_type [Symbol, WhopSDK::Models::Affiliates::AffiliateOverrideRoles] The type of override (standard or rev_share).
108
110
  #
@@ -94,6 +94,21 @@ module WhopSDK
94
94
  # @return [String]
95
95
  required :name, String
96
96
 
97
+ # @!attribute openapi_path
98
+ # The URL path template for a specific view of this app, appended to the base
99
+ # domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is
100
+ # not configured.
101
+ #
102
+ # @return [String, nil]
103
+ required :openapi_path, String, nil?: true
104
+
105
+ # @!attribute origin
106
+ # The full origin URL for this app's proxied domain (e.g.,
107
+ # 'https://myapp.apps.whop.com'). Null if no proxy domain is configured.
108
+ #
109
+ # @return [String, nil]
110
+ required :origin, String, nil?: true
111
+
97
112
  # @!attribute redirect_uris
98
113
  # The whitelisted OAuth callback URLs that users are redirected to after
99
114
  # authorizing the app.
@@ -109,6 +124,14 @@ module WhopSDK
109
124
  required :requested_permissions,
110
125
  -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::App::RequestedPermission] }
111
126
 
127
+ # @!attribute skills_path
128
+ # The URL path template for a specific view of this app, appended to the base
129
+ # domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is
130
+ # not configured.
131
+ #
132
+ # @return [String, nil]
133
+ required :skills_path, String, nil?: true
134
+
112
135
  # @!attribute stats
113
136
  # Aggregate usage statistics for this app, including daily, weekly, and monthly
114
137
  # active user counts.
@@ -131,7 +154,7 @@ module WhopSDK
131
154
  # @return [Boolean]
132
155
  required :verified, WhopSDK::Internal::Type::Boolean
133
156
 
134
- # @!method initialize(id:, api_key:, app_type:, base_url:, company:, creator:, dashboard_path:, description:, discover_path:, domain_id:, experience_path:, icon:, name:, redirect_uris:, requested_permissions:, stats:, status:, verified:)
157
+ # @!method initialize(id:, api_key:, app_type:, base_url:, company:, creator:, dashboard_path:, description:, discover_path:, domain_id:, experience_path:, icon:, name:, openapi_path:, origin:, redirect_uris:, requested_permissions:, skills_path:, stats:, status:, verified:)
135
158
  # Some parameter documentations has been truncated, see {WhopSDK::Models::App} for
136
159
  # more details.
137
160
  #
@@ -164,10 +187,16 @@ module WhopSDK
164
187
  #
165
188
  # @param name [String] The display name of this app shown on the app store and in experience navigation
166
189
  #
190
+ # @param openapi_path [String, nil] The URL path template for a specific view of this app, appended to the base doma
191
+ #
192
+ # @param origin [String, nil] The full origin URL for this app's proxied domain (e.g., 'https://myapp.apps.who
193
+ #
167
194
  # @param redirect_uris [Array<String>] The whitelisted OAuth callback URLs that users are redirected to after authorizi
168
195
  #
169
196
  # @param requested_permissions [Array<WhopSDK::Models::App::RequestedPermission>] The list of permissions this app requests when installed, including both require
170
197
  #
198
+ # @param skills_path [String, nil] The URL path template for a specific view of this app, appended to the base doma
199
+ #
171
200
  # @param stats [WhopSDK::Models::App::Stats, nil] Aggregate usage statistics for this app, including daily, weekly, and monthly ac
172
201
  #
173
202
  # @param status [Symbol, WhopSDK::Models::AppStatuses] The current visibility status of this app on the Whop app store. 'live' means pu
@@ -88,6 +88,29 @@ module WhopSDK
88
88
  # @return [String]
89
89
  required :name, String
90
90
 
91
+ # @!attribute openapi_path
92
+ # The URL path template for a specific view of this app, appended to the base
93
+ # domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is
94
+ # not configured.
95
+ #
96
+ # @return [String, nil]
97
+ required :openapi_path, String, nil?: true
98
+
99
+ # @!attribute origin
100
+ # The full origin URL for this app's proxied domain (e.g.,
101
+ # 'https://myapp.apps.whop.com'). Null if no proxy domain is configured.
102
+ #
103
+ # @return [String, nil]
104
+ required :origin, String, nil?: true
105
+
106
+ # @!attribute skills_path
107
+ # The URL path template for a specific view of this app, appended to the base
108
+ # domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is
109
+ # not configured.
110
+ #
111
+ # @return [String, nil]
112
+ required :skills_path, String, nil?: true
113
+
91
114
  # @!attribute status
92
115
  # The current visibility status of this app on the Whop app store. 'live' means
93
116
  # publicly discoverable, 'unlisted' means accessible only via direct link, and
@@ -103,7 +126,7 @@ module WhopSDK
103
126
  # @return [Boolean]
104
127
  required :verified, WhopSDK::Internal::Type::Boolean
105
128
 
106
- # @!method initialize(id:, app_type:, base_url:, company:, creator:, dashboard_path:, description:, discover_path:, domain_id:, experience_path:, icon:, name:, status:, verified:)
129
+ # @!method initialize(id:, app_type:, base_url:, company:, creator:, dashboard_path:, description:, discover_path:, domain_id:, experience_path:, icon:, name:, openapi_path:, origin:, skills_path:, status:, verified:)
107
130
  # Some parameter documentations has been truncated, see
108
131
  # {WhopSDK::Models::AppListResponse} for more details.
109
132
  #
@@ -134,6 +157,12 @@ module WhopSDK
134
157
  #
135
158
  # @param name [String] The display name of this app shown on the app store and in experience navigation
136
159
  #
160
+ # @param openapi_path [String, nil] The URL path template for a specific view of this app, appended to the base doma
161
+ #
162
+ # @param origin [String, nil] The full origin URL for this app's proxied domain (e.g., 'https://myapp.apps.who
163
+ #
164
+ # @param skills_path [String, nil] The URL path template for a specific view of this app, appended to the base doma
165
+ #
137
166
  # @param status [Symbol, WhopSDK::Models::AppStatuses] The current visibility status of this app on the Whop app store. 'live' means pu
138
167
  #
139
168
  # @param verified [Boolean] Whether this app has been verified by Whop. Verified apps are endorsed by Whop a
@@ -74,6 +74,13 @@ module WhopSDK
74
74
  # @return [Symbol, WhopSDK::Models::AppUpdateParams::OAuthClientType, nil]
75
75
  optional :oauth_client_type, enum: -> { WhopSDK::AppUpdateParams::OAuthClientType }, nil?: true
76
76
 
77
+ # @!attribute openapi_path
78
+ # The URL path to the OpenAPI spec file of the app, such as
79
+ # '/assets/openapi.json'.
80
+ #
81
+ # @return [String, nil]
82
+ optional :openapi_path, String, nil?: true
83
+
77
84
  # @!attribute redirect_uris
78
85
  # The whitelisted OAuth callback URLs that users are redirected to after
79
86
  # authorizing the app
@@ -89,13 +96,19 @@ module WhopSDK
89
96
  -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::AppUpdateParams::RequiredScope] },
90
97
  nil?: true
91
98
 
99
+ # @!attribute skills_path
100
+ # The URL path to the skills directory of the app, such as '/assets/skills/'.
101
+ #
102
+ # @return [String, nil]
103
+ optional :skills_path, String, nil?: true
104
+
92
105
  # @!attribute status
93
106
  # The status of an experience interface
94
107
  #
95
108
  # @return [Symbol, WhopSDK::Models::AppStatuses, nil]
96
109
  optional :status, enum: -> { WhopSDK::AppStatuses }, nil?: true
97
110
 
98
- # @!method initialize(id:, app_store_description: nil, app_type: nil, base_url: nil, dashboard_path: nil, description: nil, discover_path: nil, experience_path: nil, icon: nil, name: nil, oauth_client_type: nil, redirect_uris: nil, required_scopes: nil, status: nil, request_options: {})
111
+ # @!method initialize(id:, app_store_description: nil, app_type: nil, base_url: nil, dashboard_path: nil, description: nil, discover_path: nil, experience_path: nil, icon: nil, name: nil, oauth_client_type: nil, openapi_path: nil, redirect_uris: nil, required_scopes: nil, skills_path: nil, status: nil, request_options: {})
99
112
  # Some parameter documentations has been truncated, see
100
113
  # {WhopSDK::Models::AppUpdateParams} for more details.
101
114
  #
@@ -121,10 +134,14 @@ module WhopSDK
121
134
  #
122
135
  # @param oauth_client_type [Symbol, WhopSDK::Models::AppUpdateParams::OAuthClientType, nil] How this app authenticates at the OAuth token endpoint.
123
136
  #
137
+ # @param openapi_path [String, nil] The URL path to the OpenAPI spec file of the app, such as '/assets/openapi.json'
138
+ #
124
139
  # @param redirect_uris [Array<String>, nil] The whitelisted OAuth callback URLs that users are redirected to after authorizi
125
140
  #
126
141
  # @param required_scopes [Array<Symbol, WhopSDK::Models::AppUpdateParams::RequiredScope>, nil] The permission scopes the app will request from users when they install it.
127
142
  #
143
+ # @param skills_path [String, nil] The URL path to the skills directory of the app, such as '/assets/skills/'.
144
+ #
128
145
  # @param status [Symbol, WhopSDK::Models::AppStatuses, nil] The status of an experience interface
129
146
  #
130
147
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
@@ -11,6 +11,8 @@ module WhopSDK
11
11
  DASH = :dash
12
12
  DASHBOARD = :dashboard
13
13
  ANALYTICS = :analytics
14
+ SKILLS = :skills
15
+ OPENAPI = :openapi
14
16
 
15
17
  # @!method self.values
16
18
  # @return [Array<Symbol>]
@@ -44,6 +44,7 @@ module WhopSDK
44
44
  CABAL = :cabal
45
45
  HIPERCARD = :hipercard
46
46
  JCBLANKAPAY = :jcblankapay
47
+ CMI = :cmi
47
48
  UNKNOWN = :unknown
48
49
 
49
50
  # @!method self.values