class Stripetease::API::PaymentMethods

Overview

PaymentMethod objects represent your customer's payment instruments. You can use them with PaymentIntents to collect payments or save them to Customer objects to store instrument details for future payments.

Defined in:

stripetease/api/payment_methods.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(session : Session) #

[View source]

Instance Method Detail

def create(type : String, billing_details : Hash | Nil = nil, metadata : Hash | Nil = nil, acss_debit : Hash | Nil = nil, affirm : Hash | Nil = nil, afterpay_clearpay : Hash | Nil = nil, alipay : Hash | Nil = nil, au_becs_debit : Hash | Nil = nil, bacs_debit : Hash | Nil = nil, bancontact : Hash | Nil = nil, blik : Hash | Nil = nil, boleto : Hash | Nil = nil, card : Hash | Nil = nil, customer_balance : Hash | Nil = nil, eps : Hash | Nil = nil, fpx : Hash | Nil = nil, giropay : Hash | Nil = nil, ideal : Hash | Nil = nil, interac_present : Hash | Nil = nil, klarna : Hash | Nil = nil, konbini : Hash | Nil = nil, link : Hash | Nil = nil, oxxo : Hash | Nil = nil, p24 : Hash | Nil = nil, paynow : Hash | Nil = nil, promptpay : Hash | Nil = nil, radar_options : Hash | Nil = nil, sepa_debit : Hash | Nil = nil, sofort : Hash | Nil = nil, us_bank_account : Hash | Nil = nil, wechat_pay : Hash | Nil = nil) #

Creates a PaymentMethod object.


[View source]
def get(customer_id : String) #

Retrieves a PaymentMethod object for a given Customer.


[View source]
def list(type : String, customer : String | Nil = nil, ending_before : String | Nil = nil, limit : Int32 | Nil = nil, starting_after : String | Nil = nil) #

Returns a list of PaymentMethods attached to the StripeAccount.


[View source]
def list_by_customer_id(customer_id : String, **kwargs) #

Returns a list of PaymentMethods for a given Customer.


[View source]
def update(id : String, billing_details : Hash | Nil = nil, metadata : Hash | Nil = nil, card : Hash | Nil = nil, link : Hash | Nil = nil, us_bank_account : Hash | Nil = nil) #

Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.


[View source]