Sha256: b9297a1261452a2825fd8a9b8812650f79ba3893445ea40856b1c4f18059d7e9

Contents?: true

Size: 1.38 KB

Versions: 20

Compression:

Stored size: 1.38 KB

Contents

# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
  # A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times.
  #
  # When a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links.
  #
  # Related guide: [Payment Links API](https://stripe.com/docs/payments/payment-links/api)
  class PaymentLink < APIResource
    extend Stripe::APIOperations::Create
    extend Stripe::APIOperations::List
    include Stripe::APIOperations::Save

    OBJECT_NAME = "payment_link"

    def list_line_items(params = {}, opts = {})
      request_stripe_object(
        method: :get,
        path: format("/v1/payment_links/%<payment_link>s/line_items", { payment_link: CGI.escape(self["id"]) }),
        params: params,
        opts: opts
      )
    end

    def self.list_line_items(payment_link, params = {}, opts = {})
      request_stripe_object(
        method: :get,
        path: format("/v1/payment_links/%<payment_link>s/line_items", { payment_link: CGI.escape(payment_link) }),
        params: params,
        opts: opts
      )
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
stripe-8.4.0.pre.beta.3 lib/stripe/resources/payment_link.rb
stripe-8.4.0.pre.beta.2 lib/stripe/resources/payment_link.rb
stripe-8.4.0.pre.beta.1 lib/stripe/resources/payment_link.rb
stripe-8.3.0 lib/stripe/resources/payment_link.rb
stripe-8.3.0.pre.beta.1 lib/stripe/resources/payment_link.rb
stripe-8.2.0 lib/stripe/resources/payment_link.rb
stripe-8.2.0.pre.beta.3 lib/stripe/resources/payment_link.rb
stripe-8.2.0.pre.beta.2 lib/stripe/resources/payment_link.rb
stripe-8.2.0.pre.beta.1 lib/stripe/resources/payment_link.rb
stripe-8.1.0 lib/stripe/resources/payment_link.rb
stripe-8.1.0.pre.beta.4 lib/stripe/resources/payment_link.rb
stripe-8.1.0.pre.beta.3 lib/stripe/resources/payment_link.rb
stripe-8.1.0.pre.beta.2 lib/stripe/resources/payment_link.rb
stripe-8.1.0.pre.beta.1 lib/stripe/resources/payment_link.rb
stripe-8.0.0 lib/stripe/resources/payment_link.rb
stripe-7.2.0.pre.beta.5 lib/stripe/resources/payment_link.rb
stripe-7.2.0.pre.beta.4 lib/stripe/resources/payment_link.rb
stripe-7.2.0.pre.beta.3 lib/stripe/resources/payment_link.rb
stripe-7.2.0.pre.beta.2 lib/stripe/resources/payment_link.rb
stripe-7.2.0.pre.beta.1 lib/stripe/resources/payment_link.rb