Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
bc8226e
feat(api): api update
stainless-app[bot] Mar 18, 2026
c1ce4e0
feat(api): api update
stainless-app[bot] Mar 20, 2026
70a6981
chore(internal): update gitignore
stainless-app[bot] Mar 23, 2026
eaacc3d
feat(api): api update
stainless-app[bot] Mar 23, 2026
772c7bb
chore(ci): skip lint on metadata-only changes
stainless-app[bot] Mar 24, 2026
5de4eb3
codegen metadata
stainless-app[bot] Mar 24, 2026
0ad1a1e
codegen metadata
stainless-app[bot] Mar 25, 2026
9be2f31
feat(api): api update
stainless-app[bot] Mar 25, 2026
f24c39e
codegen metadata
stainless-app[bot] Mar 25, 2026
69bb1d3
codegen metadata
stainless-app[bot] Mar 25, 2026
b539f7c
codegen metadata
stainless-app[bot] Mar 25, 2026
070576e
feat(api): api update
stainless-app[bot] Mar 25, 2026
e0b1ba8
codegen metadata
stainless-app[bot] Mar 26, 2026
ffcbbd3
fix(internal): correct multipart form field name encoding
stainless-app[bot] Mar 26, 2026
7e4abda
feat(api): api update
stainless-app[bot] Mar 26, 2026
fd1f6e4
feat(api): api update
stainless-app[bot] Mar 27, 2026
c6da015
feat(api): api update
stainless-app[bot] Mar 27, 2026
1910434
chore(ci): support opting out of skipping builds on metadata-only com…
stainless-app[bot] Mar 27, 2026
041bebb
feat(api): api update
stainless-app[bot] Mar 27, 2026
adca054
codegen metadata
stainless-app[bot] Mar 27, 2026
9c3a8f7
codegen metadata
stainless-app[bot] Mar 28, 2026
0600028
codegen metadata
stainless-app[bot] Mar 30, 2026
861ff42
feat(api): api update
stainless-app[bot] Mar 30, 2026
9d9d279
feat(api): api update
stainless-app[bot] Mar 31, 2026
77b3977
feat(api): api update
stainless-app[bot] Mar 31, 2026
bd6996b
feat(api): api update
stainless-app[bot] Mar 31, 2026
2c4b26c
fix: variable name typo
stainless-app[bot] Mar 31, 2026
c355b7f
fix: align path encoding with RFC 3986 section 3.3
stainless-app[bot] Mar 31, 2026
0904666
feat(api): api update
stainless-app[bot] Apr 1, 2026
078f6eb
codegen metadata
stainless-app[bot] Apr 1, 2026
82f671a
feat(api): api update
stainless-app[bot] Apr 1, 2026
ff045f2
feat(api): api update
stainless-app[bot] Apr 1, 2026
1f361a1
release: 0.0.36
stainless-app[bot] Apr 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/whopsdk-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: |-
github.repository == 'stainless-sdks/whopsdk-ruby' &&
(github.event_name == 'push' || github.event.pull_request.head.repo.fork)
(github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@v6
- name: Set up Ruby
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.idea/
.ignore
.prism.log
.stdy.log
.ruby-lsp/
.yardoc/
bin/tapioca
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.0.35"
".": "0.0.36"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 191
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-97e920db587b07c064bef1bf31de5e110a3750ddfddc8fca26642e79e6b827f8.yml
openapi_spec_hash: 97ca16cc55271602443a4329d1e02895
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-dbc99b95f02e6b568750045987763dbdafa1edc5a7ac425e3831e61929d7ecec.yml
openapi_spec_hash: d2ec900df5b29b03d1d1786336d1daf5
config_hash: 1a836d20bb988f001cc66d1526f71306
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
# Changelog

## 0.0.36 (2026-04-01)

Full Changelog: [v0.0.35...v0.0.36](https://github.com/whopio/whopsdk-ruby/compare/v0.0.35...v0.0.36)

### Features

* **api:** api update ([ff045f2](https://github.com/whopio/whopsdk-ruby/commit/ff045f241a4b159b3e2701a260666f968fc218a9))
* **api:** api update ([82f671a](https://github.com/whopio/whopsdk-ruby/commit/82f671a64f6290642af4ef888a696eeeb414cc39))
* **api:** api update ([0904666](https://github.com/whopio/whopsdk-ruby/commit/0904666825216c11a018402de7ea7b6fde55ebcd))
* **api:** api update ([bd6996b](https://github.com/whopio/whopsdk-ruby/commit/bd6996b215315a72bce3b457a84b2127990a9a48))
* **api:** api update ([77b3977](https://github.com/whopio/whopsdk-ruby/commit/77b397710fca468ccb60b0977fea756ffe72af8d))
* **api:** api update ([9d9d279](https://github.com/whopio/whopsdk-ruby/commit/9d9d279cd5461a69d40513a7140cd935655a3e7f))
* **api:** api update ([861ff42](https://github.com/whopio/whopsdk-ruby/commit/861ff42ed47f7e8e9f13ae9d93655dcc004cf1b2))
* **api:** api update ([041bebb](https://github.com/whopio/whopsdk-ruby/commit/041bebb9ad2dcb4dc09feec04f22c79e1e26b376))
* **api:** api update ([c6da015](https://github.com/whopio/whopsdk-ruby/commit/c6da0152cd1dde833a05724f76a0e80ecd999203))
* **api:** api update ([fd1f6e4](https://github.com/whopio/whopsdk-ruby/commit/fd1f6e45955543fd67d086ff7e6c946afde283ee))
* **api:** api update ([7e4abda](https://github.com/whopio/whopsdk-ruby/commit/7e4abdab5a1764be25995aa622b871754de6a985))
* **api:** api update ([070576e](https://github.com/whopio/whopsdk-ruby/commit/070576e3e8a321f85a1c8546bd0f3e5355a7e452))
* **api:** api update ([9be2f31](https://github.com/whopio/whopsdk-ruby/commit/9be2f31407db03106bea259ac4da78e8c1407962))
* **api:** api update ([eaacc3d](https://github.com/whopio/whopsdk-ruby/commit/eaacc3d5f6a85e8fa2a13d4b9cb57eb390801b90))
* **api:** api update ([c1ce4e0](https://github.com/whopio/whopsdk-ruby/commit/c1ce4e08b7a1c33b6e43da9c81d00a4cba547067))
* **api:** api update ([bc8226e](https://github.com/whopio/whopsdk-ruby/commit/bc8226e36a365d09cd1503725ca24106f45633a6))


### Bug Fixes

* align path encoding with RFC 3986 section 3.3 ([c355b7f](https://github.com/whopio/whopsdk-ruby/commit/c355b7ff9dc90431096753bb761f0d705f9c43d4))
* **internal:** correct multipart form field name encoding ([ffcbbd3](https://github.com/whopio/whopsdk-ruby/commit/ffcbbd34b2068a3b2fed37a80422bb1023a9df5d))
* variable name typo ([2c4b26c](https://github.com/whopio/whopsdk-ruby/commit/2c4b26c0ffda6d22c4fcc450b9fb351ce91e9af1))


### Chores

* **ci:** skip lint on metadata-only changes ([772c7bb](https://github.com/whopio/whopsdk-ruby/commit/772c7bb1c831c69ddb68b779c053276189ddf287))
* **ci:** support opting out of skipping builds on metadata-only commits ([1910434](https://github.com/whopio/whopsdk-ruby/commit/1910434440c5a7d2841770cc2a1e7352dbfa545a))
* **internal:** update gitignore ([70a6981](https://github.com/whopio/whopsdk-ruby/commit/70a69813a7a9afdeebf401362aa020f851cc4ac8))

## 0.0.35 (2026-03-18)

Full Changelog: [v0.0.34...v0.0.35](https://github.com/whopio/whopsdk-ruby/compare/v0.0.34...v0.0.35)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
whop_sdk (0.0.35)
whop_sdk (0.0.36)
cgi
connection_pool
standardwebhooks
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
<!-- x-release-please-start-version -->

```ruby
gem "whop_sdk", "~> 0.0.35"
gem "whop_sdk", "~> 0.0.36"
```

<!-- x-release-please-end -->
Expand Down
4 changes: 4 additions & 0 deletions lib/whop_sdk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@
require_relative "whop_sdk/models/invoice_create_params"
require_relative "whop_sdk/models/invoice_list_item"
require_relative "whop_sdk/models/invoice_list_params"
require_relative "whop_sdk/models/invoice_marked_uncollectible_webhook_event"
require_relative "whop_sdk/models/invoice_paid_webhook_event"
require_relative "whop_sdk/models/invoice_past_due_webhook_event"
require_relative "whop_sdk/models/invoice_retrieve_params"
Expand Down Expand Up @@ -404,7 +405,9 @@
require_relative "whop_sdk/models/refund_status"
require_relative "whop_sdk/models/refund_updated_webhook_event"
require_relative "whop_sdk/models/release_method"
require_relative "whop_sdk/models/resolution_center_case_created_webhook_event"
require_relative "whop_sdk/models/resolution_center_case_customer_response"
require_relative "whop_sdk/models/resolution_center_case_decided_webhook_event"
require_relative "whop_sdk/models/resolution_center_case_issue_type"
require_relative "whop_sdk/models/resolution_center_case_list_params"
require_relative "whop_sdk/models/resolution_center_case_list_response"
Expand All @@ -413,6 +416,7 @@
require_relative "whop_sdk/models/resolution_center_case_retrieve_params"
require_relative "whop_sdk/models/resolution_center_case_retrieve_response"
require_relative "whop_sdk/models/resolution_center_case_status"
require_relative "whop_sdk/models/resolution_center_case_updated_webhook_event"
require_relative "whop_sdk/models/review_list_params"
require_relative "whop_sdk/models/review_list_response"
require_relative "whop_sdk/models/review_retrieve_params"
Expand Down
8 changes: 4 additions & 4 deletions lib/whop_sdk/internal/type/union.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ module Type
# case unwrap_webhook_event
# when WhopSDK::InvoiceCreatedWebhookEvent
# puts(unwrap_webhook_event.id)
# when WhopSDK::InvoicePaidWebhookEvent
# when WhopSDK::InvoiceMarkedUncollectibleWebhookEvent
# puts(unwrap_webhook_event.api_version)
# when WhopSDK::InvoicePastDueWebhookEvent
# when WhopSDK::InvoicePaidWebhookEvent
# puts(unwrap_webhook_event.data)
# else
# puts(unwrap_webhook_event)
Expand All @@ -22,9 +22,9 @@ module Type
# case unwrap_webhook_event
# in {type: :"invoice.created", id: id, api_version: api_version, data: data}
# puts(id)
# in {type: :"invoice.paid", id: id, api_version: api_version, data: data}
# in {type: :"invoice.marked_uncollectible", id: id, api_version: api_version, data: data}
# puts(api_version)
# in {type: :"invoice.past_due", id: id, api_version: api_version, data: data}
# in {type: :"invoice.paid", id: id, api_version: api_version, data: data}
# puts(data)
# else
# puts(unwrap_webhook_event)
Expand Down
25 changes: 19 additions & 6 deletions lib/whop_sdk/internal/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def coerce_hash!(input)
in Hash | nil => coerced
coerced
else
message = "Expected a #{Hash} or #{WhopSDK::Internal::Type::BaseModel}, got #{data.inspect}"
message = "Expected a #{Hash} or #{WhopSDK::Internal::Type::BaseModel}, got #{input.inspect}"
raise ArgumentError.new(message)
end
end
Expand Down Expand Up @@ -237,6 +237,11 @@ def dig(data, pick, &blk)
end
end

# @type [Regexp]
#
# https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3
RFC_3986_NOT_PCHARS = /[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/

class << self
# @api private
#
Expand All @@ -247,6 +252,15 @@ def uri_origin(uri)
"#{uri.scheme}://#{uri.host}#{":#{uri.port}" unless uri.port == uri.default_port}"
end

# @api private
#
# @param path [String, Integer]
#
# @return [String]
def encode_path(path)
path.to_s.gsub(WhopSDK::Internal::Util::RFC_3986_NOT_PCHARS) { ERB::Util.url_encode(_1) }
end

# @api private
#
# @param path [String, Array<String>]
Expand All @@ -259,7 +273,7 @@ def interpolate_path(path)
in []
""
in [String => p, *interpolations]
encoded = interpolations.map { ERB::Util.url_encode(_1) }
encoded = interpolations.map { encode_path(_1) }
format(p, *encoded)
end
end
Expand Down Expand Up @@ -571,16 +585,15 @@ def encode_query_params(query)
y << "Content-Disposition: form-data"

unless key.nil?
name = ERB::Util.url_encode(key.to_s)
y << "; name=\"#{name}\""
y << "; name=\"#{key}\""
end

case val
in WhopSDK::FilePart unless val.filename.nil?
filename = ERB::Util.url_encode(val.filename)
filename = encode_path(val.filename)
y << "; filename=\"#{filename}\""
in Pathname | IO
filename = ERB::Util.url_encode(::File.basename(val.to_path))
filename = encode_path(::File.basename(val.to_path))
y << "; filename=\"#{filename}\""
else
end
Expand Down
8 changes: 8 additions & 0 deletions lib/whop_sdk/models.rb
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@ module WhopSDK

InvoiceListParams = WhopSDK::Models::InvoiceListParams

InvoiceMarkedUncollectibleWebhookEvent = WhopSDK::Models::InvoiceMarkedUncollectibleWebhookEvent

InvoicePaidWebhookEvent = WhopSDK::Models::InvoicePaidWebhookEvent

InvoicePastDueWebhookEvent = WhopSDK::Models::InvoicePastDueWebhookEvent
Expand Down Expand Up @@ -575,8 +577,12 @@ module WhopSDK

ReleaseMethod = WhopSDK::Models::ReleaseMethod

ResolutionCenterCaseCreatedWebhookEvent = WhopSDK::Models::ResolutionCenterCaseCreatedWebhookEvent

ResolutionCenterCaseCustomerResponse = WhopSDK::Models::ResolutionCenterCaseCustomerResponse

ResolutionCenterCaseDecidedWebhookEvent = WhopSDK::Models::ResolutionCenterCaseDecidedWebhookEvent

ResolutionCenterCaseIssueType = WhopSDK::Models::ResolutionCenterCaseIssueType

ResolutionCenterCaseListParams = WhopSDK::Models::ResolutionCenterCaseListParams
Expand All @@ -589,6 +595,8 @@ module WhopSDK

ResolutionCenterCaseStatus = WhopSDK::Models::ResolutionCenterCaseStatus

ResolutionCenterCaseUpdatedWebhookEvent = WhopSDK::Models::ResolutionCenterCaseUpdatedWebhookEvent

ReviewListParams = WhopSDK::Models::ReviewListParams

ReviewRetrieveParams = WhopSDK::Models::ReviewRetrieveParams
Expand Down
29 changes: 18 additions & 11 deletions lib/whop_sdk/models/affiliate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,20 @@ class Affiliate < WhopSDK::Internal::Type::BaseModel
required :created_at, Time

# @!attribute customer_retention_rate
# How many referrals have remained since they joined as members
# The percentage of referred customers who are still active members
#
# @return [String]
required :customer_retention_rate, String

# @!attribute customer_retention_rate_ninety_days
# A rolling 90-day retention rate for this affiliate
# The percentage of referred customers who remained active over the last 90 days
#
# @return [String]
required :customer_retention_rate_ninety_days, String

# @!attribute monthly_recurring_revenue_usd
# The total MRR of the affiliate
# The monthly recurring revenue generated by this affiliate's referrals, formatted
# as a USD currency string
#
# @return [String]
required :monthly_recurring_revenue_usd, String
Expand All @@ -59,7 +60,8 @@ class Affiliate < WhopSDK::Internal::Type::BaseModel
required :total_overrides_count, Integer

# @!attribute total_referral_earnings_usd
# The total earnings of the affiliate from the users they referred
# The total commission earnings paid to this affiliate, formatted as a USD
# currency string
#
# @return [String]
required :total_referral_earnings_usd, String
Expand All @@ -71,7 +73,8 @@ class Affiliate < WhopSDK::Internal::Type::BaseModel
required :total_referrals_count, Integer

# @!attribute total_revenue_usd
# The total revenue of the affiliate from their referrals
# The total revenue generated from this affiliate's referrals, formatted as a USD
# currency string
#
# @return [String]
required :total_revenue_usd, String
Expand All @@ -89,7 +92,11 @@ class Affiliate < WhopSDK::Internal::Type::BaseModel
required :user, -> { WhopSDK::Affiliate::User }

# @!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:)
# An affiliate of a company or a global affiliate
# Some parameter documentations has been truncated, see
# {WhopSDK::Models::Affiliate} for more details.
#
# An affiliate tracks a user's referral performance and commission earnings for a
# company, including retention rates, revenue metrics, and payout configurations.
#
# @param id [String] The unique identifier for the affiliate.
#
Expand All @@ -99,21 +106,21 @@ class Affiliate < WhopSDK::Internal::Type::BaseModel
#
# @param created_at [Time] The datetime the affiliate was created.
#
# @param customer_retention_rate [String] How many referrals have remained since they joined as members
# @param customer_retention_rate [String] The percentage of referred customers who are still active members
#
# @param customer_retention_rate_ninety_days [String] A rolling 90-day retention rate for this affiliate
# @param customer_retention_rate_ninety_days [String] The percentage of referred customers who remained active over the last 90 days
#
# @param monthly_recurring_revenue_usd [String] The total MRR of the affiliate
# @param monthly_recurring_revenue_usd [String] The monthly recurring revenue generated by this affiliate's referrals, formatted
#
# @param status [Symbol, WhopSDK::Models::Status, nil] Statuses for resources
#
# @param total_overrides_count [Integer] The total count of all overrides for this affiliate
#
# @param total_referral_earnings_usd [String] The total earnings of the affiliate from the users they referred
# @param total_referral_earnings_usd [String] The total commission earnings paid to this affiliate, formatted as a USD currenc
#
# @param total_referrals_count [Integer] The total referrals of the affiliate
#
# @param total_revenue_usd [String] The total revenue of the affiliate from their referrals
# @param total_revenue_usd [String] The total revenue generated from this affiliate's referrals, formatted as a USD
#
# @param updated_at [Time] The datetime the affiliate was last updated.
#
Expand Down
Loading