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



65
66
67
68
69
70
71
72
73
# File 'lib/stripe/services/invoice_payment_service.rb', line 65

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.



76
77
78
79
80
81
82
83
84
# File 'lib/stripe/services/invoice_payment_service.rb', line 76

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