Class: Stigg::Resources::V1::Subscriptions::Invoice
- Inherits:
-
Object
- Object
- Stigg::Resources::V1::Subscriptions::Invoice
- Defined in:
- lib/stigg/resources/v1/subscriptions/invoice.rb
Overview
Operations related to subscriptions
Instance Method Summary collapse
-
#initialize(client:) ⇒ Invoice
constructor
private
A new instance of Invoice.
-
#mark_as_paid(id, request_options: {}) ⇒ Stigg::Models::V1::Subscriptions::InvoiceMarkAsPaidResponse
Marks the latest invoice of a subscription as paid in the billing provider.
Constructor Details
#initialize(client:) ⇒ Invoice
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Invoice.
33 34 35 |
# File 'lib/stigg/resources/v1/subscriptions/invoice.rb', line 33 def initialize(client:) @client = client end |
Instance Method Details
#mark_as_paid(id, request_options: {}) ⇒ Stigg::Models::V1::Subscriptions::InvoiceMarkAsPaidResponse
Marks the latest invoice of a subscription as paid in the billing provider. The invoice must exist and have an OPEN status.
21 22 23 24 25 26 27 28 |
# File 'lib/stigg/resources/v1/subscriptions/invoice.rb', line 21 def mark_as_paid(id, params = {}) @client.request( method: :post, path: ["api/v1/subscriptions/%1$s/invoice/paid", id], model: Stigg::Models::V1::Subscriptions::InvoiceMarkAsPaidResponse, options: params[:request_options] ) end |