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-3.31.0 lib/stripe/payment_intent.rb
stripe-3.30.0 lib/stripe/payment_intent.rb
stripe-3.29.0 lib/stripe/payment_intent.rb
stripe-3.28.0 lib/stripe/payment_intent.rb
stripe-3.27.0 lib/stripe/payment_intent.rb
stripe-3.26.1 lib/stripe/payment_intent.rb
stripe-3.26.0 lib/stripe/payment_intent.rb
stripe-3.25.0 lib/stripe/payment_intent.rb