mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-04 00:00:47 -04:00
32 lines
888 B
Ruby
32 lines
888 B
Ruby
# File generated from our OpenAPI spec
|
|
# frozen_string_literal: true
|
|
|
|
module Stripe
|
|
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 = {})
|
|
resp, opts = execute_resource_request(
|
|
:get,
|
|
format("/v1/payment_links/%<payment_link>s/line_items", { payment_link: CGI.escape(payment_link) }),
|
|
params,
|
|
opts
|
|
)
|
|
Util.convert_to_stripe_object(resp.data, opts)
|
|
end
|
|
end
|
|
end
|