Class: Stripe::InvoicePaymentService

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

Defined Under Namespace

Classes: ListParams, RetrieveParams

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(invoice, 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.



34
35
36
37
38
39
40
41
42
# File 'lib/stripe/services/invoice_payment_service.rb', line 34

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

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

Retrieves the invoice payment with the given ID.



45
46
47
48
49
50
51
52
53
# File 'lib/stripe/services/invoice_payment_service.rb', line 45

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