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 Payment Intent typings for Stripe #406

Merged
merged 1 commit into from
Feb 29, 2024
Merged
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
47 changes: 44 additions & 3 deletions lib/stripe/all/stripe.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -196,22 +196,63 @@ module Stripe
end

class PaymentIntent < APIResource
sig {returns(Integer)}
def amount_received; end

sig {returns(T.nilable(String))}
def application; end

sig { returns(Stripe::ListObject) }
def charges; end

sig { returns(String) }
def client_secret; end

sig { returns(Integer)}
def created; end

sig { returns(String) }
def status; end
def currency; end

sig { returns(Stripe::ListObject) }
def charges; end
sig {returns(T.nilable(StripeError))}
def last_payment_error; end

sig { returns(Stripe::ListObject) }
def line_items; end

sig {returns(T.nilable(PaymentIntentNextAction))}
def next_action; end

sig {returns(T.nilable(PaymentIntentPaymentMethodOptions))}
def payment_method_options; end

sig { returns(String) }
def status; end

sig { returns(PaymentIntent).params(id: T.any(String, T::Hash[Symbol, T.any(String, T::Array[String])]), opts: T.nilable(T::Hash[Symbol, T.untyped])) }
def self.retrieve(id, opts = nil); end
end

class PaymentIntentNextAction < StripeObject
sig {returns(String)}
def type; end
end

class PaymentIntentNextActionRedirectToUrl < StripeObject
sig {returns(T.nilable(String))}
def url; end
end

class PaymentIntentPaymentMethodOptions < StripeObject
sig {returns(T.nilable(String))}
def card; end
end

class PaymentIntentPaymentMethodOptionsCard < StripeObject
sig {returns(T.nilable(String))}
def capture_method; end
end

class Invoice < APIResource
sig { returns(T.nilable(Stripe::PaymentIntent)) }
def payment_intent; end
Expand Down
Loading