Class: Stripe::InvoicePaymentService

Inherits:
StripeService show all
Defined in:
lib/stripe/services/invoice_payment_service.rb

Instance Method Summary collapse

Methods inherited from StripeService

#initialize, #request, #request_stream

Constructor Details

This class inherits a constructor from Stripe::StripeService

Instance Method Details

#list(params = {}, opts = {}) ⇒ Object

When retrieving an invoice, there is an includable payments property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of payments.



7
8
9
10
11
12
13
14
15
# File 'lib/stripe/services/invoice_payment_service.rb', line 7

def list(params = {}, opts = {})
  request(
    method: :get,
    path: "/v1/invoice_payments",
    params: params,
    opts: opts,
    base_address: :api
  )
end

#retrieve(invoice_payment, params = {}, opts = {}) ⇒ Object

Retrieves the invoice payment with the given ID.



18
19
20
21
22
23
24
25
26
# File 'lib/stripe/services/invoice_payment_service.rb', line 18

def retrieve(invoice_payment, params = {}, opts = {})
  request(
    method: :get,
    path: format("/v1/invoice_payments/%<invoice_payment>s", { invoice_payment: CGI.escape(invoice_payment) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end