Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code #1486

Merged
merged 3 commits into from
Nov 20, 2024
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 OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1318
v1347
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
11 changes: 5 additions & 6 deletions lib/stripe/resources/billing/credit_grant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ module Billing
# A credit grant is an API resource that documents the allocation of some billing credits to a customer.
#
# Related guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits)
# end
class CreditGrant < APIResource
extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List
Expand All @@ -27,7 +26,7 @@ def self.create(params = {}, opts = {})
)
end

# Expires a credit grant
# Expires a credit grant.
def expire(params = {}, opts = {})
request_stripe_object(
method: :post,
Expand All @@ -37,7 +36,7 @@ def expire(params = {}, opts = {})
)
end

# Expires a credit grant
# Expires a credit grant.
def self.expire(id, params = {}, opts = {})
request_stripe_object(
method: :post,
Expand All @@ -47,7 +46,7 @@ def self.expire(id, params = {}, opts = {})
)
end

# Retrieve a list of credit grants
# Retrieve a list of credit grants.
def self.list(filters = {}, opts = {})
request_stripe_object(
method: :get,
Expand All @@ -67,7 +66,7 @@ def self.update(id, params = {}, opts = {})
)
end

# Voids a credit grant
# Voids a credit grant.
def void_grant(params = {}, opts = {})
request_stripe_object(
method: :post,
Expand All @@ -77,7 +76,7 @@ def void_grant(params = {}, opts = {})
)
end

# Voids a credit grant
# Voids a credit grant.
def self.void_grant(id, params = {}, opts = {})
request_stripe_object(
method: :post,
Expand Down
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/card.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

module Stripe
module Issuing
# You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) that are issued to cardholders.
# You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders.
class Card < APIResource
extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List
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
6 changes: 3 additions & 3 deletions lib/stripe/services/billing/credit_grant_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def create(params = {}, opts = {})
)
end

# Expires a credit grant
# Expires a credit grant.
def expire(id, params = {}, opts = {})
request(
method: :post,
Expand All @@ -26,7 +26,7 @@ def expire(id, params = {}, opts = {})
)
end

# Retrieve a list of credit grants
# Retrieve a list of credit grants.
def list(params = {}, opts = {})
request(
method: :get,
Expand Down Expand Up @@ -59,7 +59,7 @@ def update(id, params = {}, opts = {})
)
end

# Voids a credit grant
# Voids a credit grant.
def void_grant(id, params = {}, opts = {})
request(
method: :post,
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
Loading