lib/stripe/resources/issuing/cardholder.rb in stripe-10.8.0.pre.beta.1 vs lib/stripe/resources/issuing/cardholder.rb in stripe-10.8.0

- old
+ new

@@ -10,8 +10,38 @@ extend Stripe::APIOperations::Create extend Stripe::APIOperations::List include Stripe::APIOperations::Save OBJECT_NAME = "issuing.cardholder" + + # Creates a new Issuing Cardholder object that can be issued cards. + def self.create(params = {}, opts = {}) + request_stripe_object( + method: :post, + path: "/v1/issuing/cardholders", + params: params, + opts: opts + ) + end + + # Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + def self.list(filters = {}, opts = {}) + request_stripe_object( + method: :get, + path: "/v1/issuing/cardholders", + params: filters, + opts: opts + ) + end + + # Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + def self.update(id, params = {}, opts = {}) + request_stripe_object( + method: :post, + path: format("/v1/issuing/cardholders/%<id>s", { id: CGI.escape(id) }), + params: params, + opts: opts + ) + end end end end