Class: Stripe::InvoicePaymentService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::InvoicePaymentService
- Defined in:
- lib/stripe/services/invoice_payment_service.rb
Defined Under Namespace
Classes: ListParams, RetrieveParams
Instance Method Summary collapse
-
#list(invoice, params = {}, opts = {}) ⇒ Object
When retrieving an invoice, there is an includable payments property containing the first handful of those items.
-
#retrieve(invoice, invoice_payment, params = {}, opts = {}) ⇒ Object
Retrieves the invoice payment with the given ID.
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.
37 38 39 40 41 42 43 44 45 |
# File 'lib/stripe/services/invoice_payment_service.rb', line 37 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.
48 49 50 51 52 53 54 55 56 |
# File 'lib/stripe/services/invoice_payment_service.rb', line 48 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 |