Sha256: 61581633aeb1f3a0544d640a2afb1ec1214d61d5df9a80831391f4cf2386787b

Contents?: true

Size: 1.81 KB

Versions: 7

Compression:

Stored size: 1.81 KB

Contents

# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
  class SetupIntent < APIResource
    extend Stripe::APIOperations::Create
    extend Stripe::APIOperations::List
    include Stripe::APIOperations::Save

    OBJECT_NAME = "setup_intent"

    def cancel(params = {}, opts = {})
      request_stripe_object(
        method: :post,
        path: format("/v1/setup_intents/%<intent>s/cancel", { intent: CGI.escape(self["id"]) }),
        params: params,
        opts: opts
      )
    end

    def confirm(params = {}, opts = {})
      request_stripe_object(
        method: :post,
        path: format("/v1/setup_intents/%<intent>s/confirm", { intent: CGI.escape(self["id"]) }),
        params: params,
        opts: opts
      )
    end

    def verify_microdeposits(params = {}, opts = {})
      request_stripe_object(
        method: :post,
        path: format("/v1/setup_intents/%<intent>s/verify_microdeposits", { intent: CGI.escape(self["id"]) }),
        params: params,
        opts: opts
      )
    end

    def self.cancel(intent, params = {}, opts = {})
      request_stripe_object(
        method: :post,
        path: format("/v1/setup_intents/%<intent>s/cancel", { intent: CGI.escape(intent) }),
        params: params,
        opts: opts
      )
    end

    def self.confirm(intent, params = {}, opts = {})
      request_stripe_object(
        method: :post,
        path: format("/v1/setup_intents/%<intent>s/confirm", { intent: CGI.escape(intent) }),
        params: params,
        opts: opts
      )
    end

    def self.verify_microdeposits(intent, params = {}, opts = {})
      request_stripe_object(
        method: :post,
        path: format("/v1/setup_intents/%<intent>s/verify_microdeposits", { intent: CGI.escape(intent) }),
        params: params,
        opts: opts
      )
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
stripe-7.1.0 lib/stripe/resources/setup_intent.rb
stripe-7.1.0.pre.beta.2 lib/stripe/resources/setup_intent.rb
stripe-7.1.0.pre.beta.1 lib/stripe/resources/setup_intent.rb
stripe-7.0.0 lib/stripe/resources/setup_intent.rb
stripe-6.6.0.pre.beta.1 lib/stripe/resources/setup_intent.rb
stripe-6.5.0 lib/stripe/resources/setup_intent.rb
stripe-6.4.0 lib/stripe/resources/setup_intent.rb