Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"standardwebhooks": ">= 1.0"
}
},
"originGitCommit": "5e4b7064e04d687363cf69ed2044c705570ebbb7",
"originGitCommit": "d9754d1712cd4d25c94baec00749b0109dbe9b7a",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "2.3.0",
Expand Down
8 changes: 7 additions & 1 deletion .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ class CreatePaymentQuotesRequest < Internal::Types::Model

field :ip_address, -> { String }, optional: true, nullable: false

field :presentment_country, -> { String }, optional: true, nullable: false

field :presentment_currency, -> { String }, optional: true, nullable: false

field :shipping_address, -> { Whop_sdk::PaymentQuotes::Types::CreatePaymentQuotesRequestShippingAddress }, optional: true, nullable: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module PaymentQuotes
module Types
# The buyer's billing address. Where tax is calculated when no shipping address is given, and the address a tax
# registration belongs to. A seller that collects tax on this purchase needs the buyer located by a `country`
# here, on `shipping_address`, or an `ip_address`; without one the quote is refused with
# here, on `shipping_address`, a `presentment_country`, or an `ip_address`; without one the quote is refused with
# `quote_location_required`. Only the keys you supply are kept. The payment that consumes the quote must put the
# buyer in the same place, by country, state and postal code, through its own `shipping_address` or its
# confirmation token's billing address, or it is refused with `quote_mismatch`.
Expand Down
1 change: 1 addition & 0 deletions lib/whop_sdk/types/payment_quote_located_by.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module PaymentQuoteLocatedBy

SHIPPING_ADDRESS = "shipping_address"
ADDRESS = "address"
PRESENTMENT_COUNTRY = "presentment_country"
IP_ADDRESS = "ip_address"
end
end
Expand Down
10 changes: 8 additions & 2 deletions lib/whop_sdk/variants/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def initialize(client:, base_url: nil, environment: nil)
# @option params [String, nil] :created_after
# @option params [String, nil] :presentment_currency
# @option params [String, nil] :ip_address
# @option params [String, nil] :presentment_country
# @option params [Integer, nil] :first
# @option params [String, nil] :after
# @option params [Integer, nil] :last
Expand All @@ -47,7 +48,8 @@ def initialize(client:, base_url: nil, environment: nil)
# plan_types: ["renewal"],
# product_ids: ["prod_xxxxxxxxxxxxxx"],
# presentment_currency: "auto",
# ip_address: "203.0.113.7"
# ip_address: "203.0.113.7",
# presentment_country: "JP"
# )
#
# @return [Whop_sdk::Variants::Types::ListVariantsResponse]
Expand All @@ -65,6 +67,7 @@ def list(request_options: {}, **params)
query_params["created_after"] = params[:created_after] if params.key?(:created_after)
query_params["presentment_currency"] = params[:presentment_currency] if params.key?(:presentment_currency)
query_params["ip_address"] = params[:ip_address] if params.key?(:ip_address)
query_params["presentment_country"] = params[:presentment_country] if params.key?(:presentment_country)
query_params["first"] = params[:first] if params.key?(:first)
query_params["after"] = params[:after] if params.key?(:after)
query_params["last"] = params[:last] if params.key?(:last)
Expand Down Expand Up @@ -149,12 +152,14 @@ def create(request_options: {}, **params)
# @option params [String] :id
# @option params [String, nil] :presentment_currency
# @option params [String, nil] :ip_address
# @option params [String, nil] :presentment_country
#
# @example
# client.variants.retrieve(
# id: "id",
# presentment_currency: "auto",
# ip_address: "203.0.113.7"
# ip_address: "203.0.113.7",
# presentment_country: "JP"
# )
#
# @return [Whop_sdk::Types::Variant]
Expand All @@ -163,6 +168,7 @@ def retrieve(request_options: {}, **params)
query_params = {}
query_params["presentment_currency"] = params[:presentment_currency] if params.key?(:presentment_currency)
query_params["ip_address"] = params[:ip_address] if params.key?(:ip_address)
query_params["presentment_country"] = params[:presentment_country] if params.key?(:presentment_country)

request = Whop_sdk::Internal::JSON::Request.new(
base_url: request_options[:base_url] || @base_url || @environment&.dig(:api),
Expand Down
2 changes: 2 additions & 0 deletions lib/whop_sdk/variants/types/list_variants_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class ListVariantsRequest < Internal::Types::Model

field :ip_address, -> { String }, optional: true, nullable: false

field :presentment_country, -> { String }, optional: true, nullable: false

field :first, -> { Integer }, optional: true, nullable: false

field :after, -> { String }, optional: true, nullable: false
Expand Down
2 changes: 2 additions & 0 deletions lib/whop_sdk/variants/types/retrieve_variants_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ class RetrieveVariantsRequest < Internal::Types::Model
field :presentment_currency, -> { String }, optional: true, nullable: false

field :ip_address, -> { String }, optional: true, nullable: false

field :presentment_country, -> { String }, optional: true, nullable: false
end
end
end
Expand Down
Loading
Loading