whop_sdk 2.1.0 → 2.2.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ef9584f8276d3e0089deb2e1a9f677798ecfc6c887cd255ab9b04e6c1ad9812
4
- data.tar.gz: 867e2610e5df98d2cb50c943c022ab6d7ccd406065251cf19919b1e59d2c81ec
3
+ metadata.gz: b2612faea0adeced1ebb946c68b05a6e3132689526e5e23127ba350eb5335bfc
4
+ data.tar.gz: 0afedac0ceaef9453740148b2929b808da2043bc71ccf44791ec0849fcb4dff2
5
5
  SHA512:
6
- metadata.gz: 8741d8a813a82407c1306f317a3892449934e7c28909eae75b9ef3b0596394e822b17ae81819b381722c6655d50cd7b24a7e948b3555ca9c08571385cb477e61
7
- data.tar.gz: 23ae643442f03b991439490aad08392d6a6dc789215816aba2e843575ee8efc7ffffde942f65e9516687095baae605354cc4daff26f0ac80beaa37b4eec907c3
6
+ metadata.gz: fdcfa928c1e9f1c43a61a9dbc03c641ebf39e9e84518682db5f988de36ab2eafb9dc72863bfbad32cc140f2c7a8a4adcb27a4846b49bef8ebedfe5352bf63430
7
+ data.tar.gz: 36afa44a9569c487cbfcd7268746d2bf2977987c066809a72deee7e854d3dae4af825b562beb3a822825ddb4353bfd7591e6c66617afb2248de6fc2ece5f67fe
data/.fern/metadata.json CHANGED
@@ -13,10 +13,10 @@
13
13
  "standardwebhooks": ">= 1.0"
14
14
  }
15
15
  },
16
- "originGitCommit": "dd36e7eba9adce05222a63ca87400e132a7477cb",
16
+ "originGitCommit": "2deffc785420e34391d4024ab646944d6a330406",
17
17
  "originGitCommitIsDirty": false,
18
18
  "invokedBy": "ci",
19
- "requestedVersion": "2.1.0",
19
+ "requestedVersion": "2.2.0",
20
20
  "ciProvider": "unknown",
21
- "sdkVersion": "2.1.0"
21
+ "sdkVersion": "2.2.0"
22
22
  }
data/.fern/replay.lock CHANGED
@@ -1722,5 +1722,23 @@ generations:
1722
1722
  cli_version: unknown
1723
1723
  generator_versions:
1724
1724
  fernapi/fern-ruby-sdk: 1.28.3
1725
- current_generation: 1c50e9e88147c14e4d0258cfba1f889360ce963d
1725
+ - commit_sha: b56333afde63c77aa885087fa3c4072030c9a0d0
1726
+ tree_hash: 3f1b439faa5ad0e399d46decd673fc1596f292b1
1727
+ timestamp: 2026-10-03T23:37:42.769Z
1728
+ cli_version: unknown
1729
+ generator_versions:
1730
+ fernapi/fern-ruby-sdk: 1.28.3
1731
+ - commit_sha: ca493a1345224f778a7e782d7fcea0b8562ede2b
1732
+ tree_hash: 27930c8b8a0a9785515ea6fc3a0c444e65c1e6f8
1733
+ timestamp: 2026-10-04T04:08:22.224Z
1734
+ cli_version: unknown
1735
+ generator_versions:
1736
+ fernapi/fern-ruby-sdk: 1.28.3
1737
+ - commit_sha: 48af0c33b4a9badb4463d599aed41883b8146aa6
1738
+ tree_hash: 2eae93c7e391522348669c7d9538b61301b3c98e
1739
+ timestamp: 2026-10-04T06:59:30.055Z
1740
+ cli_version: unknown
1741
+ generator_versions:
1742
+ fernapi/fern-ruby-sdk: 1.28.3
1743
+ current_generation: 48af0c33b4a9badb4463d599aed41883b8146aa6
1726
1744
  patches: []
@@ -35,7 +35,7 @@ module Whop_sdk
35
35
  @default_headers = {
36
36
  "X-Fern-Language": "Ruby",
37
37
  "X-Fern-SDK-Name": "whop_sdk",
38
- "X-Fern-SDK-Version": "2.1.0"
38
+ "X-Fern-SDK-Version": "2.2.0"
39
39
  }.merge(headers)
40
40
  @overridable_headers = overridable_headers.to_set { |name| name.to_s.downcase }
41
41
  end
@@ -20,7 +20,8 @@ module Whop_sdk
20
20
  # can be quoted without them. The purchase is priced from exactly what you send: no buyer is looked up, so no
21
21
  # stored registration or purchase history applies. Quote what you are about to charge and pass the quote's `id` as
22
22
  # `quote_id` when you create the payment: it then charges exactly the purchase, promo code and tax shown here. A
23
- # quote is priced once, in the plans' own currency, and may be consumed by one payment before `expires_at`.
23
+ # quote is priced once, in the plans' own currency or the `presentment_currency` you ask for, and may be consumed
24
+ # by one payment before `expires_at`.
24
25
  #
25
26
  # @param request_options [Hash]
26
27
  # @param params [Whop_sdk::PaymentQuotes::Types::CreatePaymentQuotesRequest]
@@ -8,6 +8,8 @@ module Whop_sdk
8
8
 
9
9
  field :ip_address, -> { String }, optional: true, nullable: false
10
10
 
11
+ field :presentment_currency, -> { String }, optional: true, nullable: false
12
+
11
13
  field :shipping_address, -> { Whop_sdk::PaymentQuotes::Types::CreatePaymentQuotesRequestShippingAddress }, optional: true, nullable: false
12
14
 
13
15
  field :tax_ids, -> { Internal::Types::Array[Whop_sdk::PaymentQuotes::Types::CreatePaymentQuotesRequestTaxIDsItem] }, optional: true, nullable: false
@@ -132,6 +132,7 @@ module Whop_sdk
132
132
  VIPPS = "vipps"
133
133
  WEBPAY = "webpay"
134
134
  WECHAT_PAY = "wechat_pay"
135
+ WHOP_PAY = "whop_pay"
135
136
  YAPE = "yape"
136
137
  ZIP = "zip"
137
138
  COINFLOW = "coinflow"
@@ -7,12 +7,18 @@ module Whop_sdk
7
7
 
8
8
  field :address, -> { Whop_sdk::Types::PaymentAddress }, optional: false, nullable: true
9
9
 
10
+ field :base_currency, -> { String }, optional: false, nullable: false
11
+
12
+ field :base_total, -> { Whop_sdk::Types::Money }, optional: false, nullable: false
13
+
10
14
  field :created_at, -> { String }, optional: false, nullable: false
11
15
 
12
16
  field :currency, -> { String }, optional: false, nullable: false
13
17
 
14
18
  field :discount, -> { Whop_sdk::Types::Money }, optional: false, nullable: false
15
19
 
20
+ field :exchange_rate, -> { String }, optional: false, nullable: true
21
+
16
22
  field :expires_at, -> { String }, optional: false, nullable: false
17
23
 
18
24
  field :id, -> { String }, optional: false, nullable: false
@@ -25,6 +31,8 @@ module Whop_sdk
25
31
 
26
32
  field :promo_code_id, -> { String }, optional: false, nullable: true
27
33
 
34
+ field :recommended_currencies, -> { Internal::Types::Array[String] }, optional: false, nullable: false
35
+
28
36
  field :shipping_address, -> { Whop_sdk::Types::PaymentAddress }, optional: false, nullable: true
29
37
 
30
38
  field :subtotal, -> { Whop_sdk::Types::Money }, optional: false, nullable: false
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Whop_sdk
4
- VERSION = "2.1.0"
4
+ VERSION = "2.2.0"
5
5
  end
data/reference.md CHANGED
@@ -25811,7 +25811,7 @@ client.payment_methods.delete_payment_method(
25811
25811
  <dl>
25812
25812
  <dd>
25813
25813
 
25814
- Prices a purchase the way a payment for it will be charged, for a buyer located by the shipping address, then the billing address, then the IP address you pass. The body is the `PaymentInput` a payment takes plus where the buyer is (`address`, `shipping_address`, `tax_ids`, `ip_address`); a seller that collects no tax on the purchase can be quoted without them. The purchase is priced from exactly what you send: no buyer is looked up, so no stored registration or purchase history applies. Quote what you are about to charge and pass the quote's `id` as `quote_id` when you create the payment: it then charges exactly the purchase, promo code and tax shown here. A quote is priced once, in the plans' own currency, and may be consumed by one payment before `expires_at`.
25814
+ Prices a purchase the way a payment for it will be charged, for a buyer located by the shipping address, then the billing address, then the IP address you pass. The body is the `PaymentInput` a payment takes plus where the buyer is (`address`, `shipping_address`, `tax_ids`, `ip_address`); a seller that collects no tax on the purchase can be quoted without them. The purchase is priced from exactly what you send: no buyer is looked up, so no stored registration or purchase history applies. Quote what you are about to charge and pass the quote's `id` as `quote_id` when you create the payment: it then charges exactly the purchase, promo code and tax shown here. A quote is priced once, in the plans' own currency or the `presentment_currency` you ask for, and may be consumed by one payment before `expires_at`.
25815
25815
  </dd>
25816
25816
  </dl>
25817
25817
  </dd>
@@ -25849,7 +25849,15 @@ client.payment_quotes.create(account_id: "biz_xxxxxxxxxxxxxx")
25849
25849
  <dl>
25850
25850
  <dd>
25851
25851
 
25852
- **ip_address:** `String` — The buyer's IP address, when your server makes the call on their behalf. Locates the buyer when neither address carries a country. A quote located this way (`located_by` is `ip_address`) is a preview: a payment refuses it with `quote_preview_only`, so quote again with the buyer's address before paying.
25852
+ **ip_address:** `String` — The buyer's IP address, when your server makes the call on their behalf. Locates the buyer when neither address carries a country. A quote located this way (`located_by` is `ip_address`) is a preview: a payment refuses it with `quote_preview_only`, so quote again with the buyer's address before paying. Also where `presentment_currency` `auto` and `recommended_currencies` find the buyer's local currency.
25853
+
25854
+ </dd>
25855
+ </dl>
25856
+
25857
+ <dl>
25858
+ <dd>
25859
+
25860
+ **presentment_currency:** `String` — The currency to price and charge the purchase in. Omit it, or send null, to price in the variants' own currency. `auto` prices in the currency of the country Whop places the buyer's `ip_address` in when the purchase can be converted into it and a payment method can collect it, and in the variants' own currency otherwise, including when no `ip_address` is sent or Whop cannot place it in a country. A three-letter ISO 4217 code, such as `eur`, prices in that currency or is refused: with `presentment_currency_unsupported` when the purchase cannot be converted into it (adaptive pricing is off for the variant, the variant is not a one-time purchase, or `plan` describes a variant that does not exist yet), and with `presentment_currency_not_payable` when no payment method can collect it. A converted quote states every amount in this currency at an `exchange_rate` fixed until `expires_at`, and the payment that consumes it is charged in this currency at that rate.
25853
25861
 
25854
25862
  </dd>
25855
25863
  </dl>
@@ -26911,7 +26919,7 @@ client.payments.create(account_id: "biz_xxxxxxxxxxxxxx")
26911
26919
  <dl>
26912
26920
  <dd>
26913
26921
 
26914
- **quote_id:** `String` — A payment quote from `POST /payment_quotes`, prefixed `pq_`. The payment charges exactly the quote: its purchase (its variants and quantities, or the `plan` it priced), which this body may then omit, its promo code, and its tax, the quote's `tax_amount` rather than a figure calculated now. Omit it, or send null, to have tax calculated when the payment is charged. The quote must belong to `account_id`. A purchase field you omit or send as null takes the quote's value; the buyer's email, the addresses and the payment method are this request's own, never the quote's. Whatever you do send must describe the quoted purchase: the same variants, quantities and promo code. A quote that priced `plan` takes only the same `plan` you sent to `POST /payment_quotes` (or omit the purchase to take the quoted one), never `plan_id` or `line_items`, and a quote that priced variants by id never takes `plan`. Unless the quote located no buyer (`located_by` is null), the address the payment carries (its shipping address, else its billing address) must put the buyer where the quote priced tax, by country, state and postal code; otherwise the payment is refused with 400 before the payment method is used. A quote located by IP address (`located_by` is `ip_address`) is a preview and cannot be paid. A quote is consumed by one payment: a declined payment keeps it and can be retried; a new payment needs a new quote. A quote cannot be charged through PayPal; such a payment is refused before the payment method is used. A payment refused over its quote carries an error `code`. `quote_expired`: the quote has expired; quote again. `quote_tax_unavailable`: the quote could not price tax; quote again, or omit `quote_id`. `quote_preview_only`: the quote was located by IP address; quote again with the buyer's address. `quote_in_use` (409): another payment holds the quote. `quote_mismatch`: the purchase or the buyer's address is not the one quoted.
26922
+ **quote_id:** `String` — A payment quote from `POST /payment_quotes`, prefixed `pq_`. The payment charges exactly the quote: its purchase (its variants and quantities, or the `plan` it priced), which this body may then omit, its promo code, and its tax, the quote's `tax_amount` rather than a figure calculated now. Omit it, or send null, to have tax calculated when the payment is charged. The quote must belong to `account_id`. A purchase field you omit or send as null takes the quote's value; the buyer's email, the addresses and the payment method are this request's own, never the quote's. Whatever you do send must describe the quoted purchase: the same variants, quantities and promo code. A quote that priced `plan` takes only the same `plan` you sent to `POST /payment_quotes` (or omit the purchase to take the quoted one), never `plan_id` or `line_items`, and a quote that priced variants by id never takes `plan`. Unless the quote located no buyer (`located_by` is null), the address the payment carries (its shipping address, else its billing address) must put the buyer where the quote priced tax, by country, state and postal code; otherwise the payment is refused with 400 before the payment method is used. A quote located by IP address (`located_by` is `ip_address`) is a preview and cannot be paid. A quote is consumed by one payment: a declined payment keeps it and can be retried; a new payment needs a new quote. A quote cannot be charged through PayPal; such a payment is refused before the payment method is used. A quote priced in a `presentment_currency` is charged in that currency at the quote's `exchange_rate`. A payment refused over its quote carries an error `code`. `quote_expired`: the quote has expired; quote again. `quote_tax_unavailable`: the quote could not price tax; quote again, or omit `quote_id`. `quote_preview_only`: the quote was located by IP address; quote again with the buyer's address. `quote_in_use` (409): another payment holds the quote. `quote_mismatch`: the purchase or the buyer's address is not the one quoted. `quote_rate_expired`: the exchange rate the quote was priced at has moved too far to charge; quote again. `payment_method_currency_unsupported`: the payment method cannot pay in the quote's currency; use another method, or quote again in another currency.
26915
26923
 
26916
26924
  </dd>
26917
26925
  </dl>
@@ -35069,7 +35077,7 @@ client.stats.retrieve(
35069
35077
  <dl>
35070
35078
  <dd>
35071
35079
 
35072
- **hostname:** `String` — Filter traffic metrics to one website hostname, for example shop.example.com. Pair with breakdown_by=hostname to split by website.
35080
+ **hostname:** `String` — Filter traffic metrics to one website hostname, for example shop.example.com. On the events and people metrics, comma-separated hostnames match any listed hostname. Pair with breakdown_by=hostname to split by website.
35073
35081
 
35074
35082
  </dd>
35075
35083
  </dl>
@@ -43410,7 +43418,7 @@ client.payments.direct.create(
43410
43418
  <dl>
43411
43419
  <dd>
43412
43420
 
43413
- **quote_id:** `String` — A payment quote from `POST /payment_quotes`, prefixed `pq_`. The payment charges exactly the quote: its purchase (its variants and quantities, or the `plan` it priced), which this body may then omit, its promo code, and its tax, the quote's `tax_amount` rather than a figure calculated now. Omit it, or send null, to have tax calculated when the payment is charged. The quote must belong to `account_id`. A purchase field you omit or send as null takes the quote's value; the buyer's email, the addresses and the payment method are this request's own, never the quote's. Whatever you do send must describe the quoted purchase: the same variants, quantities and promo code. A quote that priced `plan` takes only the same `plan` you sent to `POST /payment_quotes` (or omit the purchase to take the quoted one), never `plan_id` or `line_items`, and a quote that priced variants by id never takes `plan`. Unless the quote located no buyer (`located_by` is null), the address the payment carries (its shipping address, else its billing address) must put the buyer where the quote priced tax, by country, state and postal code; otherwise the payment is refused with 400 before the payment method is used. A quote located by IP address (`located_by` is `ip_address`) is a preview and cannot be paid. A quote is consumed by one payment: a declined payment keeps it and can be retried; a new payment needs a new quote. A quote cannot be charged through PayPal; such a payment is refused before the payment method is used. A payment refused over its quote carries an error `code`. `quote_expired`: the quote has expired; quote again. `quote_tax_unavailable`: the quote could not price tax; quote again, or omit `quote_id`. `quote_preview_only`: the quote was located by IP address; quote again with the buyer's address. `quote_in_use` (409): another payment holds the quote. `quote_mismatch`: the purchase or the buyer's address is not the one quoted.
43421
+ **quote_id:** `String` — A payment quote from `POST /payment_quotes`, prefixed `pq_`. The payment charges exactly the quote: its purchase (its variants and quantities, or the `plan` it priced), which this body may then omit, its promo code, and its tax, the quote's `tax_amount` rather than a figure calculated now. Omit it, or send null, to have tax calculated when the payment is charged. The quote must belong to `account_id`. A purchase field you omit or send as null takes the quote's value; the buyer's email, the addresses and the payment method are this request's own, never the quote's. Whatever you do send must describe the quoted purchase: the same variants, quantities and promo code. A quote that priced `plan` takes only the same `plan` you sent to `POST /payment_quotes` (or omit the purchase to take the quoted one), never `plan_id` or `line_items`, and a quote that priced variants by id never takes `plan`. Unless the quote located no buyer (`located_by` is null), the address the payment carries (its shipping address, else its billing address) must put the buyer where the quote priced tax, by country, state and postal code; otherwise the payment is refused with 400 before the payment method is used. A quote located by IP address (`located_by` is `ip_address`) is a preview and cannot be paid. A quote is consumed by one payment: a declined payment keeps it and can be retried; a new payment needs a new quote. A quote cannot be charged through PayPal; such a payment is refused before the payment method is used. A quote priced in a `presentment_currency` is charged in that currency at the quote's `exchange_rate`. A payment refused over its quote carries an error `code`. `quote_expired`: the quote has expired; quote again. `quote_tax_unavailable`: the quote could not price tax; quote again, or omit `quote_id`. `quote_preview_only`: the quote was located by IP address; quote again with the buyer's address. `quote_in_use` (409): another payment holds the quote. `quote_mismatch`: the purchase or the buyer's address is not the one quoted. `quote_rate_expired`: the exchange rate the quote was priced at has moved too far to charge; quote again. `payment_method_currency_unsupported`: the payment method cannot pay in the quote's currency; use another method, or quote again in another currency.
43414
43422
 
43415
43423
  </dd>
43416
43424
  </dl>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whop_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Whop_sdk
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-10-03 00:00:00.000000000 Z
11
+ date: 2026-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt