Sha256: a292de7caa41e41ae4cc57622274635bd666878afcadacd694617f95b35d446e

Contents?: true

Size: 750 Bytes

Versions: 1

Compression:

Stored size: 750 Bytes

Contents

# frozen_string_literal: true

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

    OBJECT_NAME = "payment_intent".freeze

    def self.resource_url
      "/v1/payment_intents"
    end

    def cancel
      resp, api_key = request(:post, resource_url + "/cancel")
      initialize_from(resp.data, api_key)
    end

    def capture
      resp, api_key = request(:post, resource_url + "/capture")
      initialize_from(resp.data, api_key)
    end

    def confirm
      resp, api_key = request(:post, resource_url + "/confirm")
      initialize_from(resp.data, api_key)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stripe-3.17.0 lib/stripe/payment_intent.rb