Skip to content

Commit

Permalink
Update Payment Intent typings for Stripe (#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
munaz2-stripe authored Feb 29, 2024
1 parent c2bb04d commit 38e22d7
Showing 1 changed file with 44 additions and 3 deletions.
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

0 comments on commit 38e22d7

Please sign in to comment.