Sha256: c10aa833f89a2a5a2a6cf2bc7f034380f2d5bba4d007cc9cbf4704a7dddbe3fb

Contents?: true

Size: 741 Bytes

Versions: 28

Compression:

Stored size: 741 Bytes

Contents

# frozen_string_literal: true

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

    OBJECT_NAME = "payment_intent".freeze

    def cancel(params = {}, opts = {})
      resp, opts = request(:post, resource_url + "/cancel", params, opts)
      initialize_from(resp.data, opts)
    end

    def capture(params = {}, opts = {})
      resp, opts = request(:post, resource_url + "/capture", params, opts)
      initialize_from(resp.data, opts)
    end

    def confirm(params = {}, opts = {})
      resp, opts = request(:post, resource_url + "/confirm", params, opts)
      initialize_from(resp.data, opts)
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
stripe-4.11.0 lib/stripe/payment_intent.rb
stripe-4.10.0 lib/stripe/payment_intent.rb
stripe-4.9.1 lib/stripe/payment_intent.rb
stripe-4.9.0 lib/stripe/payment_intent.rb
stripe-4.8.1 lib/stripe/payment_intent.rb
stripe-4.8.0 lib/stripe/payment_intent.rb
stripe-4.7.1 lib/stripe/payment_intent.rb
stripe-4.7.0 lib/stripe/payment_intent.rb
stripe-4.6.0 lib/stripe/payment_intent.rb
stripe-4.5.0 lib/stripe/payment_intent.rb
stripe-4.4.1 lib/stripe/payment_intent.rb
stripe-4.4.0 lib/stripe/payment_intent.rb
stripe-4.3.0 lib/stripe/payment_intent.rb
stripe-4.2.0 lib/stripe/payment_intent.rb
stripe-4.1.0 lib/stripe/payment_intent.rb
stripe-4.0.3 lib/stripe/payment_intent.rb
stripe-4.0.2 lib/stripe/payment_intent.rb
stripe-4.0.1 lib/stripe/payment_intent.rb
stripe-4.0.0 lib/stripe/payment_intent.rb
stripe-3.31.1 lib/stripe/payment_intent.rb