lago_ruby 0.51.0.pre.beta → 0.52.0.pre.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -4
- data/docs/AddOnCreateInputAddOn.md +1 -1
- data/docs/AnalyticsApi.md +299 -0
- data/docs/CreditNoteItemObjectFee.md +4 -4
- data/docs/CustomerChargeUsageObjectCharge.md +3 -1
- data/docs/CustomersApi.md +70 -0
- data/docs/FeeObject.md +4 -4
- data/docs/GenerateCustomerCheckoutURL200Response.md +24 -0
- data/docs/GrossRevenueObject.md +22 -0
- data/docs/GrossRevenues.md +18 -0
- data/docs/InvoicedUsageObject.md +24 -0
- data/docs/InvoicedUsages.md +18 -0
- data/docs/MrrObject.md +22 -0
- data/docs/Mrrs.md +18 -0
- data/docs/OrganizationObject.md +2 -0
- data/docs/OrganizationUpdateInputOrganization.md +2 -0
- data/docs/OutstandingInvoiceObject.md +26 -0
- data/docs/OutstandingInvoices.md +18 -0
- data/docs/PlanOverridesObjectChargesInner.md +2 -0
- data/lago_ruby.gemspec +1 -1
- data/lib/lago_ruby/api/add_ons_api.rb +1 -1
- data/lib/lago_ruby/api/analytics_api.rb +268 -0
- data/lib/lago_ruby/api/billable_metrics_api.rb +1 -1
- data/lib/lago_ruby/api/coupons_api.rb +1 -1
- data/lib/lago_ruby/api/credit_notes_api.rb +1 -1
- data/lib/lago_ruby/api/customers_api.rb +64 -1
- data/lib/lago_ruby/api/events_api.rb +1 -1
- data/lib/lago_ruby/api/fees_api.rb +1 -1
- data/lib/lago_ruby/api/invoices_api.rb +1 -1
- data/lib/lago_ruby/api/organizations_api.rb +1 -1
- data/lib/lago_ruby/api/plans_api.rb +1 -1
- data/lib/lago_ruby/api/subscriptions_api.rb +1 -1
- data/lib/lago_ruby/api/taxes_api.rb +1 -1
- data/lib/lago_ruby/api/wallets_api.rb +1 -1
- data/lib/lago_ruby/api/webhook_endpoints_api.rb +1 -1
- data/lib/lago_ruby/api/webhooks_api.rb +1 -1
- data/lib/lago_ruby/api_client.rb +1 -1
- data/lib/lago_ruby/api_error.rb +1 -1
- data/lib/lago_ruby/configuration.rb +1 -1
- data/lib/lago_ruby/models/add_on.rb +1 -1
- data/lib/lago_ruby/models/add_on_base_input.rb +1 -1
- data/lib/lago_ruby/models/add_on_create_input.rb +1 -1
- data/lib/lago_ruby/models/add_on_create_input_add_on.rb +1 -1
- data/lib/lago_ruby/models/add_on_object.rb +1 -1
- data/lib/lago_ruby/models/add_on_update_input.rb +1 -1
- data/lib/lago_ruby/models/add_ons_paginated.rb +1 -1
- data/lib/lago_ruby/models/api_error_bad_request.rb +1 -1
- data/lib/lago_ruby/models/api_error_forbidden.rb +1 -1
- data/lib/lago_ruby/models/api_error_not_allowed.rb +1 -1
- data/lib/lago_ruby/models/api_error_not_found.rb +1 -1
- data/lib/lago_ruby/models/api_error_unauthorized.rb +1 -1
- data/lib/lago_ruby/models/api_error_unprocessable_entity.rb +1 -1
- data/lib/lago_ruby/models/applied_coupon.rb +1 -1
- data/lib/lago_ruby/models/applied_coupon_input.rb +1 -1
- data/lib/lago_ruby/models/applied_coupon_input_applied_coupon.rb +1 -1
- data/lib/lago_ruby/models/applied_coupon_object.rb +1 -1
- data/lib/lago_ruby/models/applied_coupon_object_extended.rb +1 -1
- data/lib/lago_ruby/models/applied_coupons_paginated.rb +1 -1
- data/lib/lago_ruby/models/base_applied_tax.rb +1 -1
- data/lib/lago_ruby/models/billable_metric.rb +1 -1
- data/lib/lago_ruby/models/billable_metric_base_input.rb +1 -1
- data/lib/lago_ruby/models/billable_metric_create_input.rb +1 -1
- data/lib/lago_ruby/models/billable_metric_create_input_billable_metric.rb +1 -1
- data/lib/lago_ruby/models/billable_metric_group.rb +1 -1
- data/lib/lago_ruby/models/billable_metric_group_values_inner.rb +1 -1
- data/lib/lago_ruby/models/billable_metric_group_values_inner_one_of.rb +1 -1
- data/lib/lago_ruby/models/billable_metric_object.rb +1 -1
- data/lib/lago_ruby/models/billable_metric_update_input.rb +1 -1
- data/lib/lago_ruby/models/billable_metrics_paginated.rb +1 -1
- data/lib/lago_ruby/models/charge_object.rb +1 -1
- data/lib/lago_ruby/models/charge_object_properties.rb +1 -1
- data/lib/lago_ruby/models/charge_properties.rb +1 -1
- data/lib/lago_ruby/models/charge_properties_graduated_percentage_ranges_inner.rb +1 -1
- data/lib/lago_ruby/models/charge_properties_graduated_ranges_inner.rb +1 -1
- data/lib/lago_ruby/models/charge_properties_volume_ranges_inner.rb +1 -1
- data/lib/lago_ruby/models/country.rb +1 -1
- data/lib/lago_ruby/models/coupon.rb +1 -1
- data/lib/lago_ruby/models/coupon_base_input.rb +1 -1
- data/lib/lago_ruby/models/coupon_base_input_applies_to.rb +1 -1
- data/lib/lago_ruby/models/coupon_create_input.rb +1 -1
- data/lib/lago_ruby/models/coupon_create_input_coupon.rb +1 -1
- data/lib/lago_ruby/models/coupon_object.rb +1 -1
- data/lib/lago_ruby/models/coupon_update_input.rb +1 -1
- data/lib/lago_ruby/models/coupons_paginated.rb +1 -1
- data/lib/lago_ruby/models/credit_note.rb +1 -1
- data/lib/lago_ruby/models/credit_note_applied_tax_object.rb +1 -1
- data/lib/lago_ruby/models/credit_note_create_input.rb +1 -1
- data/lib/lago_ruby/models/credit_note_create_input_credit_note.rb +1 -1
- data/lib/lago_ruby/models/credit_note_estimate_input.rb +1 -1
- data/lib/lago_ruby/models/credit_note_estimate_input_credit_note.rb +1 -1
- data/lib/lago_ruby/models/credit_note_estimate_input_credit_note_items_inner.rb +1 -1
- data/lib/lago_ruby/models/credit_note_estimated.rb +1 -1
- data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note.rb +1 -1
- data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner.rb +1 -1
- data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_items_inner.rb +1 -1
- data/lib/lago_ruby/models/credit_note_item_object.rb +1 -1
- data/lib/lago_ruby/models/credit_note_item_object_fee.rb +5 -5
- data/lib/lago_ruby/models/credit_note_object.rb +1 -1
- data/lib/lago_ruby/models/credit_note_update_input.rb +1 -1
- data/lib/lago_ruby/models/credit_note_update_input_credit_note.rb +1 -1
- data/lib/lago_ruby/models/credit_notes.rb +1 -1
- data/lib/lago_ruby/models/credit_object.rb +1 -1
- data/lib/lago_ruby/models/credit_object_invoice.rb +1 -1
- data/lib/lago_ruby/models/credit_object_item.rb +1 -1
- data/lib/lago_ruby/models/currency.rb +1 -1
- data/lib/lago_ruby/models/customer.rb +1 -1
- data/lib/lago_ruby/models/customer_billing_configuration.rb +1 -1
- data/lib/lago_ruby/models/customer_charge_usage_object.rb +1 -1
- data/lib/lago_ruby/models/customer_charge_usage_object_billable_metric.rb +1 -1
- data/lib/lago_ruby/models/customer_charge_usage_object_charge.rb +15 -5
- data/lib/lago_ruby/models/customer_charge_usage_object_groups_inner.rb +1 -1
- data/lib/lago_ruby/models/customer_create_input.rb +1 -1
- data/lib/lago_ruby/models/customer_create_input_customer.rb +1 -1
- data/lib/lago_ruby/models/customer_create_input_customer_metadata_inner.rb +1 -1
- data/lib/lago_ruby/models/customer_metadata.rb +1 -1
- data/lib/lago_ruby/models/customer_object.rb +1 -1
- data/lib/lago_ruby/models/customer_object_extended.rb +1 -1
- data/lib/lago_ruby/models/customer_past_usage.rb +1 -1
- data/lib/lago_ruby/models/customer_usage.rb +1 -1
- data/lib/lago_ruby/models/customer_usage_object.rb +1 -1
- data/lib/lago_ruby/models/customers_paginated.rb +1 -1
- data/lib/lago_ruby/models/event.rb +1 -1
- data/lib/lago_ruby/models/event_batch_input.rb +1 -1
- data/lib/lago_ruby/models/event_batch_input_event.rb +1 -1
- data/lib/lago_ruby/models/event_batch_input_event_properties.rb +1 -1
- data/lib/lago_ruby/models/event_estimate_fees_input.rb +1 -1
- data/lib/lago_ruby/models/event_estimate_fees_input_event.rb +1 -1
- data/lib/lago_ruby/models/event_input.rb +1 -1
- data/lib/lago_ruby/models/event_input_event.rb +1 -1
- data/lib/lago_ruby/models/event_input_event_timestamp.rb +1 -1
- data/lib/lago_ruby/models/event_object.rb +1 -1
- data/lib/lago_ruby/models/event_object_properties.rb +1 -1
- data/lib/lago_ruby/models/fee.rb +1 -1
- data/lib/lago_ruby/models/fee_applied_tax_object.rb +1 -1
- data/lib/lago_ruby/models/fee_object.rb +5 -5
- data/lib/lago_ruby/models/fee_object_item.rb +1 -1
- data/lib/lago_ruby/models/fee_update_input.rb +1 -1
- data/lib/lago_ruby/models/fee_update_input_fee.rb +1 -1
- data/lib/lago_ruby/models/fees.rb +1 -1
- data/lib/lago_ruby/models/fees_paginated.rb +1 -1
- data/lib/lago_ruby/models/generate_customer_checkout_url200_response.rb +246 -0
- data/lib/lago_ruby/models/get_customer_portal_url200_response.rb +1 -1
- data/lib/lago_ruby/models/get_customer_portal_url200_response_customer.rb +1 -1
- data/lib/lago_ruby/models/gross_revenue_object.rb +241 -0
- data/lib/lago_ruby/models/gross_revenues.rb +223 -0
- data/lib/lago_ruby/models/group_object.rb +1 -1
- data/lib/lago_ruby/models/group_properties_object.rb +1 -1
- data/lib/lago_ruby/models/group_properties_object_values.rb +1 -1
- data/lib/lago_ruby/models/groups_paginated.rb +1 -1
- data/lib/lago_ruby/models/invoice.rb +1 -1
- data/lib/lago_ruby/models/invoice_applied_tax_object.rb +1 -1
- data/lib/lago_ruby/models/invoice_metadata_object.rb +1 -1
- data/lib/lago_ruby/models/invoice_object.rb +1 -1
- data/lib/lago_ruby/models/invoice_object_customer.rb +1 -1
- data/lib/lago_ruby/models/invoice_object_extended.rb +1 -1
- data/lib/lago_ruby/models/invoice_one_off_create_input.rb +1 -1
- data/lib/lago_ruby/models/invoice_one_off_create_input_invoice.rb +1 -1
- data/lib/lago_ruby/models/invoice_one_off_create_input_invoice_fees_inner.rb +1 -1
- data/lib/lago_ruby/models/invoice_update_input.rb +1 -1
- data/lib/lago_ruby/models/invoice_update_input_invoice.rb +1 -1
- data/lib/lago_ruby/models/invoice_update_input_invoice_metadata_inner.rb +1 -1
- data/lib/lago_ruby/models/invoiced_usage_object.rb +265 -0
- data/lib/lago_ruby/models/invoiced_usages.rb +223 -0
- data/lib/lago_ruby/models/invoices_paginated.rb +1 -1
- data/lib/lago_ruby/models/mrr_object.rb +241 -0
- data/lib/lago_ruby/models/mrrs.rb +223 -0
- data/lib/lago_ruby/models/organization.rb +1 -1
- data/lib/lago_ruby/models/organization_billing_configuration.rb +1 -1
- data/lib/lago_ruby/models/organization_object.rb +11 -2
- data/lib/lago_ruby/models/organization_update_input.rb +1 -1
- data/lib/lago_ruby/models/organization_update_input_organization.rb +11 -2
- data/lib/lago_ruby/models/outstanding_invoice_object.rb +309 -0
- data/lib/lago_ruby/models/outstanding_invoices.rb +223 -0
- data/lib/lago_ruby/models/pagination_meta.rb +1 -1
- data/lib/lago_ruby/models/plan.rb +1 -1
- data/lib/lago_ruby/models/plan_create_input.rb +1 -1
- data/lib/lago_ruby/models/plan_create_input_plan.rb +1 -1
- data/lib/lago_ruby/models/plan_create_input_plan_charges_inner.rb +1 -1
- data/lib/lago_ruby/models/plan_create_input_plan_charges_inner_group_properties_inner.rb +1 -1
- data/lib/lago_ruby/models/plan_object.rb +1 -1
- data/lib/lago_ruby/models/plan_overrides_object.rb +1 -1
- data/lib/lago_ruby/models/plan_overrides_object_charges_inner.rb +12 -2
- data/lib/lago_ruby/models/plan_update_input.rb +1 -1
- data/lib/lago_ruby/models/plan_update_input_plan.rb +1 -1
- data/lib/lago_ruby/models/plan_update_input_plan_charges_inner.rb +1 -1
- data/lib/lago_ruby/models/plans_paginated.rb +1 -1
- data/lib/lago_ruby/models/subscription.rb +1 -1
- data/lib/lago_ruby/models/subscription_create_input.rb +1 -1
- data/lib/lago_ruby/models/subscription_create_input_subscription.rb +1 -1
- data/lib/lago_ruby/models/subscription_object.rb +1 -1
- data/lib/lago_ruby/models/subscription_object_extended.rb +1 -1
- data/lib/lago_ruby/models/subscription_update_input.rb +1 -1
- data/lib/lago_ruby/models/subscription_update_input_subscription.rb +1 -1
- data/lib/lago_ruby/models/subscriptions_paginated.rb +1 -1
- data/lib/lago_ruby/models/tax.rb +1 -1
- data/lib/lago_ruby/models/tax_base_input.rb +1 -1
- data/lib/lago_ruby/models/tax_create_input.rb +1 -1
- data/lib/lago_ruby/models/tax_create_input_tax.rb +1 -1
- data/lib/lago_ruby/models/tax_object.rb +1 -1
- data/lib/lago_ruby/models/tax_update_input.rb +1 -1
- data/lib/lago_ruby/models/taxes_paginated.rb +1 -1
- data/lib/lago_ruby/models/timezone.rb +1 -1
- data/lib/lago_ruby/models/wallet.rb +1 -1
- data/lib/lago_ruby/models/wallet_create_input.rb +1 -1
- data/lib/lago_ruby/models/wallet_create_input_wallet.rb +1 -1
- data/lib/lago_ruby/models/wallet_object.rb +1 -1
- data/lib/lago_ruby/models/wallet_transaction_create_input.rb +1 -1
- data/lib/lago_ruby/models/wallet_transaction_create_input_wallet_transaction.rb +1 -1
- data/lib/lago_ruby/models/wallet_transaction_object.rb +1 -1
- data/lib/lago_ruby/models/wallet_transactions.rb +1 -1
- data/lib/lago_ruby/models/wallet_transactions_paginated.rb +1 -1
- data/lib/lago_ruby/models/wallet_update_input.rb +1 -1
- data/lib/lago_ruby/models/wallet_update_input_wallet.rb +1 -1
- data/lib/lago_ruby/models/wallets_paginated.rb +1 -1
- data/lib/lago_ruby/models/webhook_endpoint.rb +1 -1
- data/lib/lago_ruby/models/webhook_endpoint_create_input.rb +1 -1
- data/lib/lago_ruby/models/webhook_endpoint_create_input_webhook_endpoint.rb +1 -1
- data/lib/lago_ruby/models/webhook_endpoint_object.rb +1 -1
- data/lib/lago_ruby/models/webhook_endpoint_update_input.rb +1 -1
- data/lib/lago_ruby/models/webhook_endpoints_paginated.rb +1 -1
- data/lib/lago_ruby/version.rb +2 -2
- data/lib/lago_ruby.rb +11 -1
- data/spec/api/analytics_api_spec.rb +85 -0
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/generate_customer_checkout_url200_response_spec.rb +54 -0
- data/spec/models/gross_revenue_object_spec.rb +48 -0
- data/spec/models/gross_revenues_spec.rb +36 -0
- data/spec/models/invoiced_usage_object_spec.rb +54 -0
- data/spec/models/invoiced_usages_spec.rb +36 -0
- data/spec/models/mrr_object_spec.rb +48 -0
- data/spec/models/mrrs_spec.rb +36 -0
- data/spec/models/outstanding_invoice_object_spec.rb +64 -0
- data/spec/models/outstanding_invoices_spec.rb +36 -0
- data/spec/spec_helper.rb +1 -1
- metadata +204 -164
data/docs/MrrObject.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# LagoAPI::MrrObject
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **month** | **String** | Identifies the month to analyze MRR. | |
|
8
|
+
| **amount_cents** | **Integer** | The total amount of MRR, expressed in cents. | [optional] |
|
9
|
+
| **currency** | [**Currency**](Currency.md) | | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'lago_ruby'
|
15
|
+
|
16
|
+
instance = LagoAPI::MrrObject.new(
|
17
|
+
month: 2023-11-01T00:00:00.000Z,
|
18
|
+
amount_cents: 50000,
|
19
|
+
currency: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
data/docs/Mrrs.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# LagoAPI::Mrrs
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **mrrs** | [**Array<MrrObject>**](MrrObject.md) | | |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'lago_ruby'
|
13
|
+
|
14
|
+
instance = LagoAPI::Mrrs.new(
|
15
|
+
mrrs: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
data/docs/OrganizationObject.md
CHANGED
@@ -10,6 +10,7 @@
|
|
10
10
|
| **webhook_url** | **String** | The URL of your newest updated webhook endpoint. This URL allows your organization to receive important messages, notifications, or data from the Lago system. By configuring your webhook endpoint to this URL, you can ensure that your organization stays informed and receives relevant information in a timely manner. | [optional] |
|
11
11
|
| **webhook_urls** | **Array<String>** | The array containing your webhooks URLs. | [optional] |
|
12
12
|
| **country** | [**Country**](Country.md) | | [optional] |
|
13
|
+
| **default_currency** | [**Currency**](Currency.md) | | [optional] |
|
13
14
|
| **address_line1** | **String** | The first line of your organization’s billing address. | [optional] |
|
14
15
|
| **address_line2** | **String** | The second line of your organization’s billing address. | [optional] |
|
15
16
|
| **state** | **String** | The state of your organization’s billing address. | [optional] |
|
@@ -36,6 +37,7 @@ instance = LagoAPI::OrganizationObject.new(
|
|
36
37
|
webhook_url: https://webhook.brex.com,
|
37
38
|
webhook_urls: ["https://webhook.brex.com","https://webhook2.brex.com"],
|
38
39
|
country: null,
|
40
|
+
default_currency: null,
|
39
41
|
address_line1: 100 Brex Street,
|
40
42
|
address_line2: null,
|
41
43
|
state: NYC,
|
@@ -6,6 +6,7 @@
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **webhook_url** | **String** | The URL of your newest updated webhook endpoint. This URL allows your organization to receive important messages, notifications, or data from the Lago system. By configuring your webhook endpoint to this URL, you can ensure that your organization stays informed and receives relevant information in a timely manner. | [optional] |
|
8
8
|
| **country** | [**Country**](Country.md) | | [optional] |
|
9
|
+
| **default_currency** | [**Currency**](Currency.md) | | [optional] |
|
9
10
|
| **address_line1** | **String** | The first line of your organization’s billing address. | [optional] |
|
10
11
|
| **address_line2** | **String** | The second line of your organization’s billing address. | [optional] |
|
11
12
|
| **state** | **String** | The state of your organization’s billing address. | [optional] |
|
@@ -28,6 +29,7 @@ require 'lago_ruby'
|
|
28
29
|
instance = LagoAPI::OrganizationUpdateInputOrganization.new(
|
29
30
|
webhook_url: https://webhook.brex.com,
|
30
31
|
country: null,
|
32
|
+
default_currency: null,
|
31
33
|
address_line1: 100 Brex Street,
|
32
34
|
address_line2: null,
|
33
35
|
state: NYC,
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# LagoAPI::OutstandingInvoiceObject
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **month** | **String** | Identifies the month to analyze revenue. | |
|
8
|
+
| **payment_status** | **String** | The payment status of the invoices. | [optional] |
|
9
|
+
| **invoices_count** | **Integer** | Contains invoices count. | |
|
10
|
+
| **amount_cents** | **Integer** | The total amount of revenue for a period, expressed in cents. | |
|
11
|
+
| **currency** | [**Currency**](Currency.md) | | [optional] |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'lago_ruby'
|
17
|
+
|
18
|
+
instance = LagoAPI::OutstandingInvoiceObject.new(
|
19
|
+
month: 2023-11-01T00:00:00.000Z,
|
20
|
+
payment_status: succeeded,
|
21
|
+
invoices_count: 10,
|
22
|
+
amount_cents: 50000,
|
23
|
+
currency: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# LagoAPI::OutstandingInvoices
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **outstanding_invoices** | [**Array<OutstandingInvoiceObject>**](OutstandingInvoiceObject.md) | | |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'lago_ruby'
|
13
|
+
|
14
|
+
instance = LagoAPI::OutstandingInvoices.new(
|
15
|
+
outstanding_invoices: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
@@ -5,6 +5,7 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **id** | **String** | Unique identifier of the charge created by Lago. | [optional] |
|
8
|
+
| **billable_metric_id** | **String** | Unique identifier of the billable metric created by Lago. | [optional] |
|
8
9
|
| **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. | [optional] |
|
9
10
|
| **min_amount_cents** | **Integer** | The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period. | [optional] |
|
10
11
|
| **properties** | [**ChargeObjectProperties**](ChargeObjectProperties.md) | | [optional] |
|
@@ -18,6 +19,7 @@ require 'lago_ruby'
|
|
18
19
|
|
19
20
|
instance = LagoAPI::PlanOverridesObjectChargesInner.new(
|
20
21
|
id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
|
22
|
+
billable_metric_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
|
21
23
|
invoice_display_name: Setup,
|
22
24
|
min_amount_cents: 0,
|
23
25
|
properties: null,
|
data/lago_ruby.gemspec
CHANGED
@@ -0,0 +1,268 @@
|
|
1
|
+
=begin
|
2
|
+
#Lago API documentation
|
3
|
+
|
4
|
+
#Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
|
+
Contact: tech@getlago.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.2.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module LagoAPI
|
16
|
+
class AnalyticsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# List gross revenue
|
23
|
+
# Gross revenue is the sum of monthly `finalized` invoice payments and fees paid in advance that are not invoiceable. This total is calculated after deducting taxes and discounts.
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [Currency] :currency Currency of revenue analytics. Format must be ISO 4217.
|
26
|
+
# @option opts [String] :external_customer_id The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level.
|
27
|
+
# @return [GrossRevenues]
|
28
|
+
def find_all_gross_revenues(opts = {})
|
29
|
+
data, _status_code, _headers = find_all_gross_revenues_with_http_info(opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# List gross revenue
|
34
|
+
# Gross revenue is the sum of monthly `finalized` invoice payments and fees paid in advance that are not invoiceable. This total is calculated after deducting taxes and discounts.
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @option opts [Currency] :currency Currency of revenue analytics. Format must be ISO 4217.
|
37
|
+
# @option opts [String] :external_customer_id The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level.
|
38
|
+
# @return [Array<(GrossRevenues, Integer, Hash)>] GrossRevenues data, response status code and response headers
|
39
|
+
def find_all_gross_revenues_with_http_info(opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: AnalyticsApi.find_all_gross_revenues ...'
|
42
|
+
end
|
43
|
+
# resource path
|
44
|
+
local_var_path = '/analytics/gross_revenue'
|
45
|
+
|
46
|
+
# query parameters
|
47
|
+
query_params = opts[:query_params] || {}
|
48
|
+
query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil?
|
49
|
+
query_params[:'external_customer_id'] = opts[:'external_customer_id'] if !opts[:'external_customer_id'].nil?
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
|
+
|
56
|
+
# form parameters
|
57
|
+
form_params = opts[:form_params] || {}
|
58
|
+
|
59
|
+
# http body (model)
|
60
|
+
post_body = opts[:debug_body]
|
61
|
+
|
62
|
+
# return_type
|
63
|
+
return_type = opts[:debug_return_type] || 'GrossRevenues'
|
64
|
+
|
65
|
+
# auth_names
|
66
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
67
|
+
|
68
|
+
new_options = opts.merge(
|
69
|
+
:operation => :"AnalyticsApi.find_all_gross_revenues",
|
70
|
+
:header_params => header_params,
|
71
|
+
:query_params => query_params,
|
72
|
+
:form_params => form_params,
|
73
|
+
:body => post_body,
|
74
|
+
:auth_names => auth_names,
|
75
|
+
:return_type => return_type
|
76
|
+
)
|
77
|
+
|
78
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
79
|
+
if @api_client.config.debugging
|
80
|
+
@api_client.config.logger.debug "API called: AnalyticsApi#find_all_gross_revenues\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
81
|
+
end
|
82
|
+
return data, status_code, headers
|
83
|
+
end
|
84
|
+
|
85
|
+
# List usage revenue
|
86
|
+
# Reports a monthly analysis focused on the revenue generated from all usage-based fees. It exclusively accounts for revenue that has been formally invoiced. Importantly, this report does not include revenue related to the usage in the current billing period, limiting its scope to previously invoiced amounts.
|
87
|
+
# @param [Hash] opts the optional parameters
|
88
|
+
# @option opts [Currency] :currency The currency of invoiced usage analytics. Format must be ISO 4217.
|
89
|
+
# @return [InvoicedUsages]
|
90
|
+
def find_all_invoiced_usages(opts = {})
|
91
|
+
data, _status_code, _headers = find_all_invoiced_usages_with_http_info(opts)
|
92
|
+
data
|
93
|
+
end
|
94
|
+
|
95
|
+
# List usage revenue
|
96
|
+
# Reports a monthly analysis focused on the revenue generated from all usage-based fees. It exclusively accounts for revenue that has been formally invoiced. Importantly, this report does not include revenue related to the usage in the current billing period, limiting its scope to previously invoiced amounts.
|
97
|
+
# @param [Hash] opts the optional parameters
|
98
|
+
# @option opts [Currency] :currency The currency of invoiced usage analytics. Format must be ISO 4217.
|
99
|
+
# @return [Array<(InvoicedUsages, Integer, Hash)>] InvoicedUsages data, response status code and response headers
|
100
|
+
def find_all_invoiced_usages_with_http_info(opts = {})
|
101
|
+
if @api_client.config.debugging
|
102
|
+
@api_client.config.logger.debug 'Calling API: AnalyticsApi.find_all_invoiced_usages ...'
|
103
|
+
end
|
104
|
+
# resource path
|
105
|
+
local_var_path = '/analytics/invoiced_usage'
|
106
|
+
|
107
|
+
# query parameters
|
108
|
+
query_params = opts[:query_params] || {}
|
109
|
+
query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil?
|
110
|
+
|
111
|
+
# header parameters
|
112
|
+
header_params = opts[:header_params] || {}
|
113
|
+
# HTTP header 'Accept' (if needed)
|
114
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
115
|
+
|
116
|
+
# form parameters
|
117
|
+
form_params = opts[:form_params] || {}
|
118
|
+
|
119
|
+
# http body (model)
|
120
|
+
post_body = opts[:debug_body]
|
121
|
+
|
122
|
+
# return_type
|
123
|
+
return_type = opts[:debug_return_type] || 'InvoicedUsages'
|
124
|
+
|
125
|
+
# auth_names
|
126
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
127
|
+
|
128
|
+
new_options = opts.merge(
|
129
|
+
:operation => :"AnalyticsApi.find_all_invoiced_usages",
|
130
|
+
:header_params => header_params,
|
131
|
+
:query_params => query_params,
|
132
|
+
:form_params => form_params,
|
133
|
+
:body => post_body,
|
134
|
+
:auth_names => auth_names,
|
135
|
+
:return_type => return_type
|
136
|
+
)
|
137
|
+
|
138
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
139
|
+
if @api_client.config.debugging
|
140
|
+
@api_client.config.logger.debug "API called: AnalyticsApi#find_all_invoiced_usages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
141
|
+
end
|
142
|
+
return data, status_code, headers
|
143
|
+
end
|
144
|
+
|
145
|
+
# List MRR
|
146
|
+
# This endpoint is used to list MRR.
|
147
|
+
# @param [Hash] opts the optional parameters
|
148
|
+
# @option opts [Currency] :currency Quantifies the revenue generated from `subscription` fees on a monthly basis. This figure is calculated post-application of applicable taxes and prior to the deduction of any applicable discounts. The method of calculation varies based on the subscription billing cycle: - Revenue from `monthly` subscription invoices is included in the MRR for the month in which the invoice is issued. - Revenue from `quarterly` subscription invoices is distributed evenly over three months. This distribution applies to fees paid in advance (allocated to the next three months) as well as to fees paid in arrears (allocated to the preceding three months). - Revenue from `yearly` subscription invoices is distributed evenly over twelve months. This allocation is applicable for fees paid in advance (spread over the next twelve months) and for fees paid in arrears (spread over the previous twelve months). - Revenue from `weekly` subscription invoices, the total revenue from all invoices issued within a month is summed up. This total is then divided by the number of invoices issued during that month, and the result is multiplied by 4.33, representing the average number of weeks in a month.
|
149
|
+
# @option opts [Integer] :months Show data only for given number of months.
|
150
|
+
# @return [Mrrs]
|
151
|
+
def find_all_mrrs(opts = {})
|
152
|
+
data, _status_code, _headers = find_all_mrrs_with_http_info(opts)
|
153
|
+
data
|
154
|
+
end
|
155
|
+
|
156
|
+
# List MRR
|
157
|
+
# This endpoint is used to list MRR.
|
158
|
+
# @param [Hash] opts the optional parameters
|
159
|
+
# @option opts [Currency] :currency Quantifies the revenue generated from `subscription` fees on a monthly basis. This figure is calculated post-application of applicable taxes and prior to the deduction of any applicable discounts. The method of calculation varies based on the subscription billing cycle: - Revenue from `monthly` subscription invoices is included in the MRR for the month in which the invoice is issued. - Revenue from `quarterly` subscription invoices is distributed evenly over three months. This distribution applies to fees paid in advance (allocated to the next three months) as well as to fees paid in arrears (allocated to the preceding three months). - Revenue from `yearly` subscription invoices is distributed evenly over twelve months. This allocation is applicable for fees paid in advance (spread over the next twelve months) and for fees paid in arrears (spread over the previous twelve months). - Revenue from `weekly` subscription invoices, the total revenue from all invoices issued within a month is summed up. This total is then divided by the number of invoices issued during that month, and the result is multiplied by 4.33, representing the average number of weeks in a month.
|
160
|
+
# @option opts [Integer] :months Show data only for given number of months.
|
161
|
+
# @return [Array<(Mrrs, Integer, Hash)>] Mrrs data, response status code and response headers
|
162
|
+
def find_all_mrrs_with_http_info(opts = {})
|
163
|
+
if @api_client.config.debugging
|
164
|
+
@api_client.config.logger.debug 'Calling API: AnalyticsApi.find_all_mrrs ...'
|
165
|
+
end
|
166
|
+
# resource path
|
167
|
+
local_var_path = '/analytics/mrr'
|
168
|
+
|
169
|
+
# query parameters
|
170
|
+
query_params = opts[:query_params] || {}
|
171
|
+
query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil?
|
172
|
+
query_params[:'months'] = opts[:'months'] if !opts[:'months'].nil?
|
173
|
+
|
174
|
+
# header parameters
|
175
|
+
header_params = opts[:header_params] || {}
|
176
|
+
# HTTP header 'Accept' (if needed)
|
177
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
178
|
+
|
179
|
+
# form parameters
|
180
|
+
form_params = opts[:form_params] || {}
|
181
|
+
|
182
|
+
# http body (model)
|
183
|
+
post_body = opts[:debug_body]
|
184
|
+
|
185
|
+
# return_type
|
186
|
+
return_type = opts[:debug_return_type] || 'Mrrs'
|
187
|
+
|
188
|
+
# auth_names
|
189
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
190
|
+
|
191
|
+
new_options = opts.merge(
|
192
|
+
:operation => :"AnalyticsApi.find_all_mrrs",
|
193
|
+
:header_params => header_params,
|
194
|
+
:query_params => query_params,
|
195
|
+
:form_params => form_params,
|
196
|
+
:body => post_body,
|
197
|
+
:auth_names => auth_names,
|
198
|
+
:return_type => return_type
|
199
|
+
)
|
200
|
+
|
201
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
202
|
+
if @api_client.config.debugging
|
203
|
+
@api_client.config.logger.debug "API called: AnalyticsApi#find_all_mrrs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
204
|
+
end
|
205
|
+
return data, status_code, headers
|
206
|
+
end
|
207
|
+
|
208
|
+
# List outstanding invoices
|
209
|
+
# Represents a monthly aggregation, detailing both the total count and the cumulative amount of invoices that have been marked as `finalized`. This report sorts invoices categorically based on their `payment_status`.
|
210
|
+
# @param [Hash] opts the optional parameters
|
211
|
+
# @option opts [Currency] :currency The currency of revenue analytics. Format must be ISO 4217.
|
212
|
+
# @return [OutstandingInvoices]
|
213
|
+
def find_all_outstanding_invoices(opts = {})
|
214
|
+
data, _status_code, _headers = find_all_outstanding_invoices_with_http_info(opts)
|
215
|
+
data
|
216
|
+
end
|
217
|
+
|
218
|
+
# List outstanding invoices
|
219
|
+
# Represents a monthly aggregation, detailing both the total count and the cumulative amount of invoices that have been marked as `finalized`. This report sorts invoices categorically based on their `payment_status`.
|
220
|
+
# @param [Hash] opts the optional parameters
|
221
|
+
# @option opts [Currency] :currency The currency of revenue analytics. Format must be ISO 4217.
|
222
|
+
# @return [Array<(OutstandingInvoices, Integer, Hash)>] OutstandingInvoices data, response status code and response headers
|
223
|
+
def find_all_outstanding_invoices_with_http_info(opts = {})
|
224
|
+
if @api_client.config.debugging
|
225
|
+
@api_client.config.logger.debug 'Calling API: AnalyticsApi.find_all_outstanding_invoices ...'
|
226
|
+
end
|
227
|
+
# resource path
|
228
|
+
local_var_path = '/analytics/outstanding_invoices'
|
229
|
+
|
230
|
+
# query parameters
|
231
|
+
query_params = opts[:query_params] || {}
|
232
|
+
query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil?
|
233
|
+
|
234
|
+
# header parameters
|
235
|
+
header_params = opts[:header_params] || {}
|
236
|
+
# HTTP header 'Accept' (if needed)
|
237
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
238
|
+
|
239
|
+
# form parameters
|
240
|
+
form_params = opts[:form_params] || {}
|
241
|
+
|
242
|
+
# http body (model)
|
243
|
+
post_body = opts[:debug_body]
|
244
|
+
|
245
|
+
# return_type
|
246
|
+
return_type = opts[:debug_return_type] || 'OutstandingInvoices'
|
247
|
+
|
248
|
+
# auth_names
|
249
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
250
|
+
|
251
|
+
new_options = opts.merge(
|
252
|
+
:operation => :"AnalyticsApi.find_all_outstanding_invoices",
|
253
|
+
:header_params => header_params,
|
254
|
+
:query_params => query_params,
|
255
|
+
:form_params => form_params,
|
256
|
+
:body => post_body,
|
257
|
+
:auth_names => auth_names,
|
258
|
+
:return_type => return_type
|
259
|
+
)
|
260
|
+
|
261
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
262
|
+
if @api_client.config.debugging
|
263
|
+
@api_client.config.logger.debug "API called: AnalyticsApi#find_all_outstanding_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
264
|
+
end
|
265
|
+
return data, status_code, headers
|
266
|
+
end
|
267
|
+
end
|
268
|
+
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 7.
|
9
|
+
OpenAPI Generator version: 7.2.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -497,6 +497,69 @@ module LagoAPI
|
|
497
497
|
return data, status_code, headers
|
498
498
|
end
|
499
499
|
|
500
|
+
# Generate a Customer Payment Provider Checkout URL
|
501
|
+
# This endpoint regenerates the Payment Provider Checkout URL of a Customer.
|
502
|
+
# @param external_customer_id [String] The customer external unique identifier (provided by your own application).
|
503
|
+
# @param [Hash] opts the optional parameters
|
504
|
+
# @return [GenerateCustomerCheckoutURL200Response]
|
505
|
+
def generate_customer_checkout_url(external_customer_id, opts = {})
|
506
|
+
data, _status_code, _headers = generate_customer_checkout_url_with_http_info(external_customer_id, opts)
|
507
|
+
data
|
508
|
+
end
|
509
|
+
|
510
|
+
# Generate a Customer Payment Provider Checkout URL
|
511
|
+
# This endpoint regenerates the Payment Provider Checkout URL of a Customer.
|
512
|
+
# @param external_customer_id [String] The customer external unique identifier (provided by your own application).
|
513
|
+
# @param [Hash] opts the optional parameters
|
514
|
+
# @return [Array<(GenerateCustomerCheckoutURL200Response, Integer, Hash)>] GenerateCustomerCheckoutURL200Response data, response status code and response headers
|
515
|
+
def generate_customer_checkout_url_with_http_info(external_customer_id, opts = {})
|
516
|
+
if @api_client.config.debugging
|
517
|
+
@api_client.config.logger.debug 'Calling API: CustomersApi.generate_customer_checkout_url ...'
|
518
|
+
end
|
519
|
+
# verify the required parameter 'external_customer_id' is set
|
520
|
+
if @api_client.config.client_side_validation && external_customer_id.nil?
|
521
|
+
fail ArgumentError, "Missing the required parameter 'external_customer_id' when calling CustomersApi.generate_customer_checkout_url"
|
522
|
+
end
|
523
|
+
# resource path
|
524
|
+
local_var_path = '/customers/{external_customer_id}/checkout_url'.sub('{' + 'external_customer_id' + '}', CGI.escape(external_customer_id.to_s))
|
525
|
+
|
526
|
+
# query parameters
|
527
|
+
query_params = opts[:query_params] || {}
|
528
|
+
|
529
|
+
# header parameters
|
530
|
+
header_params = opts[:header_params] || {}
|
531
|
+
# HTTP header 'Accept' (if needed)
|
532
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
533
|
+
|
534
|
+
# form parameters
|
535
|
+
form_params = opts[:form_params] || {}
|
536
|
+
|
537
|
+
# http body (model)
|
538
|
+
post_body = opts[:debug_body]
|
539
|
+
|
540
|
+
# return_type
|
541
|
+
return_type = opts[:debug_return_type] || 'GenerateCustomerCheckoutURL200Response'
|
542
|
+
|
543
|
+
# auth_names
|
544
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
545
|
+
|
546
|
+
new_options = opts.merge(
|
547
|
+
:operation => :"CustomersApi.generate_customer_checkout_url",
|
548
|
+
:header_params => header_params,
|
549
|
+
:query_params => query_params,
|
550
|
+
:form_params => form_params,
|
551
|
+
:body => post_body,
|
552
|
+
:auth_names => auth_names,
|
553
|
+
:return_type => return_type
|
554
|
+
)
|
555
|
+
|
556
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
557
|
+
if @api_client.config.debugging
|
558
|
+
@api_client.config.logger.debug "API called: CustomersApi#generate_customer_checkout_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
559
|
+
end
|
560
|
+
return data, status_code, headers
|
561
|
+
end
|
562
|
+
|
500
563
|
# Get a customer portal URL
|
501
564
|
# Retrieves an embeddable link for displaying a customer portal. This endpoint allows you to fetch the URL that can be embedded to provide customers access to a dedicated portal
|
502
565
|
# @param external_customer_id [String] External ID of the existing customer
|
data/lib/lago_ruby/api_client.rb
CHANGED
data/lib/lago_ruby/api_error.rb
CHANGED