Compare commits

...

6 Commits

Author SHA1 Message Date
Richard Marmorstein
783bcb163f Bump version to 10.6.0-beta.1 2024-01-04 14:40:29 -06:00
stripe-openapi[bot]
3e5b22eeae
Merge pull request #1305 from stripe/latest-codegen-beta
Update generated code for beta
2024-01-04 12:24:57 -08:00
Stripe OpenAPI
452e0c4485 Merge upstream and update generated code for v742 2024-01-04 19:58:10 +00:00
Richard Marmorstein
36dc37db5e Bump version to 10.5.0 2024-01-04 13:52:23 -06:00
stripe-openapi[bot]
8875698b96
Update generated code for v742 (#1306)
Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
2024-01-04 11:40:30 -08:00
Stripe OpenAPI
cb256e8e1c Update generated code for v742 2024-01-04 16:18:11 +00:00
50 changed files with 546 additions and 3 deletions

View File

@ -1,5 +1,14 @@
# Changelog
## 10.6.0-beta.1 - 2024-01-04
* [#1302](https://github.com/stripe/stripe-ruby/pull/1302) Update generated code for beta
* Updated stable APIs to the latest version
## 10.5.0 - 2024-01-04
* [#1306](https://github.com/stripe/stripe-ruby/pull/1306) Update generated code
* Add support for `retrieve` method on resource `Tax.Registration`
## 10.5.0-beta.1 - 2023-12-22
* [#1302](https://github.com/stripe/stripe-ruby/pull/1302) Update generated code for beta

View File

@ -1 +1 @@
v737
v742

View File

@ -1 +1 @@
10.5.0-beta.1
10.6.0-beta.1

View File

@ -25,6 +25,7 @@ module Stripe
resource_plural: "capabilities"
nested_resource_class_methods :person, operations: %i[create retrieve update delete list]
# Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first.
def persons(params = {}, opts = {})
request_stripe_object(
method: :get,
@ -34,6 +35,9 @@ module Stripe
)
end
# With [Connect](https://stripe.com/docs/connect), you may flag accounts as suspicious.
#
# Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.
def reject(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -43,6 +47,7 @@ module Stripe
)
end
# Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first.
def self.persons(account, params = {}, opts = {})
request_stripe_object(
method: :get,
@ -52,6 +57,9 @@ module Stripe
)
end
# With [Connect](https://stripe.com/docs/connect), you may flag accounts as suspicious.
#
# Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.
def self.reject(account, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -18,6 +18,7 @@ module Stripe
OBJECT_NAME = "apps.secret"
# Deletes a secret from the secret store by name and scope.
def self.delete_where(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -27,6 +28,7 @@ module Stripe
)
end
# Finds a secret in the secret store by name and scope.
def self.find(params = {}, opts = {})
request_stripe_object(
method: :get,

View File

@ -10,6 +10,8 @@ module Stripe
OBJECT_NAME = "capital.financing_offer"
# Acknowledges that platform has received and delivered the financing_offer to
# the intended merchant recipient.
def mark_delivered(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -19,6 +21,8 @@ module Stripe
)
end
# Acknowledges that platform has received and delivered the financing_offer to
# the intended merchant recipient.
def self.mark_delivered(financing_offer, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -14,6 +14,11 @@ module Stripe
OBJECT_NAME = "charge"
# Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
#
# Uncaptured payments expire a set number of days after they are created ([7 by default](https://stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
#
# Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://stripe.com/docs/api/payment_intents/capture).
def capture(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -23,6 +28,11 @@ module Stripe
)
end
# Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
#
# Uncaptured payments expire a set number of days after they are created ([7 by default](https://stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
#
# Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://stripe.com/docs/api/payment_intents/capture).
def self.capture(charge, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -23,6 +23,9 @@ module Stripe
OBJECT_NAME = "checkout.session"
# A Session can be expired when it is in one of these statuses: open
#
# After it expires, a customer can't complete a Session and customers loading the Session see a message saying the Session is expired.
def expire(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -32,6 +35,7 @@ module Stripe
)
end
# When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
def list_line_items(params = {}, opts = {})
request_stripe_object(
method: :get,
@ -41,6 +45,9 @@ module Stripe
)
end
# A Session can be expired when it is in one of these statuses: open
#
# After it expires, a customer can't complete a Session and customers loading the Session see a message saying the Session is expired.
def self.expire(session, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -50,6 +57,7 @@ module Stripe
)
end
# When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
def self.list_line_items(session, params = {}, opts = {})
request_stripe_object(
method: :get,

View File

@ -12,6 +12,10 @@ module Stripe
OBJECT_NAME = "climate.order"
# Cancels a Climate order. You can cancel an order within 30 days of creation. Stripe refunds the
# reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier
# might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe
# provides 90 days advance notice and refunds the amount_total.
def cancel(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -21,6 +25,10 @@ module Stripe
)
end
# Cancels a Climate order. You can cancel an order within 30 days of creation. Stripe refunds the
# reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier
# might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe
# provides 90 days advance notice and refunds the amount_total.
def self.cancel(order, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -12,6 +12,7 @@ module Stripe
OBJECT_NAME = "credit_note"
# Marks a credit note as void. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).
def void_credit_note(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -21,6 +22,7 @@ module Stripe
)
end
# When retrieving a credit note preview, you'll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.
def self.list_preview_line_items(params = {}, opts = {})
request_stripe_object(
method: :get,
@ -30,6 +32,7 @@ module Stripe
)
end
# Get a preview of a credit note without creating it.
def self.preview(params = {}, opts = {})
request_stripe_object(
method: :get,
@ -39,6 +42,7 @@ module Stripe
)
end
# Marks a credit note as void. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).
def self.void_credit_note(id, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -19,6 +19,9 @@ module Stripe
nested_resource_class_methods :cash_balance_transaction, operations: %i[retrieve list]
nested_resource_class_methods :tax_id, operations: %i[create retrieve delete list]
# Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new
# funding instructions will be created. If funding instructions have already been created for a given customer, the same
# funding instructions will be retrieved. In other words, we will return the same funding instructions each time.
def create_funding_instructions(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -28,6 +31,7 @@ module Stripe
)
end
# Removes the currently applied discount on a customer.
def delete_discount(params = {}, opts = {})
request_stripe_object(
method: :delete,
@ -37,6 +41,7 @@ module Stripe
)
end
# Returns a list of PaymentMethods for a given Customer
def list_payment_methods(params = {}, opts = {})
request_stripe_object(
method: :get,
@ -46,6 +51,7 @@ module Stripe
)
end
# Retrieves a PaymentMethod object for a given Customer.
def retrieve_payment_method(payment_method, params = {}, opts = {})
request_stripe_object(
method: :get,
@ -55,6 +61,9 @@ module Stripe
)
end
# Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new
# funding instructions will be created. If funding instructions have already been created for a given customer, the same
# funding instructions will be retrieved. In other words, we will return the same funding instructions each time.
def self.create_funding_instructions(customer, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -64,6 +73,7 @@ module Stripe
)
end
# Removes the currently applied discount on a customer.
def self.delete_discount(customer, params = {}, opts = {})
request_stripe_object(
method: :delete,
@ -73,6 +83,7 @@ module Stripe
)
end
# Returns a list of PaymentMethods for a given Customer
def self.list_payment_methods(customer, params = {}, opts = {})
request_stripe_object(
method: :get,
@ -82,6 +93,7 @@ module Stripe
)
end
# Retrieves a PaymentMethod object for a given Customer.
def self.retrieve_payment_method(customer, payment_method, params = {}, opts = {})
request_stripe_object(
method: :get,
@ -109,6 +121,7 @@ module Stripe
search(params, opts).auto_paging_each(&blk)
end
# Retrieves a customer's cash balance.
def self.retrieve_cash_balance(customer, params = {}, opts = {})
request_stripe_object(
method: :get,
@ -118,6 +131,7 @@ module Stripe
)
end
# Changes the settings on a customer's cash balance.
def self.update_cash_balance(customer, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -134,6 +148,7 @@ module Stripe
class TestHelpers < APIResourceTestHelpers
RESOURCE_CLASS = Customer
# Create an incoming testmode bank transfer
def self.fund_cash_balance(customer, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -143,6 +158,7 @@ module Stripe
)
end
# Create an incoming testmode bank transfer
def fund_cash_balance(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,

View File

@ -13,6 +13,9 @@ module Stripe
OBJECT_NAME = "dispute"
# Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.
#
# The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.
def close(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -22,6 +25,9 @@ module Stripe
)
end
# Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.
#
# The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.
def self.close(dispute, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -12,6 +12,7 @@ module Stripe
nested_resource_class_methods :inferred_balance, operations: %i[list]
# Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).
def disconnect(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -21,6 +22,7 @@ module Stripe
)
end
# Lists all owners for a given Account
def list_owners(params = {}, opts = {})
request_stripe_object(
method: :get,
@ -30,6 +32,7 @@ module Stripe
)
end
# Refreshes the data associated with a Financial Connections Account.
def refresh_account(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -39,6 +42,7 @@ module Stripe
)
end
# Subscribes to periodic refreshes of data associated with a Financial Connections Account.
def subscribe(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -48,6 +52,7 @@ module Stripe
)
end
# Unsubscribes from periodic refreshes of data associated with a Financial Connections Account.
def unsubscribe(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -57,6 +62,7 @@ module Stripe
)
end
# Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).
def self.disconnect(account, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -66,6 +72,7 @@ module Stripe
)
end
# Lists all owners for a given Account
def self.list_owners(account, params = {}, opts = {})
request_stripe_object(
method: :get,
@ -75,6 +82,7 @@ module Stripe
)
end
# Refreshes the data associated with a Financial Connections Account.
def self.refresh_account(account, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -84,6 +92,7 @@ module Stripe
)
end
# Subscribes to periodic refreshes of data associated with a Financial Connections Account.
def self.subscribe(account, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -93,6 +102,7 @@ module Stripe
)
end
# Unsubscribes from periodic refreshes of data associated with a Financial Connections Account.
def self.unsubscribe(account, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -12,6 +12,7 @@ module Stripe
OBJECT_NAME = "gift_cards.card"
# Validates a gift card code, returning the matching gift card object if it exists.
def self.validate(params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -16,6 +16,7 @@ module Stripe
OBJECT_NAME = "gift_cards.transaction"
# Cancel a gift card transaction
def cancel(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -25,6 +26,7 @@ module Stripe
)
end
# Confirm a gift card transaction
def confirm(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -34,6 +36,7 @@ module Stripe
)
end
# Cancel a gift card transaction
def self.cancel(id, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -43,6 +46,7 @@ module Stripe
)
end
# Confirm a gift card transaction
def self.confirm(id, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -21,6 +21,9 @@ module Stripe
OBJECT_NAME = "identity.verification_session"
# A VerificationSession object can be canceled when it is in requires_input [status](https://stripe.com/docs/identity/how-sessions-work).
#
# Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](https://stripe.com/docs/identity/verification-sessions#cancel).
def cancel(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -30,6 +33,25 @@ module Stripe
)
end
# Redact a VerificationSession to remove all collected information from Stripe. This will redact
# the VerificationSession and all objects related to it, including VerificationReports, Events,
# request logs, etc.
#
# A VerificationSession object can be redacted when it is in requires_input or verified
# [status](https://stripe.com/docs/identity/how-sessions-work). Redacting a VerificationSession in requires_action
# state will automatically cancel it.
#
# The redaction process may take up to four days. When the redaction process is in progress, the
# VerificationSession's redaction.status field will be set to processing; when the process is
# finished, it will change to redacted and an identity.verification_session.redacted event
# will be emitted.
#
# Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the
# fields that contain personal data will be replaced by the string [redacted] or a similar
# placeholder. The metadata field will also be erased. Redacted objects cannot be updated or
# used for any purpose.
#
# [Learn more](https://stripe.com/docs/identity/verification-sessions#redact).
def redact(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -39,6 +61,9 @@ module Stripe
)
end
# A VerificationSession object can be canceled when it is in requires_input [status](https://stripe.com/docs/identity/how-sessions-work).
#
# Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](https://stripe.com/docs/identity/verification-sessions#cancel).
def self.cancel(session, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -48,6 +73,25 @@ module Stripe
)
end
# Redact a VerificationSession to remove all collected information from Stripe. This will redact
# the VerificationSession and all objects related to it, including VerificationReports, Events,
# request logs, etc.
#
# A VerificationSession object can be redacted when it is in requires_input or verified
# [status](https://stripe.com/docs/identity/how-sessions-work). Redacting a VerificationSession in requires_action
# state will automatically cancel it.
#
# The redaction process may take up to four days. When the redaction process is in progress, the
# VerificationSession's redaction.status field will be set to processing; when the process is
# finished, it will change to redacted and an identity.verification_session.redacted event
# will be emitted.
#
# Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the
# fields that contain personal data will be replaced by the string [redacted] or a similar
# placeholder. The metadata field will also be erased. Redacted objects cannot be updated or
# used for any purpose.
#
# [Learn more](https://stripe.com/docs/identity/verification-sessions#redact).
def self.redact(session, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -46,6 +46,15 @@ module Stripe
nested_resource_class_methods :payment, operations: %i[retrieve list]
# Attaches a PaymentIntent to the invoice, adding it to the list of payments.
# When the PaymentIntent's status changes to succeeded, the payment is credited
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
# invoice's status becomes paid.
#
# If the PaymentIntent's status is already succeeded when it is attached, it is
# credited to the invoice immediately.
#
# Related guide: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create)
def attach_payment_intent(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -55,6 +64,7 @@ module Stripe
)
end
# Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method.
def finalize_invoice(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -64,6 +74,7 @@ module Stripe
)
end
# Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.
def mark_uncollectible(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -73,6 +84,7 @@ module Stripe
)
end
# Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.
def pay(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -82,6 +94,9 @@ module Stripe
)
end
# Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.
#
# Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.
def send_invoice(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -91,6 +106,7 @@ module Stripe
)
end
# Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://stripe.com/docs/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
def void_invoice(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -100,6 +116,15 @@ module Stripe
)
end
# Attaches a PaymentIntent to the invoice, adding it to the list of payments.
# When the PaymentIntent's status changes to succeeded, the payment is credited
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
# invoice's status becomes paid.
#
# If the PaymentIntent's status is already succeeded when it is attached, it is
# credited to the invoice immediately.
#
# Related guide: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create)
def self.attach_payment_intent(invoice, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -109,6 +134,7 @@ module Stripe
)
end
# Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method.
def self.finalize_invoice(invoice, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -118,6 +144,7 @@ module Stripe
)
end
# When retrieving an upcoming invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
def self.list_upcoming_line_items(params = {}, opts = {})
request_stripe_object(
method: :get,
@ -127,6 +154,7 @@ module Stripe
)
end
# Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.
def self.mark_uncollectible(invoice, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -136,6 +164,7 @@ module Stripe
)
end
# Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.
def self.pay(invoice, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -145,6 +174,9 @@ module Stripe
)
end
# Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.
#
# Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.
def self.send_invoice(invoice, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -154,10 +186,16 @@ module Stripe
)
end
# At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.
#
# Note that when you are viewing an upcoming invoice, you are simply viewing a preview the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount.
#
# You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass a proration_date parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date on the upcoming invoice resource.
def self.upcoming(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/invoices/upcoming", params: params, opts: opts)
end
# Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://stripe.com/docs/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
def self.void_invoice(invoice, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -14,6 +14,8 @@ module Stripe
OBJECT_NAME = "issuing.authorization"
# [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
# This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
def approve(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -23,6 +25,8 @@ module Stripe
)
end
# [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
# This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
def decline(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -32,6 +36,8 @@ module Stripe
)
end
# [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
# This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
def self.approve(authorization, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -41,6 +47,8 @@ module Stripe
)
end
# [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
# This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
def self.decline(authorization, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -57,6 +65,7 @@ module Stripe
class TestHelpers < APIResourceTestHelpers
RESOURCE_CLASS = Authorization
# Capture a test-mode authorization.
def self.capture(authorization, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -66,6 +75,7 @@ module Stripe
)
end
# Create a test-mode authorization.
def self.create(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -75,6 +85,7 @@ module Stripe
)
end
# Expire a test-mode Authorization.
def self.expire(authorization, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -84,6 +95,7 @@ module Stripe
)
end
# Increment a test-mode Authorization.
def self.increment(authorization, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -93,6 +105,7 @@ module Stripe
)
end
# Reverse a test-mode Authorization.
def self.reverse(authorization, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -102,6 +115,7 @@ module Stripe
)
end
# Capture a test-mode authorization.
def capture(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,
@ -111,6 +125,7 @@ module Stripe
)
end
# Expire a test-mode Authorization.
def expire(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,
@ -120,6 +135,7 @@ module Stripe
)
end
# Increment a test-mode Authorization.
def increment(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,
@ -129,6 +145,7 @@ module Stripe
)
end
# Reverse a test-mode Authorization.
def reverse(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,

View File

@ -18,6 +18,7 @@ module Stripe
class TestHelpers < APIResourceTestHelpers
RESOURCE_CLASS = Card
# Updates the shipping status of the specified Issuing Card object to delivered.
def self.deliver_card(card, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -27,6 +28,7 @@ module Stripe
)
end
# Updates the shipping status of the specified Issuing Card object to failure.
def self.fail_card(card, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -36,6 +38,7 @@ module Stripe
)
end
# Updates the shipping status of the specified Issuing Card object to returned.
def self.return_card(card, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -45,6 +48,7 @@ module Stripe
)
end
# Updates the shipping status of the specified Issuing Card object to shipped.
def self.ship_card(card, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -54,6 +58,7 @@ module Stripe
)
end
# Updates the shipping status of the specified Issuing Card object to delivered.
def deliver_card(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,
@ -63,6 +68,7 @@ module Stripe
)
end
# Updates the shipping status of the specified Issuing Card object to failure.
def fail_card(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,
@ -72,6 +78,7 @@ module Stripe
)
end
# Updates the shipping status of the specified Issuing Card object to returned.
def return_card(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,
@ -81,6 +88,7 @@ module Stripe
)
end
# Updates the shipping status of the specified Issuing Card object to shipped.
def ship_card(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,

View File

@ -11,6 +11,7 @@ module Stripe
OBJECT_NAME = "issuing.credit_underwriting_record"
# Update a CreditUnderwritingRecord object to correct mistakes.
def correct(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -20,6 +21,7 @@ module Stripe
)
end
# Update a CreditUnderwritingRecord object from a decision made on a credit application.
def report_decision(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -29,6 +31,7 @@ module Stripe
)
end
# Update a CreditUnderwritingRecord object to correct mistakes.
def self.correct(credit_underwriting_record, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -38,6 +41,7 @@ module Stripe
)
end
# Creates a CreditUnderwritingRecord object with information about a credit application submission.
def self.create_from_application(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -47,6 +51,7 @@ module Stripe
)
end
# Creates a CreditUnderwritingRecord object from an underwriting decision coming from a proactive review of an existing accountholder.
def self.create_from_proactive_review(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -56,6 +61,7 @@ module Stripe
)
end
# Update a CreditUnderwritingRecord object from a decision made on a credit application.
def self.report_decision(credit_underwriting_record, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -13,6 +13,7 @@ module Stripe
OBJECT_NAME = "issuing.dispute"
# Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
def submit(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -22,6 +23,7 @@ module Stripe
)
end
# Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
def self.submit(dispute, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -18,6 +18,7 @@ module Stripe
class TestHelpers < APIResourceTestHelpers
RESOURCE_CLASS = PersonalizationDesign
# Updates the status of the specified testmode personalization design object to active.
def self.activate(personalization_design, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -27,6 +28,7 @@ module Stripe
)
end
# Updates the status of the specified testmode personalization design object to inactive.
def self.deactivate(personalization_design, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -36,6 +38,7 @@ module Stripe
)
end
# Updates the status of the specified testmode personalization design object to rejected.
def self.reject(personalization_design, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -45,6 +48,7 @@ module Stripe
)
end
# Updates the status of the specified testmode personalization design object to active.
def activate(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,
@ -54,6 +58,7 @@ module Stripe
)
end
# Updates the status of the specified testmode personalization design object to inactive.
def deactivate(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,
@ -63,6 +68,7 @@ module Stripe
)
end
# Updates the status of the specified testmode personalization design object to rejected.
def reject(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,

View File

@ -21,6 +21,7 @@ module Stripe
class TestHelpers < APIResourceTestHelpers
RESOURCE_CLASS = Transaction
# Allows the user to capture an arbitrary amount, also known as a forced capture.
def self.create_force_capture(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -30,6 +31,7 @@ module Stripe
)
end
# Allows the user to refund an arbitrary amount, also known as a unlinked refund.
def self.create_unlinked_refund(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -39,6 +41,7 @@ module Stripe
)
end
# Refund a test-mode Transaction.
def self.refund(transaction, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -48,6 +51,7 @@ module Stripe
)
end
# Refund a test-mode Transaction.
def refund(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,

View File

@ -14,6 +14,7 @@ module Stripe
OBJECT_NAME = "order"
# Cancels the order as well as the payment intent if one is attached.
def cancel(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -23,6 +24,7 @@ module Stripe
)
end
# When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
def list_line_items(params = {}, opts = {})
request_stripe_object(
method: :get,
@ -32,6 +34,7 @@ module Stripe
)
end
# Reopens a submitted order.
def reopen(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -41,6 +44,7 @@ module Stripe
)
end
# Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://stripe.com/docs/api#reopen_order) method is called.
def submit(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -50,6 +54,7 @@ module Stripe
)
end
# Cancels the order as well as the payment intent if one is attached.
def self.cancel(id, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -59,6 +64,7 @@ module Stripe
)
end
# When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
def self.list_line_items(id, params = {}, opts = {})
request_stripe_object(
method: :get,
@ -68,6 +74,7 @@ module Stripe
)
end
# Reopens a submitted order.
def self.reopen(id, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -77,6 +84,7 @@ module Stripe
)
end
# Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://stripe.com/docs/api#reopen_order) method is called.
def self.submit(id, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -21,6 +21,7 @@ module Stripe
OBJECT_NAME = "payment_intent"
# Manually reconcile the remaining amount for a customer_balance PaymentIntent.
def apply_customer_balance(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -30,6 +31,11 @@ module Stripe
)
end
# You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://stripe.com/docs/payments/intents), processing.
#
# After it's canceled, no additional charges are made by the PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a status of requires_capture, the remaining amount_capturable is automatically refunded.
#
# You can't cancel the PaymentIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
def cancel(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -39,6 +45,11 @@ module Stripe
)
end
# Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.
#
# Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their creation.
#
# Learn more about [separate authorization and capture](https://stripe.com/docs/payments/capture-later).
def capture(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -48,6 +59,29 @@ module Stripe
)
end
# Confirm that your customer intends to pay with current or provided
# payment method. Upon confirmation, the PaymentIntent will attempt to initiate
# a payment.
# If the selected payment method requires additional authentication steps, the
# PaymentIntent will transition to the requires_action status and
# suggest additional actions via next_action. If payment fails,
# the PaymentIntent transitions to the requires_payment_method status or the
# canceled status if the confirmation limit is reached. If
# payment succeeds, the PaymentIntent will transition to the succeeded
# status (or requires_capture, if capture_method is set to manual).
# If the confirmation_method is automatic, payment may be attempted
# using our [client SDKs](https://stripe.com/docs/stripe-js/reference#stripe-handle-card-payment)
# and the PaymentIntent's [client_secret](https://stripe.com/docs/api#payment_intent_object-client_secret).
# After next_actions are handled by the client, no additional
# confirmation is required to complete the payment.
# If the confirmation_method is manual, all payment attempts must be
# initiated using a secret key.
# If any actions are required for the payment, the PaymentIntent will
# return to the requires_confirmation state
# after those actions are completed. Your server needs to then
# explicitly re-confirm the PaymentIntent to initiate the next payment
# attempt. Read the [expanded documentation](https://stripe.com/docs/payments/payment-intents/web-manual)
# to learn more about manual confirmation.
def confirm(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -57,6 +91,30 @@ module Stripe
)
end
# Perform an incremental authorization on an eligible
# [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
# PaymentIntent's status must be requires_capture and
# [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported)
# must be true.
#
# Incremental authorizations attempt to increase the authorized amount on
# your customer's card to the new, higher amount provided. Similar to the
# initial authorization, incremental authorizations can be declined. A
# single PaymentIntent can call this endpoint multiple times to further
# increase the authorized amount.
#
# If the incremental authorization succeeds, the PaymentIntent object
# returns with the updated
# [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount).
# If the incremental authorization fails, a
# [card_declined](https://stripe.com/docs/error-codes#card-declined) error returns, and no other
# fields on the PaymentIntent or Charge update. The PaymentIntent
# object remains capturable for the previously authorized amount.
#
# Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines.
# After it's captured, a PaymentIntent can no longer be incremented.
#
# Learn more about [incremental authorizations](https://stripe.com/docs/terminal/features/incremental-authorizations).
def increment_authorization(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -66,6 +124,7 @@ module Stripe
)
end
# Verifies microdeposits on a PaymentIntent object.
def verify_microdeposits(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -75,6 +134,7 @@ module Stripe
)
end
# Manually reconcile the remaining amount for a customer_balance PaymentIntent.
def self.apply_customer_balance(intent, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -84,6 +144,11 @@ module Stripe
)
end
# You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://stripe.com/docs/payments/intents), processing.
#
# After it's canceled, no additional charges are made by the PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a status of requires_capture, the remaining amount_capturable is automatically refunded.
#
# You can't cancel the PaymentIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
def self.cancel(intent, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -93,6 +158,11 @@ module Stripe
)
end
# Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.
#
# Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their creation.
#
# Learn more about [separate authorization and capture](https://stripe.com/docs/payments/capture-later).
def self.capture(intent, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -102,6 +172,29 @@ module Stripe
)
end
# Confirm that your customer intends to pay with current or provided
# payment method. Upon confirmation, the PaymentIntent will attempt to initiate
# a payment.
# If the selected payment method requires additional authentication steps, the
# PaymentIntent will transition to the requires_action status and
# suggest additional actions via next_action. If payment fails,
# the PaymentIntent transitions to the requires_payment_method status or the
# canceled status if the confirmation limit is reached. If
# payment succeeds, the PaymentIntent will transition to the succeeded
# status (or requires_capture, if capture_method is set to manual).
# If the confirmation_method is automatic, payment may be attempted
# using our [client SDKs](https://stripe.com/docs/stripe-js/reference#stripe-handle-card-payment)
# and the PaymentIntent's [client_secret](https://stripe.com/docs/api#payment_intent_object-client_secret).
# After next_actions are handled by the client, no additional
# confirmation is required to complete the payment.
# If the confirmation_method is manual, all payment attempts must be
# initiated using a secret key.
# If any actions are required for the payment, the PaymentIntent will
# return to the requires_confirmation state
# after those actions are completed. Your server needs to then
# explicitly re-confirm the PaymentIntent to initiate the next payment
# attempt. Read the [expanded documentation](https://stripe.com/docs/payments/payment-intents/web-manual)
# to learn more about manual confirmation.
def self.confirm(intent, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -111,6 +204,30 @@ module Stripe
)
end
# Perform an incremental authorization on an eligible
# [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
# PaymentIntent's status must be requires_capture and
# [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported)
# must be true.
#
# Incremental authorizations attempt to increase the authorized amount on
# your customer's card to the new, higher amount provided. Similar to the
# initial authorization, incremental authorizations can be declined. A
# single PaymentIntent can call this endpoint multiple times to further
# increase the authorized amount.
#
# If the incremental authorization succeeds, the PaymentIntent object
# returns with the updated
# [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount).
# If the incremental authorization fails, a
# [card_declined](https://stripe.com/docs/error-codes#card-declined) error returns, and no other
# fields on the PaymentIntent or Charge update. The PaymentIntent
# object remains capturable for the previously authorized amount.
#
# Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines.
# After it's captured, a PaymentIntent can no longer be incremented.
#
# Learn more about [incremental authorizations](https://stripe.com/docs/terminal/features/incremental-authorizations).
def self.increment_authorization(intent, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -120,6 +237,7 @@ module Stripe
)
end
# Verifies microdeposits on a PaymentIntent object.
def self.verify_microdeposits(intent, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -14,6 +14,7 @@ module Stripe
OBJECT_NAME = "payment_link"
# When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
def list_line_items(params = {}, opts = {})
request_stripe_object(
method: :get,
@ -23,6 +24,7 @@ module Stripe
)
end
# When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
def self.list_line_items(payment_link, params = {}, opts = {})
request_stripe_object(
method: :get,

View File

@ -14,6 +14,19 @@ module Stripe
OBJECT_NAME = "payment_method"
# Attaches a PaymentMethod object to a Customer.
#
# To attach a new PaymentMethod to a customer for future payments, we recommend you use a [SetupIntent](https://stripe.com/docs/api/setup_intents)
# or a PaymentIntent with [setup_future_usage](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage).
# These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach
# endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for
# future use, which makes later declines and payment friction more likely.
# See [Optimizing cards for future payments](https://stripe.com/docs/payments/payment-intents#future-usage) for more information about setting up
# future payments.
#
# To use this PaymentMethod as the default for invoice or subscription payments,
# set [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method),
# on the Customer to the PaymentMethod's ID.
def attach(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -23,6 +36,7 @@ module Stripe
)
end
# Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.
def detach(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -32,6 +46,19 @@ module Stripe
)
end
# Attaches a PaymentMethod object to a Customer.
#
# To attach a new PaymentMethod to a customer for future payments, we recommend you use a [SetupIntent](https://stripe.com/docs/api/setup_intents)
# or a PaymentIntent with [setup_future_usage](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage).
# These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach
# endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for
# future use, which makes later declines and payment friction more likely.
# See [Optimizing cards for future payments](https://stripe.com/docs/payments/payment-intents#future-usage) for more information about setting up
# future payments.
#
# To use this PaymentMethod as the default for invoice or subscription payments,
# set [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method),
# on the Customer to the PaymentMethod's ID.
def self.attach(payment_method, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -41,6 +68,7 @@ module Stripe
)
end
# Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.
def self.detach(payment_method, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -13,6 +13,12 @@ module Stripe
OBJECT_NAME = "payment_method_domain"
# Some payment methods such as Apple Pay require additional steps to verify a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain.
# The payment method doesn't appear in Elements for this domain until it is active.
#
# To activate a payment method on an existing payment method domain, complete the required validation steps specific to the payment method, and then validate the payment method domain with this endpoint.
#
# Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration).
def validate(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -22,6 +28,12 @@ module Stripe
)
end
# Some payment methods such as Apple Pay require additional steps to verify a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain.
# The payment method doesn't appear in Elements for this domain until it is active.
#
# To activate a payment method on an existing payment method domain, complete the required validation steps specific to the payment method, and then validate the payment method domain with this endpoint.
#
# Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration).
def self.validate(payment_method_domain, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -17,6 +17,7 @@ module Stripe
OBJECT_NAME = "payout"
# You can cancel a previously created payout if it hasn't been paid out yet. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts.
def cancel(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -26,6 +27,9 @@ module Stripe
)
end
# Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is in the pending status, use /v1/payouts/:id/cancel instead.
#
# By requesting a reversal through /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account authorizes the debit on the bank account and that no other authorization is required.
def reverse(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -35,6 +39,7 @@ module Stripe
)
end
# You can cancel a previously created payout if it hasn't been paid out yet. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts.
def self.cancel(payout, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -44,6 +49,9 @@ module Stripe
)
end
# Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is in the pending status, use /v1/payouts/:id/cancel instead.
#
# By requesting a reversal through /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account authorizes the debit on the bank account and that no other authorization is required.
def self.reverse(payout, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -15,6 +15,7 @@ module Stripe
nested_resource_class_methods :preview_invoice, operations: %i[list]
nested_resource_class_methods :preview_subscription_schedule, operations: %i[list]
# Accepts the specified quote.
def accept(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -24,6 +25,7 @@ module Stripe
)
end
# Cancels the quote.
def cancel(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -33,6 +35,7 @@ module Stripe
)
end
# Finalizes the quote.
def finalize_quote(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -42,6 +45,7 @@ module Stripe
)
end
# When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
def list_computed_upfront_line_items(params = {}, opts = {})
request_stripe_object(
method: :get,
@ -51,6 +55,7 @@ module Stripe
)
end
# When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
def list_line_items(params = {}, opts = {})
request_stripe_object(
method: :get,
@ -60,6 +65,7 @@ module Stripe
)
end
# Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
def list_lines(params = {}, opts = {})
request_stripe_object(
method: :get,
@ -69,6 +75,7 @@ module Stripe
)
end
# Preview the invoice line items that would be generated by accepting the quote.
def list_preview_invoice_lines(preview_invoice, params = {}, opts = {})
request_stripe_object(
method: :get,
@ -78,6 +85,7 @@ module Stripe
)
end
# Converts a stale quote to draft.
def mark_draft(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -87,6 +95,7 @@ module Stripe
)
end
# Converts a draft or open quote to stale.
def mark_stale(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -96,6 +105,7 @@ module Stripe
)
end
# Download the PDF for a finalized quote
def pdf(params = {}, opts = {}, &read_body_chunk_block)
config = opts[:client]&.config || Stripe.config
opts = { api_base: config.uploads_base }.merge(opts)
@ -108,6 +118,7 @@ module Stripe
)
end
# Recompute the upcoming invoice estimate for the quote.
def reestimate(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -117,6 +128,7 @@ module Stripe
)
end
# Accepts the specified quote.
def self.accept(quote, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -126,6 +138,7 @@ module Stripe
)
end
# Cancels the quote.
def self.cancel(quote, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -135,6 +148,7 @@ module Stripe
)
end
# Finalizes the quote.
def self.finalize_quote(quote, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -144,6 +158,7 @@ module Stripe
)
end
# When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
def self.list_computed_upfront_line_items(quote, params = {}, opts = {})
request_stripe_object(
method: :get,
@ -153,6 +168,7 @@ module Stripe
)
end
# When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
def self.list_line_items(quote, params = {}, opts = {})
request_stripe_object(
method: :get,
@ -162,6 +178,7 @@ module Stripe
)
end
# Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
def self.list_lines(quote, params = {}, opts = {})
request_stripe_object(
method: :get,
@ -171,6 +188,7 @@ module Stripe
)
end
# Preview the invoice line items that would be generated by accepting the quote.
def self.list_preview_invoice_lines(quote, preview_invoice, params = {}, opts = {})
request_stripe_object(
method: :get,
@ -180,6 +198,7 @@ module Stripe
)
end
# Converts a stale quote to draft.
def self.mark_draft(quote, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -189,6 +208,7 @@ module Stripe
)
end
# Converts a draft or open quote to stale.
def self.mark_stale(quote, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -198,6 +218,7 @@ module Stripe
)
end
# Download the PDF for a finalized quote
def self.pdf(quote, params = {}, opts = {}, &read_body_chunk_block)
config = opts[:client]&.config || Stripe.config
opts = { api_base: config.uploads_base }.merge(opts)
@ -210,6 +231,7 @@ module Stripe
)
end
# Recompute the upcoming invoice estimate for the quote.
def self.reestimate(quote, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -8,6 +8,7 @@ module Stripe
OBJECT_NAME = "quote_phase"
# When retrieving a quote phase, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
def list_line_items(params = {}, opts = {})
request_stripe_object(
method: :get,
@ -17,6 +18,7 @@ module Stripe
)
end
# When retrieving a quote phase, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
def self.list_line_items(quote_phase, params = {}, opts = {})
request_stripe_object(
method: :get,

View File

@ -14,6 +14,9 @@ module Stripe
OBJECT_NAME = "refund"
# Cancels a refund with a status of requires_action.
#
# You can't cancel refunds in other states. Only refunds for payment methods that require customer action can enter the requires_action state.
def cancel(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -23,6 +26,9 @@ module Stripe
)
end
# Cancels a refund with a status of requires_action.
#
# You can't cancel refunds in other states. Only refunds for payment methods that require customer action can enter the requires_action state.
def self.cancel(refund, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -39,6 +45,7 @@ module Stripe
class TestHelpers < APIResourceTestHelpers
RESOURCE_CLASS = Refund
# Expire a refund with a status of requires_action.
def self.expire(refund, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -48,6 +55,7 @@ module Stripe
)
end
# Expire a refund with a status of requires_action.
def expire(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,

View File

@ -11,6 +11,7 @@ module Stripe
OBJECT_NAME = "review"
# Approves a Review object, closing it and removing it from the list of reviews.
def approve(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -20,6 +21,7 @@ module Stripe
)
end
# Approves a Review object, closing it and removing it from the list of reviews.
def self.approve(review, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -30,6 +30,9 @@ module Stripe
OBJECT_NAME = "setup_intent"
# You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.
#
# After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error.
def cancel(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -39,6 +42,20 @@ module Stripe
)
end
# Confirm that your customer intends to set up the current or
# provided payment method. For example, you would confirm a SetupIntent
# when a customer hits the “Save” button on a payment method management
# page on your website.
#
# If the selected payment method does not require any additional
# steps from the customer, the SetupIntent will transition to the
# succeeded status.
#
# Otherwise, it will transition to the requires_action status and
# suggest additional actions via next_action. If setup fails,
# the SetupIntent will transition to the
# requires_payment_method status or the canceled status if the
# confirmation limit is reached.
def confirm(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -48,6 +65,7 @@ module Stripe
)
end
# Verifies microdeposits on a SetupIntent object.
def verify_microdeposits(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -57,6 +75,9 @@ module Stripe
)
end
# You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.
#
# After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error.
def self.cancel(intent, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -66,6 +87,20 @@ module Stripe
)
end
# Confirm that your customer intends to set up the current or
# provided payment method. For example, you would confirm a SetupIntent
# when a customer hits the “Save” button on a payment method management
# page on your website.
#
# If the selected payment method does not require any additional
# steps from the customer, the SetupIntent will transition to the
# succeeded status.
#
# Otherwise, it will transition to the requires_action status and
# suggest additional actions via next_action. If setup fails,
# the SetupIntent will transition to the
# requires_payment_method status or the canceled status if the
# confirmation limit is reached.
def self.confirm(intent, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -75,6 +110,7 @@ module Stripe
)
end
# Verifies microdeposits on a SetupIntent object.
def self.verify_microdeposits(intent, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -21,6 +21,7 @@ module Stripe
nested_resource_class_methods :source_transaction, operations: %i[retrieve list]
# Verify a given source.
def verify(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -30,6 +31,7 @@ module Stripe
)
end
# Verify a given source.
def self.verify(source, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -13,6 +13,11 @@ module Stripe
OBJECT_NAME = "subscription"
# Cancels a customer's subscription immediately. The customer will not be charged again for the subscription.
#
# Note, however, that any pending invoice items that you've created will still be charged for at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.
#
# By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.
def cancel(params = {}, opts = {})
request_stripe_object(
method: :delete,
@ -22,6 +27,7 @@ module Stripe
)
end
# Removes the currently applied discount on a subscription.
def delete_discount(params = {}, opts = {})
request_stripe_object(
method: :delete,
@ -31,6 +37,7 @@ module Stripe
)
end
# Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date.
def resume(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -40,6 +47,11 @@ module Stripe
)
end
# Cancels a customer's subscription immediately. The customer will not be charged again for the subscription.
#
# Note, however, that any pending invoice items that you've created will still be charged for at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.
#
# By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.
def self.cancel(subscription_exposed_id, params = {}, opts = {})
request_stripe_object(
method: :delete,
@ -49,6 +61,7 @@ module Stripe
)
end
# Removes the currently applied discount on a subscription.
def self.delete_discount(subscription_exposed_id, params = {}, opts = {})
request_stripe_object(
method: :delete,
@ -58,6 +71,7 @@ module Stripe
)
end
# Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date.
def self.resume(subscription, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -12,6 +12,7 @@ module Stripe
OBJECT_NAME = "subscription_schedule"
# Amends an existing subscription schedule.
def amend(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -21,6 +22,7 @@ module Stripe
)
end
# Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
def cancel(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -30,6 +32,7 @@ module Stripe
)
end
# Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property.
def release(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -39,6 +42,7 @@ module Stripe
)
end
# Amends an existing subscription schedule.
def self.amend(schedule, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -48,6 +52,7 @@ module Stripe
)
end
# Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
def self.cancel(schedule, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -57,6 +62,7 @@ module Stripe
)
end
# Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property.
def self.release(schedule, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -11,6 +11,7 @@ module Stripe
OBJECT_NAME = "tax.calculation"
# Retrieves the line items of a persisted tax calculation as a collection.
def list_line_items(params = {}, opts = {})
request_stripe_object(
method: :get,
@ -20,6 +21,7 @@ module Stripe
)
end
# Retrieves the line items of a persisted tax calculation as a collection.
def self.list_line_items(calculation, params = {}, opts = {})
request_stripe_object(
method: :get,

View File

@ -11,6 +11,7 @@ module Stripe
OBJECT_NAME = "tax.form"
# Download the PDF for a tax form.
def pdf(params = {}, opts = {}, &read_body_chunk_block)
config = opts[:client]&.config || Stripe.config
opts = { api_base: config.uploads_base }.merge(opts)
@ -23,6 +24,7 @@ module Stripe
)
end
# Download the PDF for a tax form.
def self.pdf(id, params = {}, opts = {}, &read_body_chunk_block)
config = opts[:client]&.config || Stripe.config
opts = { api_base: config.uploads_base }.merge(opts)

View File

@ -9,6 +9,7 @@ module Stripe
class Transaction < APIResource
OBJECT_NAME = "tax.transaction"
# Retrieves the line items of a committed standalone transaction as a collection.
def list_line_items(params = {}, opts = {})
request_stripe_object(
method: :get,
@ -18,6 +19,7 @@ module Stripe
)
end
# Creates a Tax Transaction from a calculation.
def self.create_from_calculation(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -27,6 +29,7 @@ module Stripe
)
end
# Partially or fully reverses a previously created Transaction.
def self.create_reversal(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -36,6 +39,7 @@ module Stripe
)
end
# Retrieves the line items of a committed standalone transaction as a collection.
def self.list_line_items(transaction, params = {}, opts = {})
request_stripe_object(
method: :get,

View File

@ -14,6 +14,7 @@ module Stripe
OBJECT_NAME = "terminal.reader"
# Cancels the current reader action.
def cancel_action(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -23,6 +24,7 @@ module Stripe
)
end
# Initiates an input collection flow on a Reader.
def collect_inputs(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -32,6 +34,7 @@ module Stripe
)
end
# Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
def collect_payment_method(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -41,6 +44,7 @@ module Stripe
)
end
# Finalizes a payment on a Reader.
def confirm_payment_intent(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -50,6 +54,7 @@ module Stripe
)
end
# Initiates a payment flow on a Reader.
def process_payment_intent(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -59,6 +64,7 @@ module Stripe
)
end
# Initiates a setup intent flow on a Reader.
def process_setup_intent(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -68,6 +74,7 @@ module Stripe
)
end
# Initiates a refund on a Reader
def refund_payment(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -77,6 +84,7 @@ module Stripe
)
end
# Sets reader display to show cart details.
def set_reader_display(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -86,6 +94,7 @@ module Stripe
)
end
# Cancels the current reader action.
def self.cancel_action(reader, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -95,6 +104,7 @@ module Stripe
)
end
# Initiates an input collection flow on a Reader.
def self.collect_inputs(reader, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -104,6 +114,7 @@ module Stripe
)
end
# Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
def self.collect_payment_method(reader, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -113,6 +124,7 @@ module Stripe
)
end
# Finalizes a payment on a Reader.
def self.confirm_payment_intent(reader, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -122,6 +134,7 @@ module Stripe
)
end
# Initiates a payment flow on a Reader.
def self.process_payment_intent(reader, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -131,6 +144,7 @@ module Stripe
)
end
# Initiates a setup intent flow on a Reader.
def self.process_setup_intent(reader, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -140,6 +154,7 @@ module Stripe
)
end
# Initiates a refund on a Reader
def self.refund_payment(reader, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -149,6 +164,7 @@ module Stripe
)
end
# Sets reader display to show cart details.
def self.set_reader_display(reader, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -165,6 +181,7 @@ module Stripe
class TestHelpers < APIResourceTestHelpers
RESOURCE_CLASS = Reader
# Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.
def self.present_payment_method(reader, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -174,6 +191,7 @@ module Stripe
)
end
# Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.
def present_payment_method(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,

View File

@ -13,6 +13,7 @@ module Stripe
OBJECT_NAME = "test_helpers.test_clock"
# Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.
def advance(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -22,6 +23,7 @@ module Stripe
)
end
# Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.
def self.advance(test_clock, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -14,6 +14,7 @@ module Stripe
OBJECT_NAME = "topup"
# Cancels a top-up. Only pending top-ups can be canceled.
def cancel(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -23,6 +24,7 @@ module Stripe
)
end
# Cancels a top-up. Only pending top-ups can be canceled.
def self.cancel(topup, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -12,6 +12,7 @@ module Stripe
OBJECT_NAME = "treasury.financial_account"
# Retrieves Features information associated with the FinancialAccount.
def retrieve_features(params = {}, opts = {})
request_stripe_object(
method: :get,
@ -21,6 +22,7 @@ module Stripe
)
end
# Updates the Features associated with a FinancialAccount.
def update_features(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -30,6 +32,7 @@ module Stripe
)
end
# Retrieves Features information associated with the FinancialAccount.
def self.retrieve_features(financial_account, params = {}, opts = {})
request_stripe_object(
method: :get,
@ -39,6 +42,7 @@ module Stripe
)
end
# Updates the Features associated with a FinancialAccount.
def self.update_features(financial_account, params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -10,6 +10,7 @@ module Stripe
OBJECT_NAME = "treasury.inbound_transfer"
# Cancels an InboundTransfer.
def cancel(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -19,6 +20,7 @@ module Stripe
)
end
# Cancels an InboundTransfer.
def self.cancel(inbound_transfer, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -35,6 +37,7 @@ module Stripe
class TestHelpers < APIResourceTestHelpers
RESOURCE_CLASS = InboundTransfer
# Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
def self.fail(id, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -44,6 +47,7 @@ module Stripe
)
end
# Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
def self.return_inbound_transfer(id, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -53,6 +57,7 @@ module Stripe
)
end
# Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
def self.succeed(id, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -62,6 +67,7 @@ module Stripe
)
end
# Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
def fail(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,
@ -71,6 +77,7 @@ module Stripe
)
end
# Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
def return_inbound_transfer(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,
@ -80,6 +87,7 @@ module Stripe
)
end
# Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
def succeed(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,

View File

@ -12,6 +12,7 @@ module Stripe
OBJECT_NAME = "treasury.outbound_payment"
# Cancel an OutboundPayment.
def cancel(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -21,6 +22,7 @@ module Stripe
)
end
# Cancel an OutboundPayment.
def self.cancel(id, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -37,6 +39,7 @@ module Stripe
class TestHelpers < APIResourceTestHelpers
RESOURCE_CLASS = OutboundPayment
# Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
def self.fail(id, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -46,6 +49,7 @@ module Stripe
)
end
# Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
def self.post(id, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -55,6 +59,7 @@ module Stripe
)
end
# Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
def self.return_outbound_payment(id, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -64,6 +69,7 @@ module Stripe
)
end
# Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
def fail(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,
@ -73,6 +79,7 @@ module Stripe
)
end
# Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
def post(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,
@ -82,6 +89,7 @@ module Stripe
)
end
# Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
def return_outbound_payment(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,

View File

@ -12,6 +12,7 @@ module Stripe
OBJECT_NAME = "treasury.outbound_transfer"
# An OutboundTransfer can be canceled if the funds have not yet been paid out.
def cancel(params = {}, opts = {})
request_stripe_object(
method: :post,
@ -21,6 +22,7 @@ module Stripe
)
end
# An OutboundTransfer can be canceled if the funds have not yet been paid out.
def self.cancel(outbound_transfer, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -37,6 +39,7 @@ module Stripe
class TestHelpers < APIResourceTestHelpers
RESOURCE_CLASS = OutboundTransfer
# Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
def self.fail(outbound_transfer, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -46,6 +49,7 @@ module Stripe
)
end
# Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
def self.post(outbound_transfer, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -55,6 +59,7 @@ module Stripe
)
end
# Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
def self.return_outbound_transfer(outbound_transfer, params = {}, opts = {})
request_stripe_object(
method: :post,
@ -64,6 +69,7 @@ module Stripe
)
end
# Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
def fail(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,
@ -73,6 +79,7 @@ module Stripe
)
end
# Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
def post(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,
@ -82,6 +89,7 @@ module Stripe
)
end
# Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
def return_outbound_transfer(params = {}, opts = {})
@resource.request_stripe_object(
method: :post,

View File

@ -16,6 +16,7 @@ module Stripe
class TestHelpers < APIResourceTestHelpers
RESOURCE_CLASS = ReceivedCredit
# Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties.
def self.create(params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -16,6 +16,7 @@ module Stripe
class TestHelpers < APIResourceTestHelpers
RESOURCE_CLASS = ReceivedDebit
# Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties.
def self.create(params = {}, opts = {})
request_stripe_object(
method: :post,

View File

@ -1,5 +1,5 @@
# frozen_string_literal: true
module Stripe
VERSION = "10.5.0-beta.1"
VERSION = "10.6.0-beta.1"
end