From cabd92067af633f74a30dec49d707ca49790a4d0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 21 Nov 2023 15:17:03 +0000 Subject: [PATCH] misc: Version v0.52.0-beta --- .openapi-generator/FILES | 40 ++- .openapi-generator/VERSION | 2 +- .travis.yml | 2 +- README.md | 22 +- docs/AddOnCreateInputAddOn.md | 2 +- docs/AnalyticsApi.md | 299 +++++++++++++++++ docs/CreditNoteItemObjectFee.md | 8 +- docs/CustomerChargeUsageObjectCharge.md | 4 +- docs/CustomersApi.md | 70 ++++ docs/FeeObject.md | 8 +- .../GenerateCustomerCheckoutURL200Response.md | 24 ++ docs/GrossRevenueObject.md | 22 ++ docs/GrossRevenues.md | 18 + docs/InvoicedUsageObject.md | 24 ++ docs/InvoicedUsages.md | 18 + docs/MrrObject.md | 22 ++ docs/Mrrs.md | 18 + docs/OrganizationObject.md | 2 + docs/OrganizationUpdateInputOrganization.md | 2 + docs/OutstandingInvoiceObject.md | 26 ++ docs/OutstandingInvoices.md | 18 + docs/PlanOverridesObjectChargesInner.md | 2 + lago_ruby.gemspec | 2 +- lib/lago_ruby.rb | 12 +- lib/lago_ruby/api/add_ons_api.rb | 2 +- lib/lago_ruby/api/analytics_api.rb | 268 +++++++++++++++ lib/lago_ruby/api/billable_metrics_api.rb | 2 +- lib/lago_ruby/api/coupons_api.rb | 2 +- lib/lago_ruby/api/credit_notes_api.rb | 2 +- lib/lago_ruby/api/customers_api.rb | 65 +++- lib/lago_ruby/api/events_api.rb | 2 +- lib/lago_ruby/api/fees_api.rb | 2 +- lib/lago_ruby/api/invoices_api.rb | 2 +- lib/lago_ruby/api/organizations_api.rb | 2 +- lib/lago_ruby/api/plans_api.rb | 2 +- lib/lago_ruby/api/subscriptions_api.rb | 2 +- lib/lago_ruby/api/taxes_api.rb | 2 +- lib/lago_ruby/api/wallets_api.rb | 2 +- lib/lago_ruby/api/webhook_endpoints_api.rb | 2 +- lib/lago_ruby/api/webhooks_api.rb | 2 +- lib/lago_ruby/api_client.rb | 2 +- lib/lago_ruby/api_error.rb | 2 +- lib/lago_ruby/configuration.rb | 2 +- lib/lago_ruby/models/add_on.rb | 2 +- lib/lago_ruby/models/add_on_base_input.rb | 2 +- lib/lago_ruby/models/add_on_create_input.rb | 2 +- .../models/add_on_create_input_add_on.rb | 2 +- lib/lago_ruby/models/add_on_object.rb | 2 +- lib/lago_ruby/models/add_on_update_input.rb | 2 +- lib/lago_ruby/models/add_ons_paginated.rb | 2 +- lib/lago_ruby/models/api_error_bad_request.rb | 2 +- lib/lago_ruby/models/api_error_forbidden.rb | 2 +- lib/lago_ruby/models/api_error_not_allowed.rb | 2 +- lib/lago_ruby/models/api_error_not_found.rb | 2 +- .../models/api_error_unauthorized.rb | 2 +- .../models/api_error_unprocessable_entity.rb | 2 +- lib/lago_ruby/models/applied_coupon.rb | 2 +- lib/lago_ruby/models/applied_coupon_input.rb | 2 +- .../applied_coupon_input_applied_coupon.rb | 2 +- lib/lago_ruby/models/applied_coupon_object.rb | 2 +- .../models/applied_coupon_object_extended.rb | 2 +- .../models/applied_coupons_paginated.rb | 2 +- lib/lago_ruby/models/base_applied_tax.rb | 2 +- lib/lago_ruby/models/billable_metric.rb | 2 +- .../models/billable_metric_base_input.rb | 2 +- .../models/billable_metric_create_input.rb | 2 +- ...ble_metric_create_input_billable_metric.rb | 2 +- lib/lago_ruby/models/billable_metric_group.rb | 2 +- .../billable_metric_group_values_inner.rb | 2 +- ...llable_metric_group_values_inner_one_of.rb | 2 +- .../models/billable_metric_object.rb | 2 +- .../models/billable_metric_update_input.rb | 2 +- .../models/billable_metrics_paginated.rb | 2 +- lib/lago_ruby/models/charge_object.rb | 2 +- .../models/charge_object_properties.rb | 2 +- lib/lago_ruby/models/charge_properties.rb | 2 +- ...rties_graduated_percentage_ranges_inner.rb | 2 +- ...harge_properties_graduated_ranges_inner.rb | 2 +- .../charge_properties_volume_ranges_inner.rb | 2 +- lib/lago_ruby/models/country.rb | 2 +- lib/lago_ruby/models/coupon.rb | 2 +- lib/lago_ruby/models/coupon_base_input.rb | 2 +- .../models/coupon_base_input_applies_to.rb | 2 +- lib/lago_ruby/models/coupon_create_input.rb | 2 +- .../models/coupon_create_input_coupon.rb | 2 +- lib/lago_ruby/models/coupon_object.rb | 2 +- lib/lago_ruby/models/coupon_update_input.rb | 2 +- lib/lago_ruby/models/coupons_paginated.rb | 2 +- lib/lago_ruby/models/credit_note.rb | 2 +- .../models/credit_note_applied_tax_object.rb | 2 +- .../models/credit_note_create_input.rb | 2 +- .../credit_note_create_input_credit_note.rb | 2 +- .../models/credit_note_estimate_input.rb | 2 +- .../credit_note_estimate_input_credit_note.rb | 2 +- ..._estimate_input_credit_note_items_inner.rb | 2 +- lib/lago_ruby/models/credit_note_estimated.rb | 2 +- ...it_note_estimated_estimated_credit_note.rb | 2 +- ...timated_credit_note_applied_taxes_inner.rb | 2 +- ...mated_estimated_credit_note_items_inner.rb | 2 +- .../models/credit_note_item_object.rb | 2 +- .../models/credit_note_item_object_fee.rb | 10 +- lib/lago_ruby/models/credit_note_object.rb | 2 +- .../models/credit_note_update_input.rb | 2 +- .../credit_note_update_input_credit_note.rb | 2 +- lib/lago_ruby/models/credit_notes.rb | 2 +- lib/lago_ruby/models/credit_object.rb | 2 +- lib/lago_ruby/models/credit_object_invoice.rb | 2 +- lib/lago_ruby/models/credit_object_item.rb | 2 +- lib/lago_ruby/models/currency.rb | 2 +- lib/lago_ruby/models/customer.rb | 2 +- .../models/customer_billing_configuration.rb | 2 +- .../models/customer_charge_usage_object.rb | 2 +- ...mer_charge_usage_object_billable_metric.rb | 2 +- .../customer_charge_usage_object_charge.rb | 20 +- ...stomer_charge_usage_object_groups_inner.rb | 2 +- lib/lago_ruby/models/customer_create_input.rb | 2 +- .../models/customer_create_input_customer.rb | 2 +- ...er_create_input_customer_metadata_inner.rb | 2 +- lib/lago_ruby/models/customer_metadata.rb | 2 +- lib/lago_ruby/models/customer_object.rb | 2 +- .../models/customer_object_extended.rb | 2 +- lib/lago_ruby/models/customer_past_usage.rb | 2 +- lib/lago_ruby/models/customer_usage.rb | 2 +- lib/lago_ruby/models/customer_usage_object.rb | 2 +- lib/lago_ruby/models/customers_paginated.rb | 2 +- lib/lago_ruby/models/event.rb | 2 +- lib/lago_ruby/models/event_batch_input.rb | 2 +- .../models/event_batch_input_event.rb | 2 +- .../event_batch_input_event_properties.rb | 2 +- .../models/event_estimate_fees_input.rb | 2 +- .../models/event_estimate_fees_input_event.rb | 2 +- lib/lago_ruby/models/event_input.rb | 2 +- lib/lago_ruby/models/event_input_event.rb | 2 +- .../models/event_input_event_timestamp.rb | 2 +- lib/lago_ruby/models/event_object.rb | 2 +- .../models/event_object_properties.rb | 2 +- lib/lago_ruby/models/fee.rb | 2 +- .../models/fee_applied_tax_object.rb | 2 +- lib/lago_ruby/models/fee_object.rb | 10 +- lib/lago_ruby/models/fee_object_item.rb | 2 +- lib/lago_ruby/models/fee_update_input.rb | 2 +- lib/lago_ruby/models/fee_update_input_fee.rb | 2 +- lib/lago_ruby/models/fees.rb | 2 +- lib/lago_ruby/models/fees_paginated.rb | 2 +- ...erate_customer_checkout_url200_response.rb | 246 ++++++++++++++ .../get_customer_portal_url200_response.rb | 2 +- ...ustomer_portal_url200_response_customer.rb | 2 +- lib/lago_ruby/models/gross_revenue_object.rb | 241 ++++++++++++++ lib/lago_ruby/models/gross_revenues.rb | 223 +++++++++++++ lib/lago_ruby/models/group_object.rb | 2 +- .../models/group_properties_object.rb | 2 +- .../models/group_properties_object_values.rb | 2 +- lib/lago_ruby/models/groups_paginated.rb | 2 +- lib/lago_ruby/models/invoice.rb | 2 +- .../models/invoice_applied_tax_object.rb | 2 +- .../models/invoice_metadata_object.rb | 2 +- lib/lago_ruby/models/invoice_object.rb | 2 +- .../models/invoice_object_customer.rb | 2 +- .../models/invoice_object_extended.rb | 2 +- .../models/invoice_one_off_create_input.rb | 2 +- .../invoice_one_off_create_input_invoice.rb | 2 +- ...one_off_create_input_invoice_fees_inner.rb | 2 +- lib/lago_ruby/models/invoice_update_input.rb | 2 +- .../models/invoice_update_input_invoice.rb | 2 +- ...ice_update_input_invoice_metadata_inner.rb | 2 +- lib/lago_ruby/models/invoiced_usage_object.rb | 265 +++++++++++++++ lib/lago_ruby/models/invoiced_usages.rb | 223 +++++++++++++ lib/lago_ruby/models/invoices_paginated.rb | 2 +- lib/lago_ruby/models/mrr_object.rb | 241 ++++++++++++++ lib/lago_ruby/models/mrrs.rb | 223 +++++++++++++ lib/lago_ruby/models/organization.rb | 2 +- .../organization_billing_configuration.rb | 2 +- lib/lago_ruby/models/organization_object.rb | 13 +- .../models/organization_update_input.rb | 2 +- .../organization_update_input_organization.rb | 13 +- .../models/outstanding_invoice_object.rb | 309 ++++++++++++++++++ lib/lago_ruby/models/outstanding_invoices.rb | 223 +++++++++++++ lib/lago_ruby/models/pagination_meta.rb | 2 +- lib/lago_ruby/models/plan.rb | 2 +- lib/lago_ruby/models/plan_create_input.rb | 2 +- .../models/plan_create_input_plan.rb | 2 +- .../plan_create_input_plan_charges_inner.rb | 2 +- ...an_charges_inner_group_properties_inner.rb | 2 +- lib/lago_ruby/models/plan_object.rb | 2 +- lib/lago_ruby/models/plan_overrides_object.rb | 2 +- .../plan_overrides_object_charges_inner.rb | 14 +- lib/lago_ruby/models/plan_update_input.rb | 2 +- .../models/plan_update_input_plan.rb | 2 +- .../plan_update_input_plan_charges_inner.rb | 2 +- lib/lago_ruby/models/plans_paginated.rb | 2 +- lib/lago_ruby/models/subscription.rb | 2 +- .../models/subscription_create_input.rb | 2 +- .../subscription_create_input_subscription.rb | 2 +- lib/lago_ruby/models/subscription_object.rb | 2 +- .../models/subscription_object_extended.rb | 2 +- .../models/subscription_update_input.rb | 2 +- .../subscription_update_input_subscription.rb | 2 +- .../models/subscriptions_paginated.rb | 2 +- lib/lago_ruby/models/tax.rb | 2 +- lib/lago_ruby/models/tax_base_input.rb | 2 +- lib/lago_ruby/models/tax_create_input.rb | 2 +- lib/lago_ruby/models/tax_create_input_tax.rb | 2 +- lib/lago_ruby/models/tax_object.rb | 2 +- lib/lago_ruby/models/tax_update_input.rb | 2 +- lib/lago_ruby/models/taxes_paginated.rb | 2 +- lib/lago_ruby/models/timezone.rb | 2 +- lib/lago_ruby/models/wallet.rb | 2 +- lib/lago_ruby/models/wallet_create_input.rb | 2 +- .../models/wallet_create_input_wallet.rb | 2 +- lib/lago_ruby/models/wallet_object.rb | 2 +- .../models/wallet_transaction_create_input.rb | 2 +- ...saction_create_input_wallet_transaction.rb | 2 +- .../models/wallet_transaction_object.rb | 2 +- lib/lago_ruby/models/wallet_transactions.rb | 2 +- .../models/wallet_transactions_paginated.rb | 2 +- lib/lago_ruby/models/wallet_update_input.rb | 2 +- .../models/wallet_update_input_wallet.rb | 2 +- lib/lago_ruby/models/wallets_paginated.rb | 2 +- lib/lago_ruby/models/webhook_endpoint.rb | 2 +- .../models/webhook_endpoint_create_input.rb | 2 +- ..._endpoint_create_input_webhook_endpoint.rb | 2 +- .../models/webhook_endpoint_object.rb | 2 +- .../models/webhook_endpoint_update_input.rb | 2 +- .../models/webhook_endpoints_paginated.rb | 2 +- lib/lago_ruby/version.rb | 4 +- spec/api/analytics_api_spec.rb | 85 +++++ spec/api_client_spec.rb | 2 +- spec/configuration_spec.rb | 2 +- ..._customer_checkout_url200_response_spec.rb | 54 +++ spec/models/gross_revenue_object_spec.rb | 48 +++ spec/models/gross_revenues_spec.rb | 36 ++ spec/models/invoiced_usage_object_spec.rb | 54 +++ spec/models/invoiced_usages_spec.rb | 36 ++ spec/models/mrr_object_spec.rb | 48 +++ spec/models/mrrs_spec.rb | 36 ++ .../models/outstanding_invoice_object_spec.rb | 64 ++++ spec/models/outstanding_invoices_spec.rb | 36 ++ spec/spec_helper.rb | 2 +- 238 files changed, 3909 insertions(+), 238 deletions(-) create mode 100644 docs/AnalyticsApi.md create mode 100644 docs/GenerateCustomerCheckoutURL200Response.md create mode 100644 docs/GrossRevenueObject.md create mode 100644 docs/GrossRevenues.md create mode 100644 docs/InvoicedUsageObject.md create mode 100644 docs/InvoicedUsages.md create mode 100644 docs/MrrObject.md create mode 100644 docs/Mrrs.md create mode 100644 docs/OutstandingInvoiceObject.md create mode 100644 docs/OutstandingInvoices.md create mode 100644 lib/lago_ruby/api/analytics_api.rb create mode 100644 lib/lago_ruby/models/generate_customer_checkout_url200_response.rb create mode 100644 lib/lago_ruby/models/gross_revenue_object.rb create mode 100644 lib/lago_ruby/models/gross_revenues.rb create mode 100644 lib/lago_ruby/models/invoiced_usage_object.rb create mode 100644 lib/lago_ruby/models/invoiced_usages.rb create mode 100644 lib/lago_ruby/models/mrr_object.rb create mode 100644 lib/lago_ruby/models/mrrs.rb create mode 100644 lib/lago_ruby/models/outstanding_invoice_object.rb create mode 100644 lib/lago_ruby/models/outstanding_invoices.rb create mode 100644 spec/api/analytics_api_spec.rb create mode 100644 spec/models/generate_customer_checkout_url200_response_spec.rb create mode 100644 spec/models/gross_revenue_object_spec.rb create mode 100644 spec/models/gross_revenues_spec.rb create mode 100644 spec/models/invoiced_usage_object_spec.rb create mode 100644 spec/models/invoiced_usages_spec.rb create mode 100644 spec/models/mrr_object_spec.rb create mode 100644 spec/models/mrrs_spec.rb create mode 100644 spec/models/outstanding_invoice_object_spec.rb create mode 100644 spec/models/outstanding_invoices_spec.rb diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 80e7412..21d879c 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -14,6 +14,7 @@ docs/AddOnObject.md docs/AddOnUpdateInput.md docs/AddOnsApi.md docs/AddOnsPaginated.md +docs/AnalyticsApi.md docs/ApiErrorBadRequest.md docs/ApiErrorForbidden.md docs/ApiErrorNotAllowed.md @@ -114,8 +115,11 @@ docs/FeeUpdateInputFee.md docs/Fees.md docs/FeesApi.md docs/FeesPaginated.md +docs/GenerateCustomerCheckoutURL200Response.md docs/GetCustomerPortalUrl200Response.md docs/GetCustomerPortalUrl200ResponseCustomer.md +docs/GrossRevenueObject.md +docs/GrossRevenues.md docs/GroupObject.md docs/GroupPropertiesObject.md docs/GroupPropertiesObjectValues.md @@ -132,14 +136,20 @@ docs/InvoiceOneOffCreateInputInvoiceFeesInner.md docs/InvoiceUpdateInput.md docs/InvoiceUpdateInputInvoice.md docs/InvoiceUpdateInputInvoiceMetadataInner.md +docs/InvoicedUsageObject.md +docs/InvoicedUsages.md docs/InvoicesApi.md docs/InvoicesPaginated.md +docs/MrrObject.md +docs/Mrrs.md docs/Organization.md docs/OrganizationBillingConfiguration.md docs/OrganizationObject.md docs/OrganizationUpdateInput.md docs/OrganizationUpdateInputOrganization.md docs/OrganizationsApi.md +docs/OutstandingInvoiceObject.md +docs/OutstandingInvoices.md docs/PaginationMeta.md docs/Plan.md docs/PlanCreateInput.md @@ -197,6 +207,7 @@ git_push.sh lago_ruby.gemspec lib/lago_ruby.rb lib/lago_ruby/api/add_ons_api.rb +lib/lago_ruby/api/analytics_api.rb lib/lago_ruby/api/billable_metrics_api.rb lib/lago_ruby/api/coupons_api.rb lib/lago_ruby/api/credit_notes_api.rb @@ -315,8 +326,11 @@ lib/lago_ruby/models/fee_update_input.rb lib/lago_ruby/models/fee_update_input_fee.rb lib/lago_ruby/models/fees.rb lib/lago_ruby/models/fees_paginated.rb +lib/lago_ruby/models/generate_customer_checkout_url200_response.rb lib/lago_ruby/models/get_customer_portal_url200_response.rb lib/lago_ruby/models/get_customer_portal_url200_response_customer.rb +lib/lago_ruby/models/gross_revenue_object.rb +lib/lago_ruby/models/gross_revenues.rb lib/lago_ruby/models/group_object.rb lib/lago_ruby/models/group_properties_object.rb lib/lago_ruby/models/group_properties_object_values.rb @@ -333,12 +347,18 @@ lib/lago_ruby/models/invoice_one_off_create_input_invoice_fees_inner.rb lib/lago_ruby/models/invoice_update_input.rb lib/lago_ruby/models/invoice_update_input_invoice.rb lib/lago_ruby/models/invoice_update_input_invoice_metadata_inner.rb +lib/lago_ruby/models/invoiced_usage_object.rb +lib/lago_ruby/models/invoiced_usages.rb lib/lago_ruby/models/invoices_paginated.rb +lib/lago_ruby/models/mrr_object.rb +lib/lago_ruby/models/mrrs.rb lib/lago_ruby/models/organization.rb lib/lago_ruby/models/organization_billing_configuration.rb lib/lago_ruby/models/organization_object.rb lib/lago_ruby/models/organization_update_input.rb lib/lago_ruby/models/organization_update_input_organization.rb +lib/lago_ruby/models/outstanding_invoice_object.rb +lib/lago_ruby/models/outstanding_invoices.rb lib/lago_ruby/models/pagination_meta.rb lib/lago_ruby/models/plan.rb lib/lago_ruby/models/plan_create_input.rb @@ -387,16 +407,16 @@ lib/lago_ruby/models/webhook_endpoint_object.rb lib/lago_ruby/models/webhook_endpoint_update_input.rb lib/lago_ruby/models/webhook_endpoints_paginated.rb lib/lago_ruby/version.rb +spec/api/analytics_api_spec.rb spec/api_client_spec.rb spec/configuration_spec.rb -spec/models/credit_note_estimate_input_credit_note_items_inner_spec.rb -spec/models/credit_note_estimate_input_credit_note_spec.rb -spec/models/credit_note_estimate_input_spec.rb -spec/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner_spec.rb -spec/models/credit_note_estimated_estimated_credit_note_items_inner_spec.rb -spec/models/credit_note_estimated_estimated_credit_note_spec.rb -spec/models/credit_note_estimated_spec.rb -spec/models/plan_overrides_object_charges_inner_spec.rb -spec/models/plan_overrides_object_spec.rb -spec/models/subscription_object_extended_spec.rb +spec/models/generate_customer_checkout_url200_response_spec.rb +spec/models/gross_revenue_object_spec.rb +spec/models/gross_revenues_spec.rb +spec/models/invoiced_usage_object_spec.rb +spec/models/invoiced_usages_spec.rb +spec/models/mrr_object_spec.rb +spec/models/mrrs_spec.rb +spec/models/outstanding_invoice_object_spec.rb +spec/models/outstanding_invoices_spec.rb spec/spec_helper.rb diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 40e3636..0f78c31 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.1.0-SNAPSHOT \ No newline at end of file +7.2.0-SNAPSHOT \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index a75ac94..d9e3d80 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,4 +8,4 @@ script: - bundle install --path vendor/bundle - bundle exec rspec - gem build lago_ruby.gemspec - - gem install ./lago_ruby-0.51.0-beta.gem + - gem install ./lago_ruby-0.52.0-beta.gem diff --git a/README.md b/README.md index c924a7c..08cbf59 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Lago API allows your application to push customer information and metrics (event This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 0.51.0-beta -- Package version: 0.51.0-beta +- Package version: 0.52.0-beta - Build package: org.openapitools.codegen.languages.RubyClientCodegen [![Gem Version](https://badge.fury.io/rb/lago-ruby.svg)](https://badge.fury.io/rb/lago-ruby) @@ -26,16 +26,16 @@ gem build lago_ruby.gemspec Then either install the gem locally: ```shell -gem install ./lago_ruby-0.51.0-beta.gem +gem install ./lago_ruby-0.52.0-beta.gem ``` -(for development, run `gem install --dev ./lago_ruby-0.51.0-beta.gem` to install the development dependencies) +(for development, run `gem install --dev ./lago_ruby-0.52.0-beta.gem` to install the development dependencies) or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/). Finally add this to the Gemfile: - gem 'lago_ruby', '~> 0.51.0-beta' + gem 'lago_ruby', '~> 0.52.0-beta' ### Install from Git @@ -93,6 +93,10 @@ Class | Method | HTTP request | Description *LagoAPI::AddOnsApi* | [**find_add_on**](docs/AddOnsApi.md#find_add_on) | **GET** /add_ons/{code} | Retrieve an add-on *LagoAPI::AddOnsApi* | [**find_all_add_ons**](docs/AddOnsApi.md#find_all_add_ons) | **GET** /add_ons | List all add-ons *LagoAPI::AddOnsApi* | [**update_add_on**](docs/AddOnsApi.md#update_add_on) | **PUT** /add_ons/{code} | Update an add-on +*LagoAPI::AnalyticsApi* | [**find_all_gross_revenues**](docs/AnalyticsApi.md#find_all_gross_revenues) | **GET** /analytics/gross_revenue | List gross revenue +*LagoAPI::AnalyticsApi* | [**find_all_invoiced_usages**](docs/AnalyticsApi.md#find_all_invoiced_usages) | **GET** /analytics/invoiced_usage | List usage revenue +*LagoAPI::AnalyticsApi* | [**find_all_mrrs**](docs/AnalyticsApi.md#find_all_mrrs) | **GET** /analytics/mrr | List MRR +*LagoAPI::AnalyticsApi* | [**find_all_outstanding_invoices**](docs/AnalyticsApi.md#find_all_outstanding_invoices) | **GET** /analytics/outstanding_invoices | List outstanding invoices *LagoAPI::BillableMetricsApi* | [**create_billable_metric**](docs/BillableMetricsApi.md#create_billable_metric) | **POST** /billable_metrics | Create a billable metric *LagoAPI::BillableMetricsApi* | [**destroy_billable_metric**](docs/BillableMetricsApi.md#destroy_billable_metric) | **DELETE** /billable_metrics/{code} | Delete a billable metric *LagoAPI::BillableMetricsApi* | [**find_all_billable_metric_groups**](docs/BillableMetricsApi.md#find_all_billable_metric_groups) | **GET** /billable_metrics/{code}/groups | Find a billable metric's groups @@ -121,6 +125,7 @@ Class | Method | HTTP request | Description *LagoAPI::CustomersApi* | [**find_all_customers**](docs/CustomersApi.md#find_all_customers) | **GET** /customers | List all customers *LagoAPI::CustomersApi* | [**find_customer**](docs/CustomersApi.md#find_customer) | **GET** /customers/{external_id} | Retrieve a customer *LagoAPI::CustomersApi* | [**find_customer_current_usage**](docs/CustomersApi.md#find_customer_current_usage) | **GET** /customers/{external_customer_id}/current_usage | Retrieve customer current usage +*LagoAPI::CustomersApi* | [**generate_customer_checkout_url**](docs/CustomersApi.md#generate_customer_checkout_url) | **POST** /customers/{external_customer_id}/checkout_url | Generate a Customer Payment Provider Checkout URL *LagoAPI::CustomersApi* | [**get_customer_portal_url**](docs/CustomersApi.md#get_customer_portal_url) | **GET** /customers/{external_customer_id}/portal_url | Get a customer portal URL *LagoAPI::EventsApi* | [**create_batch_events**](docs/EventsApi.md#create_batch_events) | **POST** /events/batch | Batch multiple events *LagoAPI::EventsApi* | [**create_event**](docs/EventsApi.md#create_event) | **POST** /events | Send usage events @@ -271,8 +276,11 @@ Class | Method | HTTP request | Description - [LagoAPI::FeeUpdateInputFee](docs/FeeUpdateInputFee.md) - [LagoAPI::Fees](docs/Fees.md) - [LagoAPI::FeesPaginated](docs/FeesPaginated.md) + - [LagoAPI::GenerateCustomerCheckoutURL200Response](docs/GenerateCustomerCheckoutURL200Response.md) - [LagoAPI::GetCustomerPortalUrl200Response](docs/GetCustomerPortalUrl200Response.md) - [LagoAPI::GetCustomerPortalUrl200ResponseCustomer](docs/GetCustomerPortalUrl200ResponseCustomer.md) + - [LagoAPI::GrossRevenueObject](docs/GrossRevenueObject.md) + - [LagoAPI::GrossRevenues](docs/GrossRevenues.md) - [LagoAPI::GroupObject](docs/GroupObject.md) - [LagoAPI::GroupPropertiesObject](docs/GroupPropertiesObject.md) - [LagoAPI::GroupPropertiesObjectValues](docs/GroupPropertiesObjectValues.md) @@ -289,12 +297,18 @@ Class | Method | HTTP request | Description - [LagoAPI::InvoiceUpdateInput](docs/InvoiceUpdateInput.md) - [LagoAPI::InvoiceUpdateInputInvoice](docs/InvoiceUpdateInputInvoice.md) - [LagoAPI::InvoiceUpdateInputInvoiceMetadataInner](docs/InvoiceUpdateInputInvoiceMetadataInner.md) + - [LagoAPI::InvoicedUsageObject](docs/InvoicedUsageObject.md) + - [LagoAPI::InvoicedUsages](docs/InvoicedUsages.md) - [LagoAPI::InvoicesPaginated](docs/InvoicesPaginated.md) + - [LagoAPI::MrrObject](docs/MrrObject.md) + - [LagoAPI::Mrrs](docs/Mrrs.md) - [LagoAPI::Organization](docs/Organization.md) - [LagoAPI::OrganizationBillingConfiguration](docs/OrganizationBillingConfiguration.md) - [LagoAPI::OrganizationObject](docs/OrganizationObject.md) - [LagoAPI::OrganizationUpdateInput](docs/OrganizationUpdateInput.md) - [LagoAPI::OrganizationUpdateInputOrganization](docs/OrganizationUpdateInputOrganization.md) + - [LagoAPI::OutstandingInvoiceObject](docs/OutstandingInvoiceObject.md) + - [LagoAPI::OutstandingInvoices](docs/OutstandingInvoices.md) - [LagoAPI::PaginationMeta](docs/PaginationMeta.md) - [LagoAPI::Plan](docs/Plan.md) - [LagoAPI::PlanCreateInput](docs/PlanCreateInput.md) diff --git a/docs/AddOnCreateInputAddOn.md b/docs/AddOnCreateInputAddOn.md index a5f3d9e..51a1bbb 100644 --- a/docs/AddOnCreateInputAddOn.md +++ b/docs/AddOnCreateInputAddOn.md @@ -24,7 +24,7 @@ instance = LagoAPI::AddOnCreateInputAddOn.new( amount_cents: 50000, amount_currency: null, description: Implementation fee for new customers., - tax_codes: ["french_standard_vat"] + tax_codes: [french_standard_vat] ) ``` diff --git a/docs/AnalyticsApi.md b/docs/AnalyticsApi.md new file mode 100644 index 0000000..a55c7d4 --- /dev/null +++ b/docs/AnalyticsApi.md @@ -0,0 +1,299 @@ +# LagoAPI::AnalyticsApi + +All URIs are relative to *https://api.getlago.com/api/v1* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**find_all_gross_revenues**](AnalyticsApi.md#find_all_gross_revenues) | **GET** /analytics/gross_revenue | List gross revenue | +| [**find_all_invoiced_usages**](AnalyticsApi.md#find_all_invoiced_usages) | **GET** /analytics/invoiced_usage | List usage revenue | +| [**find_all_mrrs**](AnalyticsApi.md#find_all_mrrs) | **GET** /analytics/mrr | List MRR | +| [**find_all_outstanding_invoices**](AnalyticsApi.md#find_all_outstanding_invoices) | **GET** /analytics/outstanding_invoices | List outstanding invoices | + + +## find_all_gross_revenues + +> find_all_gross_revenues(opts) + +List gross revenue + +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. + +### Examples + +```ruby +require 'time' +require 'lago_ruby' +# setup authorization +LagoAPI.configure do |config| + # Configure Bearer authorization: bearerAuth + config.access_token = 'YOUR_BEARER_TOKEN' +end + +api_instance = LagoAPI::AnalyticsApi.new +opts = { + currency: LagoAPI::Currency::AED, # Currency | Currency of revenue analytics. Format must be ISO 4217. + external_customer_id: '5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba' # String | The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level. +} + +begin + # List gross revenue + result = api_instance.find_all_gross_revenues(opts) + p result +rescue LagoAPI::ApiError => e + puts "Error when calling AnalyticsApi->find_all_gross_revenues: #{e}" +end +``` + +#### Using the find_all_gross_revenues_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> find_all_gross_revenues_with_http_info(opts) + +```ruby +begin + # List gross revenue + data, status_code, headers = api_instance.find_all_gross_revenues_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue LagoAPI::ApiError => e + puts "Error when calling AnalyticsApi->find_all_gross_revenues_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **currency** | [**Currency**](.md) | Currency of revenue analytics. Format must be ISO 4217. | [optional] | +| **external_customer_id** | **String** | The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level. | [optional] | + +### Return type + +[**GrossRevenues**](GrossRevenues.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## find_all_invoiced_usages + +> find_all_invoiced_usages(opts) + +List usage revenue + +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. + +### Examples + +```ruby +require 'time' +require 'lago_ruby' +# setup authorization +LagoAPI.configure do |config| + # Configure Bearer authorization: bearerAuth + config.access_token = 'YOUR_BEARER_TOKEN' +end + +api_instance = LagoAPI::AnalyticsApi.new +opts = { + currency: LagoAPI::Currency::AED # Currency | The currency of invoiced usage analytics. Format must be ISO 4217. +} + +begin + # List usage revenue + result = api_instance.find_all_invoiced_usages(opts) + p result +rescue LagoAPI::ApiError => e + puts "Error when calling AnalyticsApi->find_all_invoiced_usages: #{e}" +end +``` + +#### Using the find_all_invoiced_usages_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> find_all_invoiced_usages_with_http_info(opts) + +```ruby +begin + # List usage revenue + data, status_code, headers = api_instance.find_all_invoiced_usages_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue LagoAPI::ApiError => e + puts "Error when calling AnalyticsApi->find_all_invoiced_usages_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **currency** | [**Currency**](.md) | The currency of invoiced usage analytics. Format must be ISO 4217. | [optional] | + +### Return type + +[**InvoicedUsages**](InvoicedUsages.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## find_all_mrrs + +> find_all_mrrs(opts) + +List MRR + +This endpoint is used to list MRR. + +### Examples + +```ruby +require 'time' +require 'lago_ruby' +# setup authorization +LagoAPI.configure do |config| + # Configure Bearer authorization: bearerAuth + config.access_token = 'YOUR_BEARER_TOKEN' +end + +api_instance = LagoAPI::AnalyticsApi.new +opts = { + currency: LagoAPI::Currency::AED, # 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. + months: 12 # Integer | Show data only for given number of months. +} + +begin + # List MRR + result = api_instance.find_all_mrrs(opts) + p result +rescue LagoAPI::ApiError => e + puts "Error when calling AnalyticsApi->find_all_mrrs: #{e}" +end +``` + +#### Using the find_all_mrrs_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> find_all_mrrs_with_http_info(opts) + +```ruby +begin + # List MRR + data, status_code, headers = api_instance.find_all_mrrs_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue LagoAPI::ApiError => e + puts "Error when calling AnalyticsApi->find_all_mrrs_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **currency** | [**Currency**](.md) | 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. | [optional] | +| **months** | **Integer** | Show data only for given number of months. | [optional] | + +### Return type + +[**Mrrs**](Mrrs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## find_all_outstanding_invoices + +> find_all_outstanding_invoices(opts) + +List outstanding invoices + +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`. + +### Examples + +```ruby +require 'time' +require 'lago_ruby' +# setup authorization +LagoAPI.configure do |config| + # Configure Bearer authorization: bearerAuth + config.access_token = 'YOUR_BEARER_TOKEN' +end + +api_instance = LagoAPI::AnalyticsApi.new +opts = { + currency: LagoAPI::Currency::AED # Currency | The currency of revenue analytics. Format must be ISO 4217. +} + +begin + # List outstanding invoices + result = api_instance.find_all_outstanding_invoices(opts) + p result +rescue LagoAPI::ApiError => e + puts "Error when calling AnalyticsApi->find_all_outstanding_invoices: #{e}" +end +``` + +#### Using the find_all_outstanding_invoices_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> find_all_outstanding_invoices_with_http_info(opts) + +```ruby +begin + # List outstanding invoices + data, status_code, headers = api_instance.find_all_outstanding_invoices_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue LagoAPI::ApiError => e + puts "Error when calling AnalyticsApi->find_all_outstanding_invoices_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **currency** | [**Currency**](.md) | The currency of revenue analytics. Format must be ISO 4217. | [optional] | + +### Return type + +[**OutstandingInvoices**](OutstandingInvoices.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/CreditNoteItemObjectFee.md b/docs/CreditNoteItemObjectFee.md index 41ad97c..83011ad 100644 --- a/docs/CreditNoteItemObjectFee.md +++ b/docs/CreditNoteItemObjectFee.md @@ -9,10 +9,10 @@ | **lago_invoice_id** | **String** | Unique identifier assigned to the invoice that the fee belongs to | [optional] | | **lago_true_up_fee_id** | **String** | Unique identifier assigned to the true-up fee when a minimum has been set to the charge. This identifier helps to distinguish and manage the true-up fee associated with the charge, which may be applicable when a minimum threshold or limit is set for the charge amount. | [optional] | | **lago_true_up_parent_fee_id** | **String** | Unique identifier assigned to the parent fee on which the true-up fee is assigned. This identifier establishes the relationship between the parent fee and the associated true-up fee. | [optional] | -| **lago_subscription_id** | **String** | Unique identifier assigned to the subscription, created by Lago. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). | [optional] | -| **lago_customer_id** | **String** | Unique identifier assigned to the customer, created by Lago. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). | [optional] | -| **external_customer_id** | **String** | Unique identifier assigned to the customer in your application. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). | [optional] | -| **external_subscription_id** | **String** | Unique identifier assigned to the subscription in your application. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). | [optional] | +| **lago_subscription_id** | **String** | Unique identifier assigned to the subscription, created by Lago. This field is specifically displayed when the fee type is charge or subscription. | [optional] | +| **lago_customer_id** | **String** | Unique identifier assigned to the customer, created by Lago. This field is specifically displayed when the fee type is charge or subscription. | [optional] | +| **external_customer_id** | **String** | Unique identifier assigned to the customer in your application. This field is specifically displayed when the fee type is charge or subscription. | [optional] | +| **external_subscription_id** | **String** | Unique identifier assigned to the subscription in your application. This field is specifically displayed when the fee type is charge or subscription. | [optional] | | **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] | | **amount_cents** | **Integer** | The cost of this specific fee, excluding any applicable taxes. | | | **amount_currency** | [**Currency**](Currency.md) | | | diff --git a/docs/CustomerChargeUsageObjectCharge.md b/docs/CustomerChargeUsageObjectCharge.md index 8c3808d..dce01b8 100644 --- a/docs/CustomerChargeUsageObjectCharge.md +++ b/docs/CustomerChargeUsageObjectCharge.md @@ -6,6 +6,7 @@ | ---- | ---- | ----------- | ----- | | **lago_id** | **String** | Unique identifier assigned to the charge within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the charge’s record within the Lago system. | | | **charge_model** | **String** | The pricing model applied to this charge. Possible values are standard, `graduated`, `percentage`, `package` or `volume`. | | +| **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] | ## Example @@ -14,7 +15,8 @@ require 'lago_ruby' instance = LagoAPI::CustomerChargeUsageObjectCharge.new( lago_id: 1a901a90-1a90-1a90-1a90-1a901a901a90, - charge_model: graduated + charge_model: graduated, + invoice_display_name: Setup ) ``` diff --git a/docs/CustomersApi.md b/docs/CustomersApi.md index 3c51c64..2452394 100644 --- a/docs/CustomersApi.md +++ b/docs/CustomersApi.md @@ -11,6 +11,7 @@ All URIs are relative to *https://api.getlago.com/api/v1* | [**find_all_customers**](CustomersApi.md#find_all_customers) | **GET** /customers | List all customers | | [**find_customer**](CustomersApi.md#find_customer) | **GET** /customers/{external_id} | Retrieve a customer | | [**find_customer_current_usage**](CustomersApi.md#find_customer_current_usage) | **GET** /customers/{external_customer_id}/current_usage | Retrieve customer current usage | +| [**generate_customer_checkout_url**](CustomersApi.md#generate_customer_checkout_url) | **POST** /customers/{external_customer_id}/checkout_url | Generate a Customer Payment Provider Checkout URL | | [**get_customer_portal_url**](CustomersApi.md#get_customer_portal_url) | **GET** /customers/{external_customer_id}/portal_url | Get a customer portal URL | @@ -517,6 +518,75 @@ end - **Accept**: application/json +## generate_customer_checkout_url + +> generate_customer_checkout_url(external_customer_id) + +Generate a Customer Payment Provider Checkout URL + +This endpoint regenerates the Payment Provider Checkout URL of a Customer. + +### Examples + +```ruby +require 'time' +require 'lago_ruby' +# setup authorization +LagoAPI.configure do |config| + # Configure Bearer authorization: bearerAuth + config.access_token = 'YOUR_BEARER_TOKEN' +end + +api_instance = LagoAPI::CustomersApi.new +external_customer_id = '5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba' # String | The customer external unique identifier (provided by your own application). + +begin + # Generate a Customer Payment Provider Checkout URL + result = api_instance.generate_customer_checkout_url(external_customer_id) + p result +rescue LagoAPI::ApiError => e + puts "Error when calling CustomersApi->generate_customer_checkout_url: #{e}" +end +``` + +#### Using the generate_customer_checkout_url_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> generate_customer_checkout_url_with_http_info(external_customer_id) + +```ruby +begin + # Generate a Customer Payment Provider Checkout URL + data, status_code, headers = api_instance.generate_customer_checkout_url_with_http_info(external_customer_id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue LagoAPI::ApiError => e + puts "Error when calling CustomersApi->generate_customer_checkout_url_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **external_customer_id** | **String** | The customer external unique identifier (provided by your own application). | | + +### Return type + +[**GenerateCustomerCheckoutURL200Response**](GenerateCustomerCheckoutURL200Response.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + ## get_customer_portal_url > get_customer_portal_url(external_customer_id) diff --git a/docs/FeeObject.md b/docs/FeeObject.md index 92721d2..90299a1 100644 --- a/docs/FeeObject.md +++ b/docs/FeeObject.md @@ -9,10 +9,10 @@ | **lago_invoice_id** | **String** | Unique identifier assigned to the invoice that the fee belongs to | [optional] | | **lago_true_up_fee_id** | **String** | Unique identifier assigned to the true-up fee when a minimum has been set to the charge. This identifier helps to distinguish and manage the true-up fee associated with the charge, which may be applicable when a minimum threshold or limit is set for the charge amount. | [optional] | | **lago_true_up_parent_fee_id** | **String** | Unique identifier assigned to the parent fee on which the true-up fee is assigned. This identifier establishes the relationship between the parent fee and the associated true-up fee. | [optional] | -| **lago_subscription_id** | **String** | Unique identifier assigned to the subscription, created by Lago. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). | [optional] | -| **lago_customer_id** | **String** | Unique identifier assigned to the customer, created by Lago. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). | [optional] | -| **external_customer_id** | **String** | Unique identifier assigned to the customer in your application. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). | [optional] | -| **external_subscription_id** | **String** | Unique identifier assigned to the subscription in your application. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). | [optional] | +| **lago_subscription_id** | **String** | Unique identifier assigned to the subscription, created by Lago. This field is specifically displayed when the fee type is charge or subscription. | [optional] | +| **lago_customer_id** | **String** | Unique identifier assigned to the customer, created by Lago. This field is specifically displayed when the fee type is charge or subscription. | [optional] | +| **external_customer_id** | **String** | Unique identifier assigned to the customer in your application. This field is specifically displayed when the fee type is charge or subscription. | [optional] | +| **external_subscription_id** | **String** | Unique identifier assigned to the subscription in your application. This field is specifically displayed when the fee type is charge or subscription. | [optional] | | **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] | | **amount_cents** | **Integer** | The cost of this specific fee, excluding any applicable taxes. | | | **amount_currency** | [**Currency**](Currency.md) | | | diff --git a/docs/GenerateCustomerCheckoutURL200Response.md b/docs/GenerateCustomerCheckoutURL200Response.md new file mode 100644 index 0000000..13dc1ad --- /dev/null +++ b/docs/GenerateCustomerCheckoutURL200Response.md @@ -0,0 +1,24 @@ +# LagoAPI::GenerateCustomerCheckoutURL200Response + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **lago_customer_id** | **String** | Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system | [optional] | +| **external_customer_id** | **String** | The customer external unique identifier (provided by your own application) | [optional] | +| **payment_provider** | **String** | The Payment Provider name linked to the Customer. | [optional] | +| **checkout_url** | **String** | The new generated Payment Provider Checkout URL for the Customer. | [optional] | + +## Example + +```ruby +require 'lago_ruby' + +instance = LagoAPI::GenerateCustomerCheckoutURL200Response.new( + lago_customer_id: 1a901a90-1a90-1a90-1a90-1a901a901a90, + external_customer_id: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba, + payment_provider: stripe, + checkout_url: https://foo.bar +) +``` + diff --git a/docs/GrossRevenueObject.md b/docs/GrossRevenueObject.md new file mode 100644 index 0000000..da2054e --- /dev/null +++ b/docs/GrossRevenueObject.md @@ -0,0 +1,22 @@ +# LagoAPI::GrossRevenueObject + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **month** | **String** | Identifies the month to analyze revenue. | | +| **amount_cents** | **Integer** | The total amount of revenue for a period, expressed in cents. | [optional] | +| **currency** | [**Currency**](Currency.md) | | [optional] | + +## Example + +```ruby +require 'lago_ruby' + +instance = LagoAPI::GrossRevenueObject.new( + month: 2023-11-01T00:00:00.000Z, + amount_cents: 50000, + currency: null +) +``` + diff --git a/docs/GrossRevenues.md b/docs/GrossRevenues.md new file mode 100644 index 0000000..56bec22 --- /dev/null +++ b/docs/GrossRevenues.md @@ -0,0 +1,18 @@ +# LagoAPI::GrossRevenues + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **gross_revenues** | [**Array<GrossRevenueObject>**](GrossRevenueObject.md) | | | + +## Example + +```ruby +require 'lago_ruby' + +instance = LagoAPI::GrossRevenues.new( + gross_revenues: null +) +``` + diff --git a/docs/InvoicedUsageObject.md b/docs/InvoicedUsageObject.md new file mode 100644 index 0000000..b26a07f --- /dev/null +++ b/docs/InvoicedUsageObject.md @@ -0,0 +1,24 @@ +# LagoAPI::InvoicedUsageObject + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **month** | **String** | Identifies the month to analyze revenue. | | +| **code** | **String** | The code of the usage-based billable metrics. | [optional] | +| **amount_cents** | **Integer** | The total amount of revenue for a period, expressed in cents. | | +| **currency** | [**Currency**](Currency.md) | | | + +## Example + +```ruby +require 'lago_ruby' + +instance = LagoAPI::InvoicedUsageObject.new( + month: 2023-11-01T00:00:00.000Z, + code: code1, + amount_cents: 50000, + currency: null +) +``` + diff --git a/docs/InvoicedUsages.md b/docs/InvoicedUsages.md new file mode 100644 index 0000000..4644660 --- /dev/null +++ b/docs/InvoicedUsages.md @@ -0,0 +1,18 @@ +# LagoAPI::InvoicedUsages + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **invoiced_usages** | [**Array<InvoicedUsageObject>**](InvoicedUsageObject.md) | | | + +## Example + +```ruby +require 'lago_ruby' + +instance = LagoAPI::InvoicedUsages.new( + invoiced_usages: null +) +``` + diff --git a/docs/MrrObject.md b/docs/MrrObject.md new file mode 100644 index 0000000..5d1d04b --- /dev/null +++ b/docs/MrrObject.md @@ -0,0 +1,22 @@ +# LagoAPI::MrrObject + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **month** | **String** | Identifies the month to analyze MRR. | | +| **amount_cents** | **Integer** | The total amount of MRR, expressed in cents. | [optional] | +| **currency** | [**Currency**](Currency.md) | | [optional] | + +## Example + +```ruby +require 'lago_ruby' + +instance = LagoAPI::MrrObject.new( + month: 2023-11-01T00:00:00.000Z, + amount_cents: 50000, + currency: null +) +``` + diff --git a/docs/Mrrs.md b/docs/Mrrs.md new file mode 100644 index 0000000..bd6dfb4 --- /dev/null +++ b/docs/Mrrs.md @@ -0,0 +1,18 @@ +# LagoAPI::Mrrs + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **mrrs** | [**Array<MrrObject>**](MrrObject.md) | | | + +## Example + +```ruby +require 'lago_ruby' + +instance = LagoAPI::Mrrs.new( + mrrs: null +) +``` + diff --git a/docs/OrganizationObject.md b/docs/OrganizationObject.md index f53ee14..f013c88 100644 --- a/docs/OrganizationObject.md +++ b/docs/OrganizationObject.md @@ -10,6 +10,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] | | **webhook_urls** | **Array<String>** | The array containing your webhooks URLs. | [optional] | | **country** | [**Country**](Country.md) | | [optional] | +| **default_currency** | [**Currency**](Currency.md) | | [optional] | | **address_line1** | **String** | The first line of your organization’s billing address. | [optional] | | **address_line2** | **String** | The second line of your organization’s billing address. | [optional] | | **state** | **String** | The state of your organization’s billing address. | [optional] | @@ -36,6 +37,7 @@ instance = LagoAPI::OrganizationObject.new( webhook_url: https://webhook.brex.com, webhook_urls: ["https://webhook.brex.com","https://webhook2.brex.com"], country: null, + default_currency: null, address_line1: 100 Brex Street, address_line2: null, state: NYC, diff --git a/docs/OrganizationUpdateInputOrganization.md b/docs/OrganizationUpdateInputOrganization.md index b54acf6..23ab4dc 100644 --- a/docs/OrganizationUpdateInputOrganization.md +++ b/docs/OrganizationUpdateInputOrganization.md @@ -6,6 +6,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] | | **country** | [**Country**](Country.md) | | [optional] | +| **default_currency** | [**Currency**](Currency.md) | | [optional] | | **address_line1** | **String** | The first line of your organization’s billing address. | [optional] | | **address_line2** | **String** | The second line of your organization’s billing address. | [optional] | | **state** | **String** | The state of your organization’s billing address. | [optional] | @@ -28,6 +29,7 @@ require 'lago_ruby' instance = LagoAPI::OrganizationUpdateInputOrganization.new( webhook_url: https://webhook.brex.com, country: null, + default_currency: null, address_line1: 100 Brex Street, address_line2: null, state: NYC, diff --git a/docs/OutstandingInvoiceObject.md b/docs/OutstandingInvoiceObject.md new file mode 100644 index 0000000..65139e9 --- /dev/null +++ b/docs/OutstandingInvoiceObject.md @@ -0,0 +1,26 @@ +# LagoAPI::OutstandingInvoiceObject + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **month** | **String** | Identifies the month to analyze revenue. | | +| **payment_status** | **String** | The payment status of the invoices. | [optional] | +| **invoices_count** | **Integer** | Contains invoices count. | | +| **amount_cents** | **Integer** | The total amount of revenue for a period, expressed in cents. | | +| **currency** | [**Currency**](Currency.md) | | [optional] | + +## Example + +```ruby +require 'lago_ruby' + +instance = LagoAPI::OutstandingInvoiceObject.new( + month: 2023-11-01T00:00:00.000Z, + payment_status: succeeded, + invoices_count: 10, + amount_cents: 50000, + currency: null +) +``` + diff --git a/docs/OutstandingInvoices.md b/docs/OutstandingInvoices.md new file mode 100644 index 0000000..a330c16 --- /dev/null +++ b/docs/OutstandingInvoices.md @@ -0,0 +1,18 @@ +# LagoAPI::OutstandingInvoices + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **outstanding_invoices** | [**Array<OutstandingInvoiceObject>**](OutstandingInvoiceObject.md) | | | + +## Example + +```ruby +require 'lago_ruby' + +instance = LagoAPI::OutstandingInvoices.new( + outstanding_invoices: null +) +``` + diff --git a/docs/PlanOverridesObjectChargesInner.md b/docs/PlanOverridesObjectChargesInner.md index ebb8c93..188e9d0 100644 --- a/docs/PlanOverridesObjectChargesInner.md +++ b/docs/PlanOverridesObjectChargesInner.md @@ -5,6 +5,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | Unique identifier of the charge created by Lago. | [optional] | +| **billable_metric_id** | **String** | Unique identifier of the billable metric created by Lago. | [optional] | | **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] | | **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] | | **properties** | [**ChargeObjectProperties**](ChargeObjectProperties.md) | | [optional] | @@ -18,6 +19,7 @@ require 'lago_ruby' instance = LagoAPI::PlanOverridesObjectChargesInner.new( id: 1a901a90-1a90-1a90-1a90-1a901a901a90, + billable_metric_id: 1a901a90-1a90-1a90-1a90-1a901a901a90, invoice_display_name: Setup, min_amount_cents: 0, properties: null, diff --git a/lago_ruby.gemspec b/lago_ruby.gemspec index 92fc2fd..41931ee 100644 --- a/lago_ruby.gemspec +++ b/lago_ruby.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby.rb b/lib/lago_ruby.rb index d3da2aa..0017d73 100644 --- a/lib/lago_ruby.rb +++ b/lib/lago_ruby.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end @@ -118,8 +118,11 @@ require 'lago_ruby/models/fee_update_input_fee' require 'lago_ruby/models/fees' require 'lago_ruby/models/fees_paginated' +require 'lago_ruby/models/generate_customer_checkout_url200_response' require 'lago_ruby/models/get_customer_portal_url200_response' require 'lago_ruby/models/get_customer_portal_url200_response_customer' +require 'lago_ruby/models/gross_revenue_object' +require 'lago_ruby/models/gross_revenues' require 'lago_ruby/models/group_object' require 'lago_ruby/models/group_properties_object' require 'lago_ruby/models/group_properties_object_values' @@ -136,12 +139,18 @@ require 'lago_ruby/models/invoice_update_input' require 'lago_ruby/models/invoice_update_input_invoice' require 'lago_ruby/models/invoice_update_input_invoice_metadata_inner' +require 'lago_ruby/models/invoiced_usage_object' +require 'lago_ruby/models/invoiced_usages' require 'lago_ruby/models/invoices_paginated' +require 'lago_ruby/models/mrr_object' +require 'lago_ruby/models/mrrs' require 'lago_ruby/models/organization' require 'lago_ruby/models/organization_billing_configuration' require 'lago_ruby/models/organization_object' require 'lago_ruby/models/organization_update_input' require 'lago_ruby/models/organization_update_input_organization' +require 'lago_ruby/models/outstanding_invoice_object' +require 'lago_ruby/models/outstanding_invoices' require 'lago_ruby/models/pagination_meta' require 'lago_ruby/models/plan' require 'lago_ruby/models/plan_create_input' @@ -192,6 +201,7 @@ # APIs require 'lago_ruby/api/add_ons_api' +require 'lago_ruby/api/analytics_api' require 'lago_ruby/api/billable_metrics_api' require 'lago_ruby/api/coupons_api' require 'lago_ruby/api/credit_notes_api' diff --git a/lib/lago_ruby/api/add_ons_api.rb b/lib/lago_ruby/api/add_ons_api.rb index 235be65..adc27ea 100644 --- a/lib/lago_ruby/api/add_ons_api.rb +++ b/lib/lago_ruby/api/add_ons_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/api/analytics_api.rb b/lib/lago_ruby/api/analytics_api.rb new file mode 100644 index 0000000..c22d5eb --- /dev/null +++ b/lib/lago_ruby/api/analytics_api.rb @@ -0,0 +1,268 @@ +=begin +#Lago API documentation + +#Lago API allows your application to push customer information and metrics (events) from your application to the billing application. + +The version of the OpenAPI document: 0.51.0-beta +Contact: tech@getlago.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.2.0-SNAPSHOT + +=end + +require 'cgi' + +module LagoAPI + class AnalyticsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # List gross revenue + # 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. + # @param [Hash] opts the optional parameters + # @option opts [Currency] :currency Currency of revenue analytics. Format must be ISO 4217. + # @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. + # @return [GrossRevenues] + def find_all_gross_revenues(opts = {}) + data, _status_code, _headers = find_all_gross_revenues_with_http_info(opts) + data + end + + # List gross revenue + # 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. + # @param [Hash] opts the optional parameters + # @option opts [Currency] :currency Currency of revenue analytics. Format must be ISO 4217. + # @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. + # @return [Array<(GrossRevenues, Integer, Hash)>] GrossRevenues data, response status code and response headers + def find_all_gross_revenues_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AnalyticsApi.find_all_gross_revenues ...' + end + # resource path + local_var_path = '/analytics/gross_revenue' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil? + query_params[:'external_customer_id'] = opts[:'external_customer_id'] if !opts[:'external_customer_id'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GrossRevenues' + + # auth_names + auth_names = opts[:debug_auth_names] || ['bearerAuth'] + + new_options = opts.merge( + :operation => :"AnalyticsApi.find_all_gross_revenues", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AnalyticsApi#find_all_gross_revenues\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List usage revenue + # 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. + # @param [Hash] opts the optional parameters + # @option opts [Currency] :currency The currency of invoiced usage analytics. Format must be ISO 4217. + # @return [InvoicedUsages] + def find_all_invoiced_usages(opts = {}) + data, _status_code, _headers = find_all_invoiced_usages_with_http_info(opts) + data + end + + # List usage revenue + # 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. + # @param [Hash] opts the optional parameters + # @option opts [Currency] :currency The currency of invoiced usage analytics. Format must be ISO 4217. + # @return [Array<(InvoicedUsages, Integer, Hash)>] InvoicedUsages data, response status code and response headers + def find_all_invoiced_usages_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AnalyticsApi.find_all_invoiced_usages ...' + end + # resource path + local_var_path = '/analytics/invoiced_usage' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'InvoicedUsages' + + # auth_names + auth_names = opts[:debug_auth_names] || ['bearerAuth'] + + new_options = opts.merge( + :operation => :"AnalyticsApi.find_all_invoiced_usages", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AnalyticsApi#find_all_invoiced_usages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List MRR + # This endpoint is used to list MRR. + # @param [Hash] opts the optional parameters + # @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. + # @option opts [Integer] :months Show data only for given number of months. + # @return [Mrrs] + def find_all_mrrs(opts = {}) + data, _status_code, _headers = find_all_mrrs_with_http_info(opts) + data + end + + # List MRR + # This endpoint is used to list MRR. + # @param [Hash] opts the optional parameters + # @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. + # @option opts [Integer] :months Show data only for given number of months. + # @return [Array<(Mrrs, Integer, Hash)>] Mrrs data, response status code and response headers + def find_all_mrrs_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AnalyticsApi.find_all_mrrs ...' + end + # resource path + local_var_path = '/analytics/mrr' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil? + query_params[:'months'] = opts[:'months'] if !opts[:'months'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Mrrs' + + # auth_names + auth_names = opts[:debug_auth_names] || ['bearerAuth'] + + new_options = opts.merge( + :operation => :"AnalyticsApi.find_all_mrrs", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AnalyticsApi#find_all_mrrs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List outstanding invoices + # 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`. + # @param [Hash] opts the optional parameters + # @option opts [Currency] :currency The currency of revenue analytics. Format must be ISO 4217. + # @return [OutstandingInvoices] + def find_all_outstanding_invoices(opts = {}) + data, _status_code, _headers = find_all_outstanding_invoices_with_http_info(opts) + data + end + + # List outstanding invoices + # 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`. + # @param [Hash] opts the optional parameters + # @option opts [Currency] :currency The currency of revenue analytics. Format must be ISO 4217. + # @return [Array<(OutstandingInvoices, Integer, Hash)>] OutstandingInvoices data, response status code and response headers + def find_all_outstanding_invoices_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AnalyticsApi.find_all_outstanding_invoices ...' + end + # resource path + local_var_path = '/analytics/outstanding_invoices' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'OutstandingInvoices' + + # auth_names + auth_names = opts[:debug_auth_names] || ['bearerAuth'] + + new_options = opts.merge( + :operation => :"AnalyticsApi.find_all_outstanding_invoices", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AnalyticsApi#find_all_outstanding_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/lago_ruby/api/billable_metrics_api.rb b/lib/lago_ruby/api/billable_metrics_api.rb index 92528ae..58e03db 100644 --- a/lib/lago_ruby/api/billable_metrics_api.rb +++ b/lib/lago_ruby/api/billable_metrics_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/api/coupons_api.rb b/lib/lago_ruby/api/coupons_api.rb index a59492c..c97af94 100644 --- a/lib/lago_ruby/api/coupons_api.rb +++ b/lib/lago_ruby/api/coupons_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/api/credit_notes_api.rb b/lib/lago_ruby/api/credit_notes_api.rb index a0bbec7..101b1bd 100644 --- a/lib/lago_ruby/api/credit_notes_api.rb +++ b/lib/lago_ruby/api/credit_notes_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/api/customers_api.rb b/lib/lago_ruby/api/customers_api.rb index 5cdc5ad..5028234 100644 --- a/lib/lago_ruby/api/customers_api.rb +++ b/lib/lago_ruby/api/customers_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end @@ -497,6 +497,69 @@ def find_customer_current_usage_with_http_info(external_customer_id, external_su return data, status_code, headers end + # Generate a Customer Payment Provider Checkout URL + # This endpoint regenerates the Payment Provider Checkout URL of a Customer. + # @param external_customer_id [String] The customer external unique identifier (provided by your own application). + # @param [Hash] opts the optional parameters + # @return [GenerateCustomerCheckoutURL200Response] + def generate_customer_checkout_url(external_customer_id, opts = {}) + data, _status_code, _headers = generate_customer_checkout_url_with_http_info(external_customer_id, opts) + data + end + + # Generate a Customer Payment Provider Checkout URL + # This endpoint regenerates the Payment Provider Checkout URL of a Customer. + # @param external_customer_id [String] The customer external unique identifier (provided by your own application). + # @param [Hash] opts the optional parameters + # @return [Array<(GenerateCustomerCheckoutURL200Response, Integer, Hash)>] GenerateCustomerCheckoutURL200Response data, response status code and response headers + def generate_customer_checkout_url_with_http_info(external_customer_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CustomersApi.generate_customer_checkout_url ...' + end + # verify the required parameter 'external_customer_id' is set + if @api_client.config.client_side_validation && external_customer_id.nil? + fail ArgumentError, "Missing the required parameter 'external_customer_id' when calling CustomersApi.generate_customer_checkout_url" + end + # resource path + local_var_path = '/customers/{external_customer_id}/checkout_url'.sub('{' + 'external_customer_id' + '}', CGI.escape(external_customer_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GenerateCustomerCheckoutURL200Response' + + # auth_names + auth_names = opts[:debug_auth_names] || ['bearerAuth'] + + new_options = opts.merge( + :operation => :"CustomersApi.generate_customer_checkout_url", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CustomersApi#generate_customer_checkout_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get a customer portal URL # 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 # @param external_customer_id [String] External ID of the existing customer diff --git a/lib/lago_ruby/api/events_api.rb b/lib/lago_ruby/api/events_api.rb index 5dad89d..5683927 100644 --- a/lib/lago_ruby/api/events_api.rb +++ b/lib/lago_ruby/api/events_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/api/fees_api.rb b/lib/lago_ruby/api/fees_api.rb index 2b265f0..8a6f6ec 100644 --- a/lib/lago_ruby/api/fees_api.rb +++ b/lib/lago_ruby/api/fees_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/api/invoices_api.rb b/lib/lago_ruby/api/invoices_api.rb index 312a492..a9951e5 100644 --- a/lib/lago_ruby/api/invoices_api.rb +++ b/lib/lago_ruby/api/invoices_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/api/organizations_api.rb b/lib/lago_ruby/api/organizations_api.rb index 7460c90..dbfab39 100644 --- a/lib/lago_ruby/api/organizations_api.rb +++ b/lib/lago_ruby/api/organizations_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/api/plans_api.rb b/lib/lago_ruby/api/plans_api.rb index 865f2a4..d78d1ac 100644 --- a/lib/lago_ruby/api/plans_api.rb +++ b/lib/lago_ruby/api/plans_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/api/subscriptions_api.rb b/lib/lago_ruby/api/subscriptions_api.rb index 25259c0..1a442a8 100644 --- a/lib/lago_ruby/api/subscriptions_api.rb +++ b/lib/lago_ruby/api/subscriptions_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/api/taxes_api.rb b/lib/lago_ruby/api/taxes_api.rb index f02a005..f1fdd33 100644 --- a/lib/lago_ruby/api/taxes_api.rb +++ b/lib/lago_ruby/api/taxes_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/api/wallets_api.rb b/lib/lago_ruby/api/wallets_api.rb index 73cfbf8..43e9020 100644 --- a/lib/lago_ruby/api/wallets_api.rb +++ b/lib/lago_ruby/api/wallets_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/api/webhook_endpoints_api.rb b/lib/lago_ruby/api/webhook_endpoints_api.rb index 4c9dda5..6d849b4 100644 --- a/lib/lago_ruby/api/webhook_endpoints_api.rb +++ b/lib/lago_ruby/api/webhook_endpoints_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/api/webhooks_api.rb b/lib/lago_ruby/api/webhooks_api.rb index eb366ca..7c57bba 100644 --- a/lib/lago_ruby/api/webhooks_api.rb +++ b/lib/lago_ruby/api/webhooks_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/api_client.rb b/lib/lago_ruby/api_client.rb index 1baf9fd..d0bab36 100644 --- a/lib/lago_ruby/api_client.rb +++ b/lib/lago_ruby/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/api_error.rb b/lib/lago_ruby/api_error.rb index fd3befd..eed7342 100644 --- a/lib/lago_ruby/api_error.rb +++ b/lib/lago_ruby/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/configuration.rb b/lib/lago_ruby/configuration.rb index e426495..7503832 100644 --- a/lib/lago_ruby/configuration.rb +++ b/lib/lago_ruby/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/add_on.rb b/lib/lago_ruby/models/add_on.rb index 3d54add..f1ef56b 100644 --- a/lib/lago_ruby/models/add_on.rb +++ b/lib/lago_ruby/models/add_on.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/add_on_base_input.rb b/lib/lago_ruby/models/add_on_base_input.rb index aae7d86..c5dd3d3 100644 --- a/lib/lago_ruby/models/add_on_base_input.rb +++ b/lib/lago_ruby/models/add_on_base_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/add_on_create_input.rb b/lib/lago_ruby/models/add_on_create_input.rb index e99d704..9785831 100644 --- a/lib/lago_ruby/models/add_on_create_input.rb +++ b/lib/lago_ruby/models/add_on_create_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/add_on_create_input_add_on.rb b/lib/lago_ruby/models/add_on_create_input_add_on.rb index 378e53a..9da96b4 100644 --- a/lib/lago_ruby/models/add_on_create_input_add_on.rb +++ b/lib/lago_ruby/models/add_on_create_input_add_on.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/add_on_object.rb b/lib/lago_ruby/models/add_on_object.rb index 56878e3..73fabe3 100644 --- a/lib/lago_ruby/models/add_on_object.rb +++ b/lib/lago_ruby/models/add_on_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/add_on_update_input.rb b/lib/lago_ruby/models/add_on_update_input.rb index 7cccbcd..45f9eb7 100644 --- a/lib/lago_ruby/models/add_on_update_input.rb +++ b/lib/lago_ruby/models/add_on_update_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/add_ons_paginated.rb b/lib/lago_ruby/models/add_ons_paginated.rb index 82f27a0..04240ce 100644 --- a/lib/lago_ruby/models/add_ons_paginated.rb +++ b/lib/lago_ruby/models/add_ons_paginated.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/api_error_bad_request.rb b/lib/lago_ruby/models/api_error_bad_request.rb index 5a6fc8c..3638edf 100644 --- a/lib/lago_ruby/models/api_error_bad_request.rb +++ b/lib/lago_ruby/models/api_error_bad_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/api_error_forbidden.rb b/lib/lago_ruby/models/api_error_forbidden.rb index 7782662..f50baa7 100644 --- a/lib/lago_ruby/models/api_error_forbidden.rb +++ b/lib/lago_ruby/models/api_error_forbidden.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/api_error_not_allowed.rb b/lib/lago_ruby/models/api_error_not_allowed.rb index 75009c5..9c52975 100644 --- a/lib/lago_ruby/models/api_error_not_allowed.rb +++ b/lib/lago_ruby/models/api_error_not_allowed.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/api_error_not_found.rb b/lib/lago_ruby/models/api_error_not_found.rb index 4f4042f..8c2e21b 100644 --- a/lib/lago_ruby/models/api_error_not_found.rb +++ b/lib/lago_ruby/models/api_error_not_found.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/api_error_unauthorized.rb b/lib/lago_ruby/models/api_error_unauthorized.rb index d566be0..d87e647 100644 --- a/lib/lago_ruby/models/api_error_unauthorized.rb +++ b/lib/lago_ruby/models/api_error_unauthorized.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/api_error_unprocessable_entity.rb b/lib/lago_ruby/models/api_error_unprocessable_entity.rb index 9cff2b1..95c0b4d 100644 --- a/lib/lago_ruby/models/api_error_unprocessable_entity.rb +++ b/lib/lago_ruby/models/api_error_unprocessable_entity.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/applied_coupon.rb b/lib/lago_ruby/models/applied_coupon.rb index d214ddd..99cd5a6 100644 --- a/lib/lago_ruby/models/applied_coupon.rb +++ b/lib/lago_ruby/models/applied_coupon.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/applied_coupon_input.rb b/lib/lago_ruby/models/applied_coupon_input.rb index edd0ad5..6b470c1 100644 --- a/lib/lago_ruby/models/applied_coupon_input.rb +++ b/lib/lago_ruby/models/applied_coupon_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/applied_coupon_input_applied_coupon.rb b/lib/lago_ruby/models/applied_coupon_input_applied_coupon.rb index 84623a9..c0220df 100644 --- a/lib/lago_ruby/models/applied_coupon_input_applied_coupon.rb +++ b/lib/lago_ruby/models/applied_coupon_input_applied_coupon.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/applied_coupon_object.rb b/lib/lago_ruby/models/applied_coupon_object.rb index 6ff8ac1..85565b9 100644 --- a/lib/lago_ruby/models/applied_coupon_object.rb +++ b/lib/lago_ruby/models/applied_coupon_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/applied_coupon_object_extended.rb b/lib/lago_ruby/models/applied_coupon_object_extended.rb index ea180fb..2b37a26 100644 --- a/lib/lago_ruby/models/applied_coupon_object_extended.rb +++ b/lib/lago_ruby/models/applied_coupon_object_extended.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/applied_coupons_paginated.rb b/lib/lago_ruby/models/applied_coupons_paginated.rb index 3ae9621..18c972a 100644 --- a/lib/lago_ruby/models/applied_coupons_paginated.rb +++ b/lib/lago_ruby/models/applied_coupons_paginated.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/base_applied_tax.rb b/lib/lago_ruby/models/base_applied_tax.rb index 4fe98ad..b1ebfe2 100644 --- a/lib/lago_ruby/models/base_applied_tax.rb +++ b/lib/lago_ruby/models/base_applied_tax.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/billable_metric.rb b/lib/lago_ruby/models/billable_metric.rb index 5ed623b..acbcf28 100644 --- a/lib/lago_ruby/models/billable_metric.rb +++ b/lib/lago_ruby/models/billable_metric.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/billable_metric_base_input.rb b/lib/lago_ruby/models/billable_metric_base_input.rb index d4f8ed9..191b526 100644 --- a/lib/lago_ruby/models/billable_metric_base_input.rb +++ b/lib/lago_ruby/models/billable_metric_base_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/billable_metric_create_input.rb b/lib/lago_ruby/models/billable_metric_create_input.rb index bffd91d..e4bb16f 100644 --- a/lib/lago_ruby/models/billable_metric_create_input.rb +++ b/lib/lago_ruby/models/billable_metric_create_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/billable_metric_create_input_billable_metric.rb b/lib/lago_ruby/models/billable_metric_create_input_billable_metric.rb index d41bd2d..ffefdba 100644 --- a/lib/lago_ruby/models/billable_metric_create_input_billable_metric.rb +++ b/lib/lago_ruby/models/billable_metric_create_input_billable_metric.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/billable_metric_group.rb b/lib/lago_ruby/models/billable_metric_group.rb index a741d4a..1dd0fc3 100644 --- a/lib/lago_ruby/models/billable_metric_group.rb +++ b/lib/lago_ruby/models/billable_metric_group.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/billable_metric_group_values_inner.rb b/lib/lago_ruby/models/billable_metric_group_values_inner.rb index 421c9d3..e9c11da 100644 --- a/lib/lago_ruby/models/billable_metric_group_values_inner.rb +++ b/lib/lago_ruby/models/billable_metric_group_values_inner.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/billable_metric_group_values_inner_one_of.rb b/lib/lago_ruby/models/billable_metric_group_values_inner_one_of.rb index 42a4e83..3e23508 100644 --- a/lib/lago_ruby/models/billable_metric_group_values_inner_one_of.rb +++ b/lib/lago_ruby/models/billable_metric_group_values_inner_one_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/billable_metric_object.rb b/lib/lago_ruby/models/billable_metric_object.rb index 00d4003..fcb9875 100644 --- a/lib/lago_ruby/models/billable_metric_object.rb +++ b/lib/lago_ruby/models/billable_metric_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/billable_metric_update_input.rb b/lib/lago_ruby/models/billable_metric_update_input.rb index 8527664..1610ac0 100644 --- a/lib/lago_ruby/models/billable_metric_update_input.rb +++ b/lib/lago_ruby/models/billable_metric_update_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/billable_metrics_paginated.rb b/lib/lago_ruby/models/billable_metrics_paginated.rb index 3632415..72eaeac 100644 --- a/lib/lago_ruby/models/billable_metrics_paginated.rb +++ b/lib/lago_ruby/models/billable_metrics_paginated.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/charge_object.rb b/lib/lago_ruby/models/charge_object.rb index 0c50af2..73c44d3 100644 --- a/lib/lago_ruby/models/charge_object.rb +++ b/lib/lago_ruby/models/charge_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/charge_object_properties.rb b/lib/lago_ruby/models/charge_object_properties.rb index c24129f..203a6df 100644 --- a/lib/lago_ruby/models/charge_object_properties.rb +++ b/lib/lago_ruby/models/charge_object_properties.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/charge_properties.rb b/lib/lago_ruby/models/charge_properties.rb index 0ab92e8..e3dcaac 100644 --- a/lib/lago_ruby/models/charge_properties.rb +++ b/lib/lago_ruby/models/charge_properties.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/charge_properties_graduated_percentage_ranges_inner.rb b/lib/lago_ruby/models/charge_properties_graduated_percentage_ranges_inner.rb index d8ada3f..e29e867 100644 --- a/lib/lago_ruby/models/charge_properties_graduated_percentage_ranges_inner.rb +++ b/lib/lago_ruby/models/charge_properties_graduated_percentage_ranges_inner.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/charge_properties_graduated_ranges_inner.rb b/lib/lago_ruby/models/charge_properties_graduated_ranges_inner.rb index 2390a9a..2e6d1ce 100644 --- a/lib/lago_ruby/models/charge_properties_graduated_ranges_inner.rb +++ b/lib/lago_ruby/models/charge_properties_graduated_ranges_inner.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/charge_properties_volume_ranges_inner.rb b/lib/lago_ruby/models/charge_properties_volume_ranges_inner.rb index d448ee7..7a695cf 100644 --- a/lib/lago_ruby/models/charge_properties_volume_ranges_inner.rb +++ b/lib/lago_ruby/models/charge_properties_volume_ranges_inner.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/country.rb b/lib/lago_ruby/models/country.rb index 1cd1956..7cd0678 100644 --- a/lib/lago_ruby/models/country.rb +++ b/lib/lago_ruby/models/country.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/coupon.rb b/lib/lago_ruby/models/coupon.rb index 5e37d13..26437bc 100644 --- a/lib/lago_ruby/models/coupon.rb +++ b/lib/lago_ruby/models/coupon.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/coupon_base_input.rb b/lib/lago_ruby/models/coupon_base_input.rb index a35de50..c5fe0f8 100644 --- a/lib/lago_ruby/models/coupon_base_input.rb +++ b/lib/lago_ruby/models/coupon_base_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/coupon_base_input_applies_to.rb b/lib/lago_ruby/models/coupon_base_input_applies_to.rb index abc2c07..fb91f46 100644 --- a/lib/lago_ruby/models/coupon_base_input_applies_to.rb +++ b/lib/lago_ruby/models/coupon_base_input_applies_to.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/coupon_create_input.rb b/lib/lago_ruby/models/coupon_create_input.rb index 4e22419..68bdaad 100644 --- a/lib/lago_ruby/models/coupon_create_input.rb +++ b/lib/lago_ruby/models/coupon_create_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/coupon_create_input_coupon.rb b/lib/lago_ruby/models/coupon_create_input_coupon.rb index df0d152..0e11072 100644 --- a/lib/lago_ruby/models/coupon_create_input_coupon.rb +++ b/lib/lago_ruby/models/coupon_create_input_coupon.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/coupon_object.rb b/lib/lago_ruby/models/coupon_object.rb index 0249e87..7b2ea68 100644 --- a/lib/lago_ruby/models/coupon_object.rb +++ b/lib/lago_ruby/models/coupon_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/coupon_update_input.rb b/lib/lago_ruby/models/coupon_update_input.rb index c4358d0..dbab151 100644 --- a/lib/lago_ruby/models/coupon_update_input.rb +++ b/lib/lago_ruby/models/coupon_update_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/coupons_paginated.rb b/lib/lago_ruby/models/coupons_paginated.rb index eab6999..5793cd4 100644 --- a/lib/lago_ruby/models/coupons_paginated.rb +++ b/lib/lago_ruby/models/coupons_paginated.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/credit_note.rb b/lib/lago_ruby/models/credit_note.rb index 5e19e77..ae09698 100644 --- a/lib/lago_ruby/models/credit_note.rb +++ b/lib/lago_ruby/models/credit_note.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/credit_note_applied_tax_object.rb b/lib/lago_ruby/models/credit_note_applied_tax_object.rb index d19f302..84c21e7 100644 --- a/lib/lago_ruby/models/credit_note_applied_tax_object.rb +++ b/lib/lago_ruby/models/credit_note_applied_tax_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/credit_note_create_input.rb b/lib/lago_ruby/models/credit_note_create_input.rb index 4bb5e48..dc9a2af 100644 --- a/lib/lago_ruby/models/credit_note_create_input.rb +++ b/lib/lago_ruby/models/credit_note_create_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/credit_note_create_input_credit_note.rb b/lib/lago_ruby/models/credit_note_create_input_credit_note.rb index 5482f38..879249e 100644 --- a/lib/lago_ruby/models/credit_note_create_input_credit_note.rb +++ b/lib/lago_ruby/models/credit_note_create_input_credit_note.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/credit_note_estimate_input.rb b/lib/lago_ruby/models/credit_note_estimate_input.rb index 49f2f21..3a46c3b 100644 --- a/lib/lago_ruby/models/credit_note_estimate_input.rb +++ b/lib/lago_ruby/models/credit_note_estimate_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/credit_note_estimate_input_credit_note.rb b/lib/lago_ruby/models/credit_note_estimate_input_credit_note.rb index 7abc5d2..f9e267d 100644 --- a/lib/lago_ruby/models/credit_note_estimate_input_credit_note.rb +++ b/lib/lago_ruby/models/credit_note_estimate_input_credit_note.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/credit_note_estimate_input_credit_note_items_inner.rb b/lib/lago_ruby/models/credit_note_estimate_input_credit_note_items_inner.rb index 2639cc2..a499928 100644 --- a/lib/lago_ruby/models/credit_note_estimate_input_credit_note_items_inner.rb +++ b/lib/lago_ruby/models/credit_note_estimate_input_credit_note_items_inner.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/credit_note_estimated.rb b/lib/lago_ruby/models/credit_note_estimated.rb index af396cd..0a9c789 100644 --- a/lib/lago_ruby/models/credit_note_estimated.rb +++ b/lib/lago_ruby/models/credit_note_estimated.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note.rb b/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note.rb index a27461a..b3d5657 100644 --- a/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note.rb +++ b/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner.rb b/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner.rb index 26c9d63..ccd3d18 100644 --- a/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner.rb +++ b/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_items_inner.rb b/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_items_inner.rb index fb237e5..783816b 100644 --- a/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_items_inner.rb +++ b/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_items_inner.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/credit_note_item_object.rb b/lib/lago_ruby/models/credit_note_item_object.rb index d256e5f..e7fc2e2 100644 --- a/lib/lago_ruby/models/credit_note_item_object.rb +++ b/lib/lago_ruby/models/credit_note_item_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/credit_note_item_object_fee.rb b/lib/lago_ruby/models/credit_note_item_object_fee.rb index b9f6ea2..58b8d00 100644 --- a/lib/lago_ruby/models/credit_note_item_object_fee.rb +++ b/lib/lago_ruby/models/credit_note_item_object_fee.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end @@ -30,16 +30,16 @@ class CreditNoteItemObjectFee # Unique identifier assigned to the parent fee on which the true-up fee is assigned. This identifier establishes the relationship between the parent fee and the associated true-up fee. attr_accessor :lago_true_up_parent_fee_id - # Unique identifier assigned to the subscription, created by Lago. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). + # Unique identifier assigned to the subscription, created by Lago. This field is specifically displayed when the fee type is charge or subscription. attr_accessor :lago_subscription_id - # Unique identifier assigned to the customer, created by Lago. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). + # Unique identifier assigned to the customer, created by Lago. This field is specifically displayed when the fee type is charge or subscription. attr_accessor :lago_customer_id - # Unique identifier assigned to the customer in your application. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). + # Unique identifier assigned to the customer in your application. This field is specifically displayed when the fee type is charge or subscription. attr_accessor :external_customer_id - # Unique identifier assigned to the subscription in your application. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). + # Unique identifier assigned to the subscription in your application. This field is specifically displayed when the fee type is charge or subscription. attr_accessor :external_subscription_id # 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. diff --git a/lib/lago_ruby/models/credit_note_object.rb b/lib/lago_ruby/models/credit_note_object.rb index 8b9dff9..52fe69f 100644 --- a/lib/lago_ruby/models/credit_note_object.rb +++ b/lib/lago_ruby/models/credit_note_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/credit_note_update_input.rb b/lib/lago_ruby/models/credit_note_update_input.rb index 9d93e71..8b776e7 100644 --- a/lib/lago_ruby/models/credit_note_update_input.rb +++ b/lib/lago_ruby/models/credit_note_update_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/credit_note_update_input_credit_note.rb b/lib/lago_ruby/models/credit_note_update_input_credit_note.rb index 9060388..3e638c4 100644 --- a/lib/lago_ruby/models/credit_note_update_input_credit_note.rb +++ b/lib/lago_ruby/models/credit_note_update_input_credit_note.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/credit_notes.rb b/lib/lago_ruby/models/credit_notes.rb index 952bc6c..ec21af2 100644 --- a/lib/lago_ruby/models/credit_notes.rb +++ b/lib/lago_ruby/models/credit_notes.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/credit_object.rb b/lib/lago_ruby/models/credit_object.rb index 5562bbb..97c4ed1 100644 --- a/lib/lago_ruby/models/credit_object.rb +++ b/lib/lago_ruby/models/credit_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/credit_object_invoice.rb b/lib/lago_ruby/models/credit_object_invoice.rb index df2e1ac..c3707e0 100644 --- a/lib/lago_ruby/models/credit_object_invoice.rb +++ b/lib/lago_ruby/models/credit_object_invoice.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/credit_object_item.rb b/lib/lago_ruby/models/credit_object_item.rb index 5be1617..22fe2f7 100644 --- a/lib/lago_ruby/models/credit_object_item.rb +++ b/lib/lago_ruby/models/credit_object_item.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/currency.rb b/lib/lago_ruby/models/currency.rb index 89dbf8e..459e6c8 100644 --- a/lib/lago_ruby/models/currency.rb +++ b/lib/lago_ruby/models/currency.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/customer.rb b/lib/lago_ruby/models/customer.rb index 6173e38..aa223b0 100644 --- a/lib/lago_ruby/models/customer.rb +++ b/lib/lago_ruby/models/customer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/customer_billing_configuration.rb b/lib/lago_ruby/models/customer_billing_configuration.rb index 880908b..d306a04 100644 --- a/lib/lago_ruby/models/customer_billing_configuration.rb +++ b/lib/lago_ruby/models/customer_billing_configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/customer_charge_usage_object.rb b/lib/lago_ruby/models/customer_charge_usage_object.rb index 32e27b8..d110ad6 100644 --- a/lib/lago_ruby/models/customer_charge_usage_object.rb +++ b/lib/lago_ruby/models/customer_charge_usage_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/customer_charge_usage_object_billable_metric.rb b/lib/lago_ruby/models/customer_charge_usage_object_billable_metric.rb index 1115d8b..0e27a3b 100644 --- a/lib/lago_ruby/models/customer_charge_usage_object_billable_metric.rb +++ b/lib/lago_ruby/models/customer_charge_usage_object_billable_metric.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/customer_charge_usage_object_charge.rb b/lib/lago_ruby/models/customer_charge_usage_object_charge.rb index 194b05a..16147ed 100644 --- a/lib/lago_ruby/models/customer_charge_usage_object_charge.rb +++ b/lib/lago_ruby/models/customer_charge_usage_object_charge.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end @@ -22,6 +22,9 @@ class CustomerChargeUsageObjectCharge # The pricing model applied to this charge. Possible values are standard, `graduated`, `percentage`, `package` or `volume`. attr_accessor :charge_model + # 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. + attr_accessor :invoice_display_name + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -48,7 +51,8 @@ def valid?(value) def self.attribute_map { :'lago_id' => :'lago_id', - :'charge_model' => :'charge_model' + :'charge_model' => :'charge_model', + :'invoice_display_name' => :'invoice_display_name' } end @@ -61,7 +65,8 @@ def self.acceptable_attributes def self.openapi_types { :'lago_id' => :'String', - :'charge_model' => :'String' + :'charge_model' => :'String', + :'invoice_display_name' => :'String' } end @@ -97,6 +102,10 @@ def initialize(attributes = {}) else self.charge_model = nil end + + if attributes.key?(:'invoice_display_name') + self.invoice_display_name = attributes[:'invoice_display_name'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -142,7 +151,8 @@ def ==(o) return true if self.equal?(o) self.class == o.class && lago_id == o.lago_id && - charge_model == o.charge_model + charge_model == o.charge_model && + invoice_display_name == o.invoice_display_name end # @see the `==` method @@ -154,7 +164,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [lago_id, charge_model].hash + [lago_id, charge_model, invoice_display_name].hash end # Builds the object from hash diff --git a/lib/lago_ruby/models/customer_charge_usage_object_groups_inner.rb b/lib/lago_ruby/models/customer_charge_usage_object_groups_inner.rb index 47ec157..d1dab6e 100644 --- a/lib/lago_ruby/models/customer_charge_usage_object_groups_inner.rb +++ b/lib/lago_ruby/models/customer_charge_usage_object_groups_inner.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/customer_create_input.rb b/lib/lago_ruby/models/customer_create_input.rb index aa53acd..f70191c 100644 --- a/lib/lago_ruby/models/customer_create_input.rb +++ b/lib/lago_ruby/models/customer_create_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/customer_create_input_customer.rb b/lib/lago_ruby/models/customer_create_input_customer.rb index d018370..e7614d2 100644 --- a/lib/lago_ruby/models/customer_create_input_customer.rb +++ b/lib/lago_ruby/models/customer_create_input_customer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/customer_create_input_customer_metadata_inner.rb b/lib/lago_ruby/models/customer_create_input_customer_metadata_inner.rb index c71258e..4456178 100644 --- a/lib/lago_ruby/models/customer_create_input_customer_metadata_inner.rb +++ b/lib/lago_ruby/models/customer_create_input_customer_metadata_inner.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/customer_metadata.rb b/lib/lago_ruby/models/customer_metadata.rb index bfa0663..5b7acb3 100644 --- a/lib/lago_ruby/models/customer_metadata.rb +++ b/lib/lago_ruby/models/customer_metadata.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/customer_object.rb b/lib/lago_ruby/models/customer_object.rb index bbe96c4..331788b 100644 --- a/lib/lago_ruby/models/customer_object.rb +++ b/lib/lago_ruby/models/customer_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/customer_object_extended.rb b/lib/lago_ruby/models/customer_object_extended.rb index afed366..e05f9ff 100644 --- a/lib/lago_ruby/models/customer_object_extended.rb +++ b/lib/lago_ruby/models/customer_object_extended.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/customer_past_usage.rb b/lib/lago_ruby/models/customer_past_usage.rb index b32adf7..60089e2 100644 --- a/lib/lago_ruby/models/customer_past_usage.rb +++ b/lib/lago_ruby/models/customer_past_usage.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/customer_usage.rb b/lib/lago_ruby/models/customer_usage.rb index e274c92..951ece9 100644 --- a/lib/lago_ruby/models/customer_usage.rb +++ b/lib/lago_ruby/models/customer_usage.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/customer_usage_object.rb b/lib/lago_ruby/models/customer_usage_object.rb index 33a9f53..a750c81 100644 --- a/lib/lago_ruby/models/customer_usage_object.rb +++ b/lib/lago_ruby/models/customer_usage_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/customers_paginated.rb b/lib/lago_ruby/models/customers_paginated.rb index fc7c4d6..9d2f63c 100644 --- a/lib/lago_ruby/models/customers_paginated.rb +++ b/lib/lago_ruby/models/customers_paginated.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/event.rb b/lib/lago_ruby/models/event.rb index 14bfc70..7d9f4fe 100644 --- a/lib/lago_ruby/models/event.rb +++ b/lib/lago_ruby/models/event.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/event_batch_input.rb b/lib/lago_ruby/models/event_batch_input.rb index b2ea34d..67653c3 100644 --- a/lib/lago_ruby/models/event_batch_input.rb +++ b/lib/lago_ruby/models/event_batch_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/event_batch_input_event.rb b/lib/lago_ruby/models/event_batch_input_event.rb index 299d2b2..9927543 100644 --- a/lib/lago_ruby/models/event_batch_input_event.rb +++ b/lib/lago_ruby/models/event_batch_input_event.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/event_batch_input_event_properties.rb b/lib/lago_ruby/models/event_batch_input_event_properties.rb index 36820f4..b8ef7e8 100644 --- a/lib/lago_ruby/models/event_batch_input_event_properties.rb +++ b/lib/lago_ruby/models/event_batch_input_event_properties.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/event_estimate_fees_input.rb b/lib/lago_ruby/models/event_estimate_fees_input.rb index 9f7605f..39970a2 100644 --- a/lib/lago_ruby/models/event_estimate_fees_input.rb +++ b/lib/lago_ruby/models/event_estimate_fees_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/event_estimate_fees_input_event.rb b/lib/lago_ruby/models/event_estimate_fees_input_event.rb index 632c337..570ffac 100644 --- a/lib/lago_ruby/models/event_estimate_fees_input_event.rb +++ b/lib/lago_ruby/models/event_estimate_fees_input_event.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/event_input.rb b/lib/lago_ruby/models/event_input.rb index 000bd98..62dc3ae 100644 --- a/lib/lago_ruby/models/event_input.rb +++ b/lib/lago_ruby/models/event_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/event_input_event.rb b/lib/lago_ruby/models/event_input_event.rb index 3a7aeaa..2d09c42 100644 --- a/lib/lago_ruby/models/event_input_event.rb +++ b/lib/lago_ruby/models/event_input_event.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/event_input_event_timestamp.rb b/lib/lago_ruby/models/event_input_event_timestamp.rb index 3f8e66d..4b495f7 100644 --- a/lib/lago_ruby/models/event_input_event_timestamp.rb +++ b/lib/lago_ruby/models/event_input_event_timestamp.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/event_object.rb b/lib/lago_ruby/models/event_object.rb index 36045f7..75c8126 100644 --- a/lib/lago_ruby/models/event_object.rb +++ b/lib/lago_ruby/models/event_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/event_object_properties.rb b/lib/lago_ruby/models/event_object_properties.rb index a339734..02c01c1 100644 --- a/lib/lago_ruby/models/event_object_properties.rb +++ b/lib/lago_ruby/models/event_object_properties.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/fee.rb b/lib/lago_ruby/models/fee.rb index 00fd443..0a40aaf 100644 --- a/lib/lago_ruby/models/fee.rb +++ b/lib/lago_ruby/models/fee.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/fee_applied_tax_object.rb b/lib/lago_ruby/models/fee_applied_tax_object.rb index be88da0..b8205a2 100644 --- a/lib/lago_ruby/models/fee_applied_tax_object.rb +++ b/lib/lago_ruby/models/fee_applied_tax_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/fee_object.rb b/lib/lago_ruby/models/fee_object.rb index 22ec4bb..5fe52cc 100644 --- a/lib/lago_ruby/models/fee_object.rb +++ b/lib/lago_ruby/models/fee_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end @@ -30,16 +30,16 @@ class FeeObject # Unique identifier assigned to the parent fee on which the true-up fee is assigned. This identifier establishes the relationship between the parent fee and the associated true-up fee. attr_accessor :lago_true_up_parent_fee_id - # Unique identifier assigned to the subscription, created by Lago. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). + # Unique identifier assigned to the subscription, created by Lago. This field is specifically displayed when the fee type is charge or subscription. attr_accessor :lago_subscription_id - # Unique identifier assigned to the customer, created by Lago. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). + # Unique identifier assigned to the customer, created by Lago. This field is specifically displayed when the fee type is charge or subscription. attr_accessor :lago_customer_id - # Unique identifier assigned to the customer in your application. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). + # Unique identifier assigned to the customer in your application. This field is specifically displayed when the fee type is charge or subscription. attr_accessor :external_customer_id - # Unique identifier assigned to the subscription in your application. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). + # Unique identifier assigned to the subscription in your application. This field is specifically displayed when the fee type is charge or subscription. attr_accessor :external_subscription_id # 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. diff --git a/lib/lago_ruby/models/fee_object_item.rb b/lib/lago_ruby/models/fee_object_item.rb index 7e01ef3..6954747 100644 --- a/lib/lago_ruby/models/fee_object_item.rb +++ b/lib/lago_ruby/models/fee_object_item.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/fee_update_input.rb b/lib/lago_ruby/models/fee_update_input.rb index 2c8e33c..35874f4 100644 --- a/lib/lago_ruby/models/fee_update_input.rb +++ b/lib/lago_ruby/models/fee_update_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/fee_update_input_fee.rb b/lib/lago_ruby/models/fee_update_input_fee.rb index 4cf581f..226aa1b 100644 --- a/lib/lago_ruby/models/fee_update_input_fee.rb +++ b/lib/lago_ruby/models/fee_update_input_fee.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/fees.rb b/lib/lago_ruby/models/fees.rb index ff3830b..d928768 100644 --- a/lib/lago_ruby/models/fees.rb +++ b/lib/lago_ruby/models/fees.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/fees_paginated.rb b/lib/lago_ruby/models/fees_paginated.rb index 6e81db4..7a63859 100644 --- a/lib/lago_ruby/models/fees_paginated.rb +++ b/lib/lago_ruby/models/fees_paginated.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/generate_customer_checkout_url200_response.rb b/lib/lago_ruby/models/generate_customer_checkout_url200_response.rb new file mode 100644 index 0000000..1d846d6 --- /dev/null +++ b/lib/lago_ruby/models/generate_customer_checkout_url200_response.rb @@ -0,0 +1,246 @@ +=begin +#Lago API documentation + +#Lago API allows your application to push customer information and metrics (events) from your application to the billing application. + +The version of the OpenAPI document: 0.51.0-beta +Contact: tech@getlago.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module LagoAPI + # . + class GenerateCustomerCheckoutURL200Response + # Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system + attr_accessor :lago_customer_id + + # The customer external unique identifier (provided by your own application) + attr_accessor :external_customer_id + + # The Payment Provider name linked to the Customer. + attr_accessor :payment_provider + + # The new generated Payment Provider Checkout URL for the Customer. + attr_accessor :checkout_url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'lago_customer_id' => :'lago_customer_id', + :'external_customer_id' => :'external_customer_id', + :'payment_provider' => :'payment_provider', + :'checkout_url' => :'checkout_url' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'lago_customer_id' => :'String', + :'external_customer_id' => :'String', + :'payment_provider' => :'String', + :'checkout_url' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `LagoAPI::GenerateCustomerCheckoutURL200Response` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `LagoAPI::GenerateCustomerCheckoutURL200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'lago_customer_id') + self.lago_customer_id = attributes[:'lago_customer_id'] + end + + if attributes.key?(:'external_customer_id') + self.external_customer_id = attributes[:'external_customer_id'] + end + + if attributes.key?(:'payment_provider') + self.payment_provider = attributes[:'payment_provider'] + end + + if attributes.key?(:'checkout_url') + self.checkout_url = attributes[:'checkout_url'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + lago_customer_id == o.lago_customer_id && + external_customer_id == o.external_customer_id && + payment_provider == o.payment_provider && + checkout_url == o.checkout_url + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [lago_customer_id, external_customer_id, payment_provider, checkout_url].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = LagoAPI.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/lago_ruby/models/get_customer_portal_url200_response.rb b/lib/lago_ruby/models/get_customer_portal_url200_response.rb index 8c59e35..51a403c 100644 --- a/lib/lago_ruby/models/get_customer_portal_url200_response.rb +++ b/lib/lago_ruby/models/get_customer_portal_url200_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/get_customer_portal_url200_response_customer.rb b/lib/lago_ruby/models/get_customer_portal_url200_response_customer.rb index 4f80451..c127534 100644 --- a/lib/lago_ruby/models/get_customer_portal_url200_response_customer.rb +++ b/lib/lago_ruby/models/get_customer_portal_url200_response_customer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/gross_revenue_object.rb b/lib/lago_ruby/models/gross_revenue_object.rb new file mode 100644 index 0000000..aabfbf1 --- /dev/null +++ b/lib/lago_ruby/models/gross_revenue_object.rb @@ -0,0 +1,241 @@ +=begin +#Lago API documentation + +#Lago API allows your application to push customer information and metrics (events) from your application to the billing application. + +The version of the OpenAPI document: 0.51.0-beta +Contact: tech@getlago.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module LagoAPI + class GrossRevenueObject + # Identifies the month to analyze revenue. + attr_accessor :month + + # The total amount of revenue for a period, expressed in cents. + attr_accessor :amount_cents + + attr_accessor :currency + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'month' => :'month', + :'amount_cents' => :'amount_cents', + :'currency' => :'currency' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'month' => :'String', + :'amount_cents' => :'Integer', + :'currency' => :'Currency' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `LagoAPI::GrossRevenueObject` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `LagoAPI::GrossRevenueObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'month') + self.month = attributes[:'month'] + else + self.month = nil + end + + if attributes.key?(:'amount_cents') + self.amount_cents = attributes[:'amount_cents'] + end + + if attributes.key?(:'currency') + self.currency = attributes[:'currency'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @month.nil? + invalid_properties.push('invalid value for "month", month cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @month.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + month == o.month && + amount_cents == o.amount_cents && + currency == o.currency + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [month, amount_cents, currency].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = LagoAPI.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/lago_ruby/models/gross_revenues.rb b/lib/lago_ruby/models/gross_revenues.rb new file mode 100644 index 0000000..3fab4d8 --- /dev/null +++ b/lib/lago_ruby/models/gross_revenues.rb @@ -0,0 +1,223 @@ +=begin +#Lago API documentation + +#Lago API allows your application to push customer information and metrics (events) from your application to the billing application. + +The version of the OpenAPI document: 0.51.0-beta +Contact: tech@getlago.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module LagoAPI + class GrossRevenues + attr_accessor :gross_revenues + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'gross_revenues' => :'gross_revenues' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'gross_revenues' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `LagoAPI::GrossRevenues` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `LagoAPI::GrossRevenues`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'gross_revenues') + if (value = attributes[:'gross_revenues']).is_a?(Array) + self.gross_revenues = value + end + else + self.gross_revenues = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @gross_revenues.nil? + invalid_properties.push('invalid value for "gross_revenues", gross_revenues cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @gross_revenues.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + gross_revenues == o.gross_revenues + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [gross_revenues].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = LagoAPI.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/lago_ruby/models/group_object.rb b/lib/lago_ruby/models/group_object.rb index a525f37..cb99ec1 100644 --- a/lib/lago_ruby/models/group_object.rb +++ b/lib/lago_ruby/models/group_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/group_properties_object.rb b/lib/lago_ruby/models/group_properties_object.rb index 8180c3e..ff53d7d 100644 --- a/lib/lago_ruby/models/group_properties_object.rb +++ b/lib/lago_ruby/models/group_properties_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/group_properties_object_values.rb b/lib/lago_ruby/models/group_properties_object_values.rb index 7ee501a..bd0e41e 100644 --- a/lib/lago_ruby/models/group_properties_object_values.rb +++ b/lib/lago_ruby/models/group_properties_object_values.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/groups_paginated.rb b/lib/lago_ruby/models/groups_paginated.rb index 22aacdb..2214ab8 100644 --- a/lib/lago_ruby/models/groups_paginated.rb +++ b/lib/lago_ruby/models/groups_paginated.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/invoice.rb b/lib/lago_ruby/models/invoice.rb index f907082..3df50d1 100644 --- a/lib/lago_ruby/models/invoice.rb +++ b/lib/lago_ruby/models/invoice.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/invoice_applied_tax_object.rb b/lib/lago_ruby/models/invoice_applied_tax_object.rb index 044f247..ee819c0 100644 --- a/lib/lago_ruby/models/invoice_applied_tax_object.rb +++ b/lib/lago_ruby/models/invoice_applied_tax_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/invoice_metadata_object.rb b/lib/lago_ruby/models/invoice_metadata_object.rb index c217d2c..f7ae2ad 100644 --- a/lib/lago_ruby/models/invoice_metadata_object.rb +++ b/lib/lago_ruby/models/invoice_metadata_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/invoice_object.rb b/lib/lago_ruby/models/invoice_object.rb index f54eae8..802d6ce 100644 --- a/lib/lago_ruby/models/invoice_object.rb +++ b/lib/lago_ruby/models/invoice_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/invoice_object_customer.rb b/lib/lago_ruby/models/invoice_object_customer.rb index ccd75f3..72f151b 100644 --- a/lib/lago_ruby/models/invoice_object_customer.rb +++ b/lib/lago_ruby/models/invoice_object_customer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/invoice_object_extended.rb b/lib/lago_ruby/models/invoice_object_extended.rb index 6559c52..7c9fa6b 100644 --- a/lib/lago_ruby/models/invoice_object_extended.rb +++ b/lib/lago_ruby/models/invoice_object_extended.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/invoice_one_off_create_input.rb b/lib/lago_ruby/models/invoice_one_off_create_input.rb index 5dfbf74..6f83aff 100644 --- a/lib/lago_ruby/models/invoice_one_off_create_input.rb +++ b/lib/lago_ruby/models/invoice_one_off_create_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/invoice_one_off_create_input_invoice.rb b/lib/lago_ruby/models/invoice_one_off_create_input_invoice.rb index eaad68a..4d91eda 100644 --- a/lib/lago_ruby/models/invoice_one_off_create_input_invoice.rb +++ b/lib/lago_ruby/models/invoice_one_off_create_input_invoice.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/invoice_one_off_create_input_invoice_fees_inner.rb b/lib/lago_ruby/models/invoice_one_off_create_input_invoice_fees_inner.rb index 8c2503a..748ec0b 100644 --- a/lib/lago_ruby/models/invoice_one_off_create_input_invoice_fees_inner.rb +++ b/lib/lago_ruby/models/invoice_one_off_create_input_invoice_fees_inner.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/invoice_update_input.rb b/lib/lago_ruby/models/invoice_update_input.rb index ca83745..6e81231 100644 --- a/lib/lago_ruby/models/invoice_update_input.rb +++ b/lib/lago_ruby/models/invoice_update_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/invoice_update_input_invoice.rb b/lib/lago_ruby/models/invoice_update_input_invoice.rb index d223797..a646b3a 100644 --- a/lib/lago_ruby/models/invoice_update_input_invoice.rb +++ b/lib/lago_ruby/models/invoice_update_input_invoice.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/invoice_update_input_invoice_metadata_inner.rb b/lib/lago_ruby/models/invoice_update_input_invoice_metadata_inner.rb index 7a87edc..60f69bc 100644 --- a/lib/lago_ruby/models/invoice_update_input_invoice_metadata_inner.rb +++ b/lib/lago_ruby/models/invoice_update_input_invoice_metadata_inner.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/invoiced_usage_object.rb b/lib/lago_ruby/models/invoiced_usage_object.rb new file mode 100644 index 0000000..99e077a --- /dev/null +++ b/lib/lago_ruby/models/invoiced_usage_object.rb @@ -0,0 +1,265 @@ +=begin +#Lago API documentation + +#Lago API allows your application to push customer information and metrics (events) from your application to the billing application. + +The version of the OpenAPI document: 0.51.0-beta +Contact: tech@getlago.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module LagoAPI + class InvoicedUsageObject + # Identifies the month to analyze revenue. + attr_accessor :month + + # The code of the usage-based billable metrics. + attr_accessor :code + + # The total amount of revenue for a period, expressed in cents. + attr_accessor :amount_cents + + attr_accessor :currency + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'month' => :'month', + :'code' => :'code', + :'amount_cents' => :'amount_cents', + :'currency' => :'currency' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'month' => :'String', + :'code' => :'String', + :'amount_cents' => :'Integer', + :'currency' => :'Currency' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `LagoAPI::InvoicedUsageObject` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `LagoAPI::InvoicedUsageObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'month') + self.month = attributes[:'month'] + else + self.month = nil + end + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'amount_cents') + self.amount_cents = attributes[:'amount_cents'] + else + self.amount_cents = nil + end + + if attributes.key?(:'currency') + self.currency = attributes[:'currency'] + else + self.currency = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @month.nil? + invalid_properties.push('invalid value for "month", month cannot be nil.') + end + + if @amount_cents.nil? + invalid_properties.push('invalid value for "amount_cents", amount_cents cannot be nil.') + end + + if @currency.nil? + invalid_properties.push('invalid value for "currency", currency cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @month.nil? + return false if @amount_cents.nil? + return false if @currency.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + month == o.month && + code == o.code && + amount_cents == o.amount_cents && + currency == o.currency + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [month, code, amount_cents, currency].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = LagoAPI.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/lago_ruby/models/invoiced_usages.rb b/lib/lago_ruby/models/invoiced_usages.rb new file mode 100644 index 0000000..d45ec71 --- /dev/null +++ b/lib/lago_ruby/models/invoiced_usages.rb @@ -0,0 +1,223 @@ +=begin +#Lago API documentation + +#Lago API allows your application to push customer information and metrics (events) from your application to the billing application. + +The version of the OpenAPI document: 0.51.0-beta +Contact: tech@getlago.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module LagoAPI + class InvoicedUsages + attr_accessor :invoiced_usages + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'invoiced_usages' => :'invoiced_usages' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'invoiced_usages' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `LagoAPI::InvoicedUsages` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `LagoAPI::InvoicedUsages`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'invoiced_usages') + if (value = attributes[:'invoiced_usages']).is_a?(Array) + self.invoiced_usages = value + end + else + self.invoiced_usages = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @invoiced_usages.nil? + invalid_properties.push('invalid value for "invoiced_usages", invoiced_usages cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @invoiced_usages.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + invoiced_usages == o.invoiced_usages + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [invoiced_usages].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = LagoAPI.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/lago_ruby/models/invoices_paginated.rb b/lib/lago_ruby/models/invoices_paginated.rb index b0bbf04..1ced85e 100644 --- a/lib/lago_ruby/models/invoices_paginated.rb +++ b/lib/lago_ruby/models/invoices_paginated.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/mrr_object.rb b/lib/lago_ruby/models/mrr_object.rb new file mode 100644 index 0000000..e401ce0 --- /dev/null +++ b/lib/lago_ruby/models/mrr_object.rb @@ -0,0 +1,241 @@ +=begin +#Lago API documentation + +#Lago API allows your application to push customer information and metrics (events) from your application to the billing application. + +The version of the OpenAPI document: 0.51.0-beta +Contact: tech@getlago.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module LagoAPI + class MrrObject + # Identifies the month to analyze MRR. + attr_accessor :month + + # The total amount of MRR, expressed in cents. + attr_accessor :amount_cents + + attr_accessor :currency + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'month' => :'month', + :'amount_cents' => :'amount_cents', + :'currency' => :'currency' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'month' => :'String', + :'amount_cents' => :'Integer', + :'currency' => :'Currency' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `LagoAPI::MrrObject` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `LagoAPI::MrrObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'month') + self.month = attributes[:'month'] + else + self.month = nil + end + + if attributes.key?(:'amount_cents') + self.amount_cents = attributes[:'amount_cents'] + end + + if attributes.key?(:'currency') + self.currency = attributes[:'currency'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @month.nil? + invalid_properties.push('invalid value for "month", month cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @month.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + month == o.month && + amount_cents == o.amount_cents && + currency == o.currency + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [month, amount_cents, currency].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = LagoAPI.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/lago_ruby/models/mrrs.rb b/lib/lago_ruby/models/mrrs.rb new file mode 100644 index 0000000..0608ef2 --- /dev/null +++ b/lib/lago_ruby/models/mrrs.rb @@ -0,0 +1,223 @@ +=begin +#Lago API documentation + +#Lago API allows your application to push customer information and metrics (events) from your application to the billing application. + +The version of the OpenAPI document: 0.51.0-beta +Contact: tech@getlago.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module LagoAPI + class Mrrs + attr_accessor :mrrs + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'mrrs' => :'mrrs' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'mrrs' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `LagoAPI::Mrrs` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `LagoAPI::Mrrs`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'mrrs') + if (value = attributes[:'mrrs']).is_a?(Array) + self.mrrs = value + end + else + self.mrrs = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @mrrs.nil? + invalid_properties.push('invalid value for "mrrs", mrrs cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @mrrs.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + mrrs == o.mrrs + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [mrrs].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = LagoAPI.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/lago_ruby/models/organization.rb b/lib/lago_ruby/models/organization.rb index e066b10..702030f 100644 --- a/lib/lago_ruby/models/organization.rb +++ b/lib/lago_ruby/models/organization.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/organization_billing_configuration.rb b/lib/lago_ruby/models/organization_billing_configuration.rb index 7e5cd32..06334e4 100644 --- a/lib/lago_ruby/models/organization_billing_configuration.rb +++ b/lib/lago_ruby/models/organization_billing_configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/organization_object.rb b/lib/lago_ruby/models/organization_object.rb index a9cfeac..0422fa9 100644 --- a/lib/lago_ruby/models/organization_object.rb +++ b/lib/lago_ruby/models/organization_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end @@ -32,6 +32,8 @@ class OrganizationObject attr_accessor :country + attr_accessor :default_currency + # The first line of your organization’s billing address. attr_accessor :address_line1 @@ -78,6 +80,7 @@ def self.attribute_map :'webhook_url' => :'webhook_url', :'webhook_urls' => :'webhook_urls', :'country' => :'country', + :'default_currency' => :'default_currency', :'address_line1' => :'address_line1', :'address_line2' => :'address_line2', :'state' => :'state', @@ -108,6 +111,7 @@ def self.openapi_types :'webhook_url' => :'String', :'webhook_urls' => :'Array', :'country' => :'Country', + :'default_currency' => :'Currency', :'address_line1' => :'String', :'address_line2' => :'String', :'state' => :'String', @@ -189,6 +193,10 @@ def initialize(attributes = {}) self.country = attributes[:'country'] end + if attributes.key?(:'default_currency') + self.default_currency = attributes[:'default_currency'] + end + if attributes.key?(:'address_line1') self.address_line1 = attributes[:'address_line1'] end @@ -287,6 +295,7 @@ def ==(o) webhook_url == o.webhook_url && webhook_urls == o.webhook_urls && country == o.country && + default_currency == o.default_currency && address_line1 == o.address_line1 && address_line2 == o.address_line2 && state == o.state && @@ -311,7 +320,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [lago_id, name, created_at, webhook_url, webhook_urls, country, address_line1, address_line2, state, zipcode, email, city, legal_name, legal_number, net_payment_term, tax_identification_number, timezone, billing_configuration, taxes].hash + [lago_id, name, created_at, webhook_url, webhook_urls, country, default_currency, address_line1, address_line2, state, zipcode, email, city, legal_name, legal_number, net_payment_term, tax_identification_number, timezone, billing_configuration, taxes].hash end # Builds the object from hash diff --git a/lib/lago_ruby/models/organization_update_input.rb b/lib/lago_ruby/models/organization_update_input.rb index f5c3389..462601c 100644 --- a/lib/lago_ruby/models/organization_update_input.rb +++ b/lib/lago_ruby/models/organization_update_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/organization_update_input_organization.rb b/lib/lago_ruby/models/organization_update_input_organization.rb index 789a2fd..41d7f07 100644 --- a/lib/lago_ruby/models/organization_update_input_organization.rb +++ b/lib/lago_ruby/models/organization_update_input_organization.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end @@ -20,6 +20,8 @@ class OrganizationUpdateInputOrganization attr_accessor :country + attr_accessor :default_currency + # The first line of your organization’s billing address. attr_accessor :address_line1 @@ -84,6 +86,7 @@ def self.attribute_map { :'webhook_url' => :'webhook_url', :'country' => :'country', + :'default_currency' => :'default_currency', :'address_line1' => :'address_line1', :'address_line2' => :'address_line2', :'state' => :'state', @@ -110,6 +113,7 @@ def self.openapi_types { :'webhook_url' => :'String', :'country' => :'Country', + :'default_currency' => :'Currency', :'address_line1' => :'String', :'address_line2' => :'String', :'state' => :'String', @@ -165,6 +169,10 @@ def initialize(attributes = {}) self.country = attributes[:'country'] end + if attributes.key?(:'default_currency') + self.default_currency = attributes[:'default_currency'] + end + if attributes.key?(:'address_line1') self.address_line1 = attributes[:'address_line1'] end @@ -242,6 +250,7 @@ def ==(o) self.class == o.class && webhook_url == o.webhook_url && country == o.country && + default_currency == o.default_currency && address_line1 == o.address_line1 && address_line2 == o.address_line2 && state == o.state && @@ -266,7 +275,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_url, country, address_line1, address_line2, state, zipcode, email, city, legal_name, legal_number, net_payment_term, tax_identification_number, timezone, email_settings, billing_configuration].hash + [webhook_url, country, default_currency, address_line1, address_line2, state, zipcode, email, city, legal_name, legal_number, net_payment_term, tax_identification_number, timezone, email_settings, billing_configuration].hash end # Builds the object from hash diff --git a/lib/lago_ruby/models/outstanding_invoice_object.rb b/lib/lago_ruby/models/outstanding_invoice_object.rb new file mode 100644 index 0000000..e70eb64 --- /dev/null +++ b/lib/lago_ruby/models/outstanding_invoice_object.rb @@ -0,0 +1,309 @@ +=begin +#Lago API documentation + +#Lago API allows your application to push customer information and metrics (events) from your application to the billing application. + +The version of the OpenAPI document: 0.51.0-beta +Contact: tech@getlago.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module LagoAPI + class OutstandingInvoiceObject + # Identifies the month to analyze revenue. + attr_accessor :month + + # The payment status of the invoices. + attr_accessor :payment_status + + # Contains invoices count. + attr_accessor :invoices_count + + # The total amount of revenue for a period, expressed in cents. + attr_accessor :amount_cents + + attr_accessor :currency + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'month' => :'month', + :'payment_status' => :'payment_status', + :'invoices_count' => :'invoices_count', + :'amount_cents' => :'amount_cents', + :'currency' => :'currency' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'month' => :'String', + :'payment_status' => :'String', + :'invoices_count' => :'Integer', + :'amount_cents' => :'Integer', + :'currency' => :'Currency' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `LagoAPI::OutstandingInvoiceObject` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `LagoAPI::OutstandingInvoiceObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'month') + self.month = attributes[:'month'] + else + self.month = nil + end + + if attributes.key?(:'payment_status') + self.payment_status = attributes[:'payment_status'] + end + + if attributes.key?(:'invoices_count') + self.invoices_count = attributes[:'invoices_count'] + else + self.invoices_count = nil + end + + if attributes.key?(:'amount_cents') + self.amount_cents = attributes[:'amount_cents'] + else + self.amount_cents = nil + end + + if attributes.key?(:'currency') + self.currency = attributes[:'currency'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @month.nil? + invalid_properties.push('invalid value for "month", month cannot be nil.') + end + + if @invoices_count.nil? + invalid_properties.push('invalid value for "invoices_count", invoices_count cannot be nil.') + end + + if @amount_cents.nil? + invalid_properties.push('invalid value for "amount_cents", amount_cents cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @month.nil? + payment_status_validator = EnumAttributeValidator.new('String', ["pending", "succeeded", "failed"]) + return false unless payment_status_validator.valid?(@payment_status) + return false if @invoices_count.nil? + return false if @amount_cents.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] payment_status Object to be assigned + def payment_status=(payment_status) + validator = EnumAttributeValidator.new('String', ["pending", "succeeded", "failed"]) + unless validator.valid?(payment_status) + fail ArgumentError, "invalid value for \"payment_status\", must be one of #{validator.allowable_values}." + end + @payment_status = payment_status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + month == o.month && + payment_status == o.payment_status && + invoices_count == o.invoices_count && + amount_cents == o.amount_cents && + currency == o.currency + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [month, payment_status, invoices_count, amount_cents, currency].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = LagoAPI.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/lago_ruby/models/outstanding_invoices.rb b/lib/lago_ruby/models/outstanding_invoices.rb new file mode 100644 index 0000000..989c061 --- /dev/null +++ b/lib/lago_ruby/models/outstanding_invoices.rb @@ -0,0 +1,223 @@ +=begin +#Lago API documentation + +#Lago API allows your application to push customer information and metrics (events) from your application to the billing application. + +The version of the OpenAPI document: 0.51.0-beta +Contact: tech@getlago.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module LagoAPI + class OutstandingInvoices + attr_accessor :outstanding_invoices + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'outstanding_invoices' => :'outstanding_invoices' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'outstanding_invoices' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `LagoAPI::OutstandingInvoices` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `LagoAPI::OutstandingInvoices`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'outstanding_invoices') + if (value = attributes[:'outstanding_invoices']).is_a?(Array) + self.outstanding_invoices = value + end + else + self.outstanding_invoices = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @outstanding_invoices.nil? + invalid_properties.push('invalid value for "outstanding_invoices", outstanding_invoices cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @outstanding_invoices.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + outstanding_invoices == o.outstanding_invoices + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [outstanding_invoices].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = LagoAPI.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/lago_ruby/models/pagination_meta.rb b/lib/lago_ruby/models/pagination_meta.rb index 7f95aac..cf9297c 100644 --- a/lib/lago_ruby/models/pagination_meta.rb +++ b/lib/lago_ruby/models/pagination_meta.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/plan.rb b/lib/lago_ruby/models/plan.rb index b4e7174..959bd57 100644 --- a/lib/lago_ruby/models/plan.rb +++ b/lib/lago_ruby/models/plan.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/plan_create_input.rb b/lib/lago_ruby/models/plan_create_input.rb index cfe054d..100630d 100644 --- a/lib/lago_ruby/models/plan_create_input.rb +++ b/lib/lago_ruby/models/plan_create_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/plan_create_input_plan.rb b/lib/lago_ruby/models/plan_create_input_plan.rb index ac87096..066a833 100644 --- a/lib/lago_ruby/models/plan_create_input_plan.rb +++ b/lib/lago_ruby/models/plan_create_input_plan.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/plan_create_input_plan_charges_inner.rb b/lib/lago_ruby/models/plan_create_input_plan_charges_inner.rb index 7278014..fe773dc 100644 --- a/lib/lago_ruby/models/plan_create_input_plan_charges_inner.rb +++ b/lib/lago_ruby/models/plan_create_input_plan_charges_inner.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/plan_create_input_plan_charges_inner_group_properties_inner.rb b/lib/lago_ruby/models/plan_create_input_plan_charges_inner_group_properties_inner.rb index ae995f6..edf1c7f 100644 --- a/lib/lago_ruby/models/plan_create_input_plan_charges_inner_group_properties_inner.rb +++ b/lib/lago_ruby/models/plan_create_input_plan_charges_inner_group_properties_inner.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/plan_object.rb b/lib/lago_ruby/models/plan_object.rb index 42ac85d..682f8ef 100644 --- a/lib/lago_ruby/models/plan_object.rb +++ b/lib/lago_ruby/models/plan_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/plan_overrides_object.rb b/lib/lago_ruby/models/plan_overrides_object.rb index 8fd9ee6..55bfb2c 100644 --- a/lib/lago_ruby/models/plan_overrides_object.rb +++ b/lib/lago_ruby/models/plan_overrides_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/plan_overrides_object_charges_inner.rb b/lib/lago_ruby/models/plan_overrides_object_charges_inner.rb index 1dee9f2..28a97f7 100644 --- a/lib/lago_ruby/models/plan_overrides_object_charges_inner.rb +++ b/lib/lago_ruby/models/plan_overrides_object_charges_inner.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end @@ -18,6 +18,9 @@ class PlanOverridesObjectChargesInner # Unique identifier of the charge created by Lago. attr_accessor :id + # Unique identifier of the billable metric created by Lago. + attr_accessor :billable_metric_id + # 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. attr_accessor :invoice_display_name @@ -36,6 +39,7 @@ class PlanOverridesObjectChargesInner def self.attribute_map { :'id' => :'id', + :'billable_metric_id' => :'billable_metric_id', :'invoice_display_name' => :'invoice_display_name', :'min_amount_cents' => :'min_amount_cents', :'properties' => :'properties', @@ -53,6 +57,7 @@ def self.acceptable_attributes def self.openapi_types { :'id' => :'String', + :'billable_metric_id' => :'String', :'invoice_display_name' => :'String', :'min_amount_cents' => :'Integer', :'properties' => :'ChargeObjectProperties', @@ -86,6 +91,10 @@ def initialize(attributes = {}) self.id = attributes[:'id'] end + if attributes.key?(:'billable_metric_id') + self.billable_metric_id = attributes[:'billable_metric_id'] + end + if attributes.key?(:'invoice_display_name') self.invoice_display_name = attributes[:'invoice_display_name'] end @@ -132,6 +141,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && + billable_metric_id == o.billable_metric_id && invoice_display_name == o.invoice_display_name && min_amount_cents == o.min_amount_cents && properties == o.properties && @@ -148,7 +158,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, invoice_display_name, min_amount_cents, properties, group_properties, tax_codes].hash + [id, billable_metric_id, invoice_display_name, min_amount_cents, properties, group_properties, tax_codes].hash end # Builds the object from hash diff --git a/lib/lago_ruby/models/plan_update_input.rb b/lib/lago_ruby/models/plan_update_input.rb index ee08eaf..505af4e 100644 --- a/lib/lago_ruby/models/plan_update_input.rb +++ b/lib/lago_ruby/models/plan_update_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/plan_update_input_plan.rb b/lib/lago_ruby/models/plan_update_input_plan.rb index 2abc3e7..d8e5950 100644 --- a/lib/lago_ruby/models/plan_update_input_plan.rb +++ b/lib/lago_ruby/models/plan_update_input_plan.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/plan_update_input_plan_charges_inner.rb b/lib/lago_ruby/models/plan_update_input_plan_charges_inner.rb index 85c871f..b958461 100644 --- a/lib/lago_ruby/models/plan_update_input_plan_charges_inner.rb +++ b/lib/lago_ruby/models/plan_update_input_plan_charges_inner.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/plans_paginated.rb b/lib/lago_ruby/models/plans_paginated.rb index ee29db6..de9b314 100644 --- a/lib/lago_ruby/models/plans_paginated.rb +++ b/lib/lago_ruby/models/plans_paginated.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/subscription.rb b/lib/lago_ruby/models/subscription.rb index d62ab2c..249fe9b 100644 --- a/lib/lago_ruby/models/subscription.rb +++ b/lib/lago_ruby/models/subscription.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/subscription_create_input.rb b/lib/lago_ruby/models/subscription_create_input.rb index 85a64c7..83f1727 100644 --- a/lib/lago_ruby/models/subscription_create_input.rb +++ b/lib/lago_ruby/models/subscription_create_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/subscription_create_input_subscription.rb b/lib/lago_ruby/models/subscription_create_input_subscription.rb index d7f4638..e7b81c8 100644 --- a/lib/lago_ruby/models/subscription_create_input_subscription.rb +++ b/lib/lago_ruby/models/subscription_create_input_subscription.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/subscription_object.rb b/lib/lago_ruby/models/subscription_object.rb index 0fab565..f9bbb9e 100644 --- a/lib/lago_ruby/models/subscription_object.rb +++ b/lib/lago_ruby/models/subscription_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/subscription_object_extended.rb b/lib/lago_ruby/models/subscription_object_extended.rb index 637b146..020c713 100644 --- a/lib/lago_ruby/models/subscription_object_extended.rb +++ b/lib/lago_ruby/models/subscription_object_extended.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/subscription_update_input.rb b/lib/lago_ruby/models/subscription_update_input.rb index 9d38c4a..c854352 100644 --- a/lib/lago_ruby/models/subscription_update_input.rb +++ b/lib/lago_ruby/models/subscription_update_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/subscription_update_input_subscription.rb b/lib/lago_ruby/models/subscription_update_input_subscription.rb index 5329bab..4a2d7aa 100644 --- a/lib/lago_ruby/models/subscription_update_input_subscription.rb +++ b/lib/lago_ruby/models/subscription_update_input_subscription.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/subscriptions_paginated.rb b/lib/lago_ruby/models/subscriptions_paginated.rb index 3eda06a..dacecef 100644 --- a/lib/lago_ruby/models/subscriptions_paginated.rb +++ b/lib/lago_ruby/models/subscriptions_paginated.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/tax.rb b/lib/lago_ruby/models/tax.rb index de79d2c..7584d79 100644 --- a/lib/lago_ruby/models/tax.rb +++ b/lib/lago_ruby/models/tax.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/tax_base_input.rb b/lib/lago_ruby/models/tax_base_input.rb index ab697e4..8b1d3b1 100644 --- a/lib/lago_ruby/models/tax_base_input.rb +++ b/lib/lago_ruby/models/tax_base_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/tax_create_input.rb b/lib/lago_ruby/models/tax_create_input.rb index 8602cff..d52b092 100644 --- a/lib/lago_ruby/models/tax_create_input.rb +++ b/lib/lago_ruby/models/tax_create_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/tax_create_input_tax.rb b/lib/lago_ruby/models/tax_create_input_tax.rb index 06a35ca..77dea04 100644 --- a/lib/lago_ruby/models/tax_create_input_tax.rb +++ b/lib/lago_ruby/models/tax_create_input_tax.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/tax_object.rb b/lib/lago_ruby/models/tax_object.rb index bc1e46b..c418342 100644 --- a/lib/lago_ruby/models/tax_object.rb +++ b/lib/lago_ruby/models/tax_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/tax_update_input.rb b/lib/lago_ruby/models/tax_update_input.rb index 3fdc054..fe3a75b 100644 --- a/lib/lago_ruby/models/tax_update_input.rb +++ b/lib/lago_ruby/models/tax_update_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/taxes_paginated.rb b/lib/lago_ruby/models/taxes_paginated.rb index f64ae45..0647ae3 100644 --- a/lib/lago_ruby/models/taxes_paginated.rb +++ b/lib/lago_ruby/models/taxes_paginated.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/timezone.rb b/lib/lago_ruby/models/timezone.rb index 264fb05..a5d6aa6 100644 --- a/lib/lago_ruby/models/timezone.rb +++ b/lib/lago_ruby/models/timezone.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/wallet.rb b/lib/lago_ruby/models/wallet.rb index 595acc1..25c153a 100644 --- a/lib/lago_ruby/models/wallet.rb +++ b/lib/lago_ruby/models/wallet.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/wallet_create_input.rb b/lib/lago_ruby/models/wallet_create_input.rb index a5407f7..53e931e 100644 --- a/lib/lago_ruby/models/wallet_create_input.rb +++ b/lib/lago_ruby/models/wallet_create_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/wallet_create_input_wallet.rb b/lib/lago_ruby/models/wallet_create_input_wallet.rb index cbca22c..7eda263 100644 --- a/lib/lago_ruby/models/wallet_create_input_wallet.rb +++ b/lib/lago_ruby/models/wallet_create_input_wallet.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/wallet_object.rb b/lib/lago_ruby/models/wallet_object.rb index 7ea9d86..3cafe90 100644 --- a/lib/lago_ruby/models/wallet_object.rb +++ b/lib/lago_ruby/models/wallet_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/wallet_transaction_create_input.rb b/lib/lago_ruby/models/wallet_transaction_create_input.rb index fb9b766..1db20cd 100644 --- a/lib/lago_ruby/models/wallet_transaction_create_input.rb +++ b/lib/lago_ruby/models/wallet_transaction_create_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/wallet_transaction_create_input_wallet_transaction.rb b/lib/lago_ruby/models/wallet_transaction_create_input_wallet_transaction.rb index 2a24835..5156871 100644 --- a/lib/lago_ruby/models/wallet_transaction_create_input_wallet_transaction.rb +++ b/lib/lago_ruby/models/wallet_transaction_create_input_wallet_transaction.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/wallet_transaction_object.rb b/lib/lago_ruby/models/wallet_transaction_object.rb index 5d68aa5..b206342 100644 --- a/lib/lago_ruby/models/wallet_transaction_object.rb +++ b/lib/lago_ruby/models/wallet_transaction_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/wallet_transactions.rb b/lib/lago_ruby/models/wallet_transactions.rb index 67f7b09..2861a4f 100644 --- a/lib/lago_ruby/models/wallet_transactions.rb +++ b/lib/lago_ruby/models/wallet_transactions.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/wallet_transactions_paginated.rb b/lib/lago_ruby/models/wallet_transactions_paginated.rb index 83cd035..bf28e1f 100644 --- a/lib/lago_ruby/models/wallet_transactions_paginated.rb +++ b/lib/lago_ruby/models/wallet_transactions_paginated.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/wallet_update_input.rb b/lib/lago_ruby/models/wallet_update_input.rb index 3a926ca..166ca4d 100644 --- a/lib/lago_ruby/models/wallet_update_input.rb +++ b/lib/lago_ruby/models/wallet_update_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/wallet_update_input_wallet.rb b/lib/lago_ruby/models/wallet_update_input_wallet.rb index df54eb3..c87266d 100644 --- a/lib/lago_ruby/models/wallet_update_input_wallet.rb +++ b/lib/lago_ruby/models/wallet_update_input_wallet.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/wallets_paginated.rb b/lib/lago_ruby/models/wallets_paginated.rb index f8b5dfb..cc878e6 100644 --- a/lib/lago_ruby/models/wallets_paginated.rb +++ b/lib/lago_ruby/models/wallets_paginated.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/webhook_endpoint.rb b/lib/lago_ruby/models/webhook_endpoint.rb index 45f1be4..dcc3c96 100644 --- a/lib/lago_ruby/models/webhook_endpoint.rb +++ b/lib/lago_ruby/models/webhook_endpoint.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/webhook_endpoint_create_input.rb b/lib/lago_ruby/models/webhook_endpoint_create_input.rb index 9371c6a..68d7a84 100644 --- a/lib/lago_ruby/models/webhook_endpoint_create_input.rb +++ b/lib/lago_ruby/models/webhook_endpoint_create_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/webhook_endpoint_create_input_webhook_endpoint.rb b/lib/lago_ruby/models/webhook_endpoint_create_input_webhook_endpoint.rb index 505a92d..67a7df8 100644 --- a/lib/lago_ruby/models/webhook_endpoint_create_input_webhook_endpoint.rb +++ b/lib/lago_ruby/models/webhook_endpoint_create_input_webhook_endpoint.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/webhook_endpoint_object.rb b/lib/lago_ruby/models/webhook_endpoint_object.rb index 47828e1..8adff81 100644 --- a/lib/lago_ruby/models/webhook_endpoint_object.rb +++ b/lib/lago_ruby/models/webhook_endpoint_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/webhook_endpoint_update_input.rb b/lib/lago_ruby/models/webhook_endpoint_update_input.rb index c0f7987..fee37be 100644 --- a/lib/lago_ruby/models/webhook_endpoint_update_input.rb +++ b/lib/lago_ruby/models/webhook_endpoint_update_input.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/models/webhook_endpoints_paginated.rb b/lib/lago_ruby/models/webhook_endpoints_paginated.rb index 2681c0f..87c02ac 100644 --- a/lib/lago_ruby/models/webhook_endpoints_paginated.rb +++ b/lib/lago_ruby/models/webhook_endpoints_paginated.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/lib/lago_ruby/version.rb b/lib/lago_ruby/version.rb index 327f4c6..e4e994b 100644 --- a/lib/lago_ruby/version.rb +++ b/lib/lago_ruby/version.rb @@ -6,10 +6,10 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end module LagoAPI - VERSION = '0.51.0-beta' + VERSION = '0.52.0-beta' end diff --git a/spec/api/analytics_api_spec.rb b/spec/api/analytics_api_spec.rb new file mode 100644 index 0000000..59cbefb --- /dev/null +++ b/spec/api/analytics_api_spec.rb @@ -0,0 +1,85 @@ +=begin +#Lago API documentation + +#Lago API allows your application to push customer information and metrics (events) from your application to the billing application. + +The version of the OpenAPI document: 0.51.0-beta +Contact: tech@getlago.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for LagoAPI::AnalyticsApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'AnalyticsApi' do + before do + # run before each test + @api_instance = LagoAPI::AnalyticsApi.new + end + + after do + # run after each test + end + + describe 'test an instance of AnalyticsApi' do + it 'should create an instance of AnalyticsApi' do + expect(@api_instance).to be_instance_of(LagoAPI::AnalyticsApi) + end + end + + # unit tests for find_all_gross_revenues + # List gross revenue + # 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. + # @param [Hash] opts the optional parameters + # @option opts [Currency] :currency Currency of revenue analytics. Format must be ISO 4217. + # @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. + # @return [GrossRevenues] + describe 'find_all_gross_revenues test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for find_all_invoiced_usages + # List usage revenue + # 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. + # @param [Hash] opts the optional parameters + # @option opts [Currency] :currency The currency of invoiced usage analytics. Format must be ISO 4217. + # @return [InvoicedUsages] + describe 'find_all_invoiced_usages test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for find_all_mrrs + # List MRR + # This endpoint is used to list MRR. + # @param [Hash] opts the optional parameters + # @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. + # @option opts [Integer] :months Show data only for given number of months. + # @return [Mrrs] + describe 'find_all_mrrs test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for find_all_outstanding_invoices + # List outstanding invoices + # 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`. + # @param [Hash] opts the optional parameters + # @option opts [Currency] :currency The currency of revenue analytics. Format must be ISO 4217. + # @return [OutstandingInvoices] + describe 'find_all_outstanding_invoices test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/api_client_spec.rb b/spec/api_client_spec.rb index c891000..2e5f223 100644 --- a/spec/api_client_spec.rb +++ b/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/spec/configuration_spec.rb b/spec/configuration_spec.rb index 59de36c..e71ead2 100644 --- a/spec/configuration_spec.rb +++ b/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end diff --git a/spec/models/generate_customer_checkout_url200_response_spec.rb b/spec/models/generate_customer_checkout_url200_response_spec.rb new file mode 100644 index 0000000..5734463 --- /dev/null +++ b/spec/models/generate_customer_checkout_url200_response_spec.rb @@ -0,0 +1,54 @@ +=begin +#Lago API documentation + +#Lago API allows your application to push customer information and metrics (events) from your application to the billing application. + +The version of the OpenAPI document: 0.51.0-beta +Contact: tech@getlago.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for LagoAPI::GenerateCustomerCheckoutURL200Response +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe LagoAPI::GenerateCustomerCheckoutURL200Response do + let(:instance) { LagoAPI::GenerateCustomerCheckoutURL200Response.new } + + describe 'test an instance of GenerateCustomerCheckoutURL200Response' do + it 'should create an instance of GenerateCustomerCheckoutURL200Response' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(LagoAPI::GenerateCustomerCheckoutURL200Response) + end + end + + describe 'test attribute "lago_customer_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "external_customer_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "payment_provider"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "checkout_url"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/gross_revenue_object_spec.rb b/spec/models/gross_revenue_object_spec.rb new file mode 100644 index 0000000..7f5b419 --- /dev/null +++ b/spec/models/gross_revenue_object_spec.rb @@ -0,0 +1,48 @@ +=begin +#Lago API documentation + +#Lago API allows your application to push customer information and metrics (events) from your application to the billing application. + +The version of the OpenAPI document: 0.51.0-beta +Contact: tech@getlago.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for LagoAPI::GrossRevenueObject +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe LagoAPI::GrossRevenueObject do + let(:instance) { LagoAPI::GrossRevenueObject.new } + + describe 'test an instance of GrossRevenueObject' do + it 'should create an instance of GrossRevenueObject' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(LagoAPI::GrossRevenueObject) + end + end + + describe 'test attribute "month"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "amount_cents"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "currency"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/gross_revenues_spec.rb b/spec/models/gross_revenues_spec.rb new file mode 100644 index 0000000..f85da6e --- /dev/null +++ b/spec/models/gross_revenues_spec.rb @@ -0,0 +1,36 @@ +=begin +#Lago API documentation + +#Lago API allows your application to push customer information and metrics (events) from your application to the billing application. + +The version of the OpenAPI document: 0.51.0-beta +Contact: tech@getlago.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for LagoAPI::GrossRevenues +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe LagoAPI::GrossRevenues do + let(:instance) { LagoAPI::GrossRevenues.new } + + describe 'test an instance of GrossRevenues' do + it 'should create an instance of GrossRevenues' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(LagoAPI::GrossRevenues) + end + end + + describe 'test attribute "gross_revenues"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/invoiced_usage_object_spec.rb b/spec/models/invoiced_usage_object_spec.rb new file mode 100644 index 0000000..33b1751 --- /dev/null +++ b/spec/models/invoiced_usage_object_spec.rb @@ -0,0 +1,54 @@ +=begin +#Lago API documentation + +#Lago API allows your application to push customer information and metrics (events) from your application to the billing application. + +The version of the OpenAPI document: 0.51.0-beta +Contact: tech@getlago.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for LagoAPI::InvoicedUsageObject +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe LagoAPI::InvoicedUsageObject do + let(:instance) { LagoAPI::InvoicedUsageObject.new } + + describe 'test an instance of InvoicedUsageObject' do + it 'should create an instance of InvoicedUsageObject' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(LagoAPI::InvoicedUsageObject) + end + end + + describe 'test attribute "month"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "amount_cents"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "currency"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/invoiced_usages_spec.rb b/spec/models/invoiced_usages_spec.rb new file mode 100644 index 0000000..79fe71c --- /dev/null +++ b/spec/models/invoiced_usages_spec.rb @@ -0,0 +1,36 @@ +=begin +#Lago API documentation + +#Lago API allows your application to push customer information and metrics (events) from your application to the billing application. + +The version of the OpenAPI document: 0.51.0-beta +Contact: tech@getlago.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for LagoAPI::InvoicedUsages +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe LagoAPI::InvoicedUsages do + let(:instance) { LagoAPI::InvoicedUsages.new } + + describe 'test an instance of InvoicedUsages' do + it 'should create an instance of InvoicedUsages' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(LagoAPI::InvoicedUsages) + end + end + + describe 'test attribute "invoiced_usages"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/mrr_object_spec.rb b/spec/models/mrr_object_spec.rb new file mode 100644 index 0000000..814befa --- /dev/null +++ b/spec/models/mrr_object_spec.rb @@ -0,0 +1,48 @@ +=begin +#Lago API documentation + +#Lago API allows your application to push customer information and metrics (events) from your application to the billing application. + +The version of the OpenAPI document: 0.51.0-beta +Contact: tech@getlago.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for LagoAPI::MrrObject +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe LagoAPI::MrrObject do + let(:instance) { LagoAPI::MrrObject.new } + + describe 'test an instance of MrrObject' do + it 'should create an instance of MrrObject' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(LagoAPI::MrrObject) + end + end + + describe 'test attribute "month"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "amount_cents"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "currency"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/mrrs_spec.rb b/spec/models/mrrs_spec.rb new file mode 100644 index 0000000..dd302d6 --- /dev/null +++ b/spec/models/mrrs_spec.rb @@ -0,0 +1,36 @@ +=begin +#Lago API documentation + +#Lago API allows your application to push customer information and metrics (events) from your application to the billing application. + +The version of the OpenAPI document: 0.51.0-beta +Contact: tech@getlago.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for LagoAPI::Mrrs +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe LagoAPI::Mrrs do + let(:instance) { LagoAPI::Mrrs.new } + + describe 'test an instance of Mrrs' do + it 'should create an instance of Mrrs' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(LagoAPI::Mrrs) + end + end + + describe 'test attribute "mrrs"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/outstanding_invoice_object_spec.rb b/spec/models/outstanding_invoice_object_spec.rb new file mode 100644 index 0000000..f9159bb --- /dev/null +++ b/spec/models/outstanding_invoice_object_spec.rb @@ -0,0 +1,64 @@ +=begin +#Lago API documentation + +#Lago API allows your application to push customer information and metrics (events) from your application to the billing application. + +The version of the OpenAPI document: 0.51.0-beta +Contact: tech@getlago.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for LagoAPI::OutstandingInvoiceObject +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe LagoAPI::OutstandingInvoiceObject do + let(:instance) { LagoAPI::OutstandingInvoiceObject.new } + + describe 'test an instance of OutstandingInvoiceObject' do + it 'should create an instance of OutstandingInvoiceObject' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(LagoAPI::OutstandingInvoiceObject) + end + end + + describe 'test attribute "month"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "payment_status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["pending", "succeeded", "failed"]) + # validator.allowable_values.each do |value| + # expect { instance.payment_status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "invoices_count"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "amount_cents"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "currency"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/outstanding_invoices_spec.rb b/spec/models/outstanding_invoices_spec.rb new file mode 100644 index 0000000..83ef320 --- /dev/null +++ b/spec/models/outstanding_invoices_spec.rb @@ -0,0 +1,36 @@ +=begin +#Lago API documentation + +#Lago API allows your application to push customer information and metrics (events) from your application to the billing application. + +The version of the OpenAPI document: 0.51.0-beta +Contact: tech@getlago.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 7.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for LagoAPI::OutstandingInvoices +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe LagoAPI::OutstandingInvoices do + let(:instance) { LagoAPI::OutstandingInvoices.new } + + describe 'test an instance of OutstandingInvoices' do + it 'should create an instance of OutstandingInvoices' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(LagoAPI::OutstandingInvoices) + end + end + + describe 'test attribute "outstanding_invoices"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index fc224b1..b2539ec 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 0.51.0-beta Contact: tech@getlago.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.1.0-SNAPSHOT +OpenAPI Generator version: 7.2.0-SNAPSHOT =end