Skip to content

Commit

Permalink
Merge pull request #1484 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] authored Nov 14, 2024
2 parents 51983eb + e98f228 commit afa823d
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"recommendations": [
"EditorConfig.editorconfig", // default
"shopify.ruby-lsp", // intellisense-like support (if you get it working)
"castwide.solargraph", // intellisense
"sorbet.sorbet-vscode-extension", // typechecking, where applicable
"LoranKloeze.ruby-rubocop-revived", // linting
"SarahRidge.vscode-ruby-syntax" // Semantic syntax highlighting
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1333
v1345
2 changes: 1 addition & 1 deletion lib/stripe/api_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

module Stripe
module ApiVersion
CURRENT = "2024-10-28.acacia"
CURRENT = "2024-11-20.acacia"
end
end
20 changes: 20 additions & 0 deletions lib/stripe/resources/issuing/authorization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,26 @@ def increment(params = {}, opts = {})
)
end

# Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy.
def self.respond(authorization, params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/fraud_challenges/respond", { authorization: CGI.escape(authorization) }),
params: params,
opts: opts
)
end

# Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy.
def respond(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/fraud_challenges/respond", { authorization: CGI.escape(@resource["id"]) }),
params: params,
opts: opts
)
end

# Reverse a test-mode Authorization.
def self.reverse(authorization, params = {}, opts = {})
request_stripe_object(
Expand Down
2 changes: 1 addition & 1 deletion lib/stripe/resources/issuing/cardholder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Stripe
module Issuing
# An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards.
#
# Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards#create-cardholder)
# Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards/virtual/issue-cards#create-cardholder)
class Cardholder < APIResource
extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List
Expand Down
2 changes: 1 addition & 1 deletion lib/stripe/resources/subscription.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def self.search_auto_paging_each(params = {}, opts = {}, &blk)
# A trial starts or ends.
#
#
# In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/billing/subscriptions/upgrade-downgrade#immediate-payment).
# In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#immediate-payment).
#
# If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription's renewal date, you need to manually [invoice the customer](https://stripe.com/docs/api/invoices/create).
#
Expand Down
2 changes: 1 addition & 1 deletion lib/stripe/services/subscription_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def search(params = {}, opts = {})
# A trial starts or ends.
#
#
# In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/billing/subscriptions/upgrade-downgrade#immediate-payment).
# In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#immediate-payment).
#
# If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription's renewal date, you need to manually [invoice the customer](https://stripe.com/docs/api/invoices/create).
#
Expand Down
11 changes: 11 additions & 0 deletions lib/stripe/services/test_helpers/issuing/authorization_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@ def increment(authorization, params = {}, opts = {})
)
end

# Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy.
def respond(authorization, params = {}, opts = {})
request(
method: :post,
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/fraud_challenges/respond", { authorization: CGI.escape(authorization) }),
params: params,
opts: opts,
base_address: :api
)
end

# Reverse a test-mode Authorization.
def reverse(authorization, params = {}, opts = {})
request(
Expand Down

0 comments on commit afa823d

Please sign in to comment.