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, x_account_id: nil, x_environment_id: nil, request_options: {}) ⇒ Stigg::Models::V1::Subscriptions::InvoiceMarkAsPaidResponse
Some parameter documentations has been truncated, see Models::V1::Subscriptions::InvoiceMarkAsPaidParams for more details.
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.
45 46 47 |
# File 'lib/stigg/resources/v1/subscriptions/invoice.rb', line 45 def initialize(client:) @client = client end |
Instance Method Details
#mark_as_paid(id, x_account_id: nil, x_environment_id: nil, request_options: {}) ⇒ Stigg::Models::V1::Subscriptions::InvoiceMarkAsPaidResponse
Some parameter documentations has been truncated, see Models::V1::Subscriptions::InvoiceMarkAsPaidParams for more details.
Marks the latest invoice of a subscription as paid in the billing provider. The invoice must exist and have an OPEN status.
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/stigg/resources/v1/subscriptions/invoice.rb', line 28 def mark_as_paid(id, params = {}) parsed, = Stigg::V1::Subscriptions::InvoiceMarkAsPaidParams.dump_request(params) @client.request( method: :post, path: ["api/v1/subscriptions/%1$s/invoice/paid", id], headers: parsed.transform_keys( x_account_id: "x-account-id", x_environment_id: "x-environment-id" ), model: Stigg::Models::V1::Subscriptions::InvoiceMarkAsPaidResponse, options: ) end |